Class: Google::Apis::IamV1::ServiceAccount
- Inherits:
-
Object
- Object
- Google::Apis::IamV1::ServiceAccount
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/iam_v1/classes.rb,
generated/google/apis/iam_v1/representations.rb,
generated/google/apis/iam_v1/representations.rb more...
Overview
A service account in the Identity and Access Management API.
To create a service account, specify the project_id
and the account_id
for the account. The account_id
is unique within the project, and is used
to generate the service account email address and a stable
unique_id
.
If the account already exists, the account's resource name is returned
in the format of projects/PROJECT_ID
/serviceAccounts/ACCOUNT
. The caller
can use the name in other methods to access the account.
All other methods can identify the service account using the format
projects/
PROJECT_ID/serviceAccounts/
ACCOUNT`.
Using
-as a wildcard for the
PROJECT_IDwill infer the project from
the account. The
ACCOUNTvalue can be the
emailaddress or the
unique_id` of the service account.
Instance Attribute Summary collapse
-
#display_name ⇒ String
Optional.
-
#email ⇒ String
Corresponds to the JSON property
email
. -
#etag ⇒ String
Optional.
-
#name ⇒ String
The resource name of the service account in the following format:
projects/
PROJECT_ID/serviceAccounts/
ACCOUNT``. -
#oauth2_client_id ⇒ String
This is used in conjunction with the OAuth2 clientconfig API to make three legged OAuth2 (3LO) flows to access the data of Google users.
-
#project_id ⇒ String
Corresponds to the JSON property
projectId
. -
#unique_id ⇒ String
Corresponds to the JSON property
uniqueId
.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ServiceAccount
constructor
A new instance of ServiceAccount.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ ServiceAccount
Returns a new instance of ServiceAccount
1192 1193 1194 |
# File 'generated/google/apis/iam_v1/classes.rb', line 1192 def initialize(**args) update!(**args) end |
Instance Attribute Details
#display_name ⇒ String
Optional. A user-specified name for the service account.
Must be less than or equal to 100 UTF-8 bytes.
Corresponds to the JSON property displayName
1150 1151 1152 |
# File 'generated/google/apis/iam_v1/classes.rb', line 1150 def display_name @display_name end |
#email ⇒ String
Corresponds to the JSON property email
1155 1156 1157 |
# File 'generated/google/apis/iam_v1/classes.rb', line 1155 def email @email end |
#etag ⇒ String
Optional. Note: etag
is an inoperable legacy field that is only returned
for backwards compatibility.
Corresponds to the JSON property etag
NOTE: Values are automatically base64 encoded/decoded in the client library.
1162 1163 1164 |
# File 'generated/google/apis/iam_v1/classes.rb', line 1162 def etag @etag end |
#name ⇒ String
The resource name of the service account in the following format:
projects/
PROJECT_ID/serviceAccounts/
ACCOUNT.
Requests using `-` as a wildcard for the `PROJECT_ID` will infer the
project from the `account` and the `ACCOUNT` value can be the `email`
address or the `unique_id` of the service account.
In responses the resource name will always be in the format
`projects/`PROJECT_ID`/serviceAccounts/`ACCOUNT
.
Corresponds to the JSON property name
1173 1174 1175 |
# File 'generated/google/apis/iam_v1/classes.rb', line 1173 def name @name end |
#oauth2_client_id ⇒ String
This is used in conjunction with the OAuth2 clientconfig API to make
three legged OAuth2 (3LO) flows to access the data of Google users.
Corresponds to the JSON property oauth2ClientId
1180 1181 1182 |
# File 'generated/google/apis/iam_v1/classes.rb', line 1180 def oauth2_client_id @oauth2_client_id end |
#project_id ⇒ String
Corresponds to the JSON property projectId
1185 1186 1187 |
# File 'generated/google/apis/iam_v1/classes.rb', line 1185 def project_id @project_id end |
#unique_id ⇒ String
Corresponds to the JSON property uniqueId
1190 1191 1192 |
# File 'generated/google/apis/iam_v1/classes.rb', line 1190 def unique_id @unique_id end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1197 1198 1199 1200 1201 1202 1203 1204 1205 |
# File 'generated/google/apis/iam_v1/classes.rb', line 1197 def update!(**args) @display_name = args[:display_name] if args.key?(:display_name) @email = args[:email] if args.key?(:email) @etag = args[:etag] if args.key?(:etag) @name = args[:name] if args.key?(:name) @oauth2_client_id = args[:oauth2_client_id] if args.key?(:oauth2_client_id) @project_id = args[:project_id] if args.key?(:project_id) @unique_id = args[:unique_id] if args.key?(:unique_id) end |