keys

package
v0.20240617.1095803 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/synapse/2021-06-01/keys Documentation

The keys SDK allows for interaction with the Azure Resource Manager Service synapse (API Version 2021-06-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/synapse/2021-06-01/keys"

Client Initialization

client := keys.NewKeysClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: KeysClient.CreateOrUpdate

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

payload := keys.Key{
	// ...
}


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

Example Usage: KeysClient.Delete

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

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

Example Usage: KeysClient.Get

ctx := context.TODO()
id := keys.NewKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "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: KeysClient.ListByWorkspace

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

// alternatively `client.ListByWorkspace(ctx, id)` can be used to do batched pagination
items, err := client.ListByWorkspaceComplete(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 ValidateKeyID

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

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

func ValidateWorkspaceID

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

ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Key
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Key
}

type GetOperationResponse

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

type Key

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

type KeyId

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

KeyId is a struct representing the Resource ID for a Key

func NewKeyID

func NewKeyID(subscriptionId string, resourceGroupName string, workspaceName 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 KeyOperationPredicate

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

func (KeyOperationPredicate) Matches

func (p KeyOperationPredicate) Matches(input Key) bool

type KeyProperties

type KeyProperties struct {
	IsActiveCMK *bool   `json:"isActiveCMK,omitempty"`
	KeyVaultUrl *string `json:"keyVaultUrl,omitempty"`
}

type KeysClient

type KeysClient struct {
	Client *resourcemanager.Client
}

func NewKeysClientWithBaseURI

func NewKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*KeysClient, error)

func (KeysClient) CreateOrUpdate

func (c KeysClient) CreateOrUpdate(ctx context.Context, id KeyId, input Key) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (KeysClient) Delete

func (c KeysClient) Delete(ctx context.Context, id KeyId) (result DeleteOperationResponse, err error)

Delete ...

func (KeysClient) Get

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

Get ...

func (KeysClient) ListByWorkspace

func (c KeysClient) ListByWorkspace(ctx context.Context, id WorkspaceId) (result ListByWorkspaceOperationResponse, err error)

ListByWorkspace ...

func (KeysClient) ListByWorkspaceComplete

func (c KeysClient) ListByWorkspaceComplete(ctx context.Context, id WorkspaceId) (ListByWorkspaceCompleteResult, error)

ListByWorkspaceComplete retrieves all the results into a single object

func (KeysClient) ListByWorkspaceCompleteMatchingPredicate

func (c KeysClient) ListByWorkspaceCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, predicate KeyOperationPredicate) (result ListByWorkspaceCompleteResult, err error)

ListByWorkspaceCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ListByWorkspaceCompleteResult

type ListByWorkspaceCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Key
}

type ListByWorkspaceOperationResponse

type ListByWorkspaceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Key
}

type WorkspaceId

type WorkspaceId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
}

WorkspaceId is a struct representing the Resource ID for a Workspace

func NewWorkspaceID

func NewWorkspaceID(subscriptionId string, resourceGroupName string, workspaceName string) WorkspaceId

NewWorkspaceID returns a new WorkspaceId struct

func ParseWorkspaceID

func ParseWorkspaceID(input string) (*WorkspaceId, error)

ParseWorkspaceID parses 'input' into a WorkspaceId

func ParseWorkspaceIDInsensitively

func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error)

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

func (*WorkspaceId) FromParseResult

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

func (WorkspaceId) ID

func (id WorkspaceId) ID() string

ID returns the formatted Workspace ID

func (WorkspaceId) Segments

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

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

func (WorkspaceId) String

func (id WorkspaceId) String() string

String returns a human-readable description of this Workspace ID

Jump to

Keyboard shortcuts

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