Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.Identity.getCustomerSecretKeys
Explore with Pulumi AI
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[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[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)
public static Output<GetCustomerSecretKeysResult> getCustomerSecretKeys(GetCustomerSecretKeysArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Identity/getCustomerSecretKeys:getCustomerSecretKeys
  arguments:
    # arguments dictionaryThe following arguments are supported:
- UserId string
- The OCID of the user.
- Filters
List<GetCustomer Secret Keys Filter> 
- UserId string
- The OCID of the user.
- Filters
[]GetCustomer Secret Keys Filter 
- userId String
- The OCID of the user.
- filters
List<GetCustomer Secret Keys Filter> 
- userId string
- The OCID of the user.
- filters
GetCustomer Secret Keys Filter[] 
- user_id str
- The OCID of the user.
- filters
Sequence[GetCustomer Secret Keys Filter] 
- userId String
- The OCID of the user.
- filters List<Property Map>
getCustomerSecretKeys Result
The following output properties are available:
- CustomerSecret List<GetKeys Customer Secret Keys Customer Secret Key> 
- 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<GetCustomer Secret Keys Filter> 
- CustomerSecret []GetKeys Customer Secret Keys Customer Secret Key 
- 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
[]GetCustomer Secret Keys Filter 
- customerSecret List<GetKeys Customer Secret Keys Customer Secret Key> 
- 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<GetCustomer Secret Keys Filter> 
- customerSecret GetKeys Customer Secret Keys Customer Secret Key[] 
- 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
GetCustomer Secret Keys Filter[] 
- customer_secret_ Sequence[Getkeys Customer Secret Keys Customer Secret Key] 
- 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[GetCustomer Secret Keys Filter] 
- customerSecret List<Property Map>Keys 
- 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 CustomerSecretKeyobject 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 CustomerSecretKeyobject 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 CustomerSecretKeyobject 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 CustomerSecretKeyobject 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 CustomerSecretKeyobject 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 CustomerSecretKeyobject 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    
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.