Google Cloud Native is in preview. Google Cloud Classic is fully supported.
google-native.pubsub/v1.getSnapshot
Explore with Pulumi AI
Google Cloud Native is in preview. Google Cloud Classic is fully supported.
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>
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]
func LookupSnapshot(ctx *Context, args *LookupSnapshotArgs, opts ...InvokeOption) (*LookupSnapshotResult, error)
func LookupSnapshotOutput(ctx *Context, args *LookupSnapshotOutputArgs, opts ...InvokeOption) LookupSnapshotResultOutput
> 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)
}
public static CompletableFuture<GetSnapshotResult> getSnapshot(GetSnapshotArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: google-native:pubsub/v1:getSnapshot
arguments:
# arguments dictionary
The following arguments are supported:
- Snapshot
Id string - Project string
- Snapshot
Id string - Project string
- snapshot
Id String - project String
- snapshot
Id string - project string
- snapshot_
id str - project str
- snapshot
Id String - project String
getSnapshot Result
The following output properties are available:
- Expire
Time 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.
- Expire
Time 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.
- expire
Time 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.
- expire
Time 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.
- expire
Time 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.