You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::IAM::PolicyVersion

Inherits:
Resources::Resource show all
Defined in:
(unknown)

Instance Attribute Summary collapse

Attributes inherited from Resources::Resource

#client, #identifiers

Instance Method Summary collapse

Methods inherited from Resources::Resource

add_data_attribute, add_identifier, #data, data_attributes, #data_loaded?, identifiers, #load, #wait_until

Methods included from Resources::OperationMethods

#add_batch_operation, #add_operation, #batch_operation, #batch_operation_names, #batch_operations, #operation, #operation_names, #operations

Constructor Details

#initialize(arn, version_id, options = {}) ⇒ Object #initialize(options = {}) ⇒ Object

Overloads:

  • #initialize(arn, version_id, options = {}) ⇒ Object

    Parameters:

    • arn (String)
    • version_id (String)

    Options Hash (options):

    • :client (Client)

      When `:client is not given, the options hash is used to construct a new Client object.

  • #initialize(options = {}) ⇒ Object

    Options Hash (options):

    • :arn (required, String)
    • :version_id (required, String)
    • :client (Client)

      When `:client is not given, the options hash is used to construct a new Client object.

Instance Attribute Details

#arnString (readonly)

Returns:

  • (String)

#create_dateTime (readonly)

The date and time, in ISO 8601 date-time format, when the policy version was created.

Returns:

  • (Time)

    The date and time, in [ISO 8601 date-time format][1], when the policy version was created.

#documentString (readonly)

The policy document.

The policy document is returned in the response to the GetPolicyVersion and GetAccountAuthorizationDetails operations. It is not returned in the response to the CreatePolicyVersion or ListPolicyVersions operations.

Returns:

  • (String)

    The policy document.

#is_default_versionBoolean (readonly)

Specifies whether the policy version is set as the policy\'s default version.

Returns:

  • (Boolean)

    Specifies whether the policy version is set as the policy\'s default version.

#version_idString (readonly)

Returns:

  • (String)

Instance Method Details

#deleteStruct

Deletes the specified version from the specified managed policy.

You cannot delete the default version from a policy using this API. To delete the default version from a policy, use DeletePolicy. To find out which version of a policy is marked as the default version, use ListPolicyVersions.

For information about versions for managed policies, see Versioning for Managed Policies in the IAM User Guide.

Examples:

Request syntax example with placeholder values


policyversion.delete()

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#set_as_defaultStruct

Sets the specified version of the specified policy as the policy's default (operative) version.

This action affects all users, groups, and roles that the policy is attached to. To list the users, groups, and roles that the policy is attached to, use the ListEntitiesForPolicy API.

For information about managed policies, see Managed Policies and Inline Policies in the IAM User Guide.

Examples:

Request syntax example with placeholder values


policyversion.set_as_default()

Returns:

  • (Struct)

    Returns an empty response.

See Also: