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.CustomResourceManages 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
## 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' ```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.iam.inputs.GetPolicyDocumentStatementArgs; import com.pulumi.aws.iam.inputs.GetPolicyDocumentStatementPrincipalArgs; import com.pulumi.aws.ses.IdentityPolicy; import com.pulumi.aws.ses.IdentityPolicyArgs; import java.util.ArrayList; import java.util.Arrays; 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 example = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder() .statements(GetPolicyDocumentStatementArgs.builder() .principals(GetPolicyDocumentStatementPrincipalArgs.builder() .identifiers("*") .type("AWS") .build()) .actions( "SES:SendEmail", "SES:SendRawEmail") .resources(exampleDomainIdentity.arn()) .build()) .build()); var exampleIdentityPolicy = new IdentityPolicy("exampleIdentityPolicy", IdentityPolicyArgs.builder() .identity(exampleDomainIdentity.arn()) .name("example") .policy(example.applyValue(_example -> _example.json())) .build()); } }
-
-
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 IdentityPolicyget(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()com.pulumi.core.Output<java.lang.String>region()
-
-
-
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 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.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
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.
-
-