managedhsmkeys

package
v0.20240227.1165506 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/managedhsmkeys Documentation

The managedhsmkeys SDK allows for interaction with the Azure Resource Manager Service keyvault (API Version 2023-07-01).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-07-01/managedhsmkeys"

Client Initialization

client := managedhsmkeys.NewManagedHsmKeysClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ManagedHsmKeysClient.CreateIfNotExist

ctx := context.TODO()
id := managedhsmkeys.NewKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedHSMValue", "keyValue")

payload := managedhsmkeys.ManagedHsmKeyCreateParameters{
	// ...
}


read, err := client.CreateIfNotExist(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ManagedHsmKeysClient.Get

ctx := context.TODO()
id := managedhsmkeys.NewKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedHSMValue", "keyValue")

read, err := client.Get(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ManagedHsmKeysClient.GetVersion

ctx := context.TODO()
id := managedhsmkeys.NewVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedHSMValue", "keyValue", "versionValue")

read, err := client.GetVersion(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ManagedHsmKeysClient.List

ctx := context.TODO()
id := managedhsmkeys.NewManagedHSMID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedHSMValue")

// alternatively `client.List(ctx, id)` can be used to do batched pagination
items, err := client.ListComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: ManagedHsmKeysClient.ListVersions

ctx := context.TODO()
id := managedhsmkeys.NewKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedHSMValue", "keyValue")

// alternatively `client.ListVersions(ctx, id)` can be used to do batched pagination
items, err := client.ListVersionsComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForDeletionRecoveryLevel

func PossibleValuesForDeletionRecoveryLevel() []string

func PossibleValuesForJsonWebKeyCurveName

func PossibleValuesForJsonWebKeyCurveName() []string

func PossibleValuesForJsonWebKeyOperation

func PossibleValuesForJsonWebKeyOperation() []string

func PossibleValuesForJsonWebKeyType

func PossibleValuesForJsonWebKeyType() []string

func PossibleValuesForKeyRotationPolicyActionType

func PossibleValuesForKeyRotationPolicyActionType() []string

func ValidateKeyID

func ValidateKeyID(input interface{}, key string) (warnings []string, errors []error)

ValidateKeyID checks that 'input' can be parsed as a Key ID

func ValidateManagedHSMID

func ValidateManagedHSMID(input interface{}, key string) (warnings []string, errors []error)

ValidateManagedHSMID checks that 'input' can be parsed as a Managed H S M ID

func ValidateVersionID

func ValidateVersionID(input interface{}, key string) (warnings []string, errors []error)

ValidateVersionID checks that 'input' can be parsed as a Version ID

Types

type CreateIfNotExistOperationResponse

type CreateIfNotExistOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ManagedHsmKey
}

type DeletionRecoveryLevel

type DeletionRecoveryLevel string
const (
	DeletionRecoveryLevelPurgeable                                DeletionRecoveryLevel = "Purgeable"
	DeletionRecoveryLevelRecoverable                              DeletionRecoveryLevel = "Recoverable"
	DeletionRecoveryLevelRecoverablePositiveProtectedSubscription DeletionRecoveryLevel = "Recoverable+ProtectedSubscription"
	DeletionRecoveryLevelRecoverablePositivePurgeable             DeletionRecoveryLevel = "Recoverable+Purgeable"
)

func (*DeletionRecoveryLevel) UnmarshalJSON

func (s *DeletionRecoveryLevel) UnmarshalJSON(bytes []byte) error

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ManagedHsmKey
}

type GetVersionOperationResponse

type GetVersionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ManagedHsmKey
}

type JsonWebKeyCurveName

type JsonWebKeyCurveName string
const (
	JsonWebKeyCurveNamePNegativeFiveTwoOne     JsonWebKeyCurveName = "P-521"
	JsonWebKeyCurveNamePNegativeThreeEightFour JsonWebKeyCurveName = "P-384"
	JsonWebKeyCurveNamePNegativeTwoFiveSix     JsonWebKeyCurveName = "P-256"
	JsonWebKeyCurveNamePNegativeTwoFiveSixK    JsonWebKeyCurveName = "P-256K"
)

func (*JsonWebKeyCurveName) UnmarshalJSON

func (s *JsonWebKeyCurveName) UnmarshalJSON(bytes []byte) error

type JsonWebKeyOperation

type JsonWebKeyOperation string
const (
	JsonWebKeyOperationDecrypt   JsonWebKeyOperation = "decrypt"
	JsonWebKeyOperationEncrypt   JsonWebKeyOperation = "encrypt"
	JsonWebKeyOperationImport    JsonWebKeyOperation = "import"
	JsonWebKeyOperationRelease   JsonWebKeyOperation = "release"
	JsonWebKeyOperationSign      JsonWebKeyOperation = "sign"
	JsonWebKeyOperationUnwrapKey JsonWebKeyOperation = "unwrapKey"
	JsonWebKeyOperationVerify    JsonWebKeyOperation = "verify"
	JsonWebKeyOperationWrapKey   JsonWebKeyOperation = "wrapKey"
)

func (*JsonWebKeyOperation) UnmarshalJSON

func (s *JsonWebKeyOperation) UnmarshalJSON(bytes []byte) error

type JsonWebKeyType

type JsonWebKeyType string
const (
	JsonWebKeyTypeEC             JsonWebKeyType = "EC"
	JsonWebKeyTypeECNegativeHSM  JsonWebKeyType = "EC-HSM"
	JsonWebKeyTypeRSA            JsonWebKeyType = "RSA"
	JsonWebKeyTypeRSANegativeHSM JsonWebKeyType = "RSA-HSM"
)

func (*JsonWebKeyType) UnmarshalJSON

func (s *JsonWebKeyType) UnmarshalJSON(bytes []byte) error

type KeyId

type KeyId struct {
	SubscriptionId    string
	ResourceGroupName string
	ManagedHSMName    string
	KeyName           string
}

KeyId is a struct representing the Resource ID for a Key

func NewKeyID

func NewKeyID(subscriptionId string, resourceGroupName string, managedHSMName string, keyName string) KeyId

NewKeyID returns a new KeyId struct

func ParseKeyID

func ParseKeyID(input string) (*KeyId, error)

ParseKeyID parses 'input' into a KeyId

func ParseKeyIDInsensitively

func ParseKeyIDInsensitively(input string) (*KeyId, error)

ParseKeyIDInsensitively parses 'input' case-insensitively into a KeyId note: this method should only be used for API response data and not user input

func (*KeyId) FromParseResult

func (id *KeyId) FromParseResult(input resourceids.ParseResult) error

func (KeyId) ID

func (id KeyId) ID() string

ID returns the formatted Key ID

func (KeyId) Segments

func (id KeyId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Key ID

func (KeyId) String

func (id KeyId) String() string

String returns a human-readable description of this Key ID

type KeyRotationPolicyActionType

type KeyRotationPolicyActionType string
const (
	KeyRotationPolicyActionTypeNotify KeyRotationPolicyActionType = "notify"
	KeyRotationPolicyActionTypeRotate KeyRotationPolicyActionType = "rotate"
)

func (*KeyRotationPolicyActionType) UnmarshalJSON

func (s *KeyRotationPolicyActionType) UnmarshalJSON(bytes []byte) error

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ManagedHsmKey
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ManagedHsmKey
}

type ListVersionsCompleteResult

type ListVersionsCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ManagedHsmKey
}

type ListVersionsOperationResponse

type ListVersionsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ManagedHsmKey
}

type ManagedHSMId

type ManagedHSMId struct {
	SubscriptionId    string
	ResourceGroupName string
	ManagedHSMName    string
}

ManagedHSMId is a struct representing the Resource ID for a Managed H S M

func NewManagedHSMID

func NewManagedHSMID(subscriptionId string, resourceGroupName string, managedHSMName string) ManagedHSMId

NewManagedHSMID returns a new ManagedHSMId struct

func ParseManagedHSMID

func ParseManagedHSMID(input string) (*ManagedHSMId, error)

ParseManagedHSMID parses 'input' into a ManagedHSMId

func ParseManagedHSMIDInsensitively

func ParseManagedHSMIDInsensitively(input string) (*ManagedHSMId, error)

ParseManagedHSMIDInsensitively parses 'input' case-insensitively into a ManagedHSMId note: this method should only be used for API response data and not user input

func (*ManagedHSMId) FromParseResult

func (id *ManagedHSMId) FromParseResult(input resourceids.ParseResult) error

func (ManagedHSMId) ID

func (id ManagedHSMId) ID() string

ID returns the formatted Managed H S M ID

func (ManagedHSMId) Segments

func (id ManagedHSMId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Managed H S M ID

func (ManagedHSMId) String

func (id ManagedHSMId) String() string

String returns a human-readable description of this Managed H S M ID

type ManagedHsmAction

type ManagedHsmAction struct {
	Type *KeyRotationPolicyActionType `json:"type,omitempty"`
}

type ManagedHsmKey

type ManagedHsmKey struct {
	Id         *string                 `json:"id,omitempty"`
	Name       *string                 `json:"name,omitempty"`
	Properties ManagedHsmKeyProperties `json:"properties"`
	Tags       *map[string]string      `json:"tags,omitempty"`
	Type       *string                 `json:"type,omitempty"`
}

type ManagedHsmKeyAttributes

type ManagedHsmKeyAttributes struct {
	Created       *int64                 `json:"created,omitempty"`
	Enabled       *bool                  `json:"enabled,omitempty"`
	Exp           *int64                 `json:"exp,omitempty"`
	Exportable    *bool                  `json:"exportable,omitempty"`
	Nbf           *int64                 `json:"nbf,omitempty"`
	RecoveryLevel *DeletionRecoveryLevel `json:"recoveryLevel,omitempty"`
	Updated       *int64                 `json:"updated,omitempty"`
}

type ManagedHsmKeyCreateParameters

type ManagedHsmKeyCreateParameters struct {
	Properties ManagedHsmKeyProperties `json:"properties"`
	Tags       *map[string]string      `json:"tags,omitempty"`
}

type ManagedHsmKeyOperationPredicate

type ManagedHsmKeyOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (ManagedHsmKeyOperationPredicate) Matches

type ManagedHsmKeyProperties

type ManagedHsmKeyProperties struct {
	Attributes        *ManagedHsmKeyAttributes    `json:"attributes,omitempty"`
	CurveName         *JsonWebKeyCurveName        `json:"curveName,omitempty"`
	KeyOps            *[]JsonWebKeyOperation      `json:"keyOps,omitempty"`
	KeySize           *int64                      `json:"keySize,omitempty"`
	KeyUri            *string                     `json:"keyUri,omitempty"`
	KeyUriWithVersion *string                     `json:"keyUriWithVersion,omitempty"`
	Kty               *JsonWebKeyType             `json:"kty,omitempty"`
	ReleasePolicy     *ManagedHsmKeyReleasePolicy `json:"release_policy,omitempty"`
	RotationPolicy    *ManagedHsmRotationPolicy   `json:"rotationPolicy,omitempty"`
}

type ManagedHsmKeyReleasePolicy

type ManagedHsmKeyReleasePolicy struct {
	ContentType *string `json:"contentType,omitempty"`
	Data        *string `json:"data,omitempty"`
}

type ManagedHsmKeyRotationPolicyAttributes

type ManagedHsmKeyRotationPolicyAttributes struct {
	Created    *int64  `json:"created,omitempty"`
	ExpiryTime *string `json:"expiryTime,omitempty"`
	Updated    *int64  `json:"updated,omitempty"`
}

type ManagedHsmKeysClient

type ManagedHsmKeysClient struct {
	Client *resourcemanager.Client
}

func NewManagedHsmKeysClientWithBaseURI

func NewManagedHsmKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedHsmKeysClient, error)

func (ManagedHsmKeysClient) CreateIfNotExist

CreateIfNotExist ...

func (ManagedHsmKeysClient) Get

func (c ManagedHsmKeysClient) Get(ctx context.Context, id KeyId) (result GetOperationResponse, err error)

Get ...

func (ManagedHsmKeysClient) GetVersion

func (c ManagedHsmKeysClient) GetVersion(ctx context.Context, id VersionId) (result GetVersionOperationResponse, err error)

GetVersion ...

func (ManagedHsmKeysClient) List

List ...

func (ManagedHsmKeysClient) ListComplete

ListComplete retrieves all the results into a single object

func (ManagedHsmKeysClient) ListCompleteMatchingPredicate

func (c ManagedHsmKeysClient) ListCompleteMatchingPredicate(ctx context.Context, id ManagedHSMId, predicate ManagedHsmKeyOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ManagedHsmKeysClient) ListVersions

func (c ManagedHsmKeysClient) ListVersions(ctx context.Context, id KeyId) (result ListVersionsOperationResponse, err error)

ListVersions ...

func (ManagedHsmKeysClient) ListVersionsComplete

func (c ManagedHsmKeysClient) ListVersionsComplete(ctx context.Context, id KeyId) (ListVersionsCompleteResult, error)

ListVersionsComplete retrieves all the results into a single object

func (ManagedHsmKeysClient) ListVersionsCompleteMatchingPredicate

func (c ManagedHsmKeysClient) ListVersionsCompleteMatchingPredicate(ctx context.Context, id KeyId, predicate ManagedHsmKeyOperationPredicate) (result ListVersionsCompleteResult, err error)

ListVersionsCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ManagedHsmLifetimeAction

type ManagedHsmLifetimeAction struct {
	Action  *ManagedHsmAction  `json:"action,omitempty"`
	Trigger *ManagedHsmTrigger `json:"trigger,omitempty"`
}

type ManagedHsmRotationPolicy

type ManagedHsmRotationPolicy struct {
	Attributes      *ManagedHsmKeyRotationPolicyAttributes `json:"attributes,omitempty"`
	LifetimeActions *[]ManagedHsmLifetimeAction            `json:"lifetimeActions,omitempty"`
}

type ManagedHsmTrigger

type ManagedHsmTrigger struct {
	TimeAfterCreate  *string `json:"timeAfterCreate,omitempty"`
	TimeBeforeExpiry *string `json:"timeBeforeExpiry,omitempty"`
}

type VersionId

type VersionId struct {
	SubscriptionId    string
	ResourceGroupName string
	ManagedHSMName    string
	KeyName           string
	VersionName       string
}

VersionId is a struct representing the Resource ID for a Version

func NewVersionID

func NewVersionID(subscriptionId string, resourceGroupName string, managedHSMName string, keyName string, versionName string) VersionId

NewVersionID returns a new VersionId struct

func ParseVersionID

func ParseVersionID(input string) (*VersionId, error)

ParseVersionID parses 'input' into a VersionId

func ParseVersionIDInsensitively

func ParseVersionIDInsensitively(input string) (*VersionId, error)

ParseVersionIDInsensitively parses 'input' case-insensitively into a VersionId note: this method should only be used for API response data and not user input

func (*VersionId) FromParseResult

func (id *VersionId) FromParseResult(input resourceids.ParseResult) error

func (VersionId) ID

func (id VersionId) ID() string

ID returns the formatted Version ID

func (VersionId) Segments

func (id VersionId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Version ID

func (VersionId) String

func (id VersionId) String() string

String returns a human-readable description of this Version ID

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL