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
- Object
- Resources::Resource
- Aws::IAM::PolicyVersion
- Defined in:
- (unknown)
Instance Attribute Summary collapse
-
#arn ⇒ String
readonly
-
#create_date ⇒ Time
readonly
The date and time, in [ISO 8601 date-time format][1], when the policy version was created.
-
#document ⇒ String
readonly
The policy document.
-
#is_default_version ⇒ Boolean
readonly
Specifies whether the policy version is set as the policy\'s default version.
-
#version_id ⇒ String
readonly
Attributes inherited from Resources::Resource
Instance Method Summary collapse
-
#delete ⇒ Struct
Deletes the specified version from the specified managed policy.
You cannot delete the default version from a policy using this API.
-
#initialize ⇒ Object
constructor
-
#set_as_default ⇒ Struct
Sets the specified version of the specified policy as the policy's default (operative) version.
This operation affects all users, groups, and roles that the policy is attached to.
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
Instance Attribute Details
#arn ⇒ String (readonly)
#create_date ⇒ Time (readonly)
The date and time, in ISO 8601 date-time format, when the policy version was created.
#document ⇒ String (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.
The policy document returned in this structure is URL-encoded compliant
with RFC 3986. You can use a URL decoding method to convert the
policy back to plain JSON text. For example, if you use Java, you can
use the decode
method of the java.net.URLDecoder
utility class in
the Java SDK. Other languages and SDKs provide similar functionality.
#is_default_version ⇒ Boolean (readonly)
Specifies whether the policy version is set as the policy\'s default version.
#version_id ⇒ String (readonly)
Instance Method Details
#delete ⇒ Struct
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.
#set_as_default ⇒ Struct
Sets the specified version of the specified policy as the policy's default (operative) version.
This operation 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.