import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
 * A named resource representing the stream of messages from a single,
 * specific topic, to be delivered to the subscribing application.
 *
 * To get more information about Subscription, see:
 *
 * * [API documentation](https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions)
 * * How-to Guides
 *     * [Managing Subscriptions](https://cloud.google.com/pubsub/docs/admin#managing_subscriptions)
 *
 * > **Note:** You can retrieve the email of the Google Managed Pub/Sub Service Account used for forwarding
 * by using the `gcp.projects.ServiceIdentity` resource.
 *
 * ## Example Usage
 *
 * ### Pubsub Subscription Push
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const example = new gcp.pubsub.Topic("example", {name: "example-topic"});
 * const exampleSubscription = new gcp.pubsub.Subscription("example", {
 *     name: "example-subscription",
 *     topic: example.id,
 *     ackDeadlineSeconds: 20,
 *     labels: {
 *         foo: "bar",
 *     },
 *     pushConfig: {
 *         pushEndpoint: "https://example.com/push",
 *         attributes: {
 *             "x-goog-version": "v1",
 *         },
 *     },
 * });
 * ```
 * ### Pubsub Subscription Pull
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const example = new gcp.pubsub.Topic("example", {name: "example-topic"});
 * const exampleSubscription = new gcp.pubsub.Subscription("example", {
 *     name: "example-subscription",
 *     topic: example.id,
 *     labels: {
 *         foo: "bar",
 *     },
 *     messageRetentionDuration: "1200s",
 *     retainAckedMessages: true,
 *     ackDeadlineSeconds: 20,
 *     expirationPolicy: {
 *         ttl: "300000.5s",
 *     },
 *     retryPolicy: {
 *         minimumBackoff: "10s",
 *     },
 *     enableMessageOrdering: false,
 * });
 * ```
 * ### Pubsub Subscription Pull Filter
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const example = new gcp.pubsub.Topic("example", {name: "example-topic"});
 * const exampleSubscription = new gcp.pubsub.Subscription("example", {
 *     name: "example-subscription",
 *     topic: example.id,
 *     labels: {
 *         foo: "bar",
 *     },
 *     filter: `    attributes.foo = \\"foo\\"
 *     AND attributes.bar = \\"bar\\"
 * `,
 *     ackDeadlineSeconds: 20,
 * });
 * ```
 * ### Pubsub Subscription Dead Letter
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const example = new gcp.pubsub.Topic("example", {name: "example-topic"});
 * const exampleDeadLetter = new gcp.pubsub.Topic("example_dead_letter", {name: "example-topic-dead-letter"});
 * const exampleSubscription = new gcp.pubsub.Subscription("example", {
 *     name: "example-subscription",
 *     topic: example.id,
 *     deadLetterPolicy: {
 *         deadLetterTopic: exampleDeadLetter.id,
 *         maxDeliveryAttempts: 10,
 *     },
 * });
 * ```
 * ### Pubsub Subscription Push Bq
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const example = new gcp.pubsub.Topic("example", {name: "example-topic"});
 * const test = new gcp.bigquery.Dataset("test", {datasetId: "example_dataset"});
 * const testTable = new gcp.bigquery.Table("test", {
 *     tableId: "example_table",
 *     datasetId: test.datasetId,
 *     schema: `[
 *   {
 *     \\"name\\": \\"data\\",
 *     \\"type\\": \\"STRING\\",
 *     \\"mode\\": \\"NULLABLE\\",
 *     \\"description\\": \\"The data\\"
 *   }
 * ]
 * `,
 *     deletionProtection: false,
 * });
 * const exampleSubscription = new gcp.pubsub.Subscription("example", {
 *     name: "example-subscription",
 *     topic: example.id,
 *     bigqueryConfig: {
 *         table: pulumi.interpolate`${testTable.project}.${testTable.datasetId}.${testTable.tableId}`,
 *     },
 * });
 * const project = gcp.organizations.getProject({});
 * ```
 * ### Pubsub Subscription Push Bq Table Schema
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const example = new gcp.pubsub.Topic("example", {name: "example-topic"});
 * const test = new gcp.bigquery.Dataset("test", {datasetId: "example_dataset"});
 * const testTable = new gcp.bigquery.Table("test", {
 *     tableId: "example_table",
 *     datasetId: test.datasetId,
 *     schema: `[
 *   {
 *     \\"name\\": \\"data\\",
 *     \\"type\\": \\"STRING\\",
 *     \\"mode\\": \\"NULLABLE\\",
 *     \\"description\\": \\"The data\\"
 *   }
 * ]
 * `,
 *     deletionProtection: false,
 * });
 * const exampleSubscription = new gcp.pubsub.Subscription("example", {
 *     name: "example-subscription",
 *     topic: example.id,
 *     bigqueryConfig: {
 *         table: pulumi.interpolate`${testTable.project}.${testTable.datasetId}.${testTable.tableId}`,
 *         useTableSchema: true,
 *     },
 * });
 * const project = gcp.organizations.getProject({});
 * ```
 * ### Pubsub Subscription Push Bq Service Account
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const example = new gcp.pubsub.Topic("example", {name: "example-topic"});
 * const bqWriteServiceAccount = new gcp.serviceaccount.Account("bq_write_service_account", {
 *     accountId: "example-bqw",
 *     displayName: "BQ Write Service Account",
 * });
 * const project = gcp.organizations.getProject({});
 * const bigqueryMetadataViewer = new gcp.projects.IAMMember("bigquery_metadata_viewer", {
 *     project: project.then(project => project.projectId),
 *     role: "roles/bigquery.metadataViewer",
 *     member: pulumi.interpolate`serviceAccount:${bqWriteServiceAccount.email}`,
 * });
 * const bigqueryDataEditor = new gcp.projects.IAMMember("bigquery_data_editor", {
 *     project: project.then(project => project.projectId),
 *     role: "roles/bigquery.dataEditor",
 *     member: pulumi.interpolate`serviceAccount:${bqWriteServiceAccount.email}`,
 * });
 * const test = new gcp.bigquery.Dataset("test", {datasetId: "example_dataset"});
 * const testTable = new gcp.bigquery.Table("test", {
 *     deletionProtection: false,
 *     tableId: "example_table",
 *     datasetId: test.datasetId,
 *     schema: `[
 *   {
 *     \\"name\\": \\"data\\",
 *     \\"type\\": \\"STRING\\",
 *     \\"mode\\": \\"NULLABLE\\",
 *     \\"description\\": \\"The data\\"
 *   }
 * ]
 * `,
 * });
 * const exampleSubscription = new gcp.pubsub.Subscription("example", {
 *     name: "example-subscription",
 *     topic: example.id,
 *     bigqueryConfig: {
 *         table: pulumi.interpolate`${testTable.project}.${testTable.datasetId}.${testTable.tableId}`,
 *         serviceAccountEmail: bqWriteServiceAccount.email,
 *     },
 * }, {
 *     dependsOn: [
 *         bqWriteServiceAccount,
 *         bigqueryMetadataViewer,
 *         bigqueryDataEditor,
 *     ],
 * });
 * ```
 * ### Pubsub Subscription Push Cloudstorage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const example = new gcp.storage.Bucket("example", {
 *     name: "example-bucket",
 *     location: "US",
 *     uniformBucketLevelAccess: true,
 * });
 * const exampleTopic = new gcp.pubsub.Topic("example", {name: "example-topic"});
 * const project = gcp.organizations.getProject({});
 * const admin = new gcp.storage.BucketIAMMember("admin", {
 *     bucket: example.name,
 *     role: "roles/storage.admin",
 *     member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-pubsub.iam.gserviceaccount.com`),
 * });
 * const exampleSubscription = new gcp.pubsub.Subscription("example", {
 *     name: "example-subscription",
 *     topic: exampleTopic.id,
 *     cloudStorageConfig: {
 *         bucket: example.name,
 *         filenamePrefix: "pre-",
 *         filenameSuffix: "-_34534",
 *         filenameDatetimeFormat: "YYYY-MM-DD/hh_mm_ssZ",
 *         maxBytes: 1000,
 *         maxDuration: "300s",
 *         maxMessages: 1000,
 *     },
 * }, {
 *     dependsOn: [
 *         example,
 *         admin,
 *     ],
 * });
 * ```
 * ### Pubsub Subscription Push Cloudstorage Text
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const example = new gcp.storage.Bucket("example", {
 *     name: "example-bucket",
 *     location: "US",
 *     uniformBucketLevelAccess: true,
 * });
 * const exampleTopic = new gcp.pubsub.Topic("example", {name: "example-topic"});
 * const project = gcp.organizations.getProject({});
 * const admin = new gcp.storage.BucketIAMMember("admin", {
 *     bucket: example.name,
 *     role: "roles/storage.admin",
 *     member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-pubsub.iam.gserviceaccount.com`),
 * });
 * const exampleSubscription = new gcp.pubsub.Subscription("example", {
 *     name: "example-subscription",
 *     topic: exampleTopic.id,
 *     cloudStorageConfig: {
 *         bucket: example.name,
 *         filenamePrefix: "pre-",
 *         filenameSuffix: "-_87829",
 *         filenameDatetimeFormat: "YYYY-MM-DD/hh_mm_ssZ",
 *         maxBytes: 1000,
 *         maxDuration: "300s",
 *         maxMessages: 1000,
 *         textConfig: {},
 *     },
 * }, {
 *     dependsOn: [
 *         example,
 *         admin,
 *     ],
 * });
 * ```
 * ### Pubsub Subscription Push Cloudstorage Avro
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const example = new gcp.storage.Bucket("example", {
 *     name: "example-bucket",
 *     location: "US",
 *     uniformBucketLevelAccess: true,
 * });
 * const exampleTopic = new gcp.pubsub.Topic("example", {name: "example-topic"});
 * const project = gcp.organizations.getProject({});
 * const admin = new gcp.storage.BucketIAMMember("admin", {
 *     bucket: example.name,
 *     role: "roles/storage.admin",
 *     member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-pubsub.iam.gserviceaccount.com`),
 * });
 * const exampleSubscription = new gcp.pubsub.Subscription("example", {
 *     name: "example-subscription",
 *     topic: exampleTopic.id,
 *     cloudStorageConfig: {
 *         bucket: example.name,
 *         filenamePrefix: "pre-",
 *         filenameSuffix: "-_44023",
 *         filenameDatetimeFormat: "YYYY-MM-DD/hh_mm_ssZ",
 *         maxBytes: 1000,
 *         maxDuration: "300s",
 *         maxMessages: 1000,
 *         avroConfig: {
 *             writeMetadata: true,
 *             useTopicSchema: true,
 *         },
 *     },
 * }, {
 *     dependsOn: [
 *         example,
 *         admin,
 *     ],
 * });
 * ```
 * ### Pubsub Subscription Push Cloudstorage Service Account
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const example = new gcp.storage.Bucket("example", {
 *     name: "example-bucket",
 *     location: "US",
 *     uniformBucketLevelAccess: true,
 * });
 * const exampleTopic = new gcp.pubsub.Topic("example", {name: "example-topic"});
 * const storageWriteServiceAccount = new gcp.serviceaccount.Account("storage_write_service_account", {
 *     accountId: "example-stw",
 *     displayName: "Storage Write Service Account",
 * });
 * const admin = new gcp.storage.BucketIAMMember("admin", {
 *     bucket: example.name,
 *     role: "roles/storage.admin",
 *     member: pulumi.interpolate`serviceAccount:${storageWriteServiceAccount.email}`,
 * });
 * const exampleSubscription = new gcp.pubsub.Subscription("example", {
 *     name: "example-subscription",
 *     topic: exampleTopic.id,
 *     cloudStorageConfig: {
 *         bucket: example.name,
 *         filenamePrefix: "pre-",
 *         filenameSuffix: "-_50206",
 *         filenameDatetimeFormat: "YYYY-MM-DD/hh_mm_ssZ",
 *         maxBytes: 1000,
 *         maxDuration: "300s",
 *         serviceAccountEmail: storageWriteServiceAccount.email,
 *     },
 * }, {
 *     dependsOn: [
 *         storageWriteServiceAccount,
 *         example,
 *         admin,
 *     ],
 * });
 * const project = gcp.organizations.getProject({});
 * ```
 * ### Pubsub Subscription Single Smt
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const example = new gcp.pubsub.Topic("example", {name: "example-topic"});
 * const exampleSubscription = new gcp.pubsub.Subscription("example", {
 *     name: "example-subscription",
 *     topic: example.id,
 *     messageTransforms: [{
 *         javascriptUdf: {
 *             functionName: "isYearEven",
 *             code: `function isYearEven(message, metadata) {
 *   const data = JSON.parse(message.data);
 *   return message.year %2 === 0;
 * }
 * `,
 *         },
 *     }],
 * });
 * ```
 * ### Pubsub Subscription Multiple Smts
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const example = new gcp.pubsub.Topic("example", {name: "example-topic"});
 * const exampleSubscription = new gcp.pubsub.Subscription("example", {
 *     name: "example-subscription",
 *     topic: example.id,
 *     messageTransforms: [
 *         {
 *             javascriptUdf: {
 *                 functionName: "redactSSN",
 *                 code: `function redactSSN(message, metadata) {
 *   const data = JSON.parse(message.data);
 *   delete data['ssn'];
 *   message.data = JSON.stringify(data);
 *   return message;
 * }
 * `,
 *             },
 *         },
 *         {
 *             javascriptUdf: {
 *                 functionName: "otherFunc",
 *                 code: `function otherFunc(message, metadata) {
 *   return null;
 * }
 * `,
 *             },
 *         },
 *         {
 *             disabled: true,
 *             javascriptUdf: {
 *                 functionName: "someSMTWeDisabled",
 *                 code: "...",
 *             },
 *         },
 *     ],
 * });
 * ```
 * ### Pubsub Subscription Tags
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const example = new gcp.pubsub.Topic("example", {name: "example-topic"});
 * const project = gcp.organizations.getProject({});
 * const tagKey = new gcp.tags.TagKey("tag_key", {
 *     parent: project.then(project => project.id),
 *     shortName: "tag_key",
 * }, {
 *     dependsOn: [example],
 * });
 * const tagValue = new gcp.tags.TagValue("tag_value", {
 *     parent: tagKey.id,
 *     shortName: "tag_value",
 * });
 * const exampleSubscription = new gcp.pubsub.Subscription("example", {
 *     name: "example-subscription",
 *     topic: example.id,
 *     tags: pulumi.all([tagKey.namespacedName, tagValue.shortName]).apply(([namespacedName, shortName]) => {
 *         [namespacedName]: shortName,
 *     }),
 * });
 * ```
 * ### Pubsub Subscription Ai Inference
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * import * as time from "@pulumiverse/time";
 *
 * const example = new gcp.pubsub.Topic("example", {name: "example-topic"});
 * const geminiQueryServiceAccount = new gcp.serviceaccount.Account("gemini_query_service_account", {
 *     accountId: "example-sa",
 *     displayName: "Gemini Query Service Account",
 * });
 * const geminiInferenceGet = new gcp.projects.IAMMember("gemini_inference_get", {
 *     project: "my-project-name",
 *     role: "roles/aiplatform.user",
 *     member: pulumi.interpolate`serviceAccount:${geminiQueryServiceAccount.email}`,
 * });
 * const wait120Seconds = new time.Sleep("wait_120_seconds", {createDuration: "120s"}, {
 *     dependsOn: [geminiInferenceGet],
 * });
 * const exampleSubscription = new gcp.pubsub.Subscription("example", {
 *     name: "example-subscription",
 *     topic: example.id,
 *     messageTransforms: [{
 *         aiInference: {
 *             endpoint: "projects/my-project-name/locations/us-central1/publishers/google/models/gemini-2.5-flash",
 *             unstructuredInference: {
 *                 parameters: {
 *                     max_tokens: "25000",
 *                 },
 *             },
 *             serviceAccountEmail: geminiQueryServiceAccount.email,
 *         },
 *     }],
 * }, {
 *     dependsOn: [wait120Seconds],
 * });
 * ```
 *
 * ## Import
 *
 * Subscription can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/subscriptions/{{name}}`
 * * `{{project}}/{{name}}`
 * * `{{name}}`
 *
 * When using the `pulumi import` command, Subscription can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:pubsub/subscription:Subscription default projects/{{project}}/subscriptions/{{name}}
 * $ pulumi import gcp:pubsub/subscription:Subscription default {{project}}/{{name}}
 * $ pulumi import gcp:pubsub/subscription:Subscription default {{name}}
 * ```
 */
export declare class Subscription extends pulumi.CustomResource {
    /**
     * Get an existing Subscription resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param state Any extra arguments used during the lookup.
     * @param opts Optional settings to control the behavior of the CustomResource.
     */
    static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SubscriptionState, opts?: pulumi.CustomResourceOptions): Subscription;
    /**
     * Returns true if the given object is an instance of Subscription.  This is designed to work even
     * when multiple copies of the Pulumi SDK have been loaded into the same process.
     */
    static isInstance(obj: any): obj is Subscription;
    /**
     * This value is the maximum time after a subscriber receives a message
     * before the subscriber should acknowledge the message. After message
     * delivery but before the ack deadline expires and before the message is
     * acknowledged, it is an outstanding message and will not be delivered
     * again during that time (on a best-effort basis).
     * For pull subscriptions, this value is used as the initial value for
     * the ack deadline. To override this value for a given message, call
     * subscriptions.modifyAckDeadline with the corresponding ackId if using
     * pull. The minimum custom deadline you can specify is 10 seconds. The
     * maximum custom deadline you can specify is 600 seconds (10 minutes).
     * If this parameter is 0, a default value of 10 seconds is used.
     * For push delivery, this value is also used to set the request timeout
     * for the call to the push endpoint.
     * If the subscriber never acknowledges the message, the Pub/Sub system
     * will eventually redeliver the message.
     */
    readonly ackDeadlineSeconds: pulumi.Output<number>;
    /**
     * If delivery to BigQuery is used with this subscription, this field is used to configure it.
     * Either pushConfig, bigQueryConfig or cloudStorageConfig can be set, but not combined.
     * If all three are empty, then the subscriber will pull and ack messages using API methods.
     * Structure is documented below.
     */
    readonly bigqueryConfig: pulumi.Output<outputs.pubsub.SubscriptionBigqueryConfig | undefined>;
    /**
     * If delivery to Cloud Storage is used with this subscription, this field is used to configure it.
     * Either pushConfig, bigQueryConfig or cloudStorageConfig can be set, but not combined.
     * If all three are empty, then the subscriber will pull and ack messages using API methods.
     * Structure is documented below.
     */
    readonly cloudStorageConfig: pulumi.Output<outputs.pubsub.SubscriptionCloudStorageConfig | undefined>;
    /**
     * A policy that specifies the conditions for dead lettering messages in
     * this subscription. If deadLetterPolicy is not set, dead lettering
     * is disabled.
     * The Cloud Pub/Sub service account associated with this subscription's
     * parent project (i.e.,
     * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
     * permission to Acknowledge() messages on this subscription.
     * Structure is documented below.
     */
    readonly deadLetterPolicy: pulumi.Output<outputs.pubsub.SubscriptionDeadLetterPolicy | undefined>;
    /**
     * Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
     * When a 'terraform destroy' or 'pulumi up' would delete the resource,
     * the command will fail if this field is set to "PREVENT" in Terraform state.
     * When set to "ABANDON", the command will remove the resource from Terraform
     * management without updating or deleting the resource in the API.
     * When set to "DELETE", deleting the resource is allowed.
     */
    readonly deletionPolicy: pulumi.Output<string>;
    /**
     * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
     */
    readonly effectiveLabels: pulumi.Output<{
        [key: string]: string;
    }>;
    /**
     * If `true`, Pub/Sub provides the following guarantees for the delivery
     * of a message with a given value of messageId on this Subscriptions':
     * - The message sent to a subscriber is guaranteed not to be resent before the message's acknowledgement deadline expires.
     * - An acknowledged message will not be resent to a subscriber.
     * Note that subscribers may still receive multiple copies of a message when `enableExactlyOnceDelivery`
     * is true if the message was published multiple times by a publisher client. These copies are considered distinct by Pub/Sub and have distinct messageId values
     */
    readonly enableExactlyOnceDelivery: pulumi.Output<boolean | undefined>;
    /**
     * If `true`, messages published with the same orderingKey in PubsubMessage will be delivered to
     * the subscribers in the order in which they are received by the Pub/Sub system. Otherwise, they
     * may be delivered in any order.
     */
    readonly enableMessageOrdering: pulumi.Output<boolean | undefined>;
    /**
     * A policy that specifies the conditions for this subscription's expiration.
     * A subscription is considered active as long as any connected subscriber
     * is successfully consuming messages from the subscription or is issuing
     * operations on the subscription. If expirationPolicy is not set, a default
     * policy with ttl of 31 days will be used.  If it is set but ttl is "", the
     * resource never expires.  The minimum allowed value for expirationPolicy.ttl
     * is 1 day.
     * Structure is documented below.
     */
    readonly expirationPolicy: pulumi.Output<outputs.pubsub.SubscriptionExpirationPolicy>;
    /**
     * The subscription only delivers the messages that match the filter.
     * Pub/Sub automatically acknowledges the messages that don't match the filter. You can filter messages
     * by their attributes. The maximum length of a filter is 256 bytes. After creating the subscription,
     * you can't modify the filter.
     */
    readonly filter: pulumi.Output<string | undefined>;
    /**
     * A set of key/value label pairs to assign to this Subscription.
     *
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effectiveLabels` for all of the labels present on the resource.
     */
    readonly labels: pulumi.Output<{
        [key: string]: string;
    } | undefined>;
    /**
     * How long to retain unacknowledged messages in the subscription's
     * backlog, from the moment a message is published. If
     * retainAckedMessages is true, then this also configures the retention
     * of acknowledged messages, and thus configures how far back in time a
     * subscriptions.seek can be done. Defaults to 7 days. Cannot be more
     * than 31 days (`"2678400s"`) or less than 10 minutes (`"600s"`).
     * A duration in seconds with up to nine fractional digits, terminated
     * by 's'. Example: `"600.5s"`.
     */
    readonly messageRetentionDuration: pulumi.Output<string | undefined>;
    /**
     * Transforms to be applied to messages published to the topic. Transforms are applied in the
     * order specified.
     * Structure is documented below.
     */
    readonly messageTransforms: pulumi.Output<outputs.pubsub.SubscriptionMessageTransform[] | undefined>;
    /**
     * Name of the subscription.
     */
    readonly name: pulumi.Output<string>;
    /**
     * The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    readonly project: pulumi.Output<string>;
    /**
     * The combination of labels configured directly on the resource
     *  and default labels configured on the provider.
     */
    readonly pulumiLabels: pulumi.Output<{
        [key: string]: string;
    }>;
    /**
     * If push delivery is used with this subscription, this field is used to
     * configure it. An empty pushConfig signifies that the subscriber will
     * pull and ack messages using API methods.
     * Structure is documented below.
     */
    readonly pushConfig: pulumi.Output<outputs.pubsub.SubscriptionPushConfig | undefined>;
    /**
     * Indicates whether to retain acknowledged messages. If `true`, then
     * messages are not expunged from the subscription's backlog, even if
     * they are acknowledged, until they fall out of the
     * messageRetentionDuration window.
     */
    readonly retainAckedMessages: pulumi.Output<boolean | undefined>;
    /**
     * A policy that specifies how Pub/Sub retries message delivery for this subscription.
     * If not set, the default retry policy is applied. This generally implies that messages will be retried as soon as possible for healthy subscribers.
     * RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message
     * Structure is documented below.
     */
    readonly retryPolicy: pulumi.Output<outputs.pubsub.SubscriptionRetryPolicy | undefined>;
    /**
     * Input only. Resource manager tags to be bound to the subscription. Tag
     * keys and values have the same definition as resource manager tags. Keys
     * must be in the format tagKeys/{tag_key_id}, and values are in the format
     * tagValues/456. The field is ignored when empty. The field is immutable and
     * causes resource replacement when mutated. This field is only set at create
     * time and modifying this field after creation will trigger recreation. To
     * apply tags to an existing resource, see the `gcp.tags.TagValue`
     * resource.
     */
    readonly tags: pulumi.Output<{
        [key: string]: string;
    } | undefined>;
    /**
     * A reference to a Topic resource, of the form projects/{project}/topics/{{name}}
     * (as in the id property of a google_pubsub_topic), or just a topic name if
     * the topic is in the same project as the subscription.
     */
    readonly topic: pulumi.Output<string>;
    /**
     * Create a Subscription resource with the given unique name, arguments, and options.
     *
     * @param name The _unique_ name of the resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param opts A bag of options that control this resource's behavior.
     */
    constructor(name: string, args: SubscriptionArgs, opts?: pulumi.CustomResourceOptions);
}
/**
 * Input properties used for looking up and filtering Subscription resources.
 */
