Class: Aws::SecretsManager::Types::PutResourcePolicyRequest

Inherits:
Struct
  • Object
show all
Includes:
Aws::Structure
Defined in:
lib/aws-sdk-secretsmanager/types.rb

Overview

Note:

When making an API call, you may pass PutResourcePolicyRequest data as a hash:

{
  secret_id: "SecretIdType", # required
  resource_policy: "NonEmptyResourcePolicyType", # required
  block_public_policy: false,
}

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#block_public_policyBoolean

(Optional) If you set the parameter, `BlockPublicPolicy` to true, then you block resource-based policies that allow broad access to the secret.

Returns:

  • (Boolean)

1295
1296
1297
1298
1299
1300
1301
# File 'lib/aws-sdk-secretsmanager/types.rb', line 1295

class PutResourcePolicyRequest < Struct.new(
  :secret_id,
  :resource_policy,
  :block_public_policy)
  SENSITIVE = []
  include Aws::Structure
end

#resource_policyString

A JSON-formatted string constructed according to the grammar and syntax for an Amazon Web Services resource-based policy. The policy in the string identifies who can access or manage this secret and its versions. For information on how to format a JSON parameter for the various command line tool environments, see [Using JSON for Parameters] in the *CLI User Guide*.

[1]: docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json

Returns:

  • (String)

1295
1296
1297
1298
1299
1300
1301
# File 'lib/aws-sdk-secretsmanager/types.rb', line 1295

class PutResourcePolicyRequest < Struct.new(
  :secret_id,
  :resource_policy,
  :block_public_policy)
  SENSITIVE = []
  include Aws::Structure
end

#secret_idString

Specifies the secret that you want to attach the resource-based policy. You can specify either the ARN or the friendly name of the secret.

For an ARN, we recommend that you specify a complete ARN rather than a partial ARN.

Returns:

  • (String)

1295
1296
1297
1298
1299
1300
1301
# File 'lib/aws-sdk-secretsmanager/types.rb', line 1295

class PutResourcePolicyRequest < Struct.new(
  :secret_id,
  :resource_policy,
  :block_public_policy)
  SENSITIVE = []
  include Aws::Structure
end