diskencryptionsets

package
v0.20240522.1080424 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MPL-2.0 Imports: 14 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-02/diskencryptionsets Documentation

The diskencryptionsets SDK allows for interaction with the Azure Resource Manager Service compute (API Version 2022-03-02).

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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-02/diskencryptionsets"

Client Initialization

client := diskencryptionsets.NewDiskEncryptionSetsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DiskEncryptionSetsClient.CreateOrUpdate

ctx := context.TODO()
id := commonids.NewDiskEncryptionSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskEncryptionSetValue")

payload := diskencryptionsets.DiskEncryptionSet{
	// ...
}


if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: DiskEncryptionSetsClient.Delete

ctx := context.TODO()
id := commonids.NewDiskEncryptionSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskEncryptionSetValue")

if err := client.DeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: DiskEncryptionSetsClient.Get

ctx := context.TODO()
id := commonids.NewDiskEncryptionSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskEncryptionSetValue")

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: DiskEncryptionSetsClient.List

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

// 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: DiskEncryptionSetsClient.ListAssociatedResources

ctx := context.TODO()
id := commonids.NewDiskEncryptionSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskEncryptionSetValue")

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

Example Usage: DiskEncryptionSetsClient.ListByResourceGroup

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

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

Example Usage: DiskEncryptionSetsClient.Update

ctx := context.TODO()
id := commonids.NewDiskEncryptionSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "diskEncryptionSetValue")

payload := diskencryptionsets.DiskEncryptionSetUpdate{
	// ...
}


if err := client.UpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForDiskEncryptionSetType

func PossibleValuesForDiskEncryptionSetType() []string

Types

type ApiError

type ApiError struct {
	Code       *string         `json:"code,omitempty"`
	Details    *[]ApiErrorBase `json:"details,omitempty"`
	Innererror *InnerError     `json:"innererror,omitempty"`
	Message    *string         `json:"message,omitempty"`
	Target     *string         `json:"target,omitempty"`
}

type ApiErrorBase

type ApiErrorBase struct {
	Code    *string `json:"code,omitempty"`
	Message *string `json:"message,omitempty"`
	Target  *string `json:"target,omitempty"`
}

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DiskEncryptionSet
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type DiskEncryptionSet

type DiskEncryptionSet struct {
	Id         *string                            `json:"id,omitempty"`
	Identity   *identity.SystemAndUserAssignedMap `json:"identity,omitempty"`
	Location   string                             `json:"location"`
	Name       *string                            `json:"name,omitempty"`
	Properties *EncryptionSetProperties           `json:"properties,omitempty"`
	Tags       *map[string]string                 `json:"tags,omitempty"`
	Type       *string                            `json:"type,omitempty"`
}

type DiskEncryptionSetOperationPredicate

type DiskEncryptionSetOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (DiskEncryptionSetOperationPredicate) Matches

type DiskEncryptionSetType

type DiskEncryptionSetType string
const (
	DiskEncryptionSetTypeConfidentialVMEncryptedWithCustomerKey      DiskEncryptionSetType = "ConfidentialVmEncryptedWithCustomerKey"
	DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey             DiskEncryptionSetType = "EncryptionAtRestWithCustomerKey"
	DiskEncryptionSetTypeEncryptionAtRestWithPlatformAndCustomerKeys DiskEncryptionSetType = "EncryptionAtRestWithPlatformAndCustomerKeys"
)

func (*DiskEncryptionSetType) UnmarshalJSON

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

type DiskEncryptionSetUpdate

type DiskEncryptionSetUpdate struct {
	Identity   *identity.SystemAndUserAssignedMap `json:"identity,omitempty"`
	Properties *DiskEncryptionSetUpdateProperties `json:"properties,omitempty"`
	Tags       *map[string]string                 `json:"tags,omitempty"`
}

type DiskEncryptionSetUpdateProperties

type DiskEncryptionSetUpdateProperties struct {
	ActiveKey                         *KeyForDiskEncryptionSet `json:"activeKey,omitempty"`
	EncryptionType                    *DiskEncryptionSetType   `json:"encryptionType,omitempty"`
	FederatedClientId                 *string                  `json:"federatedClientId,omitempty"`
	RotationToLatestKeyVersionEnabled *bool                    `json:"rotationToLatestKeyVersionEnabled,omitempty"`
}

