1. Packages
  2. Google Cloud Native
  3. API Docs
  4. pubsub
  5. pubsub/v1
  6. getSnapshot

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/v1.getSnapshot

Explore with Pulumi AI

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

Gets the configuration details of a snapshot. Snapshots are used in Seek operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot.

Using getSnapshot

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 getSnapshot(args: GetSnapshotArgs, opts?: InvokeOptions): Promise<GetSnapshotResult>
function getSnapshotOutput(args: GetSnapshotOutputArgs, opts?: InvokeOptions): Output<GetSnapshotResult>
Copy
def get_snapshot(project: Optional[str] = None,
                 snapshot_id: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetSnapshotResult
def get_snapshot_output(project: Optional[pulumi.Input[str]] = None,
                 snapshot_id: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetSnapshotResult]
Copy
func LookupSnapshot(ctx *Context, args *LookupSnapshotArgs, opts ...InvokeOption) (*LookupSnapshotResult, error)
func LookupSnapshotOutput(ctx *Context, args *LookupSnapshotOutputArgs, opts ...InvokeOption) LookupSnapshotResultOutput
Copy

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

public static class GetSnapshot 
{
    public static Task<GetSnapshotResult> InvokeAsync(GetSnapshotArgs args, InvokeOptions? opts = null)
    public static Output<GetSnapshotResult> Invoke(GetSnapshotInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetSnapshotResult> getSnapshot(GetSnapshotArgs args, InvokeOptions options)
public static Output<GetSnapshotResult> getSnapshot(GetSnapshotArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: google-native:pubsub/v1:getSnapshot
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

SnapshotId This property is required. string
Project string
SnapshotId This property is required. string
Project string
snapshotId This property is required. String
project String
snapshotId This property is required. string
project string
snapshot_id This property is required. str
project str
snapshotId This property is required. String
project String

getSnapshot Result

The following output properties are available:

ExpireTime string
Optional. The snapshot is guaranteed to exist up until this time. A newly-created snapshot expires no later than 7 days from the time of its creation. Its exact lifetime is determined at creation by the existing backlog in the source subscription. Specifically, the lifetime of the snapshot is 7 days - (age of oldest unacked message in the subscription). For example, consider a subscription whose oldest unacked message is 3 days old. If a snapshot is created from this subscription, the snapshot -- which will always capture this 3-day-old backlog as long as the snapshot exists -- will expire in 4 days. The service will refuse to create a snapshot that would expire in less than 1 hour after creation.
Labels Dictionary<string, string>
Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
Name string
Optional. The name of the snapshot.
Topic string
Optional. The name of the topic from which this snapshot is retaining messages.
ExpireTime string
Optional. The snapshot is guaranteed to exist up until this time. A newly-created snapshot expires no later than 7 days from the time of its creation. Its exact lifetime is determined at creation by the existing backlog in the source subscription. Specifically, the lifetime of the snapshot is 7 days - (age of oldest unacked message in the subscription). For example, consider a subscription whose oldest unacked message is 3 days old. If a snapshot is created from this subscription, the snapshot -- which will always capture this 3-day-old backlog as long as the snapshot exists -- will expire in 4 days. The service will refuse to create a snapshot that would expire in less than 1 hour after creation.
Labels map[string]string
Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
Name string
Optional. The name of the snapshot.
Topic string
Optional. The name of the topic from which this snapshot is retaining messages.
expireTime String
Optional. The snapshot is guaranteed to exist up until this time. A newly-created snapshot expires no later than 7 days from the time of its creation. Its exact lifetime is determined at creation by the existing backlog in the source subscription. Specifically, the lifetime of the snapshot is 7 days - (age of oldest unacked message in the subscription). For example, consider a subscription whose oldest unacked message is 3 days old. If a snapshot is created from this subscription, the snapshot -- which will always capture this 3-day-old backlog as long as the snapshot exists -- will expire in 4 days. The service will refuse to create a snapshot that would expire in less than 1 hour after creation.
labels Map<String,String>
Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
name String
Optional. The name of the snapshot.
topic String
Optional. The name of the topic from which this snapshot is retaining messages.
expireTime string
Optional. The snapshot is guaranteed to exist up until this time. A newly-created snapshot expires no later than 7 days from the time of its creation. Its exact lifetime is determined at creation by the existing backlog in the source subscription. Specifically, the lifetime of the snapshot is 7 days - (age of oldest unacked message in the subscription). For example, consider a subscription whose oldest unacked message is 3 days old. If a snapshot is created from this subscription, the snapshot -- which will always capture this 3-day-old backlog as long as the snapshot exists -- will expire in 4 days. The service will refuse to create a snapshot that would expire in less than 1 hour after creation.
labels {[key: string]: string}
Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
name string
Optional. The name of the snapshot.
topic string
Optional. The name of the topic from which this snapshot is retaining messages.
expire_time str
Optional. The snapshot is guaranteed to exist up until this time. A newly-created snapshot expires no later than 7 days from the time of its creation. Its exact lifetime is determined at creation by the existing backlog in the source subscription. Specifically, the lifetime of the snapshot is 7 days - (age of oldest unacked message in the subscription). For example, consider a subscription whose oldest unacked message is 3 days old. If a snapshot is created from this subscription, the snapshot -- which will always capture this 3-day-old backlog as long as the snapshot exists -- will expire in 4 days. The service will refuse to create a snapshot that would expire in less than 1 hour after creation.
labels Mapping[str, str]
Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
name str
Optional. The name of the snapshot.
topic str
Optional. The name of the topic from which this snapshot is retaining messages.
expireTime String
Optional. The snapshot is guaranteed to exist up until this time. A newly-created snapshot expires no later than 7 days from the time of its creation. Its exact lifetime is determined at creation by the existing backlog in the source subscription. Specifically, the lifetime of the snapshot is 7 days - (age of oldest unacked message in the subscription). For example, consider a subscription whose oldest unacked message is 3 days old. If a snapshot is created from this subscription, the snapshot -- which will always capture this 3-day-old backlog as long as the snapshot exists -- will expire in 4 days. The service will refuse to create a snapshot that would expire in less than 1 hour after creation.
labels Map<String>
Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
name String
Optional. The name of the snapshot.
topic String
Optional. The name of the topic from which this snapshot is retaining messages.

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.

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