AWS SDK for C++  1.9.109
AWS SDK for C++
Public Member Functions | List of all members
Aws::KMS::Model::PutKeyPolicyRequest Class Reference

#include <PutKeyPolicyRequest.h>

+ Inheritance diagram for Aws::KMS::Model::PutKeyPolicyRequest:

Public Member Functions

 PutKeyPolicyRequest ()
 
virtual const char * GetServiceRequestName () const override
 
Aws::String SerializePayload () const override
 
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders () const override
 
const Aws::StringGetKeyId () const
 
bool KeyIdHasBeenSet () const
 
void SetKeyId (const Aws::String &value)
 
void SetKeyId (Aws::String &&value)
 
void SetKeyId (const char *value)
 
PutKeyPolicyRequestWithKeyId (const Aws::String &value)
 
PutKeyPolicyRequestWithKeyId (Aws::String &&value)
 
PutKeyPolicyRequestWithKeyId (const char *value)
 
const Aws::StringGetPolicyName () const
 
bool PolicyNameHasBeenSet () const
 
void SetPolicyName (const Aws::String &value)
 
void SetPolicyName (Aws::String &&value)
 
void SetPolicyName (const char *value)
 
PutKeyPolicyRequestWithPolicyName (const Aws::String &value)
 
PutKeyPolicyRequestWithPolicyName (Aws::String &&value)
 
PutKeyPolicyRequestWithPolicyName (const char *value)
 
const Aws::StringGetPolicy () const
 
bool PolicyHasBeenSet () const
 
void SetPolicy (const Aws::String &value)
 
void SetPolicy (Aws::String &&value)
 
void SetPolicy (const char *value)
 
PutKeyPolicyRequestWithPolicy (const Aws::String &value)
 
PutKeyPolicyRequestWithPolicy (Aws::String &&value)
 
PutKeyPolicyRequestWithPolicy (const char *value)
 
bool GetBypassPolicyLockoutSafetyCheck () const
 
bool BypassPolicyLockoutSafetyCheckHasBeenSet () const
 
void SetBypassPolicyLockoutSafetyCheck (bool value)
 
PutKeyPolicyRequestWithBypassPolicyLockoutSafetyCheck (bool value)
 
- Public Member Functions inherited from Aws::KMS::KMSRequest
virtual ~KMSRequest ()
 
void AddParametersToRequest (Aws::Http::HttpRequest &httpRequest) const
 
Aws::Http::HeaderValueCollection GetHeaders () const override
 
- Public Member Functions inherited from Aws::AmazonSerializableWebServiceRequest
 AmazonSerializableWebServiceRequest ()
 
virtual ~AmazonSerializableWebServiceRequest ()
 
std::shared_ptr< Aws::IOStreamGetBody () const override
 
- Public Member Functions inherited from Aws::AmazonWebServiceRequest
 AmazonWebServiceRequest ()
 
virtual ~AmazonWebServiceRequest ()=default
 
virtual void AddQueryStringParameters (Aws::Http::URI &uri) const
 
virtual void PutToPresignedUrl (Aws::Http::URI &uri) const
 
virtual bool IsStreaming () const
 
virtual bool IsEventStreamRequest () const
 
virtual bool SignBody () const
 
virtual bool IsChunked () const
 
virtual void SetRequestSignedHandler (const RequestSignedHandler &handler)
 
virtual const RequestSignedHandlerGetRequestSignedHandler () const
 
const Aws::IOStreamFactoryGetResponseStreamFactory () const
 
void SetResponseStreamFactory (const Aws::IOStreamFactory &factory)
 
virtual void SetDataReceivedEventHandler (const Aws::Http::DataReceivedEventHandler &dataReceivedEventHandler)
 
virtual void SetDataSentEventHandler (const Aws::Http::DataSentEventHandler &dataSentEventHandler)
 
virtual void SetContinueRequestHandler (const Aws::Http::ContinueRequestHandler &continueRequestHandler)
 
virtual void SetDataReceivedEventHandler (Aws::Http::DataReceivedEventHandler &&dataReceivedEventHandler)
 
virtual void SetDataSentEventHandler (Aws::Http::DataSentEventHandler &&dataSentEventHandler)
 
virtual void SetContinueRequestHandler (Aws::Http::ContinueRequestHandler &&continueRequestHandler)
 
virtual void SetRequestRetryHandler (const RequestRetryHandler &handler)
 
