1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Identity
  5. getCustomerSecretKeys
Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi

oci.Identity.getCustomerSecretKeys

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 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,
});
Copy
import pulumi
import pulumi_oci as oci

test_customer_secret_keys = oci.Identity.get_customer_secret_keys(user_id=test_user["id"])
Copy
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
	})
}
Copy
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,
    });

});
Copy
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());

    }
}
Copy
variables:
  testCustomerSecretKeys:
    fn::invoke:
      function: oci:Identity:getCustomerSecretKeys
      arguments:
        userId: ${testUser.id}
Copy

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>
Copy
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]
Copy
func GetCustomerSecretKeys(ctx *Context, args *GetCustomerSecretKeysArgs, opts ...InvokeOption) (*GetCustomerSecretKeysResult, error)
func GetCustomerSecretKeysOutput(ctx *Context, args *GetCustomerSecretKeysOutputArgs, opts ...InvokeOption) GetCustomerSecretKeysResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetCustomerSecretKeysResult> getCustomerSecretKeys(GetCustomerSecretKeysArgs args, InvokeOptions options)
public static Output<GetCustomerSecretKeysResult> getCustomerSecretKeys(GetCustomerSecretKeysArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:Identity/getCustomerSecretKeys:getCustomerSecretKeys
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

UserId This property is required. string
The OCID of the user.
Filters Changes to this property will trigger replacement. List<GetCustomerSecretKeysFilter>
UserId This property is required. string
The OCID of the user.
Filters Changes to this property will trigger replacement. []GetCustomerSecretKeysFilter
userId This property is required. String
The OCID of the user.
filters Changes to this property will trigger replacement. List<GetCustomerSecretKeysFilter>
userId This property is required. string
The OCID of the user.
filters Changes to this property will trigger replacement. GetCustomerSecretKeysFilter[]
user_id This property is required. str
The OCID of the user.
filters Changes to this property will trigger replacement. Sequence[identity.GetCustomerSecretKeysFilter]
userId This property is required. String
The OCID of the user.
filters Changes to this property will trigger replacement. 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 This property is required. string
The display name you assign to the secret key. Does not have to be unique, and it's changeable.
Id This property is required. string
The access key portion of the key pair.
InactiveState This property is required. string
The detailed status of INACTIVE lifecycleState.
Key This property is required. string
State This property is required. string
The secret key's current state.
TimeCreated This property is required. string
Date and time the CustomerSecretKey object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
TimeExpires This property is required. 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 This property is required. string
The OCID of the user.
DisplayName This property is required. string
The display name you assign to the secret key. Does not have to be unique, and it's changeable.
Id This property is required. string
The access key portion of the key pair.
InactiveState This property is required. string
The detailed status of INACTIVE lifecycleState.
Key This property is required. string
State This property is required. string
The secret key's current state.
TimeCreated This property is required. string
Date and time the CustomerSecretKey object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
TimeExpires This property is required. 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 This property is required. string
The OCID of the user.
displayName This property is required. String
The display name you assign to the secret key. Does not have to be unique, and it's changeable.
id This property is required. String
The access key portion of the key pair.
inactiveState This property is required. String
The detailed status of INACTIVE lifecycleState.
key This property is required. String
state This property is required. String
The secret key's current state.
timeCreated This property is required. String
Date and time the CustomerSecretKey object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
timeExpires This property is required. 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 This property is required. String
The OCID of the user.
displayName This property is required. string
The display name you assign to the secret key. Does not have to be unique, and it's changeable.
id This property is required. string
The access key portion of the key pair.
inactiveState This property is required. string
The detailed status of INACTIVE lifecycleState.
key This property is required. string
state This property is required. string
The secret key's current state.
timeCreated This property is required. string
Date and time the CustomerSecretKey object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
timeExpires This property is required. 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 This property is required. string
The OCID of the user.
display_name This property is required. str
The display name you assign to the secret key. Does not have to be unique, and it's changeable.
id This property is required. str
The access key portion of the key pair.
inactive_state This property is required. str
The detailed status of INACTIVE lifecycleState.
key This property is required. str
state This property is required. str
The secret key's current state.
time_created This property is required. str
Date and time the CustomerSecretKey object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
time_expires This property is required. 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 This property is required. str
The OCID of the user.
displayName This property is required. String
The display name you assign to the secret key. Does not have to be unique, and it's changeable.
id This property is required. String
The access key portion of the key pair.
inactiveState This property is required. String
The detailed status of INACTIVE lifecycleState.
key This property is required. String
state This property is required. String
The secret key's current state.
timeCreated This property is required. String
Date and time the CustomerSecretKey object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
timeExpires This property is required. 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 This property is required. String
The OCID of the user.

GetCustomerSecretKeysFilter

Name This property is required. string
Values This property is required. List<string>
Regex bool
Name This property is required. string
Values This property is required. []string
Regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean
name This property is required. string
values This property is required. string[]
regex boolean
name This property is required. str
values This property is required. Sequence[str]
regex bool
name This property is required. String
values This property is required. 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.
Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi