1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. pubsub
  5. getSubscription
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

gcp.pubsub.getSubscription

Explore with Pulumi AI

gcp logo
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

    Get information about a Google Cloud Pub/Sub Subscription. For more information see the official documentation and API.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const my-pubsub-subscription = gcp.pubsub.getSubscription({
        name: "my-pubsub-subscription",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    my_pubsub_subscription = gcp.pubsub.get_subscription(name="my-pubsub-subscription")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/pubsub"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := pubsub.LookupSubscription(ctx, &pubsub.LookupSubscriptionArgs{
    			Name: "my-pubsub-subscription",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var my_pubsub_subscription = Gcp.PubSub.GetSubscription.Invoke(new()
        {
            Name = "my-pubsub-subscription",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.pubsub.PubsubFunctions;
    import com.pulumi.gcp.pubsub.inputs.GetSubscriptionArgs;
    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) {
            final var my-pubsub-subscription = PubsubFunctions.getSubscription(GetSubscriptionArgs.builder()
                .name("my-pubsub-subscription")
                .build());
    
        }
    }
    
    variables:
      my-pubsub-subscription:
        fn::invoke:
          Function: gcp:pubsub:getSubscription
          Arguments:
            name: my-pubsub-subscription
    

    Using getSubscription

    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 getSubscription(args: GetSubscriptionArgs, opts?: InvokeOptions): Promise<GetSubscriptionResult>
    function getSubscriptionOutput(args: GetSubscriptionOutputArgs, opts?: InvokeOptions): Output<GetSubscriptionResult>
    def get_subscription(name: Optional[str] = None,
                         project: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetSubscriptionResult
    def get_subscription_output(name: Optional[pulumi.Input[str]] = None,
                         project: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetSubscriptionResult]
    func LookupSubscription(ctx *Context, args *LookupSubscriptionArgs, opts ...InvokeOption) (*LookupSubscriptionResult, error)
    func LookupSubscriptionOutput(ctx *Context, args *LookupSubscriptionOutputArgs, opts ...InvokeOption) LookupSubscriptionResultOutput

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

    public static class GetSubscription 
    {
        public static Task<GetSubscriptionResult> InvokeAsync(GetSubscriptionArgs args, InvokeOptions? opts = null)
        public static Output<GetSubscriptionResult> Invoke(GetSubscriptionInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSubscriptionResult> getSubscription(GetSubscriptionArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gcp:pubsub/getSubscription:getSubscription
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the Cloud Pub/Sub Subscription.


    Project string
    The project in which the resource belongs. If it is not provided, the provider project is used.
    Name string
    The name of the Cloud Pub/Sub Subscription.


    Project string
    The project in which the resource belongs. If it is not provided, the provider project is used.
    name String
    The name of the Cloud Pub/Sub Subscription.


    project String
    The project in which the resource belongs. If it is not provided, the provider project is used.
    name string
    The name of the Cloud Pub/Sub Subscription.


    project string
    The project in which the resource belongs. If it is not provided, the provider project is used.
    name str
    The name of the Cloud Pub/Sub Subscription.


    project str
    The project in which the resource belongs. If it is not provided, the provider project is used.
    name String
    The name of the Cloud Pub/Sub Subscription.


    project String
    The project in which the resource belongs. If it is not provided, the provider project is used.

    getSubscription Result

    The following output properties are available:

    Supporting Types

    GetSubscriptionBigqueryConfig

    DropUnknownFields bool
    When true and use_topic_schema or use_table_schema is true, any fields that are a part of the topic schema or message schema that are not part of the BigQuery table schema are dropped when writing to BigQuery. Otherwise, the schemas must be kept in sync and any messages with extra fields are not written and remain in the subscription's backlog.
    ServiceAccountEmail string
    The service account to use to write to BigQuery. If not specified, the Pub/Sub service agent, service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    Table string
    The name of the table to which to write data, of the form {projectId}.{datasetId}.{tableId}
    UseTableSchema bool
    When true, use the BigQuery table's schema as the columns to write to in BigQuery. Messages must be published in JSON format. Only one of use_topic_schema and use_table_schema can be set.
    UseTopicSchema bool
    When true, use the topic's schema as the columns to write to in BigQuery, if it exists. Only one of use_topic_schema and use_table_schema can be set.
    WriteMetadata bool
    When true, write the subscription name, messageId, publishTime, attributes, and orderingKey to additional columns in the table. The subscription name, messageId, and publishTime fields are put in their own columns while all other message properties (other than data) are written to a JSON object in the attributes column.
    DropUnknownFields bool
    When true and use_topic_schema or use_table_schema is true, any fields that are a part of the topic schema or message schema that are not part of the BigQuery table schema are dropped when writing to BigQuery. Otherwise, the schemas must be kept in sync and any messages with extra fields are not written and remain in the subscription's backlog.
    ServiceAccountEmail string
    The service account to use to write to BigQuery. If not specified, the Pub/Sub service agent, service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    Table string
    The name of the table to which to write data, of the form {projectId}.{datasetId}.{tableId}
    UseTableSchema bool
    When true, use the BigQuery table's schema as the columns to write to in BigQuery. Messages must be published in JSON format. Only one of use_topic_schema and use_table_schema can be set.
    UseTopicSchema bool
    When true, use the topic's schema as the columns to write to in BigQuery, if it exists. Only one of use_topic_schema and use_table_schema can be set.
    WriteMetadata bool
    When true, write the subscription name, messageId, publishTime, attributes, and orderingKey to additional columns in the table. The subscription name, messageId, and publishTime fields are put in their own columns while all other message properties (other than data) are written to a JSON object in the attributes column.
    dropUnknownFields Boolean
    When true and use_topic_schema or use_table_schema is true, any fields that are a part of the topic schema or message schema that are not part of the BigQuery table schema are dropped when writing to BigQuery. Otherwise, the schemas must be kept in sync and any messages with extra fields are not written and remain in the subscription's backlog.
    serviceAccountEmail String
    The service account to use to write to BigQuery. If not specified, the Pub/Sub service agent, service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    table String
    The name of the table to which to write data, of the form {projectId}.{datasetId}.{tableId}
    useTableSchema Boolean
    When true, use the BigQuery table's schema as the columns to write to in BigQuery. Messages must be published in JSON format. Only one of use_topic_schema and use_table_schema can be set.
    useTopicSchema Boolean
    When true, use the topic's schema as the columns to write to in BigQuery, if it exists. Only one of use_topic_schema and use_table_schema can be set.
    writeMetadata Boolean
    When true, write the subscription name, messageId, publishTime, attributes, and orderingKey to additional columns in the table. The subscription name, messageId, and publishTime fields are put in their own columns while all other message properties (other than data) are written to a JSON object in the attributes column.
    dropUnknownFields boolean
    When true and use_topic_schema or use_table_schema is true, any fields that are a part of the topic schema or message schema that are not part of the BigQuery table schema are dropped when writing to BigQuery. Otherwise, the schemas must be kept in sync and any messages with extra fields are not written and remain in the subscription's backlog.
    serviceAccountEmail string
    The service account to use to write to BigQuery. If not specified, the Pub/Sub service agent, service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    table string
    The name of the table to which to write data, of the form {projectId}.{datasetId}.{tableId}
    useTableSchema boolean
    When true, use the BigQuery table's schema as the columns to write to in BigQuery. Messages must be published in JSON format. Only one of use_topic_schema and use_table_schema can be set.
    useTopicSchema boolean
    When true, use the topic's schema as the columns to write to in BigQuery, if it exists. Only one of use_topic_schema and use_table_schema can be set.
    writeMetadata boolean
    When true, write the subscription name, messageId, publishTime, attributes, and orderingKey to additional columns in the table. The subscription name, messageId, and publishTime fields are put in their own columns while all other message properties (other than data) are written to a JSON object in the attributes column.
    drop_unknown_fields bool
    When true and use_topic_schema or use_table_schema is true, any fields that are a part of the topic schema or message schema that are not part of the BigQuery table schema are dropped when writing to BigQuery. Otherwise, the schemas must be kept in sync and any messages with extra fields are not written and remain in the subscription's backlog.
    service_account_email str
    The service account to use to write to BigQuery. If not specified, the Pub/Sub service agent, service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    table str
    The name of the table to which to write data, of the form {projectId}.{datasetId}.{tableId}
    use_table_schema bool
    When true, use the BigQuery table's schema as the columns to write to in BigQuery. Messages must be published in JSON format. Only one of use_topic_schema and use_table_schema can be set.
    use_topic_schema bool
    When true, use the topic's schema as the columns to write to in BigQuery, if it exists. Only one of use_topic_schema and use_table_schema can be set.
    write_metadata bool
    When true, write the subscription name, messageId, publishTime, attributes, and orderingKey to additional columns in the table. The subscription name, messageId, and publishTime fields are put in their own columns while all other message properties (other than data) are written to a JSON object in the attributes column.
    dropUnknownFields Boolean
    When true and use_topic_schema or use_table_schema is true, any fields that are a part of the topic schema or message schema that are not part of the BigQuery table schema are dropped when writing to BigQuery. Otherwise, the schemas must be kept in sync and any messages with extra fields are not written and remain in the subscription's backlog.
    serviceAccountEmail String
    The service account to use to write to BigQuery. If not specified, the Pub/Sub service agent, service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    table String
    The name of the table to which to write data, of the form {projectId}.{datasetId}.{tableId}
    useTableSchema Boolean
    When true, use the BigQuery table's schema as the columns to write to in BigQuery. Messages must be published in JSON format. Only one of use_topic_schema and use_table_schema can be set.
    useTopicSchema Boolean
    When true, use the topic's schema as the columns to write to in BigQuery, if it exists. Only one of use_topic_schema and use_table_schema can be set.
    writeMetadata Boolean
    When true, write the subscription name, messageId, publishTime, attributes, and orderingKey to additional columns in the table. The subscription name, messageId, and publishTime fields are put in their own columns while all other message properties (other than data) are written to a JSON object in the attributes column.

    GetSubscriptionCloudStorageConfig

    AvroConfigs List<GetSubscriptionCloudStorageConfigAvroConfig>
    If set, message data will be written to Cloud Storage in Avro format.
    Bucket string
    User-provided name for the Cloud Storage bucket. The bucket must be created by the user. The bucket name must be without any prefix like "gs://".
    FilenameDatetimeFormat string
    User-provided format string specifying how to represent datetimes in Cloud Storage filenames.
    FilenamePrefix string
    User-provided prefix for Cloud Storage filename.
    FilenameSuffix string
    User-provided suffix for Cloud Storage filename. Must not end in "/".
    MaxBytes int
    The maximum bytes that can be written to a Cloud Storage file before a new file is created. Min 1 KB, max 10 GiB. The maxBytes limit may be exceeded in cases where messages are larger than the limit.
    MaxDuration string
    The maximum duration that can elapse before a new Cloud Storage file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed the subscription's acknowledgement deadline. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
    MaxMessages int
    The maximum messages that can be written to a Cloud Storage file before a new file is created. Min 1000 messages.
    ServiceAccountEmail string
    The service account to use to write to Cloud Storage. If not specified, the Pub/Sub service agent, service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    State string
    An output-only field that indicates whether or not the subscription can receive messages.
    AvroConfigs []GetSubscriptionCloudStorageConfigAvroConfig
    If set, message data will be written to Cloud Storage in Avro format.
    Bucket string
    User-provided name for the Cloud Storage bucket. The bucket must be created by the user. The bucket name must be without any prefix like "gs://".
    FilenameDatetimeFormat string
    User-provided format string specifying how to represent datetimes in Cloud Storage filenames.
    FilenamePrefix string
    User-provided prefix for Cloud Storage filename.
    FilenameSuffix string
    User-provided suffix for Cloud Storage filename. Must not end in "/".
    MaxBytes int
    The maximum bytes that can be written to a Cloud Storage file before a new file is created. Min 1 KB, max 10 GiB. The maxBytes limit may be exceeded in cases where messages are larger than the limit.
    MaxDuration string
    The maximum duration that can elapse before a new Cloud Storage file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed the subscription's acknowledgement deadline. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
    MaxMessages int
    The maximum messages that can be written to a Cloud Storage file before a new file is created. Min 1000 messages.
    ServiceAccountEmail string
    The service account to use to write to Cloud Storage. If not specified, the Pub/Sub service agent, service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    State string
    An output-only field that indicates whether or not the subscription can receive messages.
    avroConfigs List<GetSubscriptionCloudStorageConfigAvroConfig>
    If set, message data will be written to Cloud Storage in Avro format.
    bucket String
    User-provided name for the Cloud Storage bucket. The bucket must be created by the user. The bucket name must be without any prefix like "gs://".
    filenameDatetimeFormat String
    User-provided format string specifying how to represent datetimes in Cloud Storage filenames.
    filenamePrefix String
    User-provided prefix for Cloud Storage filename.
    filenameSuffix String
    User-provided suffix for Cloud Storage filename. Must not end in "/".
    maxBytes Integer
    The maximum bytes that can be written to a Cloud Storage file before a new file is created. Min 1 KB, max 10 GiB. The maxBytes limit may be exceeded in cases where messages are larger than the limit.
    maxDuration String
    The maximum duration that can elapse before a new Cloud Storage file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed the subscription's acknowledgement deadline. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
    maxMessages Integer
    The maximum messages that can be written to a Cloud Storage file before a new file is created. Min 1000 messages.
    serviceAccountEmail String
    The service account to use to write to Cloud Storage. If not specified, the Pub/Sub service agent, service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    state String
    An output-only field that indicates whether or not the subscription can receive messages.
    avroConfigs GetSubscriptionCloudStorageConfigAvroConfig[]
    If set, message data will be written to Cloud Storage in Avro format.
    bucket string
    User-provided name for the Cloud Storage bucket. The bucket must be created by the user. The bucket name must be without any prefix like "gs://".
    filenameDatetimeFormat string
    User-provided format string specifying how to represent datetimes in Cloud Storage filenames.
    filenamePrefix string
    User-provided prefix for Cloud Storage filename.
    filenameSuffix string
    User-provided suffix for Cloud Storage filename. Must not end in "/".
    maxBytes number
    The maximum bytes that can be written to a Cloud Storage file before a new file is created. Min 1 KB, max 10 GiB. The maxBytes limit may be exceeded in cases where messages are larger than the limit.
    maxDuration string
    The maximum duration that can elapse before a new Cloud Storage file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed the subscription's acknowledgement deadline. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
    maxMessages number
    The maximum messages that can be written to a Cloud Storage file before a new file is created. Min 1000 messages.
    serviceAccountEmail string
    The service account to use to write to Cloud Storage. If not specified, the Pub/Sub service agent, service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    state string
    An output-only field that indicates whether or not the subscription can receive messages.
    avro_configs Sequence[GetSubscriptionCloudStorageConfigAvroConfig]
    If set, message data will be written to Cloud Storage in Avro format.
    bucket str
    User-provided name for the Cloud Storage bucket. The bucket must be created by the user. The bucket name must be without any prefix like "gs://".
    filename_datetime_format str
    User-provided format string specifying how to represent datetimes in Cloud Storage filenames.
    filename_prefix str
    User-provided prefix for Cloud Storage filename.
    filename_suffix str
    User-provided suffix for Cloud Storage filename. Must not end in "/".
    max_bytes int
    The maximum bytes that can be written to a Cloud Storage file before a new file is created. Min 1 KB, max 10 GiB. The maxBytes limit may be exceeded in cases where messages are larger than the limit.
    max_duration str
    The maximum duration that can elapse before a new Cloud Storage file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed the subscription's acknowledgement deadline. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
    max_messages int
    The maximum messages that can be written to a Cloud Storage file before a new file is created. Min 1000 messages.
    service_account_email str
    The service account to use to write to Cloud Storage. If not specified, the Pub/Sub service agent, service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    state str
    An output-only field that indicates whether or not the subscription can receive messages.
    avroConfigs List<Property Map>
    If set, message data will be written to Cloud Storage in Avro format.
    bucket String
    User-provided name for the Cloud Storage bucket. The bucket must be created by the user. The bucket name must be without any prefix like "gs://".
    filenameDatetimeFormat String
    User-provided format string specifying how to represent datetimes in Cloud Storage filenames.
    filenamePrefix String
    User-provided prefix for Cloud Storage filename.
    filenameSuffix String
    User-provided suffix for Cloud Storage filename. Must not end in "/".
    maxBytes Number
    The maximum bytes that can be written to a Cloud Storage file before a new file is created. Min 1 KB, max 10 GiB. The maxBytes limit may be exceeded in cases where messages are larger than the limit.
    maxDuration String
    The maximum duration that can elapse before a new Cloud Storage file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed the subscription's acknowledgement deadline. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
    maxMessages Number
    The maximum messages that can be written to a Cloud Storage file before a new file is created. Min 1000 messages.
    serviceAccountEmail String
    The service account to use to write to Cloud Storage. If not specified, the Pub/Sub service agent, service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
    state String
    An output-only field that indicates whether or not the subscription can receive messages.

    GetSubscriptionCloudStorageConfigAvroConfig

    UseTopicSchema bool
    When true, the output Cloud Storage file will be serialized using the topic schema, if it exists.
    WriteMetadata bool
    When true, write the subscription name, messageId, publishTime, attributes, and orderingKey as additional fields in the output.
    UseTopicSchema bool
    When true, the output Cloud Storage file will be serialized using the topic schema, if it exists.
    WriteMetadata bool
    When true, write the subscription name, messageId, publishTime, attributes, and orderingKey as additional fields in the output.
    useTopicSchema Boolean
    When true, the output Cloud Storage file will be serialized using the topic schema, if it exists.
    writeMetadata Boolean
    When true, write the subscription name, messageId, publishTime, attributes, and orderingKey as additional fields in the output.
    useTopicSchema boolean
    When true, the output Cloud Storage file will be serialized using the topic schema, if it exists.
    writeMetadata boolean
    When true, write the subscription name, messageId, publishTime, attributes, and orderingKey as additional fields in the output.
    use_topic_schema bool
    When true, the output Cloud Storage file will be serialized using the topic schema, if it exists.
    write_metadata bool
    When true, write the subscription name, messageId, publishTime, attributes, and orderingKey as additional fields in the output.
    useTopicSchema Boolean
    When true, the output Cloud Storage file will be serialized using the topic schema, if it exists.
    writeMetadata Boolean
    When true, write the subscription name, messageId, publishTime, attributes, and orderingKey as additional fields in the output.

    GetSubscriptionDeadLetterPolicy

    DeadLetterTopic string

    The name of the topic to which dead letter messages should be published. Format is 'projects/{project}/topics/{topic}'.

    The Cloud Pub/Sub service account associated with the enclosing subscription's parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Publish() to this topic.

    The operation will fail if the topic does not exist. Users should ensure that there is a subscription attached to this topic since messages published to a topic with no subscriptions are lost.

    MaxDeliveryAttempts int

    The maximum number of delivery attempts for any message. The value must be between 5 and 100.

    The number of delivery attempts is defined as 1 + (the sum of number of NACKs and number of times the acknowledgement deadline has been exceeded for the message).

    A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that client libraries may automatically extend ack_deadlines.

    This field will be honored on a best effort basis.

    If this parameter is 0, a default value of 5 is used.

    DeadLetterTopic string

    The name of the topic to which dead letter messages should be published. Format is 'projects/{project}/topics/{topic}'.

    The Cloud Pub/Sub service account associated with the enclosing subscription's parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Publish() to this topic.

    The operation will fail if the topic does not exist. Users should ensure that there is a subscription attached to this topic since messages published to a topic with no subscriptions are lost.

    MaxDeliveryAttempts int

    The maximum number of delivery attempts for any message. The value must be between 5 and 100.

    The number of delivery attempts is defined as 1 + (the sum of number of NACKs and number of times the acknowledgement deadline has been exceeded for the message).

    A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that client libraries may automatically extend ack_deadlines.

    This field will be honored on a best effort basis.

    If this parameter is 0, a default value of 5 is used.

    deadLetterTopic String

    The name of the topic to which dead letter messages should be published. Format is 'projects/{project}/topics/{topic}'.

    The Cloud Pub/Sub service account associated with the enclosing subscription's parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Publish() to this topic.

    The operation will fail if the topic does not exist. Users should ensure that there is a subscription attached to this topic since messages published to a topic with no subscriptions are lost.

    maxDeliveryAttempts Integer

    The maximum number of delivery attempts for any message. The value must be between 5 and 100.

    The number of delivery attempts is defined as 1 + (the sum of number of NACKs and number of times the acknowledgement deadline has been exceeded for the message).

    A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that client libraries may automatically extend ack_deadlines.

    This field will be honored on a best effort basis.

    If this parameter is 0, a default value of 5 is used.

    deadLetterTopic string

    The name of the topic to which dead letter messages should be published. Format is 'projects/{project}/topics/{topic}'.

    The Cloud Pub/Sub service account associated with the enclosing subscription's parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Publish() to this topic.

    The operation will fail if the topic does not exist. Users should ensure that there is a subscription attached to this topic since messages published to a topic with no subscriptions are lost.

    maxDeliveryAttempts number

    The maximum number of delivery attempts for any message. The value must be between 5 and 100.

    The number of delivery attempts is defined as 1 + (the sum of number of NACKs and number of times the acknowledgement deadline has been exceeded for the message).

    A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that client libraries may automatically extend ack_deadlines.

    This field will be honored on a best effort basis.

    If this parameter is 0, a default value of 5 is used.

    dead_letter_topic str

    The name of the topic to which dead letter messages should be published. Format is 'projects/{project}/topics/{topic}'.

    The Cloud Pub/Sub service account associated with the enclosing subscription's parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Publish() to this topic.

    The operation will fail if the topic does not exist. Users should ensure that there is a subscription attached to this topic since messages published to a topic with no subscriptions are lost.

    max_delivery_attempts int

    The maximum number of delivery attempts for any message. The value must be between 5 and 100.

    The number of delivery attempts is defined as 1 + (the sum of number of NACKs and number of times the acknowledgement deadline has been exceeded for the message).

    A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that client libraries may automatically extend ack_deadlines.

    This field will be honored on a best effort basis.

    If this parameter is 0, a default value of 5 is used.

    deadLetterTopic String

    The name of the topic to which dead letter messages should be published. Format is 'projects/{project}/topics/{topic}'.

    The Cloud Pub/Sub service account associated with the enclosing subscription's parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Publish() to this topic.

    The operation will fail if the topic does not exist. Users should ensure that there is a subscription attached to this topic since messages published to a topic with no subscriptions are lost.

    maxDeliveryAttempts Number

    The maximum number of delivery attempts for any message. The value must be between 5 and 100.

    The number of delivery attempts is defined as 1 + (the sum of number of NACKs and number of times the acknowledgement deadline has been exceeded for the message).

    A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that client libraries may automatically extend ack_deadlines.

    This field will be honored on a best effort basis.

    If this parameter is 0, a default value of 5 is used.

    GetSubscriptionExpirationPolicy

    Ttl string
    Specifies the "time-to-live" duration for an associated resource. The resource expires if it is not active for a period of ttl. If ttl is set to "", the associated resource never expires. A duration in seconds with up to nine fractional digits, terminated by 's'. Example - "3.5s".
    Ttl string
    Specifies the "time-to-live" duration for an associated resource. The resource expires if it is not active for a period of ttl. If ttl is set to "", the associated resource never expires. A duration in seconds with up to nine fractional digits, terminated by 's'. Example - "3.5s".
    ttl String
    Specifies the "time-to-live" duration for an associated resource. The resource expires if it is not active for a period of ttl. If ttl is set to "", the associated resource never expires. A duration in seconds with up to nine fractional digits, terminated by 's'. Example - "3.5s".
    ttl string
    Specifies the "time-to-live" duration for an associated resource. The resource expires if it is not active for a period of ttl. If ttl is set to "", the associated resource never expires. A duration in seconds with up to nine fractional digits, terminated by 's'. Example - "3.5s".
    ttl str
    Specifies the "time-to-live" duration for an associated resource. The resource expires if it is not active for a period of ttl. If ttl is set to "", the associated resource never expires. A duration in seconds with up to nine fractional digits, terminated by 's'. Example - "3.5s".
    ttl String
    Specifies the "time-to-live" duration for an associated resource. The resource expires if it is not active for a period of ttl. If ttl is set to "", the associated resource never expires. A duration in seconds with up to nine fractional digits, terminated by 's'. Example - "3.5s".

    GetSubscriptionPushConfig

    Attributes Dictionary<string, string>

    Endpoint configuration attributes.

    Every endpoint has a set of API supported attributes that can be used to control different aspects of the message delivery.

    The currently supported attribute is x-goog-version, which you can use to change the format of the pushed message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the pushed message (i.e., its fields and metadata). The endpoint version is based on the version of the Pub/Sub API.

    If not present during the subscriptions.create call, it will default to the version of the API used to make such call. If not present during a subscriptions.modifyPushConfig call, its value will not be changed. subscriptions.get calls will always return a valid version, even if the subscription was created without this attribute.

    The possible values for this attribute are:

    • v1beta1: uses the push format defined in the v1beta1 Pub/Sub API.
    • v1 or v1beta2: uses the push format defined in the v1 Pub/Sub API.
    NoWrappers List<GetSubscriptionPushConfigNoWrapper>
    When set, the payload to the push endpoint is not wrapped.Sets the 'data' field as the HTTP body for delivery.
    OidcTokens List<GetSubscriptionPushConfigOidcToken>
    If specified, Pub/Sub will generate and attach an OIDC JWT token as an Authorization header in the HTTP request for every pushed message.
    PushEndpoint string
    A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
    Attributes map[string]string

    Endpoint configuration attributes.

    Every endpoint has a set of API supported attributes that can be used to control different aspects of the message delivery.

    The currently supported attribute is x-goog-version, which you can use to change the format of the pushed message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the pushed message (i.e., its fields and metadata). The endpoint version is based on the version of the Pub/Sub API.

    If not present during the subscriptions.create call, it will default to the version of the API used to make such call. If not present during a subscriptions.modifyPushConfig call, its value will not be changed. subscriptions.get calls will always return a valid version, even if the subscription was created without this attribute.

    The possible values for this attribute are:

    • v1beta1: uses the push format defined in the v1beta1 Pub/Sub API.
    • v1 or v1beta2: uses the push format defined in the v1 Pub/Sub API.
    NoWrappers []GetSubscriptionPushConfigNoWrapper
    When set, the payload to the push endpoint is not wrapped.Sets the 'data' field as the HTTP body for delivery.
    OidcTokens []GetSubscriptionPushConfigOidcToken
    If specified, Pub/Sub will generate and attach an OIDC JWT token as an Authorization header in the HTTP request for every pushed message.
    PushEndpoint string
    A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
    attributes Map<String,String>

    Endpoint configuration attributes.

    Every endpoint has a set of API supported attributes that can be used to control different aspects of the message delivery.

    The currently supported attribute is x-goog-version, which you can use to change the format of the pushed message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the pushed message (i.e., its fields and metadata). The endpoint version is based on the version of the Pub/Sub API.

    If not present during the subscriptions.create call, it will default to the version of the API used to make such call. If not present during a subscriptions.modifyPushConfig call, its value will not be changed. subscriptions.get calls will always return a valid version, even if the subscription was created without this attribute.

    The possible values for this attribute are:

    • v1beta1: uses the push format defined in the v1beta1 Pub/Sub API.
    • v1 or v1beta2: uses the push format defined in the v1 Pub/Sub API.
    noWrappers List<GetSubscriptionPushConfigNoWrapper>
    When set, the payload to the push endpoint is not wrapped.Sets the 'data' field as the HTTP body for delivery.
    oidcTokens List<GetSubscriptionPushConfigOidcToken>
    If specified, Pub/Sub will generate and attach an OIDC JWT token as an Authorization header in the HTTP request for every pushed message.
    pushEndpoint String
    A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
    attributes {[key: string]: string}

    Endpoint configuration attributes.

    Every endpoint has a set of API supported attributes that can be used to control different aspects of the message delivery.

    The currently supported attribute is x-goog-version, which you can use to change the format of the pushed message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the pushed message (i.e., its fields and metadata). The endpoint version is based on the version of the Pub/Sub API.

    If not present during the subscriptions.create call, it will default to the version of the API used to make such call. If not present during a subscriptions.modifyPushConfig call, its value will not be changed. subscriptions.get calls will always return a valid version, even if the subscription was created without this attribute.

    The possible values for this attribute are:

    • v1beta1: uses the push format defined in the v1beta1 Pub/Sub API.
    • v1 or v1beta2: uses the push format defined in the v1 Pub/Sub API.
    noWrappers GetSubscriptionPushConfigNoWrapper[]
    When set, the payload to the push endpoint is not wrapped.Sets the 'data' field as the HTTP body for delivery.
    oidcTokens GetSubscriptionPushConfigOidcToken[]
    If specified, Pub/Sub will generate and attach an OIDC JWT token as an Authorization header in the HTTP request for every pushed message.
    pushEndpoint string
    A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
    attributes Mapping[str, str]

    Endpoint configuration attributes.

    Every endpoint has a set of API supported attributes that can be used to control different aspects of the message delivery.

    The currently supported attribute is x-goog-version, which you can use to change the format of the pushed message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the pushed message (i.e., its fields and metadata). The endpoint version is based on the version of the Pub/Sub API.

    If not present during the subscriptions.create call, it will default to the version of the API used to make such call. If not present during a subscriptions.modifyPushConfig call, its value will not be changed. subscriptions.get calls will always return a valid version, even if the subscription was created without this attribute.

    The possible values for this attribute are:

    • v1beta1: uses the push format defined in the v1beta1 Pub/Sub API.
    • v1 or v1beta2: uses the push format defined in the v1 Pub/Sub API.
    no_wrappers Sequence[GetSubscriptionPushConfigNoWrapper]
    When set, the payload to the push endpoint is not wrapped.Sets the 'data' field as the HTTP body for delivery.
    oidc_tokens Sequence[GetSubscriptionPushConfigOidcToken]
    If specified, Pub/Sub will generate and attach an OIDC JWT token as an Authorization header in the HTTP request for every pushed message.
    push_endpoint str
    A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
    attributes Map<String>

    Endpoint configuration attributes.

    Every endpoint has a set of API supported attributes that can be used to control different aspects of the message delivery.

    The currently supported attribute is x-goog-version, which you can use to change the format of the pushed message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the pushed message (i.e., its fields and metadata). The endpoint version is based on the version of the Pub/Sub API.

    If not present during the subscriptions.create call, it will default to the version of the API used to make such call. If not present during a subscriptions.modifyPushConfig call, its value will not be changed. subscriptions.get calls will always return a valid version, even if the subscription was created without this attribute.

    The possible values for this attribute are:

    • v1beta1: uses the push format defined in the v1beta1 Pub/Sub API.
    • v1 or v1beta2: uses the push format defined in the v1 Pub/Sub API.
    noWrappers List<Property Map>
    When set, the payload to the push endpoint is not wrapped.Sets the 'data' field as the HTTP body for delivery.
    oidcTokens List<Property Map>
    If specified, Pub/Sub will generate and attach an OIDC JWT token as an Authorization header in the HTTP request for every pushed message.
    pushEndpoint String
    A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".

    GetSubscriptionPushConfigNoWrapper

    WriteMetadata bool
    When true, writes the Pub/Sub message metadata to 'x-goog-pubsub-:' headers of the HTTP request. Writes the Pub/Sub message attributes to ':' headers of the HTTP request.
    WriteMetadata bool
    When true, writes the Pub/Sub message metadata to 'x-goog-pubsub-:' headers of the HTTP request. Writes the Pub/Sub message attributes to ':' headers of the HTTP request.
    writeMetadata Boolean
    When true, writes the Pub/Sub message metadata to 'x-goog-pubsub-:' headers of the HTTP request. Writes the Pub/Sub message attributes to ':' headers of the HTTP request.
    writeMetadata boolean
    When true, writes the Pub/Sub message metadata to 'x-goog-pubsub-:' headers of the HTTP request. Writes the Pub/Sub message attributes to ':' headers of the HTTP request.
    write_metadata bool
    When true, writes the Pub/Sub message metadata to 'x-goog-pubsub-:' headers of the HTTP request. Writes the Pub/Sub message attributes to ':' headers of the HTTP request.
    writeMetadata Boolean
    When true, writes the Pub/Sub message metadata to 'x-goog-pubsub-:' headers of the HTTP request. Writes the Pub/Sub message attributes to ':' headers of the HTTP request.

    GetSubscriptionPushConfigOidcToken

    Audience string
    Audience to be used when generating OIDC token. The audience claim identifies the recipients that the JWT is intended for. The audience value is a single case-sensitive string. Having multiple values (array) for the audience field is not supported. More info about the OIDC JWT token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified, the Push endpoint URL will be used.
    ServiceAccountEmail string
    Service account email to be used for generating the OIDC token. The caller (for subscriptions.create, subscriptions.patch, and subscriptions.modifyPushConfig RPCs) must have the iam.serviceAccounts.actAs permission for the service account.
    Audience string
    Audience to be used when generating OIDC token. The audience claim identifies the recipients that the JWT is intended for. The audience value is a single case-sensitive string. Having multiple values (array) for the audience field is not supported. More info about the OIDC JWT token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified, the Push endpoint URL will be used.
    ServiceAccountEmail string
    Service account email to be used for generating the OIDC token. The caller (for subscriptions.create, subscriptions.patch, and subscriptions.modifyPushConfig RPCs) must have the iam.serviceAccounts.actAs permission for the service account.
    audience String
    Audience to be used when generating OIDC token. The audience claim identifies the recipients that the JWT is intended for. The audience value is a single case-sensitive string. Having multiple values (array) for the audience field is not supported. More info about the OIDC JWT token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified, the Push endpoint URL will be used.
    serviceAccountEmail String
    Service account email to be used for generating the OIDC token. The caller (for subscriptions.create, subscriptions.patch, and subscriptions.modifyPushConfig RPCs) must have the iam.serviceAccounts.actAs permission for the service account.
    audience string
    Audience to be used when generating OIDC token. The audience claim identifies the recipients that the JWT is intended for. The audience value is a single case-sensitive string. Having multiple values (array) for the audience field is not supported. More info about the OIDC JWT token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified, the Push endpoint URL will be used.
    serviceAccountEmail string
    Service account email to be used for generating the OIDC token. The caller (for subscriptions.create, subscriptions.patch, and subscriptions.modifyPushConfig RPCs) must have the iam.serviceAccounts.actAs permission for the service account.
    audience str
    Audience to be used when generating OIDC token. The audience claim identifies the recipients that the JWT is intended for. The audience value is a single case-sensitive string. Having multiple values (array) for the audience field is not supported. More info about the OIDC JWT token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified, the Push endpoint URL will be used.
    service_account_email str
    Service account email to be used for generating the OIDC token. The caller (for subscriptions.create, subscriptions.patch, and subscriptions.modifyPushConfig RPCs) must have the iam.serviceAccounts.actAs permission for the service account.
    audience String
    Audience to be used when generating OIDC token. The audience claim identifies the recipients that the JWT is intended for. The audience value is a single case-sensitive string. Having multiple values (array) for the audience field is not supported. More info about the OIDC JWT token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified, the Push endpoint URL will be used.
    serviceAccountEmail String
    Service account email to be used for generating the OIDC token. The caller (for subscriptions.create, subscriptions.patch, and subscriptions.modifyPushConfig RPCs) must have the iam.serviceAccounts.actAs permission for the service account.

    GetSubscriptionRetryPolicy

    MaximumBackoff string
    The maximum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 600 seconds. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
    MinimumBackoff string
    The minimum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 10 seconds. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
    MaximumBackoff string
    The maximum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 600 seconds. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
    MinimumBackoff string
    The minimum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 10 seconds. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
    maximumBackoff String
    The maximum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 600 seconds. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
    minimumBackoff String
    The minimum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 10 seconds. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
    maximumBackoff string
    The maximum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 600 seconds. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
    minimumBackoff string
    The minimum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 10 seconds. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
    maximum_backoff str
    The maximum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 600 seconds. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
    minimum_backoff str
    The minimum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 10 seconds. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
    maximumBackoff String
    The maximum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 600 seconds. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
    minimumBackoff String
    The minimum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 10 seconds. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi