1. Packages
  2. Google Cloud Native
  3. API Docs
  4. secretmanager
  5. secretmanager/v1beta1
  6. getSecret

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.secretmanager/v1beta1.getSecret

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 metadata for a given Secret.

Using getSecret

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 getSecret(args: GetSecretArgs, opts?: InvokeOptions): Promise<GetSecretResult>
function getSecretOutput(args: GetSecretOutputArgs, opts?: InvokeOptions): Output<GetSecretResult>
Copy
def get_secret(project: Optional[str] = None,
               secret_id: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetSecretResult
def get_secret_output(project: Optional[pulumi.Input[str]] = None,
               secret_id: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetSecretResult]
Copy
func LookupSecret(ctx *Context, args *LookupSecretArgs, opts ...InvokeOption) (*LookupSecretResult, error)
func LookupSecretOutput(ctx *Context, args *LookupSecretOutputArgs, opts ...InvokeOption) LookupSecretResultOutput
Copy

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

public static class GetSecret 
{
    public static Task<GetSecretResult> InvokeAsync(GetSecretArgs args, InvokeOptions? opts = null)
    public static Output<GetSecretResult> Invoke(GetSecretInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetSecretResult> getSecret(GetSecretArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Copy
fn::invoke:
  function: google-native:secretmanager/v1beta1:getSecret
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

SecretId This property is required. string
Project string
SecretId This property is required. string
Project string
secretId This property is required. String
project String
secretId This property is required. string
project string
secret_id This property is required. str
project str
secretId This property is required. String
project String

getSecret Result

The following output properties are available:

CreateTime string
The time at which the Secret was created.
Labels Dictionary<string, string>
The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: \p{Ll}\p{Lo}{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be assigned to a given resource.
Name string
The resource name of the Secret in the format projects/*/secrets/*.
Replication Pulumi.GoogleNative.SecretManager.V1Beta1.Outputs.ReplicationResponse
Immutable. The replication policy of the secret data attached to the Secret. The replication policy cannot be changed after the Secret has been created.
CreateTime string
The time at which the Secret was created.
Labels map[string]string
The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: \p{Ll}\p{Lo}{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be assigned to a given resource.
Name string
The resource name of the Secret in the format projects/*/secrets/*.
Replication ReplicationResponse
Immutable. The replication policy of the secret data attached to the Secret. The replication policy cannot be changed after the Secret has been created.
createTime String
The time at which the Secret was created.
labels Map<String,String>
The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: \p{Ll}\p{Lo}{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be assigned to a given resource.
name String
The resource name of the Secret in the format projects/*/secrets/*.
replication ReplicationResponse
Immutable. The replication policy of the secret data attached to the Secret. The replication policy cannot be changed after the Secret has been created.
createTime string
The time at which the Secret was created.
labels {[key: string]: string}
The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: \p{Ll}\p{Lo}{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be assigned to a given resource.
name string
The resource name of the Secret in the format projects/*/secrets/*.
replication ReplicationResponse
Immutable. The replication policy of the secret data attached to the Secret. The replication policy cannot be changed after the Secret has been created.
create_time str
The time at which the Secret was created.
labels Mapping[str, str]
The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: \p{Ll}\p{Lo}{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be assigned to a given resource.
name str
The resource name of the Secret in the format projects/*/secrets/*.
replication ReplicationResponse
Immutable. The replication policy of the secret data attached to the Secret. The replication policy cannot be changed after the Secret has been created.
createTime String
The time at which the Secret was created.
labels Map<String>
The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: \p{Ll}\p{Lo}{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be assigned to a given resource.
name String
The resource name of the Secret in the format projects/*/secrets/*.
replication Property Map
Immutable. The replication policy of the secret data attached to the Secret. The replication policy cannot be changed after the Secret has been created.

Supporting Types

ReplicaResponse

Location This property is required. string
The canonical IDs of the location to replicate data. For example: "us-east1".
Location This property is required. string
The canonical IDs of the location to replicate data. For example: "us-east1".
location This property is required. String
The canonical IDs of the location to replicate data. For example: "us-east1".
location This property is required. string
The canonical IDs of the location to replicate data. For example: "us-east1".
location This property is required. str
The canonical IDs of the location to replicate data. For example: "us-east1".
location This property is required. String
The canonical IDs of the location to replicate data. For example: "us-east1".

ReplicationResponse

Automatic This property is required. Pulumi.GoogleNative.SecretManager.V1Beta1.Inputs.AutomaticResponse
The Secret will automatically be replicated without any restrictions.
UserManaged This property is required. Pulumi.GoogleNative.SecretManager.V1Beta1.Inputs.UserManagedResponse
The Secret will only be replicated into the locations specified.
Automatic This property is required. AutomaticResponse
The Secret will automatically be replicated without any restrictions.
UserManaged This property is required. UserManagedResponse
The Secret will only be replicated into the locations specified.
automatic This property is required. AutomaticResponse
The Secret will automatically be replicated without any restrictions.
userManaged This property is required. UserManagedResponse
The Secret will only be replicated into the locations specified.
automatic This property is required. AutomaticResponse
The Secret will automatically be replicated without any restrictions.
userManaged This property is required. UserManagedResponse
The Secret will only be replicated into the locations specified.
automatic This property is required. AutomaticResponse
The Secret will automatically be replicated without any restrictions.
user_managed This property is required. UserManagedResponse
The Secret will only be replicated into the locations specified.
automatic This property is required. Property Map
The Secret will automatically be replicated without any restrictions.
userManaged This property is required. Property Map
The Secret will only be replicated into the locations specified.

UserManagedResponse

Replicas This property is required. List<Pulumi.GoogleNative.SecretManager.V1Beta1.Inputs.ReplicaResponse>
The list of Replicas for this Secret. Cannot be empty.
Replicas This property is required. []ReplicaResponse
The list of Replicas for this Secret. Cannot be empty.
replicas This property is required. List<ReplicaResponse>
The list of Replicas for this Secret. Cannot be empty.
replicas This property is required. ReplicaResponse[]
The list of Replicas for this Secret. Cannot be empty.
replicas This property is required. Sequence[ReplicaResponse]
The list of Replicas for this Secret. Cannot be empty.
replicas This property is required. List<Property Map>
The list of Replicas for this Secret. Cannot be empty.

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