1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Identity
  5. getCustomerSecretKeys
Oracle Cloud Infrastructure v2.2.0 published on Friday, Jul 12, 2024 by Pulumi

oci.Identity.getCustomerSecretKeys

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.2.0 published on Friday, Jul 12, 2024 by Pulumi

    This data source provides the list of Customer Secret Keys in Oracle Cloud Infrastructure Identity service.

    Lists the secret keys for the specified user. The returned object contains the secret key’s OCID, but not the secret key itself. The actual secret key is returned only upon creation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testCustomerSecretKeys = oci.Identity.getCustomerSecretKeys({
        userId: testUser.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_customer_secret_keys = oci.Identity.get_customer_secret_keys(user_id=test_user["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Identity"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Identity.GetCustomerSecretKeys(ctx, &identity.GetCustomerSecretKeysArgs{
    			UserId: testUser.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testCustomerSecretKeys = Oci.Identity.GetCustomerSecretKeys.Invoke(new()
        {
            UserId = testUser.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Identity.IdentityFunctions;
    import com.pulumi.oci.Identity.inputs.GetCustomerSecretKeysArgs;
    import java.util.List;
    import java.util.ArrayList;
    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 testCustomerSecretKeys = IdentityFunctions.getCustomerSecretKeys(GetCustomerSecretKeysArgs.builder()
                .userId(testUser.id())
                .build());
    
        }
    }
    
    variables:
      testCustomerSecretKeys:
        fn::invoke:
          Function: oci:Identity:getCustomerSecretKeys
          Arguments:
            userId: ${testUser.id}
    

    Using getCustomerSecretKeys

    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 getCustomerSecretKeys(args: GetCustomerSecretKeysArgs, opts?: InvokeOptions): Promise<GetCustomerSecretKeysResult>
    function getCustomerSecretKeysOutput(args: GetCustomerSecretKeysOutputArgs, opts?: InvokeOptions): Output<GetCustomerSecretKeysResult>
    def get_customer_secret_keys(filters: Optional[Sequence[_identity.GetCustomerSecretKeysFilter]] = None,
                                 user_id: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetCustomerSecretKeysResult
    def get_customer_secret_keys_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[_identity.GetCustomerSecretKeysFilterArgs]]]] = None,
                                 user_id: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetCustomerSecretKeysResult]
    func GetCustomerSecretKeys(ctx *Context, args *GetCustomerSecretKeysArgs, opts ...InvokeOption) (*GetCustomerSecretKeysResult, error)
    func GetCustomerSecretKeysOutput(ctx *Context, args *GetCustomerSecretKeysOutputArgs, opts ...InvokeOption) GetCustomerSecretKeysResultOutput

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

    public static class GetCustomerSecretKeys 
    {
        public static Task<GetCustomerSecretKeysResult> InvokeAsync(GetCustomerSecretKeysArgs args, InvokeOptions? opts = null)
        public static Output<GetCustomerSecretKeysResult> Invoke(GetCustomerSecretKeysInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCustomerSecretKeysResult> getCustomerSecretKeys(GetCustomerSecretKeysArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Identity/getCustomerSecretKeys:getCustomerSecretKeys
      arguments:
        # arguments dictionary

    The following arguments are supported:

    UserId string
    The OCID of the user.
    Filters []GetCustomerSecretKeysFilter
    userId string
    The OCID of the user.
    filters GetCustomerSecretKeysFilter[]
    userId String
    The OCID of the user.
    filters List<Property Map>

    getCustomerSecretKeys Result

    The following output properties are available:

    CustomerSecretKeys List<GetCustomerSecretKeysCustomerSecretKey>
    The list of customer_secret_keys.
    Id string
    The provider-assigned unique ID for this managed resource.
    UserId string
    The OCID of the user the password belongs to.
    Filters List<GetCustomerSecretKeysFilter>
    CustomerSecretKeys []GetCustomerSecretKeysCustomerSecretKey
    The list of customer_secret_keys.
    Id string
    The provider-assigned unique ID for this managed resource.
    UserId string
    The OCID of the user the password belongs to.
    Filters []GetCustomerSecretKeysFilter
    customerSecretKeys List<GetCustomerSecretKeysCustomerSecretKey>
    The list of customer_secret_keys.
    id String
    The provider-assigned unique ID for this managed resource.
    userId String
    The OCID of the user the password belongs to.
    filters List<GetCustomerSecretKeysFilter>
    customerSecretKeys GetCustomerSecretKeysCustomerSecretKey[]
    The list of customer_secret_keys.
    id string
    The provider-assigned unique ID for this managed resource.
    userId string
    The OCID of the user the password belongs to.
    filters GetCustomerSecretKeysFilter[]
    customer_secret_keys Sequence[identity.GetCustomerSecretKeysCustomerSecretKey]
    The list of customer_secret_keys.
    id str
    The provider-assigned unique ID for this managed resource.
    user_id str
    The OCID of the user the password belongs to.
    filters Sequence[identity.GetCustomerSecretKeysFilter]
    customerSecretKeys List<Property Map>
    The list of customer_secret_keys.
    id String
    The provider-assigned unique ID for this managed resource.
    userId String
    The OCID of the user the password belongs to.
    filters List<Property Map>

    Supporting Types

    GetCustomerSecretKeysCustomerSecretKey

    DisplayName string
    The display name you assign to the secret key. Does not have to be unique, and it's changeable.
    Id string
    The access key portion of the key pair.
    InactiveState string
    The detailed status of INACTIVE lifecycleState.
    Key string
    State string
    The secret key's current state.
    TimeCreated string
    Date and time the CustomerSecretKey object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    TimeExpires string
    Date and time when this password will expire, in the format defined by RFC3339. Null if it never expires. Example: 2016-08-25T21:10:29.600Z
    UserId string
    The OCID of the user.
    DisplayName string
    The display name you assign to the secret key. Does not have to be unique, and it's changeable.
    Id string
    The access key portion of the key pair.
    InactiveState string
    The detailed status of INACTIVE lifecycleState.
    Key string
    State string
    The secret key's current state.
    TimeCreated string
    Date and time the CustomerSecretKey object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    TimeExpires string
    Date and time when this password will expire, in the format defined by RFC3339. Null if it never expires. Example: 2016-08-25T21:10:29.600Z
    UserId string
    The OCID of the user.
    displayName String
    The display name you assign to the secret key. Does not have to be unique, and it's changeable.
    id String
    The access key portion of the key pair.
    inactiveState String
    The detailed status of INACTIVE lifecycleState.
    key String
    state String
    The secret key's current state.
    timeCreated String
    Date and time the CustomerSecretKey object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    timeExpires String
    Date and time when this password will expire, in the format defined by RFC3339. Null if it never expires. Example: 2016-08-25T21:10:29.600Z
    userId String
    The OCID of the user.
    displayName string
    The display name you assign to the secret key. Does not have to be unique, and it's changeable.
    id string
    The access key portion of the key pair.
    inactiveState string
    The detailed status of INACTIVE lifecycleState.
    key string
    state string
    The secret key's current state.
    timeCreated string
    Date and time the CustomerSecretKey object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    timeExpires string
    Date and time when this password will expire, in the format defined by RFC3339. Null if it never expires. Example: 2016-08-25T21:10:29.600Z
    userId string
    The OCID of the user.
    display_name str
    The display name you assign to the secret key. Does not have to be unique, and it's changeable.
    id str
    The access key portion of the key pair.
    inactive_state str
    The detailed status of INACTIVE lifecycleState.
    key str
    state str
    The secret key's current state.
    time_created str
    Date and time the CustomerSecretKey object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    time_expires str
    Date and time when this password will expire, in the format defined by RFC3339. Null if it never expires. Example: 2016-08-25T21:10:29.600Z
    user_id str
    The OCID of the user.
    displayName String
    The display name you assign to the secret key. Does not have to be unique, and it's changeable.
    id String
    The access key portion of the key pair.
    inactiveState String
    The detailed status of INACTIVE lifecycleState.
    key String
    state String
    The secret key's current state.
    timeCreated String
    Date and time the CustomerSecretKey object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    timeExpires String
    Date and time when this password will expire, in the format defined by RFC3339. Null if it never expires. Example: 2016-08-25T21:10:29.600Z
    userId String
    The OCID of the user.

    GetCustomerSecretKeysFilter

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.2.0 published on Friday, Jul 12, 2024 by Pulumi