diskencryptionsets

package
v0.20230725.1143138 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: MPL-2.0 Imports: 13 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-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 := diskencryptionsets.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 := diskencryptionsets.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 := diskencryptionsets.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 := diskencryptionsets.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 := diskencryptionsets.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 := diskencryptionsets.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 := diskencryptionsets.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

func ValidateDiskEncryptionSetID

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

ValidateDiskEncryptionSetID checks that 'input' can be parsed as a Disk Encryption Set ID

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       polling.LongRunningPoller
	HttpResponse *http.Response
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

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 DiskEncryptionSetId

type DiskEncryptionSetId struct {
	SubscriptionId        string
	ResourceGroupName     string
	DiskEncryptionSetName string
}

DiskEncryptionSetId is a struct representing the Resource ID for a Disk Encryption Set

func NewDiskEncryptionSetID

func NewDiskEncryptionSetID(subscriptionId string, resourceGroupName string, diskEncryptionSetName string) DiskEncryptionSetId

NewDiskEncryptionSetID returns a new DiskEncryptionSetId struct

func ParseDiskEncryptionSetID

func ParseDiskEncryptionSetID(input string) (*DiskEncryptionSetId, error)

ParseDiskEncryptionSetID parses 'input' into a DiskEncryptionSetId

func ParseDiskEncryptionSetIDInsensitively

func ParseDiskEncryptionSetIDInsensitively(input string) (*DiskEncryptionSetId, error)

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

func (DiskEncryptionSetId) ID

func (id DiskEncryptionSetId) ID() string

ID returns the formatted Disk Encryption Set ID

func (DiskEncryptionSetId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Disk Encryption Set ID

func (DiskEncryptionSetId) String

func (id DiskEncryptionSetId) String() string

String returns a human-readable description of this Disk Encryption Set ID

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"
)

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 autorest.Client
	// contains filtered or unexported fields
}

func NewDiskEncryptionSetsClientWithBaseURI

func NewDiskEncryptionSetsClientWithBaseURI(endpoint string) DiskEncryptionSetsClient

func (DiskEncryptionSetsClient) CreateOrUpdate

CreateOrUpdate ...

func (DiskEncryptionSetsClient) CreateOrUpdateThenPoll

func (c DiskEncryptionSetsClient) CreateOrUpdateThenPoll(ctx context.Context, id DiskEncryptionSetId, input DiskEncryptionSet) error

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 DiskEncryptionSetId) (result ListAssociatedResourcesCompleteResult, err error)

ListAssociatedResourcesComplete retrieves all of the results into a single object

func (DiskEncryptionSetsClient) ListByResourceGroup

ListByResourceGroup ...

func (DiskEncryptionSetsClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all of the results into a single object

func (DiskEncryptionSetsClient) ListByResourceGroupCompleteMatchingPredicate

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

ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (DiskEncryptionSetsClient) ListComplete

ListComplete retrieves all of the results into a single object

func (DiskEncryptionSetsClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all of the results and then applied 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
	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 {
	Items []string
}

type ListAssociatedResourcesOperationResponse

type ListAssociatedResourcesOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]string
	// contains filtered or unexported fields
}

func (ListAssociatedResourcesOperationResponse) HasMore

func (ListAssociatedResourcesOperationResponse) LoadMore

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	Items []DiskEncryptionSet
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]DiskEncryptionSet
	// contains filtered or unexported fields
}

func (ListByResourceGroupOperationResponse) HasMore

func (ListByResourceGroupOperationResponse) LoadMore

type ListCompleteResult

type ListCompleteResult struct {
	Items []DiskEncryptionSet
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]DiskEncryptionSet
	// contains filtered or unexported fields
}

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

type SourceVault

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

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

Jump to

Keyboard shortcuts

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