1. Packages
  2. AWS Native
  3. API Docs
  4. sns
  5. getTopic

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.103.0 published on Monday, Apr 22, 2024 by Pulumi

aws-native.sns.getTopic

Explore with Pulumi AI

aws-native logo

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.103.0 published on Monday, Apr 22, 2024 by Pulumi

    The AWS::SNS::Topic resource creates a topic to which notifications can be published. One account can create a maximum of 100,000 standard topics and 1,000 FIFO topics. For more information, see endpoints and quotas in the General Reference. The structure of AUTHPARAMS depends on the .signature of the API request. For more information, see Examples of the complete Signature Version 4 signing process in the General Reference.

    Using getTopic

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getTopic(args: GetTopicArgs, opts?: InvokeOptions): Promise<GetTopicResult>
    function getTopicOutput(args: GetTopicOutputArgs, opts?: InvokeOptions): Output<GetTopicResult>
    def get_topic(topic_arn: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetTopicResult
    def get_topic_output(topic_arn: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetTopicResult]
    func LookupTopic(ctx *Context, args *LookupTopicArgs, opts ...InvokeOption) (*LookupTopicResult, error)
    func LookupTopicOutput(ctx *Context, args *LookupTopicOutputArgs, opts ...InvokeOption) LookupTopicResultOutput

    > Note: This function is named LookupTopic in the Go SDK.

    public static class GetTopic 
    {
        public static Task<GetTopicResult> InvokeAsync(GetTopicArgs args, InvokeOptions? opts = null)
        public static Output<GetTopicResult> Invoke(GetTopicInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTopicResult> getTopic(GetTopicArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws-native:sns:getTopic
      arguments:
        # arguments dictionary

    The following arguments are supported:

    TopicArn string
    TopicArn string
    topicArn String
    topicArn string
    topicArn String

    getTopic Result

    The following output properties are available:

    ArchivePolicy object

    The archive policy determines the number of days SNS retains messages. You can set a retention period from 1 to 365 days.

    Search the CloudFormation User Guide for AWS::SNS::Topic for more information about the expected schema for this property.

    ContentBasedDeduplication bool
    Enables content-based deduplication for FIFO topics.

    • By default, ContentBasedDeduplication is set to false. If you create a FIFO topic and this attribute is false, you must specify a value for the MessageDeduplicationId parameter for the Publish action.
    • When you set ContentBasedDeduplication to true, SNS uses a SHA-256 hash to generate the MessageDeduplicationId using the body of the message (but not the attributes of the message). (Optional) To override the generated value, you can specify a value for the the MessageDeduplicationId parameter for the Publish action.
    DataProtectionPolicy object

    The body of the policy document you want to use for this topic. You can only add one policy per topic. The policy must be in JSON string format. Length Constraints: Maximum length of 30,720.

    Search the CloudFormation User Guide for AWS::SNS::Topic for more information about the expected schema for this property.

    DeliveryStatusLogging List<Pulumi.AwsNative.Sns.Outputs.TopicLoggingConfig>
    DisplayName string
    The display name to use for an SNS topic with SMS subscriptions. The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs.
    KmsMasterKeyId string
    The ID of an AWS managed customer master key (CMK) for SNS or a custom CMK. For more information, see Key terms. For more examples, see KeyId in the API Reference. This property applies only to server-side-encryption.
    SignatureVersion string
    The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS. By default, SignatureVersion is set to 1.
    Subscription List<Pulumi.AwsNative.Sns.Outputs.TopicSubscription>
    The SNS subscriptions (endpoints) for this topic. If you specify the Subscription property in the AWS::SNS::Topic resource and it creates an associated subscription resource, the associated subscription is not deleted when the AWS::SNS::Topic resource is deleted.
    Tags List<Pulumi.AwsNative.Outputs.Tag>
    The list of tags to add to a new topic. To be able to tag a topic on creation, you must have the sns:CreateTopic and sns:TagResource permissions.
    TopicArn string
    TracingConfig string
    Tracing mode of an SNS topic. By default TracingConfig is set to PassThrough, and the topic passes through the tracing header it receives from an SNS publisher to its subscriptions. If set to Active, SNS will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true.
    ArchivePolicy interface{}

    The archive policy determines the number of days SNS retains messages. You can set a retention period from 1 to 365 days.

    Search the CloudFormation User Guide for AWS::SNS::Topic for more information about the expected schema for this property.

    ContentBasedDeduplication bool
    Enables content-based deduplication for FIFO topics.

    • By default, ContentBasedDeduplication is set to false. If you create a FIFO topic and this attribute is false, you must specify a value for the MessageDeduplicationId parameter for the Publish action.
    • When you set ContentBasedDeduplication to true, SNS uses a SHA-256 hash to generate the MessageDeduplicationId using the body of the message (but not the attributes of the message). (Optional) To override the generated value, you can specify a value for the the MessageDeduplicationId parameter for the Publish action.
    DataProtectionPolicy interface{}

    The body of the policy document you want to use for this topic. You can only add one policy per topic. The policy must be in JSON string format. Length Constraints: Maximum length of 30,720.

    Search the CloudFormation User Guide for AWS::SNS::Topic for more information about the expected schema for this property.

    DeliveryStatusLogging []TopicLoggingConfig
    DisplayName string
    The display name to use for an SNS topic with SMS subscriptions. The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs.
    KmsMasterKeyId string
    The ID of an AWS managed customer master key (CMK) for SNS or a custom CMK. For more information, see Key terms. For more examples, see KeyId in the API Reference. This property applies only to server-side-encryption.
    SignatureVersion string
    The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS. By default, SignatureVersion is set to 1.
    Subscription []TopicSubscription
    The SNS subscriptions (endpoints) for this topic. If you specify the Subscription property in the AWS::SNS::Topic resource and it creates an associated subscription resource, the associated subscription is not deleted when the AWS::SNS::Topic resource is deleted.
    Tags Tag
    The list of tags to add to a new topic. To be able to tag a topic on creation, you must have the sns:CreateTopic and sns:TagResource permissions.
    TopicArn string
    TracingConfig string
    Tracing mode of an SNS topic. By default TracingConfig is set to PassThrough, and the topic passes through the tracing header it receives from an SNS publisher to its subscriptions. If set to Active, SNS will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true.
    archivePolicy Object

    The archive policy determines the number of days SNS retains messages. You can set a retention period from 1 to 365 days.

    Search the CloudFormation User Guide for AWS::SNS::Topic for more information about the expected schema for this property.

    contentBasedDeduplication Boolean
    Enables content-based deduplication for FIFO topics.

    • By default, ContentBasedDeduplication is set to false. If you create a FIFO topic and this attribute is false, you must specify a value for the MessageDeduplicationId parameter for the Publish action.
    • When you set ContentBasedDeduplication to true, SNS uses a SHA-256 hash to generate the MessageDeduplicationId using the body of the message (but not the attributes of the message). (Optional) To override the generated value, you can specify a value for the the MessageDeduplicationId parameter for the Publish action.
    dataProtectionPolicy Object

    The body of the policy document you want to use for this topic. You can only add one policy per topic. The policy must be in JSON string format. Length Constraints: Maximum length of 30,720.

    Search the CloudFormation User Guide for AWS::SNS::Topic for more information about the expected schema for this property.

    deliveryStatusLogging List<TopicLoggingConfig>
    displayName String
    The display name to use for an SNS topic with SMS subscriptions. The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs.
    kmsMasterKeyId String
    The ID of an AWS managed customer master key (CMK) for SNS or a custom CMK. For more information, see Key terms. For more examples, see KeyId in the API Reference. This property applies only to server-side-encryption.
    signatureVersion String
    The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS. By default, SignatureVersion is set to 1.
    subscription List<TopicSubscription>
    The SNS subscriptions (endpoints) for this topic. If you specify the Subscription property in the AWS::SNS::Topic resource and it creates an associated subscription resource, the associated subscription is not deleted when the AWS::SNS::Topic resource is deleted.
    tags List<Tag>
    The list of tags to add to a new topic. To be able to tag a topic on creation, you must have the sns:CreateTopic and sns:TagResource permissions.
    topicArn String
    tracingConfig String
    Tracing mode of an SNS topic. By default TracingConfig is set to PassThrough, and the topic passes through the tracing header it receives from an SNS publisher to its subscriptions. If set to Active, SNS will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true.
    archivePolicy any

    The archive policy determines the number of days SNS retains messages. You can set a retention period from 1 to 365 days.

    Search the CloudFormation User Guide for AWS::SNS::Topic for more information about the expected schema for this property.

    contentBasedDeduplication boolean
    Enables content-based deduplication for FIFO topics.

    • By default, ContentBasedDeduplication is set to false. If you create a FIFO topic and this attribute is false, you must specify a value for the MessageDeduplicationId parameter for the Publish action.
    • When you set ContentBasedDeduplication to true, SNS uses a SHA-256 hash to generate the MessageDeduplicationId using the body of the message (but not the attributes of the message). (Optional) To override the generated value, you can specify a value for the the MessageDeduplicationId parameter for the Publish action.
    dataProtectionPolicy any

    The body of the policy document you want to use for this topic. You can only add one policy per topic. The policy must be in JSON string format. Length Constraints: Maximum length of 30,720.

    Search the CloudFormation User Guide for AWS::SNS::Topic for more information about the expected schema for this property.

    deliveryStatusLogging TopicLoggingConfig[]
    displayName string
    The display name to use for an SNS topic with SMS subscriptions. The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs.
    kmsMasterKeyId string
    The ID of an AWS managed customer master key (CMK) for SNS or a custom CMK. For more information, see Key terms. For more examples, see KeyId in the API Reference. This property applies only to server-side-encryption.
    signatureVersion string
    The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS. By default, SignatureVersion is set to 1.
    subscription TopicSubscription[]
    The SNS subscriptions (endpoints) for this topic. If you specify the Subscription property in the AWS::SNS::Topic resource and it creates an associated subscription resource, the associated subscription is not deleted when the AWS::SNS::Topic resource is deleted.
    tags Tag[]
    The list of tags to add to a new topic. To be able to tag a topic on creation, you must have the sns:CreateTopic and sns:TagResource permissions.
    topicArn string
    tracingConfig string
    Tracing mode of an SNS topic. By default TracingConfig is set to PassThrough, and the topic passes through the tracing header it receives from an SNS publisher to its subscriptions. If set to Active, SNS will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true.
    archive_policy Any

    The archive policy determines the number of days SNS retains messages. You can set a retention period from 1 to 365 days.

    Search the CloudFormation User Guide for AWS::SNS::Topic for more information about the expected schema for this property.

    content_based_deduplication bool
    Enables content-based deduplication for FIFO topics.

    • By default, ContentBasedDeduplication is set to false. If you create a FIFO topic and this attribute is false, you must specify a value for the MessageDeduplicationId parameter for the Publish action.
    • When you set ContentBasedDeduplication to true, SNS uses a SHA-256 hash to generate the MessageDeduplicationId using the body of the message (but not the attributes of the message). (Optional) To override the generated value, you can specify a value for the the MessageDeduplicationId parameter for the Publish action.
    data_protection_policy Any

    The body of the policy document you want to use for this topic. You can only add one policy per topic. The policy must be in JSON string format. Length Constraints: Maximum length of 30,720.

    Search the CloudFormation User Guide for AWS::SNS::Topic for more information about the expected schema for this property.

    delivery_status_logging Sequence[TopicLoggingConfig]
    display_name str
    The display name to use for an SNS topic with SMS subscriptions. The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs.
    kms_master_key_id str
    The ID of an AWS managed customer master key (CMK) for SNS or a custom CMK. For more information, see Key terms. For more examples, see KeyId in the API Reference. This property applies only to server-side-encryption.
    signature_version str
    The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS. By default, SignatureVersion is set to 1.
    subscription Sequence[TopicSubscription]
    The SNS subscriptions (endpoints) for this topic. If you specify the Subscription property in the AWS::SNS::Topic resource and it creates an associated subscription resource, the associated subscription is not deleted when the AWS::SNS::Topic resource is deleted.
    tags Sequence[root_Tag]
    The list of tags to add to a new topic. To be able to tag a topic on creation, you must have the sns:CreateTopic and sns:TagResource permissions.
    topic_arn str
    tracing_config str
    Tracing mode of an SNS topic. By default TracingConfig is set to PassThrough, and the topic passes through the tracing header it receives from an SNS publisher to its subscriptions. If set to Active, SNS will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true.
    archivePolicy Any

    The archive policy determines the number of days SNS retains messages. You can set a retention period from 1 to 365 days.

    Search the CloudFormation User Guide for AWS::SNS::Topic for more information about the expected schema for this property.

    contentBasedDeduplication Boolean
    Enables content-based deduplication for FIFO topics.

    • By default, ContentBasedDeduplication is set to false. If you create a FIFO topic and this attribute is false, you must specify a value for the MessageDeduplicationId parameter for the Publish action.
    • When you set ContentBasedDeduplication to true, SNS uses a SHA-256 hash to generate the MessageDeduplicationId using the body of the message (but not the attributes of the message). (Optional) To override the generated value, you can specify a value for the the MessageDeduplicationId parameter for the Publish action.
    dataProtectionPolicy Any

    The body of the policy document you want to use for this topic. You can only add one policy per topic. The policy must be in JSON string format. Length Constraints: Maximum length of 30,720.

    Search the CloudFormation User Guide for AWS::SNS::Topic for more information about the expected schema for this property.

    deliveryStatusLogging List<Property Map>
    displayName String
    The display name to use for an SNS topic with SMS subscriptions. The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs.
    kmsMasterKeyId String
    The ID of an AWS managed customer master key (CMK) for SNS or a custom CMK. For more information, see Key terms. For more examples, see KeyId in the API Reference. This property applies only to server-side-encryption.
    signatureVersion String
    The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS. By default, SignatureVersion is set to 1.
    subscription List<Property Map>
    The SNS subscriptions (endpoints) for this topic. If you specify the Subscription property in the AWS::SNS::Topic resource and it creates an associated subscription resource, the associated subscription is not deleted when the AWS::SNS::Topic resource is deleted.
    tags List<Property Map>
    The list of tags to add to a new topic. To be able to tag a topic on creation, you must have the sns:CreateTopic and sns:TagResource permissions.
    topicArn String
    tracingConfig String
    Tracing mode of an SNS topic. By default TracingConfig is set to PassThrough, and the topic passes through the tracing header it receives from an SNS publisher to its subscriptions. If set to Active, SNS will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true.

    Supporting Types

    Tag

    Key string
    The key name of the tag
    Value string
    The value of the tag
    Key string
    The key name of the tag
    Value string
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag
    key string
    The key name of the tag
    value string
    The value of the tag
    key str
    The key name of the tag
    value str
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag

    TopicLoggingConfig

    TopicLoggingConfigProtocol

    TopicSubscription

    Endpoint string
    The endpoint that receives notifications from the SNS topic. The endpoint value depends on the protocol that you specify. For more information, see the Endpoint parameter of the Subscribe action in the API Reference.
    Protocol string
    The subscription's protocol. For more information, see the Protocol parameter of the Subscribe action in the API Reference.
    Endpoint string
    The endpoint that receives notifications from the SNS topic. The endpoint value depends on the protocol that you specify. For more information, see the Endpoint parameter of the Subscribe action in the API Reference.
    Protocol string
    The subscription's protocol. For more information, see the Protocol parameter of the Subscribe action in the API Reference.
    endpoint String
    The endpoint that receives notifications from the SNS topic. The endpoint value depends on the protocol that you specify. For more information, see the Endpoint parameter of the Subscribe action in the API Reference.
    protocol String
    The subscription's protocol. For more information, see the Protocol parameter of the Subscribe action in the API Reference.
    endpoint string
    The endpoint that receives notifications from the SNS topic. The endpoint value depends on the protocol that you specify. For more information, see the Endpoint parameter of the Subscribe action in the API Reference.
    protocol string
    The subscription's protocol. For more information, see the Protocol parameter of the Subscribe action in the API Reference.
    endpoint str
    The endpoint that receives notifications from the SNS topic. The endpoint value depends on the protocol that you specify. For more information, see the Endpoint parameter of the Subscribe action in the API Reference.
    protocol str
    The subscription's protocol. For more information, see the Protocol parameter of the Subscribe action in the API Reference.
    endpoint String
    The endpoint that receives notifications from the SNS topic. The endpoint value depends on the protocol that you specify. For more information, see the Endpoint parameter of the Subscribe action in the API Reference.
    protocol String
    The subscription's protocol. For more information, see the Protocol parameter of the Subscribe action in the API Reference.

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    AWS Native is in preview. AWS Classic is fully supported.

    AWS Native v0.103.0 published on Monday, Apr 22, 2024 by Pulumi