virtual void SetRequestRetryHandler (RequestRetryHandler &&handler)
 
virtual const Aws::Http::DataReceivedEventHandlerGetDataReceivedEventHandler () const
 
virtual const Aws::Http::DataSentEventHandlerGetDataSentEventHandler () const
 
virtual const Aws::Http::ContinueRequestHandlerGetContinueRequestHandler () const
 
virtual const RequestRetryHandlerGetRequestRetryHandler () const
 
virtual bool ShouldComputeContentMd5 () const
 

Additional Inherited Members

- Protected Member Functions inherited from Aws::AmazonWebServiceRequest
virtual void DumpBodyToUrl (Aws::Http::URI &uri) const
 

Detailed Description

Definition at line 21 of file PutKeyPolicyRequest.h.

Constructor & Destructor Documentation

◆ PutKeyPolicyRequest()

Aws::KMS::Model::PutKeyPolicyRequest::PutKeyPolicyRequest ( )

Member Function Documentation

◆ BypassPolicyLockoutSafetyCheckHasBeenSet()

bool Aws::KMS::Model::PutKeyPolicyRequest::BypassPolicyLockoutSafetyCheckHasBeenSet ( ) const
inline

A flag to indicate whether to bypass the key policy lockout safety check.

Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately.

For more information, refer to the scenario in the Default Key Policy section in the Key Management Service Developer Guide.

Use this parameter only when you intend to prevent the principal that is making the request from making a subsequent PutKeyPolicy request on the KMS key.

The default value is false.

Definition at line 384 of file PutKeyPolicyRequest.h.

◆ GetBypassPolicyLockoutSafetyCheck()

bool Aws::KMS::Model::PutKeyPolicyRequest::GetBypassPolicyLockoutSafetyCheck ( ) const
inline

A flag to indicate whether to bypass the key policy lockout safety check.

Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately.

For more information, refer to the scenario in the Default Key Policy section in the Key Management Service Developer Guide.

Use this parameter only when you intend to prevent the principal that is making the request from making a subsequent PutKeyPolicy request on the KMS key.

The default value is false.

Definition at line 371 of file PutKeyPolicyRequest.h.

◆ GetKeyId()

const Aws::String& Aws::KMS::Model::PutKeyPolicyRequest::GetKeyId ( ) const
inline

Sets the key policy on the specified KMS key.

Specify the key ID or key ARN of the KMS key.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.

Definition at line 45 of file PutKeyPolicyRequest.h.

◆ GetPolicy()

const Aws::String& Aws::KMS::Model::PutKeyPolicyRequest::GetPolicy ( ) const
inline

The key policy to attach to the KMS key.

The key policy must meet the following criteria:

  • If you don't set BypassPolicyLockoutSafetyCheck to true, the key policy must allow the principal that is making the PutKeyPolicy request to make a subsequent PutKeyPolicy request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, refer to the scenario in the Default Key Policy section of the Key Management Service Developer Guide.

  • Each statement in the key policy must contain one or more principals. The principals in the key policy must exist and be visible to KMS. When you create a new Amazon Web Services principal (for example, an IAM user or role), you might need to enforce a delay before including the new principal in a key policy because the new principal might not be immediately visible to KMS. For more information, see Changes that I make are not always immediately visible in the Amazon Web Services Identity and Access Management User Guide.

The key policy cannot exceed 32 kilobytes (32768 bytes). For more information, see Resource Quotas in the Key Management Service Developer Guide.

Definition at line 182 of file PutKeyPolicyRequest.h.

◆ GetPolicyName()

const Aws::String& Aws::KMS::Model::PutKeyPolicyRequest::GetPolicyName ( ) const
inline

The name of the key policy. The only valid value is default.

Definition at line 121 of file PutKeyPolicyRequest.h.

◆ GetRequestSpecificHeaders()

Aws::Http::HeaderValueCollection Aws::KMS::Model::PutKeyPolicyRequest::GetRequestSpecificHeaders ( ) const
overridevirtual

Reimplemented from Aws::KMS::KMSRequest.

◆ GetServiceRequestName()

virtual const char* Aws::KMS::Model::PutKeyPolicyRequest::GetServiceRequestName ( ) const
inlineoverridevirtual

Implements Aws::AmazonWebServiceRequest.

Definition at line 30 of file PutKeyPolicyRequest.h.

◆ KeyIdHasBeenSet()

