1. Registry
  2. Packages
  3. Alibaba Cloud Provider
  4. API Docs
  5. apig
  6. getSecrets
Viewing docs for Alibaba Cloud v3.109.1
published on Tuesday, Oct 13, 2026 by Pulumi
alicloud logo alicloud logo
Viewing docs for Alibaba Cloud v3.109.1
published on Tuesday, Oct 13, 2026 by Pulumi

    This data source provides the Apig Secrets of the current Alibaba Cloud user.

    NOTE: Available since v1.294.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const _default = alicloud.vpc.getNetworks({
        nameRegex: "^default-NODELETING$",
    });
    const defaultGetSwitches = _default.then(_default => alicloud.vpc.getSwitches({
        vpcId: _default.ids?.[0],
        zoneId: "cn-hangzhou-j",
    }));
    const defaultInstance = new alicloud.kms.Instance("default", {
        productVersion: "3",
        vpcNum: 1,
        keyNum: 1000,
        secretNum: 1000,
        spec: 1000,
        vpcId: _default.then(_default => _default.ids?.[0]),
        vswitchIds: [defaultGetSwitches.then(defaultGetSwitches => defaultGetSwitches.ids?.[0])],
        zoneIds: [
            "cn-hangzhou-k",
            "cn-hangzhou-j",
        ],
    });
    const defaultKey = new alicloud.kms.Key("default", {
        dkmsInstanceId: defaultInstance.id,
        pendingWindowInDays: 7,
    });
    const defaultSecret = new alicloud.kms.Secret("default", {
        secretData: name,
        secretName: name,
        versionId: "v1",
        dkmsInstanceId: defaultKey.dkmsInstanceId,
        encryptionKeyId: defaultKey.id,
        forceDeleteWithoutRecovery: true,
    });
    const defaultSecret2 = new alicloud.apig.Secret("default", {
        gatewayType: "API",
        name: name,
        secretSource: "KMS",
        secretData: defaultSecret.secretData,
        description: name,
        kmsConfig: {
            kmsInstanceId: defaultSecret.dkmsInstanceId,
            kmsKeyId: defaultSecret.encryptionKeyId,
        },
    });
    const ids = alicloud.apig.getSecretsOutput({
        ids: [defaultSecret2.id],
    });
    export const apigSecretsId0 = ids.apply(ids => ids.secrets?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default = alicloud.vpc.get_networks(name_regex="^default-NODELETING$")
    default_get_switches = alicloud.vpc.get_switches(vpc_id=default.ids[0],
        zone_id="cn-hangzhou-j")
    default_instance = alicloud.kms.Instance("default",
        product_version="3",
        vpc_num=1,
        key_num=1000,
        secret_num=1000,
        spec=1000,
        vpc_id=default.ids[0],
        vswitch_ids=[default_get_switches.ids[0]],
        zone_ids=[
            "cn-hangzhou-k",
            "cn-hangzhou-j",
        ])
    default_key = alicloud.kms.Key("default",
        dkms_instance_id=default_instance.id,
        pending_window_in_days=7)
    default_secret = alicloud.kms.Secret("default",
        secret_data=name,
        secret_name=name,
        version_id="v1",
        dkms_instance_id=default_key.dkms_instance_id,
        encryption_key_id=default_key.id,
        force_delete_without_recovery=True)
    default_secret2 = alicloud.apig.Secret("default",
        gateway_type="API",
        name=name,
        secret_source="KMS",
        secret_data=default_secret.secret_data,
        description=name,
        kms_config={
            "kms_instance_id": default_secret.dkms_instance_id,
            "kms_key_id": default_secret.encryption_key_id,
        })
    ids = alicloud.apig.get_secrets_output(ids=[default_secret2.id])
    pulumi.export("apigSecretsId0", ids.secrets[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/apig"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/kms"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_default, err := vpc.GetNetworks(ctx, &vpc.GetNetworksArgs{
    			NameRegex: pulumi.StringRef("^default-NODELETING$"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetSwitches, err := vpc.GetSwitches(ctx, &vpc.GetSwitchesArgs{
    			VpcId:  pulumi.StringRef(_default.Ids[0]),
    			ZoneId: pulumi.StringRef("cn-hangzhou-j"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultInstance, err := kms.NewInstance(ctx, "default", &kms.InstanceArgs{
    			ProductVersion: pulumi.String("3"),
    			VpcNum:         pulumi.Int(1),
    			KeyNum:         pulumi.Int(1000),
    			SecretNum:      pulumi.Int(1000),
    			Spec:           pulumi.Int(1000),
    			VpcId:          pulumi.String(_default.Ids[0]),
    			VswitchIds: pulumi.StringArray{
    				pulumi.String(defaultGetSwitches.Ids[0]),
    			},
    			ZoneIds: pulumi.StringArray{
    				pulumi.String("cn-hangzhou-k"),
    				pulumi.String("cn-hangzhou-j"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		defaultKey, err := kms.NewKey(ctx, "default", &kms.KeyArgs{
    			DkmsInstanceId:      defaultInstance.ID().ToIDOutput().ToStringOutput(),
    			PendingWindowInDays: pulumi.Int(7),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSecret, err := kms.NewSecret(ctx, "default", &kms.SecretArgs{
    			SecretData:                 pulumi.String(name),
    			SecretName:                 pulumi.String(name),
    			VersionId:                  pulumi.String("v1"),
    			DkmsInstanceId:             defaultKey.DkmsInstanceId,
    			EncryptionKeyId:            defaultKey.ID().ToIDOutput().ToStringOutput(),
    			ForceDeleteWithoutRecovery: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSecret2, err := apig.NewSecret(ctx, "default", &apig.SecretArgs{
    			GatewayType:  pulumi.String("API"),
    			Name:         pulumi.String(name),
    			SecretSource: pulumi.String("KMS"),
    			SecretData:   defaultSecret.SecretData,
    			Description:  pulumi.String(name),
    			KmsConfig: &apig.SecretKmsConfigArgs{
    				KmsInstanceId: defaultSecret.DkmsInstanceId,
    				KmsKeyId:      defaultSecret.EncryptionKeyId,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		ids := apig.GetSecretsOutput(ctx, apig.GetSecretsOutputArgs{
    			Ids: pulumi.StringArray{
    				defaultSecret2.ID().ToIDOutput().ToStringOutput(),
    			},
    		}, nil)
    		ctx.Export("apigSecretsId0", ids.ApplyT(func(ids apig.GetSecretsResult) (*string, error) {
    			return ids.Secrets[0].Id, nil
    		}).(pulumi.StringPtrOutput))
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var @default = AliCloud.Vpc.GetNetworks.Invoke(new()
        {
            NameRegex = "^default-NODELETING$",
        });
    
        var defaultGetSwitches = AliCloud.Vpc.GetSwitches.Invoke(new()
        {
            VpcId = @default.Apply(getNetworksResult => getNetworksResult.Ids[0]),
            ZoneId = "cn-hangzhou-j",
        });
    
        var defaultInstance = new AliCloud.Kms.Instance("default", new()
        {
            ProductVersion = "3",
            VpcNum = 1,
            KeyNum = 1000,
            SecretNum = 1000,
            Spec = 1000,
            VpcId = @default.Apply(@default => @default.Apply(getNetworksResult => getNetworksResult.Ids[0])),
            VswitchIds = new[]
            {
                defaultGetSwitches.Apply(getSwitchesResult => getSwitchesResult.Ids[0]),
            },
            ZoneIds = new[]
            {
                "cn-hangzhou-k",
                "cn-hangzhou-j",
            },
        });
    
        var defaultKey = new AliCloud.Kms.Key("default", new()
        {
            DkmsInstanceId = defaultInstance.Id,
            PendingWindowInDays = 7,
        });
    
        var defaultSecret = new AliCloud.Kms.Secret("default", new()
        {
            SecretData = name,
            SecretName = name,
            VersionId = "v1",
            DkmsInstanceId = defaultKey.DkmsInstanceId,
            EncryptionKeyId = defaultKey.Id,
            ForceDeleteWithoutRecovery = true,
        });
    
        var defaultSecret2 = new AliCloud.Apig.Secret("default", new()
        {
            GatewayType = "API",
            Name = name,
            SecretSource = "KMS",
            SecretData = defaultSecret.SecretData,
            Description = name,
            KmsConfig = new AliCloud.Apig.Inputs.SecretKmsConfigArgs
            {
                KmsInstanceId = defaultSecret.DkmsInstanceId,
                KmsKeyId = defaultSecret.EncryptionKeyId,
            },
        });
    
        var ids = AliCloud.Apig.GetSecrets.Invoke(new()
        {
            Ids = new[]
            {
                defaultSecret2.Id,
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["apigSecretsId0"] = ids.Apply(getSecretsResult => getSecretsResult.Secrets[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.vpc.VpcFunctions;
    import com.pulumi.alicloud.vpc.inputs.GetNetworksArgs;
    import com.pulumi.alicloud.vpc.inputs.GetSwitchesArgs;
    import com.pulumi.alicloud.kms.Instance;
    import com.pulumi.alicloud.kms.InstanceArgs;
    import com.pulumi.alicloud.kms.Key;
    import com.pulumi.alicloud.kms.KeyArgs;
    import com.pulumi.alicloud.apig.inputs.SecretKmsConfigArgs;
    import com.pulumi.alicloud.apig.ApigFunctions;
    import com.pulumi.alicloud.apig.inputs.GetSecretsArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("terraform-example");
            final var default = VpcFunctions.getNetworks(GetNetworksArgs.builder()
                .nameRegex("^default-NODELETING$")
                .build());
    
            final var defaultGetSwitches = VpcFunctions.getSwitches(GetSwitchesArgs.builder()
                .vpcId(default_.ids()[0])
                .zoneId("cn-hangzhou-j")
                .build());
    
            var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
                .productVersion("3")
                .vpcNum(1)
                .keyNum(1000)
                .secretNum(1000)
                .spec(1000)
                .vpcId(default_.ids()[0])
                .vswitchIds(defaultGetSwitches.ids()[0])
                .zoneIds(            
                    "cn-hangzhou-k",
                    "cn-hangzhou-j")
                .build());
    
            var defaultKey = new Key("defaultKey", KeyArgs.builder()
                .dkmsInstanceId(defaultInstance.id())
                .pendingWindowInDays(7)
                .build());
    
            var defaultSecret = new com.pulumi.alicloud.kms.Secret("defaultSecret", com.pulumi.alicloud.kms.SecretArgs.builder()
                .secretData(name)
                .secretName(name)
                .versionId("v1")
                .dkmsInstanceId(defaultKey.dkmsInstanceId())
                .encryptionKeyId(defaultKey.id())
                .forceDeleteWithoutRecovery(true)
                .build());
    
            var defaultSecret2 = new com.pulumi.alicloud.apig.Secret("defaultSecret2", com.pulumi.alicloud.apig.SecretArgs.builder()
                .gatewayType("API")
                .name(name)
                .secretSource("KMS")
                .secretData(defaultSecret.secretData())
                .description(name)
                .kmsConfig(SecretKmsConfigArgs.builder()
                    .kmsInstanceId(defaultSecret.dkmsInstanceId())
                    .kmsKeyId(defaultSecret.encryptionKeyId())
                    .build())
                .build());
    
            final var ids = ApigFunctions.getSecrets(GetSecretsArgs.builder()
                .ids(defaultSecret2.id())
                .build());
    
            ctx.export("apigSecretsId0", ids.applyValue(_ids -> _ids.secrets().get(0).id()));
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      defaultInstance:
        type: alicloud:kms:Instance
        name: default
        properties:
          productVersion: '3'
          vpcNum: '1'
          keyNum: '1000'
          secretNum: '1000'
          spec: '1000'
          vpcId: ${default.ids[0]}
          vswitchIds:
            - ${defaultGetSwitches.ids[0]}
          zoneIds:
            - cn-hangzhou-k
            - cn-hangzhou-j
      defaultKey:
        type: alicloud:kms:Key
        name: default
        properties:
          dkmsInstanceId: ${defaultInstance.id}
          pendingWindowInDays: 7
      defaultSecret:
        type: alicloud:kms:Secret
        name: default
        properties:
          secretData: ${name}
          secretName: ${name}
          versionId: v1
          dkmsInstanceId: ${defaultKey.dkmsInstanceId}
          encryptionKeyId: ${defaultKey.id}
          forceDeleteWithoutRecovery: true
      defaultSecret2:
        type: alicloud:apig:Secret
        name: default
        properties:
          gatewayType: API
          name: ${name}
          secretSource: KMS
          secretData: ${defaultSecret.secretData}
          description: ${name}
          kmsConfig:
            kmsInstanceId: ${defaultSecret.dkmsInstanceId}
            kmsKeyId: ${defaultSecret.encryptionKeyId}
    variables:
      default:
        fn::invoke:
          function: alicloud:vpc:getNetworks
          arguments:
            nameRegex: ^default-NODELETING$
      defaultGetSwitches:
        fn::invoke:
          function: alicloud:vpc:getSwitches
          arguments:
            vpcId: ${default.ids[0]}
            zoneId: cn-hangzhou-j
      ids:
        fn::invoke:
          function: alicloud:apig:getSecrets
          arguments:
            ids:
              - ${defaultSecret2.id}
    outputs:
      apigSecretsId0: ${ids.secrets[0].id}
    
    terraform {
      required_providers {
        alicloud = {
          source = "pulumi/alicloud"
        }
      }
    }
    
    data "alicloud_vpc_networks" "default" {
      name_regex = "^default-NODELETING$"
    }
    data "alicloud_vpc_switches" "defaultGetSwitches" {
      vpc_id  = data.alicloud_vpc_networks.default.ids[0]
      zone_id = "cn-hangzhou-j"
    }
    data "alicloud_apig_secrets" "ids" {
      ids = [alicloud_apig_secret.default.id]
    }
    
    resource "alicloud_kms_instance" "default" {
      lifecycle {
        create_before_destroy = true
      }
      product_version = "3"
      vpc_num         = "1"
      key_num         = "1000"
      secret_num      = "1000"
      spec            = "1000"
      vpc_id          = data.alicloud_vpc_networks.default.ids[0]
      vswitch_ids     = [data.alicloud_vpc_switches.defaultGetSwitches.ids[0]]
      zone_ids        = ["cn-hangzhou-k", "cn-hangzhou-j"]
    }
    resource "alicloud_kms_key" "default" {
      lifecycle {
        create_before_destroy = true
      }
      dkms_instance_id       = alicloud_kms_instance.default.id
      pending_window_in_days = 7
    }
    resource "alicloud_kms_secret" "default" {
      lifecycle {
        create_before_destroy = true
      }
      secret_data                   = var.name
      secret_name                   = var.name
      version_id                    = "v1"
      dkms_instance_id              = alicloud_kms_key.default.dkms_instance_id
      encryption_key_id             = alicloud_kms_key.default.id
      force_delete_without_recovery = true
    }
    resource "alicloud_apig_secret" "default" {
      lifecycle {
        create_before_destroy = true
      }
      gateway_type  = "API"
      name          = var.name
      secret_source = "KMS"
      secret_data   = alicloud_kms_secret.default.secret_data
      description   = var.name
      kms_config = {
        kms_instance_id = alicloud_kms_secret.default.dkms_instance_id
        kms_key_id      = alicloud_kms_secret.default.encryption_key_id
      }
    }
    variable "name" {
      type    = string
      default = "terraform-example"
    }
    output "apigSecretsId0" {
      value = data.alicloud_apig_secrets.ids.secrets[0].id
    }
    

    Using getSecrets

    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 getSecrets(args: GetSecretsArgs, opts?: InvokeOptions): Promise<GetSecretsResult>
    function getSecretsOutput(args: GetSecretsOutputArgs, opts?: InvokeOutputOptions): Output<GetSecretsResult>
    def get_secrets(gateway_type: Optional[str] = None,
                    ids: Optional[Sequence[str]] = None,
                    name_like: Optional[str] = None,
                    name_regex: Optional[str] = None,
                    output_file: Optional[str] = None,
                    status: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetSecretsResult
    def get_secrets_output(gateway_type: pulumi.Input[Optional[str]] = None,
                    ids: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
                    name_like: pulumi.Input[Optional[str]] = None,
                    name_regex: pulumi.Input[Optional[str]] = None,
                    output_file: pulumi.Input[Optional[str]] = None,
                    status: pulumi.Input[Optional[str]] = None,
                    opts: Optional[InvokeOutputOptions] = None) -> Output[GetSecretsResult]
    func GetSecrets(ctx *Context, args *GetSecretsArgs, opts ...InvokeOption) (*GetSecretsResult, error)
    func GetSecretsOutput(ctx *Context, args *GetSecretsOutputArgs, opts ...InvokeOption) GetSecretsResultOutput

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

    public static class GetSecrets 
    {
        public static Task<GetSecretsResult> InvokeAsync(GetSecretsArgs args, InvokeOptions? opts = null)
        public static Output<GetSecretsResult> Invoke(GetSecretsInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetSecretsResult> Invoke(GetSecretsInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetSecretsResult> getSecrets(GetSecretsArgs args, InvokeOptions options)
    public static Output<GetSecretsResult> getSecrets(GetSecretsArgs args, InvokeOptions options)
    public static Output<GetSecretsResult> getSecrets(GetSecretsArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: alicloud:apig/getSecrets:getSecrets
      arguments:
        # arguments dictionary
    data "alicloud_apig_get_secrets" "name" {
        # arguments
    }

    The following arguments are supported:

    GatewayType string
    The gateway type associated with the secret. Valid values: AI, API.
    Ids List<string>
    A list of Secret IDs.
    NameLike string
    The secret name. Fuzzy match is supported.
    NameRegex string
    A regex string to filter results by Secret name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The current status of the secret. Valid values: ENABLE, DISABLE, DELETED.
    GatewayType string
    The gateway type associated with the secret. Valid values: AI, API.
    Ids []string
    A list of Secret IDs.
    NameLike string
    The secret name. Fuzzy match is supported.
    NameRegex string
    A regex string to filter results by Secret name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The current status of the secret. Valid values: ENABLE, DISABLE, DELETED.
    gateway_type string
    The gateway type associated with the secret. Valid values: AI, API.
    ids list(string)
    A list of Secret IDs.
    name_like string
    The secret name. Fuzzy match is supported.
    name_regex string
    A regex string to filter results by Secret name.
    output_file string
    File name where to save data source results (after running pulumi preview).
    status string
    The current status of the secret. Valid values: ENABLE, DISABLE, DELETED.
    gatewayType String
    The gateway type associated with the secret. Valid values: AI, API.
    ids List<String>
    A list of Secret IDs.
    nameLike String
    The secret name. Fuzzy match is supported.
    nameRegex String
    A regex string to filter results by Secret name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The current status of the secret. Valid values: ENABLE, DISABLE, DELETED.
    gatewayType string
    The gateway type associated with the secret. Valid values: AI, API.
    ids string[]
    A list of Secret IDs.
    nameLike string
    The secret name. Fuzzy match is supported.
    nameRegex string
    A regex string to filter results by Secret name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    status string
    The current status of the secret. Valid values: ENABLE, DISABLE, DELETED.
    gateway_type str
    The gateway type associated with the secret. Valid values: AI, API.
    ids Sequence[str]
    A list of Secret IDs.
    name_like str
    The secret name. Fuzzy match is supported.
    name_regex str
    A regex string to filter results by Secret name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    status str
    The current status of the secret. Valid values: ENABLE, DISABLE, DELETED.
    gatewayType String
    The gateway type associated with the secret. Valid values: AI, API.
    ids List<String>
    A list of Secret IDs.
    nameLike String
    The secret name. Fuzzy match is supported.
    nameRegex String
    A regex string to filter results by Secret name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The current status of the secret. Valid values: ENABLE, DISABLE, DELETED.

    getSecrets Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Names List<string>
    A list of Secret names.
    Secrets List<Pulumi.AliCloud.Apig.Outputs.GetSecretsSecret>
    A list of Secrets. Each element contains the following attributes:
    GatewayType string
    The gateway type.
    NameLike string
    NameRegex string
    OutputFile string
    Status string
    The status of the secret.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Names []string
    A list of Secret names.
    Secrets []GetSecretsSecret
    A list of Secrets. Each element contains the following attributes:
    GatewayType string
    The gateway type.
    NameLike string
    NameRegex string
    OutputFile string
    Status string
    The status of the secret.
    id string
    The provider-assigned unique ID for this managed resource.
    ids list(string)
    names list(string)
    A list of Secret names.
    secrets list(object)
    A list of Secrets. Each element contains the following attributes:
    gateway_type string
    The gateway type.
    name_like string
    name_regex string
    output_file string
    status string
    The status of the secret.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    A list of Secret names.
    secrets List<GetSecretsSecret>
    A list of Secrets. Each element contains the following attributes:
    gatewayType String
    The gateway type.
    nameLike String
    nameRegex String
    outputFile String
    status String
    The status of the secret.
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    names string[]
    A list of Secret names.
    secrets GetSecretsSecret[]
    A list of Secrets. Each element contains the following attributes:
    gatewayType string
    The gateway type.
    nameLike string
    nameRegex string
    outputFile string
    status string
    The status of the secret.
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    names Sequence[str]
    A list of Secret names.
    secrets Sequence[GetSecretsSecret]
    A list of Secrets. Each element contains the following attributes:
    gateway_type str
    The gateway type.
    name_like str
    name_regex str
    output_file str
    status str
    The status of the secret.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    A list of Secret names.
    secrets List<Property Map>
    A list of Secrets. Each element contains the following attributes:
    gatewayType String
    The gateway type.
    nameLike String
    nameRegex String
    outputFile String
    status String
    The status of the secret.

    Supporting Types

    GetSecretsSecret

    CreateTimestamp string
    The creation timestamp of the secret.
    Description string
    The secret description.
    GatewayType string
    The gateway type associated with the secret. Valid values: AI, API.
    Id string
    The ID of the resource supplied above.
    KmsConfigs List<Pulumi.AliCloud.Apig.Inputs.GetSecretsSecretKmsConfig>
    The KMS config of the secret.
    Name string
    The secret name.
    ReferenceCount int
    The reference count of the secret.
    SecretId string
    The secret ID.
    SecretSource string
    The secret source.
    Status string
    The current status of the secret. Valid values: ENABLE, DISABLE, DELETED.
    UpdateTimestamp string
    The update timestamp of the secret.
    CreateTimestamp string
    The creation timestamp of the secret.
    Description string
    The secret description.
    GatewayType string
    The gateway type associated with the secret. Valid values: AI, API.
    Id string
    The ID of the resource supplied above.
    KmsConfigs []GetSecretsSecretKmsConfig
    The KMS config of the secret.
    Name string
    The secret name.
    ReferenceCount int
    The reference count of the secret.
    SecretId string
    The secret ID.
    SecretSource string
    The secret source.
    Status string
    The current status of the secret. Valid values: ENABLE, DISABLE, DELETED.
    UpdateTimestamp string
    The update timestamp of the secret.
    create_timestamp string
    The creation timestamp of the secret.
    description string
    The secret description.
    gateway_type string
    The gateway type associated with the secret. Valid values: AI, API.
    id string
    The ID of the resource supplied above.
    kms_configs list(object)
    The KMS config of the secret.
    name string
    The secret name.
    reference_count number
    The reference count of the secret.
    secret_id string
    The secret ID.
    secret_source string
    The secret source.
    status string
    The current status of the secret. Valid values: ENABLE, DISABLE, DELETED.
    update_timestamp string
    The update timestamp of the secret.
    createTimestamp String
    The creation timestamp of the secret.
    description String
    The secret description.
    gatewayType String
    The gateway type associated with the secret. Valid values: AI, API.
    id String
    The ID of the resource supplied above.
    kmsConfigs List<GetSecretsSecretKmsConfig>
    The KMS config of the secret.
    name String
    The secret name.
    referenceCount Integer
    The reference count of the secret.
    secretId String
    The secret ID.
    secretSource String
    The secret source.
    status String
    The current status of the secret. Valid values: ENABLE, DISABLE, DELETED.
    updateTimestamp String
    The update timestamp of the secret.
    createTimestamp string
    The creation timestamp of the secret.
    description string
    The secret description.
    gatewayType string
    The gateway type associated with the secret. Valid values: AI, API.
    id string
    The ID of the resource supplied above.
    kmsConfigs GetSecretsSecretKmsConfig[]
    The KMS config of the secret.
    name string
    The secret name.
    referenceCount number
    The reference count of the secret.
    secretId string
    The secret ID.
    secretSource string
    The secret source.
    status string
    The current status of the secret. Valid values: ENABLE, DISABLE, DELETED.
    updateTimestamp string
    The update timestamp of the secret.
    create_timestamp str
    The creation timestamp of the secret.
    description str
    The secret description.
    gateway_type str
    The gateway type associated with the secret. Valid values: AI, API.
    id str
    The ID of the resource supplied above.
    kms_configs Sequence[GetSecretsSecretKmsConfig]
    The KMS config of the secret.
    name str
    The secret name.
    reference_count int
    The reference count of the secret.
    secret_id str
    The secret ID.
    secret_source str
    The secret source.
    status str
    The current status of the secret. Valid values: ENABLE, DISABLE, DELETED.
    update_timestamp str
    The update timestamp of the secret.
    createTimestamp String
    The creation timestamp of the secret.
    description String
    The secret description.
    gatewayType String
    The gateway type associated with the secret. Valid values: AI, API.
    id String
    The ID of the resource supplied above.
    kmsConfigs List<Property Map>
    The KMS config of the secret.
    name String
    The secret name.
    referenceCount Number
    The reference count of the secret.
    secretId String
    The secret ID.
    secretSource String
    The secret source.
    status String
    The current status of the secret. Valid values: ENABLE, DISABLE, DELETED.
    updateTimestamp String
    The update timestamp of the secret.

    GetSecretsSecretKmsConfig

    KmsInstanceId string
    The KMS instance ID.
    KmsKeyId string
    The KMS key ID.
    KmsSecretArn string
    The KMS secret arn.
    VersionId string
    The version ID.
    KmsInstanceId string
    The KMS instance ID.
    KmsKeyId string
    The KMS key ID.
    KmsSecretArn string
    The KMS secret arn.
    VersionId string
    The version ID.
    kms_instance_id string
    The KMS instance ID.
    kms_key_id string
    The KMS key ID.
    kms_secret_arn string
    The KMS secret arn.
    version_id string
    The version ID.
    kmsInstanceId String
    The KMS instance ID.
    kmsKeyId String
    The KMS key ID.
    kmsSecretArn String
    The KMS secret arn.
    versionId String
    The version ID.
    kmsInstanceId string
    The KMS instance ID.
    kmsKeyId string
    The KMS key ID.
    kmsSecretArn string
    The KMS secret arn.
    versionId string
    The version ID.
    kms_instance_id str
    The KMS instance ID.
    kms_key_id str
    The KMS key ID.
    kms_secret_arn str
    The KMS secret arn.
    version_id str
    The version ID.
    kmsInstanceId String
    The KMS instance ID.
    kmsKeyId String
    The KMS key ID.
    kmsSecretArn String
    The KMS secret arn.
    versionId String
    The version ID.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo alicloud logo
    Viewing docs for Alibaba Cloud v3.109.1
    published on Tuesday, Oct 13, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial