|
| 1 | +# oci_identity_customer_secret_key |
| 2 | + |
| 3 | +## CustomerSecretKey Resource |
| 4 | + |
| 5 | +### CustomerSecretKey Reference |
| 6 | + |
| 7 | +The following attributes are exported: |
| 8 | + |
| 9 | +* `display_name` - The displayName you assign to the secret key. Does not have to be unique, and it's changeable. |
| 10 | +* `id` - The OCID of the secret key. |
| 11 | +* `inactive_state` - The detailed status of INACTIVE lifecycleState. |
| 12 | +* `key` - The secret key. |
| 13 | +* `state` - The secret key's current state. After creating a secret key, make sure its `lifecycleState` changes from CREATING to ACTIVE before using it. |
| 14 | +* `time_created` - Date and time the `CustomerSecretKey` object was created, in the format defined by RFC3339. Example: `2016-08-25T21:10:29.600Z` |
| 15 | +* `time_expires` - 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` |
| 16 | +* `user_id` - The OCID of the user the password belongs to. |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | +### Create Operation |
| 21 | +Creates a new secret key for the specified user. Secret keys are used for authentication with the Object Storage Service's Amazon S3 |
| 22 | +compatible API. For information, see |
| 23 | +[Managing User Credentials](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm). |
| 24 | + |
| 25 | +You must specify a *description* for the secret key (although it can be an empty string). It does not |
| 26 | +have to be unique, and you can change it anytime with |
| 27 | +[UpdateCustomerSecretKey](https://docs.us-phoenix-1.oraclecloud.com/api/#/en/identity/20160918/CustomerSecretKeySummary/UpdateCustomerSecretKey). |
| 28 | + |
| 29 | +Every user has permission to create a secret key for *their own user ID*. An administrator in your organization |
| 30 | +does not need to write a policy to give users this ability. To compare, administrators who have permission to the |
| 31 | +tenancy can use this operation to create a secret key for any user, including themselves. |
| 32 | + |
| 33 | + |
| 34 | +The following arguments are supported: |
| 35 | + |
| 36 | +* `display_name` - (Required) The name you assign to the secret key during creation. Does not have to be unique, and it's changeable. |
| 37 | +* `user_id` - (Required) The OCID of the user. |
| 38 | + |
| 39 | + |
| 40 | +### Update Operation |
| 41 | + |
| 42 | + |
| 43 | +The following arguments support updates: |
| 44 | +* `display_name` - The name you assign to the secret key during creation. Does not have to be unique, and it's changeable. |
| 45 | + |
| 46 | +** IMPORTANT ** |
| 47 | +Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values |
| 48 | + |
| 49 | +### Example Usage |
| 50 | + |
| 51 | +``` |
| 52 | +resource "oci_identity_customer_secret_key" "test_customer_secret_key" { |
| 53 | + #Required |
| 54 | + display_name = "${var.customer_secret_key_display_name}" |
| 55 | + user_id = "${oci_identity_user.test_user.id}" |
| 56 | +} |
| 57 | +``` |
| 58 | + |
| 59 | +# oci_identity_customer_secret_keys |
| 60 | + |
| 61 | +## CustomerSecretKey DataSource |
| 62 | + |
| 63 | +Gets a list of customer_secret_keys. |
| 64 | + |
| 65 | +### List Operation |
| 66 | +Lists the secret keys for the specified user. The returned object contains the secret key's OCID, but not |
| 67 | +the secret key itself. The actual secret key is returned only upon creation. |
| 68 | + |
| 69 | +The following arguments are supported: |
| 70 | + |
| 71 | +* `user_id` - (Required) The OCID of the user. |
| 72 | + |
| 73 | + |
| 74 | +The following attributes are exported: |
| 75 | + |
| 76 | +* `customer_secret_keys` - The list of customer_secret_keys. |
| 77 | + |
| 78 | +### Example Usage |
| 79 | + |
| 80 | +``` |
| 81 | +data "oci_identity_customer_secret_keys" "test_customer_secret_keys" { |
| 82 | + #Required |
| 83 | + user_id = "${oci_identity_user.test_user.id}" |
| 84 | +} |
| 85 | +``` |
0 commit comments