Class HmacKey (5.19.1)

Inheritance

ServiceObject<HmacKeyMetadata >HmacKey

Package

@google-cloud/storage

Constructors

(constructor)(storage, accessId, options)

constructor(storage:Storage,accessId:string,options?:HmacKeyOptions);

Constructs an HmacKey object.

Note: this only create a local reference to an HMAC key, to create an HMAC key, use .

Parameters
NameDescription
storageStorage

The Storage instance this HMAC key is attached to.

accessIdstring

The unique accessId for this HMAC key.

optionsHmacKeyOptions

Constructor configurations.

Example
const{Storage}=require('@google-cloud/storage');conststorage=newStorage();consthmacKey=storage.hmacKey('access-id');

Properties

metadata

metadata:HmacKeyMetadata|undefined;

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-30 UTC.