bool Aws::KMS::Model::PutKeyPolicyRequest::KeyIdHasBeenSet ( ) const
inline

Sets the key policy on the specified KMS key.

Specify the key ID or key ARN of the KMS key.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.

Definition at line 55 of file PutKeyPolicyRequest.h.

◆ PolicyHasBeenSet()

bool Aws::KMS::Model::PutKeyPolicyRequest::PolicyHasBeenSet ( ) const
inline

The key policy to attach to the KMS key.

The key policy must meet the following criteria:

  • If you don't set BypassPolicyLockoutSafetyCheck to true, the key policy must allow the principal that is making the PutKeyPolicy request to make a subsequent PutKeyPolicy request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, refer to the scenario in the Default Key Policy section of the Key Management Service Developer Guide.

  • Each statement in the key policy must contain one or more principals. The principals in the key policy must exist and be visible to KMS. When you create a new Amazon Web Services principal (for example, an IAM user or role), you might need to enforce a delay before including the new principal in a key policy because the new principal might not be immediately visible to KMS. For more information, see Changes that I make are not always immediately visible in the Amazon Web Services Identity and Access Management User Guide.

The key policy cannot exceed 32 kilobytes (32768 bytes). For more information, see Resource Quotas in the Key Management Service Developer Guide.

Definition at line 207 of file PutKeyPolicyRequest.h.

◆ PolicyNameHasBeenSet()

bool Aws::KMS::Model::PutKeyPolicyRequest::PolicyNameHasBeenSet ( ) const
inline

The name of the key policy. The only valid value is default.

Definition at line 126 of file PutKeyPolicyRequest.h.

◆ SerializePayload()

Aws::String Aws::KMS::Model::PutKeyPolicyRequest::SerializePayload ( ) const
overridevirtual

Convert payload into String.

Implements Aws::AmazonSerializableWebServiceRequest.

◆ SetBypassPolicyLockoutSafetyCheck()

void Aws::KMS::Model::PutKeyPolicyRequest::SetBypassPolicyLockoutSafetyCheck ( bool  value)
inline

A flag to indicate whether to bypass the key policy lockout safety check.

Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately.

For more information, refer to the scenario in the Default Key Policy section in the Key Management Service Developer Guide.

Use this parameter only when you intend to prevent the principal that is making the request from making a subsequent PutKeyPolicy request on the KMS key.

The default value is false.

Definition at line 397 of file PutKeyPolicyRequest.h.

◆ SetKeyId() [1/3]

void Aws::KMS::Model::PutKeyPolicyRequest::SetKeyId ( Aws::String &&  value)
inline

Sets the key policy on the specified KMS key.

Specify the key ID or key ARN of the KMS key.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.

Definition at line 75 of file PutKeyPolicyRequest.h.

◆ SetKeyId() [2/3]

void Aws::KMS::Model::PutKeyPolicyRequest::SetKeyId ( const Aws::String value)
inline

Sets the key policy on the specified KMS key.

Specify the key ID or key ARN of the KMS key.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.

Definition at line 65 of file PutKeyPolicyRequest.h.

◆ SetKeyId() [3/3]

void Aws::KMS::Model::PutKeyPolicyRequest::SetKeyId ( const char *  value)
inline

Sets the key policy on the specified KMS key.

Specify the key ID or key ARN of the KMS key.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.

Definition at line 85 of file PutKeyPolicyRequest.h.

◆ SetPolicy() [1/3]

void Aws::KMS::Model::PutKeyPolicyRequest::SetPolicy ( Aws::String &&  value)
inline

The key policy to attach to the KMS key.

The key policy must meet the following criteria:

  • If you don't set BypassPolicyLockoutSafetyCheck to true, the key policy must allow the principal that is making the PutKeyPolicy request to make a subsequent PutKeyPolicy request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, refer to the scenario in the Default Key Policy section of the Key Management Service Developer Guide.

  • Each statement in the key policy must contain one or more principals. The principals in the key policy must exist and be visible to KMS. When you create a new Amazon Web Services principal (for example, an IAM user or role), you might need to enforce a delay before including the new principal in a key policy because the new principal might not be immediately visible to KMS. For more information, see Changes that I make are not always immediately visible in the Amazon Web Services Identity and Access Management User Guide.

The key policy cannot exceed 32 kilobytes (32768 bytes). For more information, see Resource Quotas in the Key Management Service Developer Guide.

Definition at line 257 of file PutKeyPolicyRequest.h.

◆ SetPolicy() [2/3]

void Aws::KMS::Model::PutKeyPolicyRequest::SetPolicy ( const Aws::String value)
inline

The key policy to attach to the KMS key.

The key policy must meet the following criteria:

  • If you don't set BypassPolicyLockoutSafetyCheck to true, the key policy must allow the principal that is making the PutKeyPolicy request to make a subsequent PutKeyPolicy request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, refer to the scenario in the Default Key Policy section of the Key Management Service Developer Guide.

  • Each statement in the key policy must contain one or more principals. The principals in the key policy must exist and be visible to KMS. When you create a new Amazon Web Services principal (for example, an IAM user or role), you might need to enforce a delay before including the new principal in a key policy because the new principal might not be immediately visible to KMS. For more information, see Changes that I make are not always immediately visible in the Amazon Web Services Identity and Access Management User Guide.

The key policy cannot exceed 32 kilobytes (32768 bytes). For more information, see Resource Quotas in the Key Management Service Developer Guide.

Definition at line 232 of file PutKeyPolicyRequest.h.

◆ SetPolicy() [3/3]

void Aws::KMS::Model::PutKeyPolicyRequest::SetPolicy ( const char *  value)
inline

The key policy to attach to the KMS key.

The key policy must meet the following criteria:

  • If you don't set BypassPolicyLockoutSafetyCheck to true, the key policy must allow the principal that is making the PutKeyPolicy request to make a subsequent PutKeyPolicy request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, refer to the scenario in the Default Key Policy section of the Key Management Service Developer Guide.

  • Each statement in the key policy must contain one or more principals. The principals in the key policy must exist and be visible to KMS. When you create a new Amazon Web Services principal (for example, an IAM user or role), you might need to enforce a delay before including the new principal in a key policy because the new principal might not be immediately visible to KMS. For more information, see Changes that I make are not always immediately visible in the Amazon Web Services Identity and Access Management User Guide.

The key policy cannot exceed 32 kilobytes (32768 bytes). For more information, see Resource Quotas in the Key Management Service Developer Guide.

Definition at line 282 of file PutKeyPolicyRequest.h.

◆ SetPolicyName() [1/3]

void Aws::KMS::Model::PutKeyPolicyRequest::SetPolicyName ( Aws::String &&  value)
inline

The name of the key policy. The only valid value is default.

Definition at line 136 of file PutKeyPolicyRequest.h.

◆ SetPolicyName() [2/3]

void Aws::KMS::Model::PutKeyPolicyRequest::SetPolicyName ( const Aws::String value)
inline

The name of the key policy. The only valid value is default.

Definition at line 131 of file PutKeyPolicyRequest.h.

◆ SetPolicyName() [3/3]

void Aws::KMS::Model::PutKeyPolicyRequest::SetPolicyName ( const char *  value)
inline

The name of the key policy. The only valid value is default.

Definition at line 141 of file PutKeyPolicyRequest.h.

◆ WithBypassPolicyLockoutSafetyCheck()

PutKeyPolicyRequest& Aws::KMS::Model::PutKeyPolicyRequest::WithBypassPolicyLockoutSafetyCheck ( bool  value)
inline

A flag to indicate whether to bypass the key policy lockout safety check.

Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately.

For more information, refer to the scenario in the Default Key Policy section in the Key Management Service Developer Guide.

Use this parameter only when you intend to prevent the principal that is making the request from making a subsequent PutKeyPolicy request on the KMS key.

The default value is false.

Definition at line 410 of file PutKeyPolicyRequest.h.

◆ WithKeyId() [1/3]

PutKeyPolicyRequest& Aws::KMS::Model::PutKeyPolicyRequest::WithKeyId ( Aws::String &&  value)
inline

Sets the key policy on the specified KMS key.

Specify the key ID or key ARN of the KMS key.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.

Definition at line 105 of file PutKeyPolicyRequest.h.

◆ WithKeyId() [2/3]

PutKeyPolicyRequest& Aws::KMS::Model::PutKeyPolicyRequest::WithKeyId ( const Aws::String value)
inline

Sets the key policy on the specified KMS key.

Specify the key ID or key ARN of the KMS key.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.

Definition at line 95 of file PutKeyPolicyRequest.h.

◆ WithKeyId() [3/3]

PutKeyPolicyRequest& Aws::KMS::Model::PutKeyPolicyRequest::WithKeyId ( const char *  value)
inline

Sets the key policy on the specified KMS key.

Specify the key ID or key ARN of the KMS key.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.

Definition at line 115 of file PutKeyPolicyRequest.h.

◆ WithPolicy() [1/3]

PutKeyPolicyRequest& Aws::KMS::Model::PutKeyPolicyRequest::WithPolicy ( Aws::String &&  value)
inline

The key policy to attach to the KMS key.

The key policy must meet the following criteria:

  • If you don't set BypassPolicyLockoutSafetyCheck to true, the key policy must allow the principal that is making the PutKeyPolicy request to make a subsequent PutKeyPolicy request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, refer to the scenario in the Default Key Policy section of the Key Management Service Developer Guide.

  • Each statement in the key policy must contain one or more principals. The principals in the key policy must exist and be visible to KMS. When you create a new Amazon Web Services principal (for example, an IAM user or role), you might need to enforce a delay before including the new principal in a key policy because the new principal might not be immediately visible to KMS. For more information, see Changes that I make are not always immediately visible in the Amazon Web Services Identity and Access Management User Guide.

The key policy cannot exceed 32 kilobytes (32768 bytes). For more information, see Resource Quotas in the Key Management Service Developer Guide.

Definition at line 332 of file PutKeyPolicyRequest.h.

◆ WithPolicy() [2/3]

PutKeyPolicyRequest& Aws::KMS::Model::PutKeyPolicyRequest::WithPolicy ( const Aws::String value)
inline

The key policy to attach to the KMS key.

The key policy must meet the following criteria:

  • If you don't set BypassPolicyLockoutSafetyCheck to true, the key policy must allow the principal that is making the PutKeyPolicy request to make a subsequent PutKeyPolicy request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, refer to the scenario in the Default Key Policy section of the Key Management Service Developer Guide.

  • Each statement in the key policy must contain one or more principals. The principals in the key policy must exist and be visible to KMS. When you create a new Amazon Web Services principal (for example, an IAM user or role), you might need to enforce a delay before including the new principal in a key policy because the new principal might not be immediately visible to KMS. For more information, see Changes that I make are not always immediately visible in the Amazon Web Services Identity and Access Management User Guide.

The key policy cannot exceed 32 kilobytes (32768 bytes). For more information, see Resource Quotas in the Key Management Service Developer Guide.

Definition at line 307 of file PutKeyPolicyRequest.h.

◆ WithPolicy() [3/3]

PutKeyPolicyRequest& Aws::KMS::Model::PutKeyPolicyRequest::WithPolicy ( const char *  value)
inline

The key policy to attach to the KMS key.

The key policy must meet the following criteria:

  • If you don't set BypassPolicyLockoutSafetyCheck to true, the key policy must allow the principal that is making the PutKeyPolicy request to make a subsequent PutKeyPolicy request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, refer to the scenario in the Default Key Policy section of the Key Management Service Developer Guide.

  • Each statement in the key policy must contain one or more principals. The principals in the key policy must exist and be visible to KMS. When you create a new Amazon Web Services principal (for example, an IAM user or role), you might need to enforce a delay before including the new principal in a key policy because the new principal might not be immediately visible to KMS. For more information, see Changes that I make are not always immediately visible in the Amazon Web Services Identity and Access Management User Guide.

The key policy cannot exceed 32 kilobytes (32768 bytes). For more information, see Resource Quotas in the Key Management Service Developer Guide.

Definition at line 357 of file PutKeyPolicyRequest.h.

◆ WithPolicyName() [1/3]

PutKeyPolicyRequest& Aws::KMS::Model::PutKeyPolicyRequest::WithPolicyName ( Aws::String &&  value)
inline

The name of the key policy. The only valid value is default.

Definition at line 151 of file PutKeyPolicyRequest.h.

◆ WithPolicyName() [2/3]

PutKeyPolicyRequest& Aws::KMS::Model::PutKeyPolicyRequest::WithPolicyName ( const Aws::String value)
inline

The name of the key policy. The only valid value is default.

Definition at line 146 of file PutKeyPolicyRequest.h.

◆ WithPolicyName() [3/3]

PutKeyPolicyRequest& Aws::KMS::Model::PutKeyPolicyRequest::WithPolicyName ( const char *  value)
inline

The name of the key policy. The only valid value is default.

Definition at line 156 of file PutKeyPolicyRequest.h.


The documentation for this class was generated from the following file: