Class: Google::Apis::IamV1::Role

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/iam_v1/classes.rb,
lib/google/apis/iam_v1/representations.rb,
lib/google/apis/iam_v1/representations.rb

Overview

A role in the Identity and Access Management API.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Role

Returns a new instance of Role.



1747
1748
1749
# File 'lib/google/apis/iam_v1/classes.rb', line 1747

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#deletedBoolean Also known as: deleted?

The current deleted state of the role. This field is read only. It will be ignored in calls to CreateRole and UpdateRole. Corresponds to the JSON property deleted

Returns:

  • (Boolean)


1705
1706
1707
# File 'lib/google/apis/iam_v1/classes.rb', line 1705

def deleted
  @deleted
end

#descriptionString

Optional. A human-readable description for the role. Corresponds to the JSON property description

Returns:

  • (String)


1711
1712
1713
# File 'lib/google/apis/iam_v1/classes.rb', line 1711

def description
  @description
end

#etagString

Used to perform a consistent read-modify-write. Corresponds to the JSON property etag NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


1717
1718
1719
# File 'lib/google/apis/iam_v1/classes.rb', line 1717

def etag
  @etag
end

#included_permissionsArray<String>

The names of the permissions this role grants when bound in an IAM policy. Corresponds to the JSON property includedPermissions

Returns:

  • (Array<String>)


1722
1723
1724
# File 'lib/google/apis/iam_v1/classes.rb', line 1722

def included_permissions
  @included_permissions
end

#nameString

The name of the role. When Role is used in CreateRole, the role name must not be set. When Role is used in output and other input such as UpdateRole, the role name is the complete path. For example, roles/logging.viewer for predefined roles, organizations/ORGANIZATION_ID/roles/my-role for organization-level custom roles, and projects/PROJECT_ID/roles/my-role for project-level custom roles. Corresponds to the JSON property name

Returns:

  • (String)


1732
1733
1734
# File 'lib/google/apis/iam_v1/classes.rb', line 1732

def name
  @name
end

#stageString

The current launch stage of the role. If the ALPHA launch stage has been selected for a role, the stage field will not be included in the returned definition for the role. Corresponds to the JSON property stage

Returns:

  • (String)


1739
1740
1741
# File 'lib/google/apis/iam_v1/classes.rb', line 1739

def stage
  @stage
end

#titleString

Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes. Corresponds to the JSON property title

Returns:

  • (String)


1745
1746
1747
# File 'lib/google/apis/iam_v1/classes.rb', line 1745

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1752
1753
1754
1755
1756
1757
1758
1759
1760
# File 'lib/google/apis/iam_v1/classes.rb', line 1752

def update!(**args)
  @deleted = args[:deleted] if args.key?(:deleted)
  @description = args[:description] if args.key?(:description)
  @etag = args[:etag] if args.key?(:etag)
  @included_permissions = args[:included_permissions] if args.key?(:included_permissions)
  @name = args[:name] if args.key?(:name)
  @stage = args[:stage] if args.key?(:stage)
  @title = args[:title] if args.key?(:title)
end