Package com.pulumi.aws.ses
Class IdentityPolicy
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.ses.IdentityPolicy
-
public class IdentityPolicy extends com.pulumi.resources.CustomResource
Manages a SES Identity Policy. More information about SES Sending Authorization Policies can be found in the [SES Developer Guide](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization-policies.html). ## Example Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.ses.DomainIdentity; import com.pulumi.aws.ses.DomainIdentityArgs; import com.pulumi.aws.iam.IamFunctions; import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs; import com.pulumi.aws.ses.IdentityPolicy; import com.pulumi.aws.ses.IdentityPolicyArgs; 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 exampleDomainIdentity = new DomainIdentity("exampleDomainIdentity", DomainIdentityArgs.builder() .domain("example.com") .build()); final var examplePolicyDocument = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder() .statements(GetPolicyDocumentStatementArgs.builder() .actions( "SES:SendEmail", "SES:SendRawEmail") .resources(exampleDomainIdentity.arn()) .principals(GetPolicyDocumentStatementPrincipalArgs.builder() .identifiers("*") .type("AWS") .build()) .build()) .build()); var exampleIdentityPolicy = new IdentityPolicy("exampleIdentityPolicy", IdentityPolicyArgs.builder() .identity(exampleDomainIdentity.arn()) .policy(examplePolicyDocument.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult).applyValue(examplePolicyDocument -> examplePolicyDocument.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json()))) .build()); } } ``` ## Import Using `pulumi import`, import SES Identity Policies using the identity and policy name, separated by a pipe character (`|`). For example: ```sh $ pulumi import aws:ses/identityPolicy:IdentityPolicy example 'example.com|example' ```
-
-
Constructor Summary
Constructors Constructor Description IdentityPolicy(java.lang.String name)
IdentityPolicy(java.lang.String name, IdentityPolicyArgs args)
IdentityPolicy(java.lang.String name, IdentityPolicyArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IdentityPolicy
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, IdentityPolicyState 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>
identity()
com.pulumi.core.Output<java.lang.String>
name()
com.pulumi.core.Output<java.lang.String>
policy()
-
-
-
Constructor Detail
-
IdentityPolicy
public IdentityPolicy(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
IdentityPolicy
public IdentityPolicy(java.lang.String name, IdentityPolicyArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
IdentityPolicy
public IdentityPolicy(java.lang.String name, IdentityPolicyArgs 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
-
identity
public com.pulumi.core.Output<java.lang.String> identity()
- Returns:
- Name or Amazon Resource Name (ARN) of the SES Identity.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- Name of the policy.
-
policy
public com.pulumi.core.Output<java.lang.String> policy()
- Returns:
- JSON string of the policy.
-
get
public static IdentityPolicy get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable IdentityPolicyState 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.
-
-