gcp.pubsub.getSubscription
Explore with Pulumi AI
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/v7/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:
getSubscription Result
The following output properties are available:
- Ack
Deadline intSeconds - Bigquery
Configs List<GetSubscription Bigquery Config> - Cloud
Storage List<GetConfigs Subscription Cloud Storage Config> - Dead
Letter List<GetPolicies Subscription Dead Letter Policy> - Effective
Labels Dictionary<string, string> - Enable
Exactly boolOnce Delivery - Enable
Message boolOrdering - Expiration
Policies List<GetSubscription Expiration Policy> - Filter string
- Id string
- The provider-assigned unique ID for this managed resource.
- Labels Dictionary<string, string>
- Message
Retention stringDuration - Name string
- Pulumi
Labels Dictionary<string, string> - Push
Configs List<GetSubscription Push Config> - Retain
Acked boolMessages - Retry
Policies List<GetSubscription Retry Policy> - Topic string
- Project string
- Ack
Deadline intSeconds - Bigquery
Configs []GetSubscription Bigquery Config - Cloud
Storage []GetConfigs Subscription Cloud Storage Config - Dead
Letter []GetPolicies Subscription Dead Letter Policy - Effective
Labels map[string]string - Enable
Exactly boolOnce Delivery - Enable
Message boolOrdering - Expiration
Policies []GetSubscription Expiration Policy - Filter string
- Id string
- The provider-assigned unique ID for this managed resource.
- Labels map[string]string
- Message
Retention stringDuration - Name string
- Pulumi
Labels map[string]string - Push
Configs []GetSubscription Push Config - Retain
Acked boolMessages - Retry
Policies []GetSubscription Retry Policy - Topic string
- Project string
- ack
Deadline IntegerSeconds - bigquery
Configs List<GetSubscription Bigquery Config> - cloud
Storage List<GetConfigs Subscription Cloud Storage Config> - dead
Letter List<GetPolicies Subscription Dead Letter Policy> - effective
Labels Map<String,String> - enable
Exactly BooleanOnce Delivery - enable
Message BooleanOrdering - expiration
Policies List<GetSubscription Expiration Policy> - filter String
- id String
- The provider-assigned unique ID for this managed resource.
- labels Map<String,String>
- message
Retention StringDuration - name String
- pulumi
Labels Map<String,String> - push
Configs List<GetSubscription Push Config> - retain
Acked BooleanMessages - retry
Policies List<GetSubscription Retry Policy> - topic String
- project String
- ack
Deadline numberSeconds - bigquery
Configs GetSubscription Bigquery Config[] - cloud
Storage GetConfigs Subscription Cloud Storage Config[] - dead
Letter GetPolicies Subscription Dead Letter Policy[] - effective
Labels {[key: string]: string} - enable
Exactly booleanOnce Delivery - enable
Message booleanOrdering - expiration
Policies GetSubscription Expiration Policy[] - filter string
- id string
- The provider-assigned unique ID for this managed resource.
- labels {[key: string]: string}
- message
Retention stringDuration - name string
- pulumi
Labels {[key: string]: string} - push
Configs GetSubscription Push Config[] - retain
Acked booleanMessages - retry
Policies GetSubscription Retry Policy[] - topic string
- project string
- ack_
deadline_ intseconds - bigquery_
configs Sequence[GetSubscription Bigquery Config] - cloud_
storage_ Sequence[Getconfigs Subscription Cloud Storage Config] - dead_
letter_ Sequence[Getpolicies Subscription Dead Letter Policy] - effective_
labels Mapping[str, str] - enable_
exactly_ boolonce_ delivery - enable_
message_ boolordering - expiration_
policies Sequence[GetSubscription Expiration Policy] - filter str
- id str
- The provider-assigned unique ID for this managed resource.
- labels Mapping[str, str]
- message_
retention_ strduration - name str
- pulumi_
labels Mapping[str, str] - push_
configs Sequence[GetSubscription Push Config] - retain_
acked_ boolmessages - retry_
policies Sequence[GetSubscription Retry Policy] - topic str
- project str
- ack
Deadline NumberSeconds - bigquery
Configs List<Property Map> - cloud
Storage List<Property Map>Configs - dead
Letter List<Property Map>Policies - effective
Labels Map<String> - enable
Exactly BooleanOnce Delivery - enable
Message BooleanOrdering - expiration
Policies List<Property Map> - filter String
- id String
- The provider-assigned unique ID for this managed resource.
- labels Map<String>
- message
Retention StringDuration - name String
- pulumi
Labels Map<String> - push
Configs List<Property Map> - retain
Acked BooleanMessages - retry
Policies List<Property Map> - topic String
- project String
Supporting Types
GetSubscriptionBigqueryConfig
- Drop
Unknown boolFields - 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 stringEmail - 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}
- Use
Table boolSchema - 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 boolSchema - 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.
- Drop
Unknown boolFields - 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 stringEmail - 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}
- Use
Table boolSchema - 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 boolSchema - 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.
- drop
Unknown BooleanFields - 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 StringEmail - 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}
- use
Table BooleanSchema - 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 BooleanSchema - 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 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 booleanFields - 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 stringEmail - 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}
- use
Table booleanSchema - 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 booleanSchema - 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 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_ boolfields - 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_ stremail - 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_ boolschema - 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_ boolschema - 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.
- drop
Unknown BooleanFields - 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 StringEmail - 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}
- use
Table BooleanSchema - 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 BooleanSchema - 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 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
- Avro
Configs List<GetSubscription Cloud Storage Config Avro Config> - 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://".
- Filename
Datetime stringFormat - User-provided format string specifying how to represent datetimes in Cloud Storage filenames.
- Filename
Prefix string - User-provided prefix for Cloud Storage filename.
- Filename
Suffix string - 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 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".
- Service
Account stringEmail - 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 []GetSubscription Cloud Storage Config Avro Config - 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://".
- Filename
Datetime stringFormat - User-provided format string specifying how to represent datetimes in Cloud Storage filenames.
- Filename
Prefix string - User-provided prefix for Cloud Storage filename.
- Filename
Suffix string - 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 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".
- Service
Account stringEmail - 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 List<GetSubscription Cloud Storage Config Avro Config> - 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://".
- filename
Datetime StringFormat - User-provided format string specifying how to represent datetimes in Cloud Storage filenames.
- filename
Prefix String - User-provided prefix for Cloud Storage filename.
- filename
Suffix String - User-provided suffix for Cloud Storage filename. Must not end in "/".
- max
Bytes 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.
- max
Duration 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".
- service
Account StringEmail - 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 GetSubscription Cloud Storage Config Avro Config[] - 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://".
- filename
Datetime stringFormat - User-provided format string specifying how to represent datetimes in Cloud Storage filenames.
- filename
Prefix string - User-provided prefix for Cloud Storage filename.
- filename
Suffix string - User-provided suffix for Cloud Storage filename. Must not end in "/".
- max
Bytes 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.
- max
Duration 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".
- service
Account stringEmail - 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[GetSubscription Cloud Storage Config Avro Config] - 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_ strformat - 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".
- service_
account_ stremail - 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.
- avro
Configs 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://".
- filename
Datetime StringFormat - User-provided format string specifying how to represent datetimes in Cloud Storage filenames.
- filename
Prefix String - User-provided prefix for Cloud Storage filename.
- filename
Suffix String - User-provided suffix for Cloud Storage filename. Must not end in "/".
- max
Bytes 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.
- max
Duration 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".
- service
Account StringEmail - 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
- Write
Metadata bool - When true, write the subscription name, messageId, publishTime, attributes, and orderingKey as additional fields in the output.
- Write
Metadata bool - When true, write the subscription name, messageId, publishTime, attributes, and orderingKey as additional fields in the output.
- write
Metadata Boolean - When true, write the subscription name, messageId, publishTime, attributes, and orderingKey as additional fields in the output.
- write
Metadata boolean - When true, write the subscription name, messageId, publishTime, attributes, and orderingKey as additional fields in the output.
- write_
metadata bool - When true, write the subscription name, messageId, publishTime, attributes, and orderingKey as additional fields in the output.
- write
Metadata Boolean - When true, write the subscription name, messageId, publishTime, attributes, and orderingKey as additional fields in the output.
GetSubscriptionDeadLetterPolicy
- Dead
Letter stringTopic 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 intAttempts 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 stringTopic 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 intAttempts 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 StringTopic 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 IntegerAttempts 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 stringTopic 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 numberAttempts 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_ strtopic 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_ intattempts 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 StringTopic 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 NumberAttempts 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.
- No
Wrappers List<GetSubscription Push Config No Wrapper> - When set, the payload to the push endpoint is not wrapped.Sets the 'data' field as the HTTP body for delivery.
- Oidc
Tokens List<GetSubscription Push Config Oidc Token> - 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 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.
- No
Wrappers []GetSubscription Push Config No Wrapper - When set, the payload to the push endpoint is not wrapped.Sets the 'data' field as the HTTP body for delivery.
- Oidc
Tokens []GetSubscription Push Config Oidc Token - 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 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.
- no
Wrappers List<GetSubscription Push Config No Wrapper> - When set, the payload to the push endpoint is not wrapped.Sets the 'data' field as the HTTP body for delivery.
- oidc
Tokens List<GetSubscription Push Config Oidc Token> - 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 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.
- no
Wrappers GetSubscription Push Config No Wrapper[] - When set, the payload to the push endpoint is not wrapped.Sets the 'data' field as the HTTP body for delivery.
- oidc
Tokens GetSubscription Push Config Oidc Token[] - 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 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[GetSubscription Push Config No Wrapper] - When set, the payload to the push endpoint is not wrapped.Sets the 'data' field as the HTTP body for delivery.
- oidc_
tokens Sequence[GetSubscription Push Config Oidc Token] - 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.
- no
Wrappers List<Property Map> - When set, the payload to the push endpoint is not wrapped.Sets the 'data' field as the HTTP body for delivery.
- oidc
Tokens 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.
- push
Endpoint String - A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
GetSubscriptionPushConfigNoWrapper
- 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.
- 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.
- write
Metadata 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 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.
- write
Metadata 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.
- Service
Account stringEmail - 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.
- Service
Account stringEmail - 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.
- service
Account StringEmail - 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.
- service
Account stringEmail - 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_ stremail - 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.
- service
Account StringEmail - 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
- Maximum
Backoff 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".
- Minimum
Backoff 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 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".
- Minimum
Backoff 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 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".
- minimum
Backoff 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 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".
- minimum
Backoff 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".
- maximum
Backoff 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".
- minimum
Backoff 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.