Show / Hide Table of Contents

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 secret value will be stored in the raw state as plain-text. Read more about secrets in state. On import, the secret value will not be retrieved.

Warning: All arguments including secret will 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,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
HmacKey
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Gcp.Storage
Assembly: Pulumi.Gcp.dll
Syntax
public class HmacKey : CustomResource

Constructors

View Source

HmacKey(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 Source

AccessId

The access ID of the HMAC Key.

Declaration
public Output<string> AccessId { get; }
Property Value
Type Description
Output<System.String>
View Source

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>
View Source

Secret

HMAC secret key material.

Declaration
public Output<string> Secret { get; }
Property Value
Type Description
Output<System.String>
View Source

ServiceAccountEmail

The email address of the key's associated service account.

Declaration
public Output<string> ServiceAccountEmail { get; }
Property Value
Type Description
Output<System.String>
View Source

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>
View Source

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>
View Source

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 Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.