1. Packages
  2. Google Cloud Native
  3. API Docs
  4. pubsub
  5. pubsub/v1beta1a
  6. Subscription

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

google-native.pubsub/v1beta1a.Subscription

Explore with Pulumi AI

google-native logo

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

    Creates a subscription on a given topic for a given subscriber. If the subscription already exists, returns ALREADY_EXISTS. If the corresponding topic doesn’t exist, returns NOT_FOUND. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic.

    Create Subscription Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Subscription(name: string, args?: SubscriptionArgs, opts?: CustomResourceOptions);
    @overload
    def Subscription(resource_name: str,
                     args: Optional[SubscriptionArgs] = None,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def Subscription(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     ack_deadline_seconds: Optional[int] = None,
                     name: Optional[str] = None,
                     push_config: Optional[PushConfigArgs] = None,
                     topic: Optional[str] = None)
    func NewSubscription(ctx *Context, name string, args *SubscriptionArgs, opts ...ResourceOption) (*Subscription, error)
    public Subscription(string name, SubscriptionArgs? args = null, CustomResourceOptions? opts = null)
    public Subscription(String name, SubscriptionArgs args)
    public Subscription(String name, SubscriptionArgs args, CustomResourceOptions options)
    
    type: google-native:pubsub/v1beta1a:Subscription
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SubscriptionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SubscriptionArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SubscriptionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SubscriptionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SubscriptionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var examplesubscriptionResourceResourceFromPubsubv1beta1a = new GoogleNative.Pubsub.V1Beta1a.Subscription("examplesubscriptionResourceResourceFromPubsubv1beta1a", new()
    {
        AckDeadlineSeconds = 0,
        Name = "string",
        PushConfig = new GoogleNative.Pubsub.V1Beta1a.Inputs.PushConfigArgs
        {
            PushEndpoint = "string",
        },
        Topic = "string",
    });
    
    example, err := pubsubv1beta1a.NewSubscription(ctx, "examplesubscriptionResourceResourceFromPubsubv1beta1a", &pubsubv1beta1a.SubscriptionArgs{
    AckDeadlineSeconds: pulumi.Int(0),
    Name: pulumi.String("string"),
    PushConfig: &pubsub.PushConfigArgs{
    PushEndpoint: pulumi.String("string"),
    },
    Topic: pulumi.String("string"),
    })
    
    var examplesubscriptionResourceResourceFromPubsubv1beta1a = new Subscription("examplesubscriptionResourceResourceFromPubsubv1beta1a", SubscriptionArgs.builder()
        .ackDeadlineSeconds(0)
        .name("string")
        .pushConfig(PushConfigArgs.builder()
            .pushEndpoint("string")
            .build())
        .topic("string")
        .build());
    
    examplesubscription_resource_resource_from_pubsubv1beta1a = google_native.pubsub.v1beta1a.Subscription("examplesubscriptionResourceResourceFromPubsubv1beta1a",
        ack_deadline_seconds=0,
        name="string",
        push_config=google_native.pubsub.v1beta1a.PushConfigArgs(
            push_endpoint="string",
        ),
        topic="string")
    
    const examplesubscriptionResourceResourceFromPubsubv1beta1a = new google_native.pubsub.v1beta1a.Subscription("examplesubscriptionResourceResourceFromPubsubv1beta1a", {
        ackDeadlineSeconds: 0,
        name: "string",
        pushConfig: {
            pushEndpoint: "string",
        },
        topic: "string",
    });
    
    type: google-native:pubsub/v1beta1a:Subscription
    properties:
        ackDeadlineSeconds: 0
        name: string
        pushConfig:
            pushEndpoint: string
        topic: string
    

    Subscription Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Subscription resource accepts the following input properties:

    AckDeadlineSeconds int
    For either push or pull delivery, the value is the maximum time after a subscriber receives a message before the subscriber should acknowledge or Nack the message. If the Ack deadline for a message passes without an Ack or a Nack, the Pub/Sub system will eventually redeliver the message. If a subscriber acknowledges after the deadline, the Pub/Sub system may accept the Ack, but it is possible that the message has been already delivered again. Multiple Acks to the message are allowed and will succeed. For push delivery, this value is used to set the request timeout for the call to the push endpoint. For pull delivery, this value is used as the initial value for the Ack deadline. It may be overridden for each message using its corresponding ack_id with ModifyAckDeadline. While a message is outstanding (i.e. it has been delivered to a pull subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub system will not deliver that message to another pull subscriber (on a best-effort basis).
    Name string
    Name of the subscription.
    PushConfig Pulumi.GoogleNative.Pubsub.V1Beta1a.Inputs.PushConfig
    If push delivery is used with this subscription, this field is used to configure it.
    Topic string
    The name of the topic from which this subscription is receiving messages.
    AckDeadlineSeconds int
    For either push or pull delivery, the value is the maximum time after a subscriber receives a message before the subscriber should acknowledge or Nack the message. If the Ack deadline for a message passes without an Ack or a Nack, the Pub/Sub system will eventually redeliver the message. If a subscriber acknowledges after the deadline, the Pub/Sub system may accept the Ack, but it is possible that the message has been already delivered again. Multiple Acks to the message are allowed and will succeed. For push delivery, this value is used to set the request timeout for the call to the push endpoint. For pull delivery, this value is used as the initial value for the Ack deadline. It may be overridden for each message using its corresponding ack_id with ModifyAckDeadline. While a message is outstanding (i.e. it has been delivered to a pull subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub system will not deliver that message to another pull subscriber (on a best-effort basis).
    Name string
    Name of the subscription.
    PushConfig PushConfigArgs
    If push delivery is used with this subscription, this field is used to configure it.
    Topic string
    The name of the topic from which this subscription is receiving messages.
    ackDeadlineSeconds Integer
    For either push or pull delivery, the value is the maximum time after a subscriber receives a message before the subscriber should acknowledge or Nack the message. If the Ack deadline for a message passes without an Ack or a Nack, the Pub/Sub system will eventually redeliver the message. If a subscriber acknowledges after the deadline, the Pub/Sub system may accept the Ack, but it is possible that the message has been already delivered again. Multiple Acks to the message are allowed and will succeed. For push delivery, this value is used to set the request timeout for the call to the push endpoint. For pull delivery, this value is used as the initial value for the Ack deadline. It may be overridden for each message using its corresponding ack_id with ModifyAckDeadline. While a message is outstanding (i.e. it has been delivered to a pull subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub system will not deliver that message to another pull subscriber (on a best-effort basis).
    name String
    Name of the subscription.
    pushConfig PushConfig
    If push delivery is used with this subscription, this field is used to configure it.
    topic String
    The name of the topic from which this subscription is receiving messages.
    ackDeadlineSeconds number
    For either push or pull delivery, the value is the maximum time after a subscriber receives a message before the subscriber should acknowledge or Nack the message. If the Ack deadline for a message passes without an Ack or a Nack, the Pub/Sub system will eventually redeliver the message. If a subscriber acknowledges after the deadline, the Pub/Sub system may accept the Ack, but it is possible that the message has been already delivered again. Multiple Acks to the message are allowed and will succeed. For push delivery, this value is used to set the request timeout for the call to the push endpoint. For pull delivery, this value is used as the initial value for the Ack deadline. It may be overridden for each message using its corresponding ack_id with ModifyAckDeadline. While a message is outstanding (i.e. it has been delivered to a pull subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub system will not deliver that message to another pull subscriber (on a best-effort basis).
    name string
    Name of the subscription.
    pushConfig PushConfig
    If push delivery is used with this subscription, this field is used to configure it.
    topic string
    The name of the topic from which this subscription is receiving messages.
    ack_deadline_seconds int
    For either push or pull delivery, the value is the maximum time after a subscriber receives a message before the subscriber should acknowledge or Nack the message. If the Ack deadline for a message passes without an Ack or a Nack, the Pub/Sub system will eventually redeliver the message. If a subscriber acknowledges after the deadline, the Pub/Sub system may accept the Ack, but it is possible that the message has been already delivered again. Multiple Acks to the message are allowed and will succeed. For push delivery, this value is used to set the request timeout for the call to the push endpoint. For pull delivery, this value is used as the initial value for the Ack deadline. It may be overridden for each message using its corresponding ack_id with ModifyAckDeadline. While a message is outstanding (i.e. it has been delivered to a pull subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub system will not deliver that message to another pull subscriber (on a best-effort basis).
    name str
    Name of the subscription.
    push_config PushConfigArgs
    If push delivery is used with this subscription, this field is used to configure it.
    topic str
    The name of the topic from which this subscription is receiving messages.
    ackDeadlineSeconds Number
    For either push or pull delivery, the value is the maximum time after a subscriber receives a message before the subscriber should acknowledge or Nack the message. If the Ack deadline for a message passes without an Ack or a Nack, the Pub/Sub system will eventually redeliver the message. If a subscriber acknowledges after the deadline, the Pub/Sub system may accept the Ack, but it is possible that the message has been already delivered again. Multiple Acks to the message are allowed and will succeed. For push delivery, this value is used to set the request timeout for the call to the push endpoint. For pull delivery, this value is used as the initial value for the Ack deadline. It may be overridden for each message using its corresponding ack_id with ModifyAckDeadline. While a message is outstanding (i.e. it has been delivered to a pull subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub system will not deliver that message to another pull subscriber (on a best-effort basis).
    name String
    Name of the subscription.
    pushConfig Property Map
    If push delivery is used with this subscription, this field is used to configure it.
    topic String
    The name of the topic from which this subscription is receiving messages.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Subscription resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Supporting Types

    PushConfig, PushConfigArgs

    PushEndpoint string
    A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
    PushEndpoint string
    A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
    pushEndpoint String
    A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
    pushEndpoint string
    A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
    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".
    pushEndpoint String
    A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".

    PushConfigResponse, PushConfigResponseArgs

    PushEndpoint string
    A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
    PushEndpoint string
    A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
    pushEndpoint String
    A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
    pushEndpoint string
    A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
    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".
    pushEndpoint String
    A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".

    Package Details

    Repository
    Google Cloud Native pulumi/pulumi-google-native
    License
    Apache-2.0
    google-native logo

    Google Cloud Native is in preview. Google Cloud Classic is fully supported.

    Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi