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
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 util::Status's ResourceInfo.
resource_name in the format of projects/project
/serviceAccounts/email
. 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/
serviceAccounts/
account`. Using
-as a wildcard for the project will 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
Used to perform a consistent read-modify-write.
-
#name ⇒ String
The resource name of the service account in the following format:
projects/
project/serviceAccounts/
account``. -
#oauth2_client_id ⇒ String
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.
108 109 110 |
# File 'generated/google/apis/iam_v1/classes.rb', line 108 def initialize(**args) update!(**args) end |
Instance Attribute Details
#display_name ⇒ String
Optional. A user-specified description of the service account. Must be fewer
than 100 UTF-8 bytes.
Corresponds to the JSON property displayName
94 95 96 |
# File 'generated/google/apis/iam_v1/classes.rb', line 94 def display_name @display_name end |
#email ⇒ String
Corresponds to the JSON property email
88 89 90 |
# File 'generated/google/apis/iam_v1/classes.rb', line 88 def email @email end |
#etag ⇒ String
Used to perform a consistent read-modify-write.
Corresponds to the JSON property etag
99 100 101 |
# File 'generated/google/apis/iam_v1/classes.rb', line 99 def etag @etag end |
#name ⇒ String
The resource name of the service account in the following format: projects/
project/serviceAccounts/
account. Requests using `-` as a wildcard for the
project 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`/
serviceAccounts/`email
.
Corresponds to the JSON property name
73 74 75 |
# File 'generated/google/apis/iam_v1/classes.rb', line 73 def name @name end |
#oauth2_client_id ⇒ String
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
106 107 108 |
# File 'generated/google/apis/iam_v1/classes.rb', line 106 def oauth2_client_id @oauth2_client_id end |
#project_id ⇒ String
Corresponds to the JSON property projectId
78 79 80 |
# File 'generated/google/apis/iam_v1/classes.rb', line 78 def project_id @project_id end |
#unique_id ⇒ String
Corresponds to the JSON property uniqueId
83 84 85 |
# File 'generated/google/apis/iam_v1/classes.rb', line 83 def unique_id @unique_id end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
113 114 115 116 117 118 119 120 121 |
# File 'generated/google/apis/iam_v1/classes.rb', line 113 def update!(**args) @name = args[:name] if args.key?(:name) @project_id = args[:project_id] if args.key?(:project_id) @unique_id = args[:unique_id] if args.key?(:unique_id) @email = args[:email] if args.key?(:email) @display_name = args[:display_name] if args.key?(:display_name) @etag = args[:etag] if args.key?(:etag) @oauth2_client_id = args[:oauth2_client_id] if args.key?(:oauth2_client_id) end |