export interface SubscriptionState {
    /**
     * This value is the maximum time after a subscriber receives a message
     * before the subscriber should acknowledge the message. After message
     * delivery but before the ack deadline expires and before the message is
     * acknowledged, it is an outstanding message and will not be delivered
     * again during that time (on a best-effort basis).
     * For pull subscriptions, this value is used as the initial value for
     * the ack deadline. To override this value for a given message, call
     * subscriptions.modifyAckDeadline with the corresponding ackId if using
     * pull. The minimum custom deadline you can specify is 10 seconds. The
     * maximum custom deadline you can specify is 600 seconds (10 minutes).
     * If this parameter is 0, a default value of 10 seconds is used.
     * For push delivery, this value is also used to set the request timeout
     * for the call to the push endpoint.
     * If the subscriber never acknowledges the message, the Pub/Sub system
     * will eventually redeliver the message.
     */
    ackDeadlineSeconds?: pulumi.Input<number | undefined>;
    /**
     * If delivery to BigQuery is used with this subscription, this field is used to configure it.
     * Either pushConfig, bigQueryConfig or cloudStorageConfig can be set, but not combined.
     * If all three are empty, then the subscriber will pull and ack messages using API methods.
     * Structure is documented below.
     */
    bigqueryConfig?: pulumi.Input<inputs.pubsub.SubscriptionBigqueryConfig | undefined>;
    /**
     * If delivery to Cloud Storage is used with this subscription, this field is used to configure it.
     * Either pushConfig, bigQueryConfig or cloudStorageConfig can be set, but not combined.
     * If all three are empty, then the subscriber will pull and ack messages using API methods.
     * Structure is documented below.
     */
    cloudStorageConfig?: pulumi.Input<inputs.pubsub.SubscriptionCloudStorageConfig | undefined>;
    /**
     * A policy that specifies the conditions for dead lettering messages in
     * this subscription. If deadLetterPolicy is not set, dead lettering
     * is disabled.
     * The Cloud Pub/Sub service account associated with this subscription's
     * parent project (i.e.,
     * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
     * permission to Acknowledge() messages on this subscription.
     * Structure is documented below.
     */
    deadLetterPolicy?: pulumi.Input<inputs.pubsub.SubscriptionDeadLetterPolicy | undefined>;
    /**
     * Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
     * When a 'terraform destroy' or 'pulumi up' would delete the resource,
     * the command will fail if this field is set to "PREVENT" in Terraform state.
     * When set to "ABANDON", the command will remove the resource from Terraform
     * management without updating or deleting the resource in the API.
     * When set to "DELETE", deleting the resource is allowed.
     */
    deletionPolicy?: pulumi.Input<string | undefined>;
    /**
     * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
     */
    effectiveLabels?: pulumi.Input<{
        [key: string]: pulumi.Input<string>;
    } | undefined>;
    /**
     * If `true`, Pub/Sub provides the following guarantees for the delivery
     * of a message with a given value of messageId on this Subscriptions':
     * - The message sent to a subscriber is guaranteed not to be resent before the message's acknowledgement deadline expires.
     * - An acknowledged message will not be resent to a subscriber.
     * Note that subscribers may still receive multiple copies of a message when `enableExactlyOnceDelivery`
     * is true if the message was published multiple times by a publisher client. These copies are considered distinct by Pub/Sub and have distinct messageId values
     */
    enableExactlyOnceDelivery?: pulumi.Input<boolean | undefined>;
    /**
     * If `true`, messages published with the same orderingKey in PubsubMessage will be delivered to
     * the subscribers in the order in which they are received by the Pub/Sub system. Otherwise, they
     * may be delivered in any order.
     */
    enableMessageOrdering?: pulumi.Input<boolean | undefined>;
    /**
     * A policy that specifies the conditions for this subscription's expiration.
     * A subscription is considered active as long as any connected subscriber
     * is successfully consuming messages from the subscription or is issuing
     * operations on the subscription. If expirationPolicy is not set, a default
     * policy with ttl of 31 days will be used.  If it is set but ttl is "", the
     * resource never expires.  The minimum allowed value for expirationPolicy.ttl
     * is 1 day.
     * Structure is documented below.
     */
    expirationPolicy?: pulumi.Input<inputs.pubsub.SubscriptionExpirationPolicy | undefined>;
    /**
     * The subscription only delivers the messages that match the filter.
     * Pub/Sub automatically acknowledges the messages that don't match the filter. You can filter messages
     * by their attributes. The maximum length of a filter is 256 bytes. After creating the subscription,
     * you can't modify the filter.
     */
    filter?: pulumi.Input<string | undefined>;
    /**
     * A set of key/value label pairs to assign to this Subscription.
     *
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effectiveLabels` for all of the labels present on the resource.
     */
    labels?: pulumi.Input<{
        [key: string]: pulumi.Input<string>;
    } | undefined>;
    /**
     * How long to retain unacknowledged messages in the subscription's
     * backlog, from the moment a message is published. If
     * retainAckedMessages is true, then this also configures the retention
     * of acknowledged messages, and thus configures how far back in time a
     * subscriptions.seek can be done. Defaults to 7 days. Cannot be more
     * than 31 days (`"2678400s"`) or less than 10 minutes (`"600s"`).
     * A duration in seconds with up to nine fractional digits, terminated
     * by 's'. Example: `"600.5s"`.
     */
    messageRetentionDuration?: pulumi.Input<string | undefined>;
    /**
     * Transforms to be applied to messages published to the topic. Transforms are applied in the
     * order specified.
     * Structure is documented below.
     */
    messageTransforms?: pulumi.Input<pulumi.Input<inputs.pubsub.SubscriptionMessageTransform>[] | undefined>;
    /**
     * Name of the subscription.
     */
    name?: pulumi.Input<string | undefined>;
    /**
     * The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    project?: pulumi.Input<string | undefined>;
    /**
     * The combination of labels configured directly on the resource
     *  and default labels configured on the provider.
     */
    pulumiLabels?: pulumi.Input<{
        [key: string]: pulumi.Input<string>;
    } | undefined>;
    /**
     * If push delivery is used with this subscription, this field is used to
     * configure it. An empty pushConfig signifies that the subscriber will
     * pull and ack messages using API methods.
     * Structure is documented below.
     */
    pushConfig?: pulumi.Input<inputs.pubsub.SubscriptionPushConfig | undefined>;
    /**
     * Indicates whether to retain acknowledged messages. If `true`, then
     * messages are not expunged from the subscription's backlog, even if
     * they are acknowledged, until they fall out of the
     * messageRetentionDuration window.
     */
    retainAckedMessages?: pulumi.Input<boolean | undefined>;
    /**
     * A policy that specifies how Pub/Sub retries message delivery for this subscription.
     * If not set, the default retry policy is applied. This generally implies that messages will be retried as soon as possible for healthy subscribers.
     * RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message
     * Structure is documented below.
     */
    retryPolicy?: pulumi.Input<inputs.pubsub.SubscriptionRetryPolicy | undefined>;
    /**
     * Input only. Resource manager tags to be bound to the subscription. Tag
     * keys and values have the same definition as resource manager tags. Keys
     * must be in the format tagKeys/{tag_key_id}, and values are in the format
     * tagValues/456. The field is ignored when empty. The field is immutable and
     * causes resource replacement when mutated. This field is only set at create
     * time and modifying this field after creation will trigger recreation. To
     * apply tags to an existing resource, see the `gcp.tags.TagValue`
     * resource.
     */
    tags?: pulumi.Input<{
        [key: string]: pulumi.Input<string>;
    } | undefined>;
    /**
     * A reference to a Topic resource, of the form projects/{project}/topics/{{name}}
     * (as in the id property of a google_pubsub_topic), or just a topic name if
     * the topic is in the same project as the subscription.
     */
    topic?: pulumi.Input<string | undefined>;
}
/**
 * The set of arguments for constructing a Subscription resource.
 */
export interface SubscriptionArgs {
    /**
     * This value is the maximum time after a subscriber receives a message
     * before the subscriber should acknowledge the message. After message
     * delivery but before the ack deadline expires and before the message is
     * acknowledged, it is an outstanding message and will not be delivered
     * again during that time (on a best-effort basis).
     * For pull subscriptions, this value is used as the initial value for
     * the ack deadline. To override this value for a given message, call
     * subscriptions.modifyAckDeadline with the corresponding ackId if using
     * pull. The minimum custom deadline you can specify is 10 seconds. The
     * maximum custom deadline you can specify is 600 seconds (10 minutes).
     * If this parameter is 0, a default value of 10 seconds is used.
     * For push delivery, this value is also used to set the request timeout
     * for the call to the push endpoint.
     * If the subscriber never acknowledges the message, the Pub/Sub system
     * will eventually redeliver the message.
     */
    ackDeadlineSeconds?: pulumi.Input<number | undefined>;
    /**
     * If delivery to BigQuery is used with this subscription, this field is used to configure it.
     * Either pushConfig, bigQueryConfig or cloudStorageConfig can be set, but not combined.
     * If all three are empty, then the subscriber will pull and ack messages using API methods.
     * Structure is documented below.
     */
    bigqueryConfig?: pulumi.Input<inputs.pubsub.SubscriptionBigqueryConfig | undefined>;
    /**
     * If delivery to Cloud Storage is used with this subscription, this field is used to configure it.
     * Either pushConfig, bigQueryConfig or cloudStorageConfig can be set, but not combined.
     * If all three are empty, then the subscriber will pull and ack messages using API methods.
     * Structure is documented below.
     */
    cloudStorageConfig?: pulumi.Input<inputs.pubsub.SubscriptionCloudStorageConfig | undefined>;
    /**
     * A policy that specifies the conditions for dead lettering messages in
     * this subscription. If deadLetterPolicy is not set, dead lettering
     * is disabled.
     * The Cloud Pub/Sub service account associated with this subscription's
     * parent project (i.e.,
     * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
     * permission to Acknowledge() messages on this subscription.
     * Structure is documented below.
     */
    deadLetterPolicy?: pulumi.Input<inputs.pubsub.SubscriptionDeadLetterPolicy | undefined>;
    /**
     * Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
     * When a 'terraform destroy' or 'pulumi up' would delete the resource,
     * the command will fail if this field is set to "PREVENT" in Terraform state.
     * When set to "ABANDON", the command will remove the resource from Terraform
     * management without updating or deleting the resource in the API.
     * When set to "DELETE", deleting the resource is allowed.
     */
    deletionPolicy?: pulumi.Input<string | undefined>;
    /**
     * If `true`, Pub/Sub provides the following guarantees for the delivery
     * of a message with a given value of messageId on this Subscriptions':
     * - The message sent to a subscriber is guaranteed not to be resent before the message's acknowledgement deadline expires.
     * - An acknowledged message will not be resent to a subscriber.
     * Note that subscribers may still receive multiple copies of a message when `enableExactlyOnceDelivery`
     * is true if the message was published multiple times by a publisher client. These copies are considered distinct by Pub/Sub and have distinct messageId values
     */
    enableExactlyOnceDelivery?: pulumi.Input<boolean | undefined>;
    /**
     * If `true`, messages published with the same orderingKey in PubsubMessage will be delivered to
     * the subscribers in the order in which they are received by the Pub/Sub system. Otherwise, they
     * may be delivered in any order.
     */
    enableMessageOrdering?: pulumi.Input<boolean | undefined>;
    /**
     * A policy that specifies the conditions for this subscription's expiration.
     * A subscription is considered active as long as any connected subscriber
     * is successfully consuming messages from the subscription or is issuing
     * operations on the subscription. If expirationPolicy is not set, a default
     * policy with ttl of 31 days will be used.  If it is set but ttl is "", the
     * resource never expires.  The minimum allowed value for expirationPolicy.ttl
     * is 1 day.
     * Structure is documented below.
     */
    expirationPolicy?: pulumi.Input<inputs.pubsub.SubscriptionExpirationPolicy | undefined>;
    /**
     * The subscription only delivers the messages that match the filter.
     * Pub/Sub automatically acknowledges the messages that don't match the filter. You can filter messages
     * by their attributes. The maximum length of a filter is 256 bytes. After creating the subscription,
     * you can't modify the filter.
     */
    filter?: pulumi.Input<string | undefined>;
    /**
     * A set of key/value label pairs to assign to this Subscription.
     *
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effectiveLabels` for all of the labels present on the resource.
     */
    labels?: pulumi.Input<{
        [key: string]: pulumi.Input<string>;
    } | undefined>;
    /**
     * How long to retain unacknowledged messages in the subscription's
     * backlog, from the moment a message is published. If
     * retainAckedMessages is true, then this also configures the retention
     * of acknowledged messages, and thus configures how far back in time a
     * subscriptions.seek can be done. Defaults to 7 days. Cannot be more
     * than 31 days (`"2678400s"`) or less than 10 minutes (`"600s"`).
     * A duration in seconds with up to nine fractional digits, terminated
     * by 's'. Example: `"600.5s"`.
     */
    messageRetentionDuration?: pulumi.Input<string | undefined>;
    /**
     * Transforms to be applied to messages published to the topic. Transforms are applied in the
     * order specified.
     * Structure is documented below.
     */
    messageTransforms?: pulumi.Input<pulumi.Input<inputs.pubsub.SubscriptionMessageTransform>[] | undefined>;
    /**
     * Name of the subscription.
     */
    name?: pulumi.Input<string | undefined>;
    /**
     * The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    project?: pulumi.Input<string | undefined>;
    /**
     * If push delivery is used with this subscription, this field is used to
     * configure it. An empty pushConfig signifies that the subscriber will
     * pull and ack messages using API methods.
     * Structure is documented below.
     */
    pushConfig?: pulumi.Input<inputs.pubsub.SubscriptionPushConfig | undefined>;
    /**
     * Indicates whether to retain acknowledged messages. If `true`, then
     * messages are not expunged from the subscription's backlog, even if
     * they are acknowledged, until they fall out of the
     * messageRetentionDuration window.
     */
    retainAckedMessages?: pulumi.Input<boolean | undefined>;
    /**
     * A policy that specifies how Pub/Sub retries message delivery for this subscription.
     * If not set, the default retry policy is applied. This generally implies that messages will be retried as soon as possible for healthy subscribers.
     * RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message
     * Structure is documented below.
     */
    retryPolicy?: pulumi.Input<inputs.pubsub.SubscriptionRetryPolicy | undefined>;
    /**
     * Input only. Resource manager tags to be bound to the subscription. Tag
     * keys and values have the same definition as resource manager tags. Keys
     * must be in the format tagKeys/{tag_key_id}, and values are in the format
     * tagValues/456. The field is ignored when empty. The field is immutable and
     * causes resource replacement when mutated. This field is only set at create
     * time and modifying this field after creation will trigger recreation. To
     * apply tags to an existing resource, see the `gcp.tags.TagValue`
     * resource.
     */
    tags?: pulumi.Input<{
        [key: string]: pulumi.Input<string>;
    } | undefined>;
    /**
     * A reference to a Topic resource, of the form projects/{project}/topics/{{name}}
     * (as in the id property of a google_pubsub_topic), or just a topic name if
     * the topic is in the same project as the subscription.
     */
    topic: pulumi.Input<string>;
}
//# sourceMappingURL=subscription.d.ts.map