Class CfnStream

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, IEnvironmentAware, IStreamRef, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)", date="2026-09-02T11:03:11.836Z") @Stability(Stable) public class CfnStream extends CfnResource implements IInspectable, IStreamRef, ITaggableV2
Resource Type definition for AWS IoT Stream.

A stream is a publicly addressable resource that is an abstraction for a list of files that can be transferred to an IoT device.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.iot.*;
 CfnStream cfnStream = CfnStream.Builder.create(this, "MyCfnStream")
         .files(List.of(StreamFileProperty.builder()
                 .fileId(123)
                 .s3Location(S3LocationProperty.builder()
                         .bucket("bucket")
                         .key("key")
                         .version("version")
                         .build())
                 .build()))
         .roleArn("roleArn")
         .streamId("streamId")
         // the properties below are optional
         .description("description")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnStream

      protected CfnStream(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnStream

      protected CfnStream(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnStream

      @Stability(Stable) public CfnStream(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnStreamProps props)
      Create a new AWS::IoT::Stream.

      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • arnForStream

      @Stability(Stable) @NotNull public static String arnForStream(@NotNull IStreamRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnStream

      @Stability(Stable) @NotNull public static Boolean isCfnStream(@NotNull Object x)
      Checks whether the given object is a CfnStream.

      Parameters:
      x - This parameter is required.
    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the stream.
    • getAttrCreatedAt

      @Stability(Stable) @NotNull public String getAttrCreatedAt()
      The date when the stream was created.
    • getAttrLastUpdatedAt

      @Stability(Stable) @NotNull public String getAttrLastUpdatedAt()
      The date when the stream was last updated.
    • getAttrStreamVersion

      @Stability(Stable) @NotNull public Number getAttrStreamVersion()
      The stream version.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getCfnPropertyNames

      @Stability(Stable) @NotNull protected Map<String,String> getCfnPropertyNames()
      Overrides:
      getCfnPropertyNames in class CfnResource
    • getStreamRef

      @Stability(Stable) @NotNull public StreamReference getStreamRef()
      A reference to a Stream resource.
      Specified by:
      getStreamRef in interface IStreamRef
    • getFiles

      @Stability(Stable) @NotNull public Object getFiles()
      The files to stream.

      Returns union: either IResolvable or Listinvalid input: '<'either IResolvable or CfnStream.StreamFileProperty>

    • setFiles

      @Stability(Stable) public void setFiles(@NotNull IResolvable value)
      The files to stream.
    • setFiles

      @Stability(Stable) public void setFiles(@NotNull List<Object> value)
      The files to stream.
    • getRoleArn

      @Stability(Stable) @NotNull public String getRoleArn()
      An IAM role that allows the IoT service principal to access your S3 files.
    • setRoleArn

      @Stability(Stable) public void setRoleArn(@NotNull String value)
      An IAM role that allows the IoT service principal to access your S3 files.
    • getStreamId

      @Stability(Stable) @NotNull public String getStreamId()
      The stream ID.
    • setStreamId

      @Stability(Stable) public void setStreamId(@NotNull String value)
      The stream ID.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      The description of the stream.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      The description of the stream.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      Metadata which can be used to manage streams.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      Metadata which can be used to manage streams.