encryptionscopes

package
v0.20231214.1160726 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/storage/2022-09-01/encryptionscopes Documentation

The encryptionscopes SDK allows for interaction with the Azure Resource Manager Service storage (API Version 2022-09-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/storage/2022-09-01/encryptionscopes"

Client Initialization

client := encryptionscopes.NewEncryptionScopesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: EncryptionScopesClient.Get

ctx := context.TODO()
id := encryptionscopes.NewEncryptionScopeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageAccountValue", "encryptionScopeValue")

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

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

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

Example Usage: EncryptionScopesClient.Patch

ctx := context.TODO()
id := encryptionscopes.NewEncryptionScopeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageAccountValue", "encryptionScopeValue")

payload := encryptionscopes.EncryptionScope{
	// ...
}


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

Example Usage: EncryptionScopesClient.Put

ctx := context.TODO()
id := encryptionscopes.NewEncryptionScopeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageAccountValue", "encryptionScopeValue")

payload := encryptionscopes.EncryptionScope{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForEncryptionScopeSource

func PossibleValuesForEncryptionScopeSource() []string

func PossibleValuesForEncryptionScopeState

func PossibleValuesForEncryptionScopeState() []string

func PossibleValuesForListEncryptionScopesInclude

func PossibleValuesForListEncryptionScopesInclude() []string

func ValidateEncryptionScopeID

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

ValidateEncryptionScopeID checks that 'input' can be parsed as a Encryption Scope ID

Types

type EncryptionScope

type EncryptionScope struct {
	Id         *string                    `json:"id,omitempty"`
	Name       *string                    `json:"name,omitempty"`
	Properties *EncryptionScopeProperties `json:"properties,omitempty"`
	Type       *string                    `json:"type,omitempty"`
}

type EncryptionScopeId

type EncryptionScopeId struct {
	SubscriptionId      string
	ResourceGroupName   string
	StorageAccountName  string
	EncryptionScopeName string
}

EncryptionScopeId is a struct representing the Resource ID for a Encryption Scope

func NewEncryptionScopeID

func NewEncryptionScopeID(subscriptionId string, resourceGroupName string, storageAccountName string, encryptionScopeName string) EncryptionScopeId

NewEncryptionScopeID returns a new EncryptionScopeId struct

func ParseEncryptionScopeID

func ParseEncryptionScopeID(input string) (*EncryptionScopeId, error)

ParseEncryptionScopeID parses 'input' into a EncryptionScopeId

func ParseEncryptionScopeIDInsensitively

func ParseEncryptionScopeIDInsensitively(input string) (*EncryptionScopeId, error)

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

func (*EncryptionScopeId) FromParseResult added in v0.20231127.1171502

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

func (EncryptionScopeId) ID

func (id EncryptionScopeId) ID() string

ID returns the formatted Encryption Scope ID

func (EncryptionScopeId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Encryption Scope ID

func (EncryptionScopeId) String

func (id EncryptionScopeId) String() string

String returns a human-readable description of this Encryption Scope ID

type EncryptionScopeKeyVaultProperties

type EncryptionScopeKeyVaultProperties struct {
	CurrentVersionedKeyIdentifier *string `json:"currentVersionedKeyIdentifier,omitempty"`
	KeyUri                        *string `json:"keyUri,omitempty"`
	LastKeyRotationTimestamp      *string `json:"lastKeyRotationTimestamp,omitempty"`
}

func (*EncryptionScopeKeyVaultProperties) GetLastKeyRotationTimestampAsTime

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

func (*EncryptionScopeKeyVaultProperties) SetLastKeyRotationTimestampAsTime

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

type EncryptionScopeOperationPredicate

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

func (EncryptionScopeOperationPredicate) Matches

type EncryptionScopeProperties

type EncryptionScopeProperties struct {
	CreationTime                    *string                            `json:"creationTime,omitempty"`
	KeyVaultProperties              *EncryptionScopeKeyVaultProperties `json:"keyVaultProperties,omitempty"`
	LastModifiedTime                *string                            `json:"lastModifiedTime,omitempty"`
	RequireInfrastructureEncryption *bool                              `json:"requireInfrastructureEncryption,omitempty"`
	Source                          *EncryptionScopeSource             `json:"source,omitempty"`
	State                           *EncryptionScopeState              `json:"state,omitempty"`
}

func (*EncryptionScopeProperties) GetCreationTimeAsTime

func (o *EncryptionScopeProperties) GetCreationTimeAsTime() (*time.Time, error)

func (*EncryptionScopeProperties) GetLastModifiedTimeAsTime

func (o *EncryptionScopeProperties) GetLastModifiedTimeAsTime() (*time.Time, error)

func (*EncryptionScopeProperties) SetCreationTimeAsTime

func (o *EncryptionScopeProperties) SetCreationTimeAsTime(input time.Time)

func (*EncryptionScopeProperties) SetLastModifiedTimeAsTime

func (o *EncryptionScopeProperties) SetLastModifiedTimeAsTime(input time.Time)

type EncryptionScopeSource

type EncryptionScopeSource string
const (
	EncryptionScopeSourceMicrosoftPointKeyVault EncryptionScopeSource = "Microsoft.KeyVault"
	EncryptionScopeSourceMicrosoftPointStorage  EncryptionScopeSource = "Microsoft.Storage"
)

func (*EncryptionScopeSource) UnmarshalJSON added in v0.20231114.1115341

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

type EncryptionScopeState

type EncryptionScopeState string
const (
	EncryptionScopeStateDisabled EncryptionScopeState = "Disabled"
	EncryptionScopeStateEnabled  EncryptionScopeState = "Enabled"
)

func (*EncryptionScopeState) UnmarshalJSON added in v0.20231114.1115341

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

type EncryptionScopesClient

type EncryptionScopesClient struct {
	Client *resourcemanager.Client
}

func NewEncryptionScopesClientWithBaseURI

func NewEncryptionScopesClientWithBaseURI(sdkApi sdkEnv.Api) (*EncryptionScopesClient, error)

func (EncryptionScopesClient) Get

Get ...

func (EncryptionScopesClient) List

List ...

func (EncryptionScopesClient) ListComplete

ListComplete retrieves all the results into a single object

func (EncryptionScopesClient) ListCompleteMatchingPredicate

func (c EncryptionScopesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.StorageAccountId, options ListOperationOptions, predicate EncryptionScopeOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (EncryptionScopesClient) Patch

Patch ...

func (EncryptionScopesClient) Put

Put ...

type GetOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	Items []EncryptionScope
}

type ListEncryptionScopesInclude

type ListEncryptionScopesInclude string
const (
	ListEncryptionScopesIncludeAll      ListEncryptionScopesInclude = "All"
	ListEncryptionScopesIncludeDisabled ListEncryptionScopesInclude = "Disabled"
	ListEncryptionScopesIncludeEnabled  ListEncryptionScopesInclude = "Enabled"
)

func (*ListEncryptionScopesInclude) UnmarshalJSON added in v0.20231114.1115341

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

type ListOperationOptions

type ListOperationOptions struct {
	Filter      *string
	Include     *ListEncryptionScopesInclude
	Maxpagesize *int64
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders added in v0.20231114.1115341

func (o ListOperationOptions) ToHeaders() *client.Headers

func (ListOperationOptions) ToOData added in v0.20231114.1115341

func (o ListOperationOptions) ToOData() *odata.Query

func (ListOperationOptions) ToQuery added in v0.20231114.1115341

type ListOperationResponse

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

type PatchOperationResponse

type PatchOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *EncryptionScope
}

type PutOperationResponse

type PutOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *EncryptionScope
}

Jump to

Keyboard shortcuts

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