confidentialledger

package
v0.20230731.1122530 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: MPL-2.0 Imports: 13 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/confidentialledger/2022-05-13/confidentialledger Documentation

The confidentialledger SDK allows for interaction with the Azure Resource Manager Service confidentialledger (API Version 2022-05-13).

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/confidentialledger/2022-05-13/confidentialledger"

Client Initialization

client := confidentialledger.NewConfidentialLedgerClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ConfidentialLedgerClient.LedgerCreate

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

payload := confidentialledger.ConfidentialLedger{
	// ...
}


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

Example Usage: ConfidentialLedgerClient.LedgerDelete

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

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

Example Usage: ConfidentialLedgerClient.LedgerGet

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

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

Example Usage: ConfidentialLedgerClient.LedgerListByResourceGroup

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

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

Example Usage: ConfidentialLedgerClient.LedgerListBySubscription

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

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

Example Usage: ConfidentialLedgerClient.LedgerUpdate

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

payload := confidentialledger.ConfidentialLedger{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForLedgerRoleName

func PossibleValuesForLedgerRoleName() []string

func PossibleValuesForLedgerType

func PossibleValuesForLedgerType() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateLedgerID

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

ValidateLedgerID checks that 'input' can be parsed as a Ledger ID

Types

type AADBasedSecurityPrincipal

type AADBasedSecurityPrincipal struct {
	LedgerRoleName *LedgerRoleName `json:"ledgerRoleName,omitempty"`
	PrincipalId    *string         `json:"principalId,omitempty"`
	TenantId       *string         `json:"tenantId,omitempty"`
}

type CertBasedSecurityPrincipal

type CertBasedSecurityPrincipal struct {
	Cert           *string         `json:"cert,omitempty"`
	LedgerRoleName *LedgerRoleName `json:"ledgerRoleName,omitempty"`
}

type ConfidentialLedger

type ConfidentialLedger struct {
	Id         *string                `json:"id,omitempty"`
	Location   *string                `json:"location,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *LedgerProperties      `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Tags       *map[string]string     `json:"tags,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type ConfidentialLedgerClient

type ConfidentialLedgerClient struct {
	Client *resourcemanager.Client
}

func NewConfidentialLedgerClientWithBaseURI

func NewConfidentialLedgerClientWithBaseURI(api environments.Api) (*ConfidentialLedgerClient, error)

func (ConfidentialLedgerClient) LedgerCreate

LedgerCreate ...

func (ConfidentialLedgerClient) LedgerCreateThenPoll

func (c ConfidentialLedgerClient) LedgerCreateThenPoll(ctx context.Context, id LedgerId, input ConfidentialLedger) error

LedgerCreateThenPoll performs LedgerCreate then polls until it's completed

func (ConfidentialLedgerClient) LedgerDelete

LedgerDelete ...

func (ConfidentialLedgerClient) LedgerDeleteThenPoll

func (c ConfidentialLedgerClient) LedgerDeleteThenPoll(ctx context.Context, id LedgerId) error

LedgerDeleteThenPoll performs LedgerDelete then polls until it's completed

func (ConfidentialLedgerClient) LedgerGet

LedgerGet ...

func (ConfidentialLedgerClient) LedgerListByResourceGroup

LedgerListByResourceGroup ...

func (ConfidentialLedgerClient) LedgerListByResourceGroupComplete

LedgerListByResourceGroupComplete retrieves all the results into a single object

func (ConfidentialLedgerClient) LedgerListByResourceGroupCompleteMatchingPredicate

LedgerListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ConfidentialLedgerClient) LedgerListBySubscription

LedgerListBySubscription ...

func (ConfidentialLedgerClient) LedgerListBySubscriptionComplete

LedgerListBySubscriptionComplete retrieves all the results into a single object

func (ConfidentialLedgerClient) LedgerListBySubscriptionCompleteMatchingPredicate

LedgerListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ConfidentialLedgerClient) LedgerUpdate

LedgerUpdate ...

func (ConfidentialLedgerClient) LedgerUpdateThenPoll

func (c ConfidentialLedgerClient) LedgerUpdateThenPoll(ctx context.Context, id LedgerId, input ConfidentialLedger) error

LedgerUpdateThenPoll performs LedgerUpdate then polls until it's completed

type ConfidentialLedgerOperationPredicate

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

func (ConfidentialLedgerOperationPredicate) Matches

type LedgerCreateOperationResponse

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

type LedgerDeleteOperationResponse

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

type LedgerGetOperationResponse

type LedgerGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ConfidentialLedger
}

type LedgerId

type LedgerId struct {
	SubscriptionId    string
	ResourceGroupName string
	LedgerName        string
}

LedgerId is a struct representing the Resource ID for a Ledger

func NewLedgerID

func NewLedgerID(subscriptionId string, resourceGroupName string, ledgerName string) LedgerId

NewLedgerID returns a new LedgerId struct

func ParseLedgerID

func ParseLedgerID(input string) (*LedgerId, error)

ParseLedgerID parses 'input' into a LedgerId

func ParseLedgerIDInsensitively

func ParseLedgerIDInsensitively(input string) (*LedgerId, error)

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

func (LedgerId) ID

func (id LedgerId) ID() string

ID returns the formatted Ledger ID

func (LedgerId) Segments

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

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

func (LedgerId) String

func (id LedgerId) String() string

String returns a human-readable description of this Ledger ID

type LedgerListByResourceGroupCompleteResult

type LedgerListByResourceGroupCompleteResult struct {
	Items []ConfidentialLedger
}

type LedgerListByResourceGroupOperationOptions

type LedgerListByResourceGroupOperationOptions struct {
	Filter *string
}

func DefaultLedgerListByResourceGroupOperationOptions

func DefaultLedgerListByResourceGroupOperationOptions() LedgerListByResourceGroupOperationOptions

func (LedgerListByResourceGroupOperationOptions) ToHeaders added in v0.20230411.1183115

func (LedgerListByResourceGroupOperationOptions) ToOData added in v0.20230411.1183115

func (LedgerListByResourceGroupOperationOptions) ToQuery added in v0.20230411.1183115

type LedgerListByResourceGroupOperationResponse

type LedgerListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ConfidentialLedger
}

type LedgerListBySubscriptionCompleteResult

type LedgerListBySubscriptionCompleteResult struct {
	Items []ConfidentialLedger
}

type LedgerListBySubscriptionOperationOptions

type LedgerListBySubscriptionOperationOptions struct {
	Filter *string
}

func DefaultLedgerListBySubscriptionOperationOptions

func DefaultLedgerListBySubscriptionOperationOptions() LedgerListBySubscriptionOperationOptions

func (LedgerListBySubscriptionOperationOptions) ToHeaders added in v0.20230411.1183115

func (LedgerListBySubscriptionOperationOptions) ToOData added in v0.20230411.1183115

func (LedgerListBySubscriptionOperationOptions) ToQuery added in v0.20230411.1183115

type LedgerListBySubscriptionOperationResponse

type LedgerListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ConfidentialLedger
}

type LedgerProperties

type LedgerProperties struct {
	AadBasedSecurityPrincipals  *[]AADBasedSecurityPrincipal  `json:"aadBasedSecurityPrincipals,omitempty"`
	CertBasedSecurityPrincipals *[]CertBasedSecurityPrincipal `json:"certBasedSecurityPrincipals,omitempty"`
	IdentityServiceUri          *string                       `json:"identityServiceUri,omitempty"`
	LedgerInternalNamespace     *string                       `json:"ledgerInternalNamespace,omitempty"`
	LedgerName                  *string                       `json:"ledgerName,omitempty"`
	LedgerType                  *LedgerType                   `json:"ledgerType,omitempty"`
	LedgerUri                   *string                       `json:"ledgerUri,omitempty"`
	ProvisioningState           *ProvisioningState            `json:"provisioningState,omitempty"`
}

type LedgerRoleName

type LedgerRoleName string
const (
	LedgerRoleNameAdministrator LedgerRoleName = "Administrator"
	LedgerRoleNameContributor   LedgerRoleName = "Contributor"
	LedgerRoleNameReader        LedgerRoleName = "Reader"
)

func (*LedgerRoleName) UnmarshalJSON added in v0.20230411.1183115

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

type LedgerType

type LedgerType string
const (
	LedgerTypePrivate LedgerType = "Private"
	LedgerTypePublic  LedgerType = "Public"
	LedgerTypeUnknown LedgerType = "Unknown"
)

func (*LedgerType) UnmarshalJSON added in v0.20230411.1183115

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

type LedgerUpdateOperationResponse

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

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateCreating  ProvisioningState = "Creating"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUnknown   ProvisioningState = "Unknown"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON added in v0.20230411.1183115

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

Jump to

Keyboard shortcuts

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