type DiskEncryptionSetsClient

type DiskEncryptionSetsClient struct {
	Client *resourcemanager.Client
}

func NewDiskEncryptionSetsClientWithBaseURI

func NewDiskEncryptionSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*DiskEncryptionSetsClient, error)

func (DiskEncryptionSetsClient) CreateOrUpdate

CreateOrUpdate ...

func (DiskEncryptionSetsClient) CreateOrUpdateThenPoll

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (DiskEncryptionSetsClient) Delete

Delete ...

func (DiskEncryptionSetsClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (DiskEncryptionSetsClient) Get

Get ...

func (DiskEncryptionSetsClient) List

List ...

func (DiskEncryptionSetsClient) ListAssociatedResources

ListAssociatedResources ...

func (DiskEncryptionSetsClient) ListAssociatedResourcesComplete

func (c DiskEncryptionSetsClient) ListAssociatedResourcesComplete(ctx context.Context, id commonids.DiskEncryptionSetId) (result ListAssociatedResourcesCompleteResult, err error)

ListAssociatedResourcesComplete retrieves all the results into a single object

func (DiskEncryptionSetsClient) ListByResourceGroup

ListByResourceGroup ...

func (DiskEncryptionSetsClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (DiskEncryptionSetsClient) ListByResourceGroupCompleteMatchingPredicate

func (c DiskEncryptionSetsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate DiskEncryptionSetOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DiskEncryptionSetsClient) ListComplete

ListComplete retrieves all the results into a single object

func (DiskEncryptionSetsClient) ListCompleteMatchingPredicate

func (c DiskEncryptionSetsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate DiskEncryptionSetOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DiskEncryptionSetsClient) Update

Update ...

func (DiskEncryptionSetsClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type EncryptionSetProperties

type EncryptionSetProperties struct {
	ActiveKey                         *KeyForDiskEncryptionSet   `json:"activeKey,omitempty"`
	AutoKeyRotationError              *ApiError                  `json:"autoKeyRotationError,omitempty"`
	EncryptionType                    *DiskEncryptionSetType     `json:"encryptionType,omitempty"`
	FederatedClientId                 *string                    `json:"federatedClientId,omitempty"`
	LastKeyRotationTimestamp          *string                    `json:"lastKeyRotationTimestamp,omitempty"`
	PreviousKeys                      *[]KeyForDiskEncryptionSet `json:"previousKeys,omitempty"`
	ProvisioningState                 *string                    `json:"provisioningState,omitempty"`
	RotationToLatestKeyVersionEnabled *bool                      `json:"rotationToLatestKeyVersionEnabled,omitempty"`
}

func (*EncryptionSetProperties) GetLastKeyRotationTimestampAsTime

func (o *EncryptionSetProperties) GetLastKeyRotationTimestampAsTime() (*time.Time, error)

func (*EncryptionSetProperties) SetLastKeyRotationTimestampAsTime

func (o *EncryptionSetProperties) SetLastKeyRotationTimestampAsTime(input time.Time)

type GetOperationResponse

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

type InnerError

type InnerError struct {
	Errordetail   *string `json:"errordetail,omitempty"`
	Exceptiontype *string `json:"exceptiontype,omitempty"`
}

type KeyForDiskEncryptionSet

type KeyForDiskEncryptionSet struct {
	KeyUrl      string       `json:"keyUrl"`
	SourceVault *SourceVault `json:"sourceVault,omitempty"`
}

type ListAssociatedResourcesCompleteResult

type ListAssociatedResourcesCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []string
}

type ListAssociatedResourcesOperationResponse

type ListAssociatedResourcesOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]string
}

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []DiskEncryptionSet
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]DiskEncryptionSet
}

type ListCompleteResult

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

type ListOperationResponse

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

type SourceVault

type SourceVault struct {
	Id *string `json:"id,omitempty"`
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DiskEncryptionSet
}

Jump to

Keyboard shortcuts

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