Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 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[_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:
- User
Id string - The OCID of the user.
- Filters
List<Get
Customer Secret Keys Filter>
- User
Id string - The OCID of the user.
- Filters
[]Get
Customer Secret Keys Filter
- user
Id String - The OCID of the user.
- filters
List<Get
Customer Secret Keys Filter>
- user
Id string - The OCID of the user.
- filters
Get
Customer Secret Keys Filter[]
- user_
id str - The OCID of the user.
- filters
Sequence[identity.
Get Customer Secret Keys Filter]
- user
Id String - The OCID of the user.
- filters List<Property Map>
getCustomerSecretKeys Result
The following output properties are available:
- Customer
Secret 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.
- User
Id string - The OCID of the user the password belongs to.
- Filters
List<Get
Customer Secret Keys Filter>
- Customer
Secret []GetKeys Customer Secret Keys Customer Secret Key - The list of customer_secret_keys.
- Id string
- The provider-assigned unique ID for this managed resource.
- User
Id string - The OCID of the user the password belongs to.
- Filters
[]Get
Customer Secret Keys Filter
- customer
Secret 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.
- user
Id String - The OCID of the user the password belongs to.
- filters
List<Get
Customer Secret Keys Filter>
- customer
Secret GetKeys Customer Secret Keys Customer Secret Key[] - The list of customer_secret_keys.
- id string
- The provider-assigned unique ID for this managed resource.
- user
Id string - The OCID of the user the password belongs to.
- filters
Get
Customer Secret Keys Filter[]
- customer_
secret_ Sequence[identity.keys Get 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[identity.
Get Customer Secret Keys Filter]
- customer
Secret List<Property Map>Keys - The list of customer_secret_keys.
- id String
- The provider-assigned unique ID for this managed resource.
- user
Id String - The OCID of the user the password belongs to.
- filters List<Property Map>
Supporting Types
GetCustomerSecretKeysCustomerSecretKey
- Display
Name 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.
- Inactive
State string - The detailed status of INACTIVE lifecycleState.
- Key string
- State string
- The secret key's current state.
- Time
Created string - Date and time the
CustomerSecretKey
object was created, in the format defined by RFC3339. Example:2016-08-25T21:10:29.600Z
- Time
Expires 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
- User
Id string - The OCID of the user.
- Display
Name 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.
- Inactive
State string - The detailed status of INACTIVE lifecycleState.
- Key string
- State string
- The secret key's current state.
- Time
Created string - Date and time the
CustomerSecretKey
object was created, in the format defined by RFC3339. Example:2016-08-25T21:10:29.600Z
- Time
Expires 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
- User
Id string - The OCID of the user.
- display
Name 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.
- inactive
State String - The detailed status of INACTIVE lifecycleState.
- key String
- state String
- The secret key's current state.
- time
Created String - Date and time the
CustomerSecretKey
object was created, in the format defined by RFC3339. Example:2016-08-25T21:10:29.600Z
- time
Expires 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
- user
Id String - The OCID of the user.
- display
Name 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.
- inactive
State string - The detailed status of INACTIVE lifecycleState.
- key string
- state string
- The secret key's current state.
- time
Created string - Date and time the
CustomerSecretKey
object was created, in the format defined by RFC3339. Example:2016-08-25T21:10:29.600Z
- time
Expires 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
- user
Id 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.
- display
Name 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.
- inactive
State String - The detailed status of INACTIVE lifecycleState.
- key String
- state String
- The secret key's current state.
- time
Created String - Date and time the
CustomerSecretKey
object was created, in the format defined by RFC3339. Example:2016-08-25T21:10:29.600Z
- time
Expires 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
- user
Id 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
oci
Terraform Provider.