Package com.pulumi.aws.pinpoint
Class EventStream
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.pinpoint.EventStream
-
public class EventStream extends com.pulumi.resources.CustomResource
Provides a Pinpoint Event Stream resource. ## Example Usage <!--Start PulumiCodeChooser -->package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.pinpoint.App; import com.pulumi.aws.kinesis.Stream; import com.pulumi.aws.kinesis.StreamArgs; import com.pulumi.aws.iam.IamFunctions; import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs; import com.pulumi.aws.iam.Role; import com.pulumi.aws.iam.RoleArgs; import com.pulumi.aws.pinpoint.EventStream; import com.pulumi.aws.pinpoint.EventStreamArgs; import com.pulumi.aws.iam.RolePolicy; import com.pulumi.aws.iam.RolePolicyArgs; 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 app = new App("app"); var testStream = new Stream("testStream", StreamArgs.builder() .name("pinpoint-kinesis-test") .shardCount(1) .build()); final var assumeRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder() .statements(GetPolicyDocumentStatementArgs.builder() .effect("Allow") .principals(GetPolicyDocumentStatementPrincipalArgs.builder() .type("Service") .identifiers("pinpoint.us-east-1.amazonaws.com") .build()) .actions("sts:AssumeRole") .build()) .build()); var testRole = new Role("testRole", RoleArgs.builder() .assumeRolePolicy(assumeRole.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json())) .build()); var stream = new EventStream("stream", EventStreamArgs.builder() .applicationId(app.applicationId()) .destinationStreamArn(testStream.arn()) .roleArn(testRole.arn()) .build()); final var testRolePolicy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder() .statements(GetPolicyDocumentStatementArgs.builder() .effect("Allow") .actions( "kinesis:PutRecords", "kinesis:DescribeStream") .resources("arn:aws:kinesis:us-east-1:*:*{@literal /}*") .build()) .build()); var testRolePolicyRolePolicy = new RolePolicy("testRolePolicyRolePolicy", RolePolicyArgs.builder() .name("test_policy") .role(testRole.id()) .policy(testRolePolicy.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json())) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description EventStream(java.lang.String name)
EventStream(java.lang.String name, EventStreamArgs args)
EventStream(java.lang.String name, EventStreamArgs 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.String>
applicationId()
com.pulumi.core.Output<java.lang.String>
destinationStreamArn()
static EventStream
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, EventStreamState 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>
roleArn()
-
-
-
Constructor Detail
-
EventStream
public EventStream(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
EventStream
public EventStream(java.lang.String name, EventStreamArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
EventStream
public EventStream(java.lang.String name, EventStreamArgs 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
-
applicationId
public com.pulumi.core.Output<java.lang.String> applicationId()
- Returns:
- The application ID.
-
destinationStreamArn
public com.pulumi.core.Output<java.lang.String> destinationStreamArn()
- Returns:
- The Amazon Resource Name (ARN) of the Amazon Kinesis stream or Firehose delivery stream to which you want to publish events.
-
roleArn
public com.pulumi.core.Output<java.lang.String> roleArn()
- Returns:
- The IAM role that authorizes Amazon Pinpoint to publish events to the stream in your account.
-
get
public static EventStream get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable EventStreamState 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.
-
-