Package com.pulumi.aws.dynamodb
Class ResourcePolicy
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.dynamodb.ResourcePolicy
-
public class ResourcePolicy extends com.pulumi.resources.CustomResource
Resource for managing an AWS DynamoDB Resource Policy. ## Example Usage ### Basic Usage <!--Start PulumiCodeChooser -->package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.dynamodb.ResourcePolicy; import com.pulumi.aws.dynamodb.ResourcePolicyArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var example = new ResourcePolicy("example", ResourcePolicyArgs.builder() .resourceArn(exampleAwsDynamodbTable.arn()) .policy(test.json()) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description ResourcePolicy(java.lang.String name)
ResourcePolicy(java.lang.String name, ResourcePolicyArgs args)
ResourcePolicy(java.lang.String name, ResourcePolicyArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.Boolean>
confirmRemoveSelfResourceAccess()
static ResourcePolicy
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ResourcePolicyState state, com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>
policy()
com.pulumi.core.Output<java.lang.String>
resourceArn()
com.pulumi.core.Output<java.lang.String>
revisionId()
-
-
-
Constructor Detail
-
ResourcePolicy
public ResourcePolicy(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
ResourcePolicy
public ResourcePolicy(java.lang.String name, ResourcePolicyArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
ResourcePolicy
public ResourcePolicy(java.lang.String name, ResourcePolicyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.options
- A bag of options that control this resource's behavior.
-
-
Method Detail
-
confirmRemoveSelfResourceAccess
public com.pulumi.core.Output<java.lang.Boolean> confirmRemoveSelfResourceAccess()
- Returns:
- Set this parameter to true to confirm that you want to remove your permissions to change the policy of this resource in the future.
-
policy
public com.pulumi.core.Output<java.lang.String> policy()
- Returns:
- n Amazon Web Services resource-based policy document in JSON format. The maximum size supported for a resource-based policy document is 20 KB. DynamoDB counts whitespaces when calculating the size of a policy against this limit. For a full list of all considerations that you should keep in mind while attaching a resource-based policy, see Resource-based policy considerations. The following arguments are optional:
-
resourceArn
public com.pulumi.core.Output<java.lang.String> resourceArn()
- Returns:
- The Amazon Resource Name (ARN) of the DynamoDB resource to which the policy will be attached. The resources you can specify include tables and streams. You can control index permissions using the base table's policy. To specify the same permission level for your table and its indexes, you can provide both the table and index Amazon Resource Name (ARN)s in the Resource field of a given Statement in your policy document. Alternatively, to specify different permissions for your table, indexes, or both, you can define multiple Statement fields in your policy document.
-
revisionId
public com.pulumi.core.Output<java.lang.String> revisionId()
- Returns:
- A unique string that represents the revision ID of the policy. If you are comparing revision IDs, make sure to always use string comparison logic.
-
get
public static ResourcePolicy get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable ResourcePolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name
- The _unique_ name of the resulting resource.id
- The _unique_ provider ID of the resource to lookup.state
-options
- Optional settings to control the behavior of the CustomResource.
-
-