Google Cloud Native is in preview. Google Cloud Classic is fully supported.
google-native.pubsub/v1beta1a.Subscription
Explore with Pulumi AI
Google Cloud Native is in preview. Google Cloud Classic is fully supported.
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:
- Ack
Deadline intSeconds - 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.
- Push
Config Pulumi.Google Native. Pubsub. V1Beta1a. Inputs. Push Config - 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 intSeconds - 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.
- Push
Config PushConfig Args - 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 IntegerSeconds - 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.
- push
Config 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 numberSeconds - 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.
- push
Config 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_ intseconds - 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 PushConfig Args - 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.
- ack
Deadline NumberSeconds - 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.
- push
Config 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
- 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".
- 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".
- 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".
- 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".
- 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".
- 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".
PushConfigResponse, PushConfigResponseArgs
- 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".
- 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".
- 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".
- 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".
- 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".
- 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".
Package Details
- Repository
- Google Cloud Native pulumi/pulumi-google-native
- License
- Apache-2.0
Google Cloud Native is in preview. Google Cloud Classic is fully supported.