Class HmacKey
The hmacKeys resource represents an HMAC key within Cloud Storage. The resource consists of a secret and HMAC key metadata. HMAC keys can be used as credentials for service accounts.
To get more information about HmacKey, see:
- API documentation
- How-to Guides
- Official Documentation
Warning: All arguments including the
secretvalue will be stored in the raw state as plain-text. Read more about secrets in state. On import, thesecretvalue will not be retrieved.
Warning: All arguments including
secretwill be stored in the raw state as plain-text. Read more about secrets in state.
Example Usage - Storage Hmac Key
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var serviceAccount = new Gcp.ServiceAccount.Account("serviceAccount", new Gcp.ServiceAccount.AccountArgs
{
AccountId = "my-svc-acc",
});
var key = new Gcp.Storage.HmacKey("key", new Gcp.Storage.HmacKeyArgs
{
ServiceAccountEmail = serviceAccount.Email,
});
}
}
Inherited Members
Namespace: Pulumi.Gcp.Storage
Assembly: Pulumi.Gcp.dll
Syntax
public class HmacKey : CustomResource
Constructors
View SourceHmacKey(String, HmacKeyArgs, CustomResourceOptions)
Create a HmacKey resource with the given unique name, arguments, and options.
Declaration
public HmacKey(string name, HmacKeyArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| HmacKeyArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAccessId
The access ID of the HMAC Key.
Declaration
public Output<string> AccessId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Project
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Declaration
public Output<string> Project { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Secret
HMAC secret key material.
Declaration
public Output<string> Secret { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ServiceAccountEmail
The email address of the key's associated service account.
Declaration
public Output<string> ServiceAccountEmail { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
State
The state of the key. Can be set to one of ACTIVE, INACTIVE.
Declaration
public Output<string> State { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
TimeCreated
'The creation time of the HMAC key in RFC 3339 format. '
Declaration
public Output<string> TimeCreated { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Updated
'The last modification time of the HMAC key metadata in RFC 3339 format.'
Declaration
public Output<string> Updated { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, HmacKeyState, CustomResourceOptions)
Get an existing HmacKey resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static HmacKey Get(string name, Input<string> id, HmacKeyState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| HmacKeyState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| HmacKey |