managementlocks

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: 13 Imported by: 3

README

github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-05-01/managementlocks Documentation

The managementlocks SDK allows for interaction with the Azure Resource Manager Service resources (API Version 2020-05-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-05-01/managementlocks"

Client Initialization

client := managementlocks.NewManagementLocksClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ManagementLocksClient.CreateOrUpdateAtResourceGroupLevel

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

payload := managementlocks.ManagementLockObject{
	// ...
}


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

Example Usage: ManagementLocksClient.CreateOrUpdateAtResourceLevel

ctx := context.TODO()
id := managementlocks.NewScopedLockID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "lockValue")

payload := managementlocks.ManagementLockObject{
	// ...
}


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

Example Usage: ManagementLocksClient.CreateOrUpdateAtSubscriptionLevel

ctx := context.TODO()
id := managementlocks.NewLockID("12345678-1234-9876-4563-123456789012", "lockValue")

payload := managementlocks.ManagementLockObject{
	// ...
}


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

Example Usage: ManagementLocksClient.CreateOrUpdateByScope

ctx := context.TODO()
id := managementlocks.NewScopedLockID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "lockValue")

payload := managementlocks.ManagementLockObject{
	// ...
}


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

Example Usage: ManagementLocksClient.DeleteAtResourceGroupLevel

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

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

Example Usage: ManagementLocksClient.DeleteAtResourceLevel

ctx := context.TODO()
id := managementlocks.NewScopedLockID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "lockValue")

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

Example Usage: ManagementLocksClient.DeleteAtSubscriptionLevel

ctx := context.TODO()
id := managementlocks.NewLockID("12345678-1234-9876-4563-123456789012", "lockValue")

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

Example Usage: ManagementLocksClient.DeleteByScope

ctx := context.TODO()
id := managementlocks.NewScopedLockID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "lockValue")

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

Example Usage: ManagementLocksClient.GetAtResourceGroupLevel

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

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

Example Usage: ManagementLocksClient.GetAtResourceLevel

ctx := context.TODO()
id := managementlocks.NewScopedLockID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "lockValue")

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

Example Usage: ManagementLocksClient.GetAtSubscriptionLevel

ctx := context.TODO()
id := managementlocks.NewLockID("12345678-1234-9876-4563-123456789012", "lockValue")

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

Example Usage: ManagementLocksClient.GetByScope

ctx := context.TODO()
id := managementlocks.NewScopedLockID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "lockValue")

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

Example Usage: ManagementLocksClient.ListAtResourceGroupLevel

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

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

Example Usage: ManagementLocksClient.ListAtResourceLevel

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

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

Example Usage: ManagementLocksClient.ListAtSubscriptionLevel

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

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

Example Usage: ManagementLocksClient.ListByScope

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

// alternatively `client.ListByScope(ctx, id, managementlocks.DefaultListByScopeOperationOptions())` can be used to do batched pagination
items, err := client.ListByScopeComplete(ctx, id, managementlocks.DefaultListByScopeOperationOptions())
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 PossibleValuesForLockLevel

func PossibleValuesForLockLevel() []string

func ValidateLockID

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

ValidateLockID checks that 'input' can be parsed as a Lock ID

func ValidateProviderLockID

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

ValidateProviderLockID checks that 'input' can be parsed as a Provider Lock ID

func ValidateScopedLockID

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

ValidateScopedLockID checks that 'input' can be parsed as a Scoped Lock ID

Types

type CreateOrUpdateAtResourceGroupLevelOperationResponse

type CreateOrUpdateAtResourceGroupLevelOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ManagementLockObject
}

type CreateOrUpdateAtResourceLevelOperationResponse

type CreateOrUpdateAtResourceLevelOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ManagementLockObject
}

type CreateOrUpdateAtSubscriptionLevelOperationResponse

type CreateOrUpdateAtSubscriptionLevelOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ManagementLockObject
}

type CreateOrUpdateByScopeOperationResponse

type CreateOrUpdateByScopeOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ManagementLockObject
}

type DeleteAtResourceGroupLevelOperationResponse

type DeleteAtResourceGroupLevelOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type DeleteAtResourceLevelOperationResponse

type DeleteAtResourceLevelOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type DeleteAtSubscriptionLevelOperationResponse

type DeleteAtSubscriptionLevelOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type DeleteByScopeOperationResponse

type DeleteByScopeOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetAtResourceGroupLevelOperationResponse

type GetAtResourceGroupLevelOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ManagementLockObject
}

type GetAtResourceLevelOperationResponse

type GetAtResourceLevelOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ManagementLockObject
}

type GetAtSubscriptionLevelOperationResponse

type GetAtSubscriptionLevelOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ManagementLockObject
}

type GetByScopeOperationResponse

type GetByScopeOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ManagementLockObject
}

type ListAtResourceGroupLevelCompleteResult

type ListAtResourceGroupLevelCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ManagementLockObject
}

type ListAtResourceGroupLevelOperationOptions

type ListAtResourceGroupLevelOperationOptions struct {
	Filter *string
}

func DefaultListAtResourceGroupLevelOperationOptions

func DefaultListAtResourceGroupLevelOperationOptions() ListAtResourceGroupLevelOperationOptions

func (ListAtResourceGroupLevelOperationOptions) ToHeaders

func (ListAtResourceGroupLevelOperationOptions) ToOData

func (ListAtResourceGroupLevelOperationOptions) ToQuery

type ListAtResourceGroupLevelOperationResponse

type ListAtResourceGroupLevelOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ManagementLockObject
}

type ListAtResourceLevelCompleteResult

type ListAtResourceLevelCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ManagementLockObject
}

type ListAtResourceLevelOperationOptions

type ListAtResourceLevelOperationOptions struct {
	Filter *string
}

func DefaultListAtResourceLevelOperationOptions

func DefaultListAtResourceLevelOperationOptions() ListAtResourceLevelOperationOptions

func (ListAtResourceLevelOperationOptions) ToHeaders

func (ListAtResourceLevelOperationOptions) ToOData

func (ListAtResourceLevelOperationOptions) ToQuery

type ListAtResourceLevelOperationResponse

type ListAtResourceLevelOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ManagementLockObject
}

type ListAtSubscriptionLevelCompleteResult

type ListAtSubscriptionLevelCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ManagementLockObject
}

type ListAtSubscriptionLevelOperationOptions

type ListAtSubscriptionLevelOperationOptions struct {
	Filter *string
}

func DefaultListAtSubscriptionLevelOperationOptions

func DefaultListAtSubscriptionLevelOperationOptions() ListAtSubscriptionLevelOperationOptions

func (ListAtSubscriptionLevelOperationOptions) ToHeaders

func (ListAtSubscriptionLevelOperationOptions) ToOData

func (ListAtSubscriptionLevelOperationOptions) ToQuery

type ListAtSubscriptionLevelOperationResponse

type ListAtSubscriptionLevelOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ManagementLockObject
}

type ListByScopeCompleteResult

type ListByScopeCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ManagementLockObject
}

type ListByScopeOperationOptions

type ListByScopeOperationOptions struct {
	Filter *string
}

func DefaultListByScopeOperationOptions

func DefaultListByScopeOperationOptions() ListByScopeOperationOptions

func (ListByScopeOperationOptions) ToHeaders

func (ListByScopeOperationOptions) ToOData

func (ListByScopeOperationOptions) ToQuery

type ListByScopeOperationResponse

type ListByScopeOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ManagementLockObject
}

type LockId

type LockId struct {
	SubscriptionId string
	LockName       string
}

LockId is a struct representing the Resource ID for a Lock

func NewLockID

func NewLockID(subscriptionId string, lockName string) LockId

NewLockID returns a new LockId struct

func ParseLockID

func ParseLockID(input string) (*LockId, error)

ParseLockID parses 'input' into a LockId

func ParseLockIDInsensitively

func ParseLockIDInsensitively(input string) (*LockId, error)

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

func (*LockId) FromParseResult

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

func (LockId) ID

func (id LockId) ID() string

ID returns the formatted Lock ID

func (LockId) Segments

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

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

func (LockId) String

func (id LockId) String() string

String returns a human-readable description of this Lock ID

type LockLevel

type LockLevel string
const (
	LockLevelCanNotDelete LockLevel = "CanNotDelete"
	LockLevelNotSpecified LockLevel = "NotSpecified"
	LockLevelReadOnly     LockLevel = "ReadOnly"
)

func (*LockLevel) UnmarshalJSON

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

type ManagementLockObject

type ManagementLockObject struct {
	Id         *string                  `json:"id,omitempty"`
	Name       *string                  `json:"name,omitempty"`
	Properties ManagementLockProperties `json:"properties"`
	SystemData *systemdata.SystemData   `json:"systemData,omitempty"`
	Type       *string                  `json:"type,omitempty"`
}

type ManagementLockObjectOperationPredicate

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

func (ManagementLockObjectOperationPredicate) Matches

type ManagementLockOwner

type ManagementLockOwner struct {
	ApplicationId *string `json:"applicationId,omitempty"`
}

type ManagementLockProperties

type ManagementLockProperties struct {
	Level  LockLevel              `json:"level"`
	Notes  *string                `json:"notes,omitempty"`
	Owners *[]ManagementLockOwner `json:"owners,omitempty"`
}

type ManagementLocksClient

type ManagementLocksClient struct {
	Client *resourcemanager.Client
}

func NewManagementLocksClientWithBaseURI

func NewManagementLocksClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagementLocksClient, error)

func (ManagementLocksClient) CreateOrUpdateAtResourceGroupLevel

CreateOrUpdateAtResourceGroupLevel ...

func (ManagementLocksClient) CreateOrUpdateAtResourceLevel

CreateOrUpdateAtResourceLevel ...

func (ManagementLocksClient) CreateOrUpdateAtSubscriptionLevel

func (c ManagementLocksClient) CreateOrUpdateAtSubscriptionLevel(ctx context.Context, id LockId, input ManagementLockObject) (result CreateOrUpdateAtSubscriptionLevelOperationResponse, err error)

CreateOrUpdateAtSubscriptionLevel ...

func (ManagementLocksClient) CreateOrUpdateByScope

CreateOrUpdateByScope ...

func (ManagementLocksClient) DeleteAtResourceGroupLevel

func (c ManagementLocksClient) DeleteAtResourceGroupLevel(ctx context.Context, id ProviderLockId) (result DeleteAtResourceGroupLevelOperationResponse, err error)

DeleteAtResourceGroupLevel ...

func (ManagementLocksClient) DeleteAtResourceLevel

func (c ManagementLocksClient) DeleteAtResourceLevel(ctx context.Context, id ScopedLockId) (result DeleteAtResourceLevelOperationResponse, err error)

DeleteAtResourceLevel ...

func (ManagementLocksClient) DeleteAtSubscriptionLevel

func (c ManagementLocksClient) DeleteAtSubscriptionLevel(ctx context.Context, id LockId) (result DeleteAtSubscriptionLevelOperationResponse, err error)

DeleteAtSubscriptionLevel ...

func (ManagementLocksClient) DeleteByScope

DeleteByScope ...

func (ManagementLocksClient) GetAtResourceGroupLevel

func (c ManagementLocksClient) GetAtResourceGroupLevel(ctx context.Context, id ProviderLockId) (result GetAtResourceGroupLevelOperationResponse, err error)

GetAtResourceGroupLevel ...

func (ManagementLocksClient) GetAtResourceLevel

func (c ManagementLocksClient) GetAtResourceLevel(ctx context.Context, id ScopedLockId) (result GetAtResourceLevelOperationResponse, err error)

GetAtResourceLevel ...

func (ManagementLocksClient) GetAtSubscriptionLevel

func (c ManagementLocksClient) GetAtSubscriptionLevel(ctx context.Context, id LockId) (result GetAtSubscriptionLevelOperationResponse, err error)

GetAtSubscriptionLevel ...

func (ManagementLocksClient) GetByScope

GetByScope ...

func (ManagementLocksClient) ListAtResourceGroupLevel

ListAtResourceGroupLevel ...

func (ManagementLocksClient) ListAtResourceGroupLevelComplete

ListAtResourceGroupLevelComplete retrieves all the results into a single object

func (ManagementLocksClient) ListAtResourceGroupLevelCompleteMatchingPredicate

ListAtResourceGroupLevelCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ManagementLocksClient) ListAtResourceLevel

ListAtResourceLevel ...

func (ManagementLocksClient) ListAtResourceLevelComplete

ListAtResourceLevelComplete retrieves all the results into a single object

func (ManagementLocksClient) ListAtResourceLevelCompleteMatchingPredicate

ListAtResourceLevelCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ManagementLocksClient) ListAtSubscriptionLevel

ListAtSubscriptionLevel ...

func (ManagementLocksClient) ListAtSubscriptionLevelComplete

ListAtSubscriptionLevelComplete retrieves all the results into a single object

func (ManagementLocksClient) ListAtSubscriptionLevelCompleteMatchingPredicate

ListAtSubscriptionLevelCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ManagementLocksClient) ListByScope

ListByScope ...

func (ManagementLocksClient) ListByScopeComplete

ListByScopeComplete retrieves all the results into a single object

func (ManagementLocksClient) ListByScopeCompleteMatchingPredicate

func (c ManagementLocksClient) ListByScopeCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, options ListByScopeOperationOptions, predicate ManagementLockObjectOperationPredicate) (result ListByScopeCompleteResult, err error)

ListByScopeCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ProviderLockId

type ProviderLockId struct {
	SubscriptionId    string
	ResourceGroupName string
	LockName          string
}

ProviderLockId is a struct representing the Resource ID for a Provider Lock

func NewProviderLockID

func NewProviderLockID(subscriptionId string, resourceGroupName string, lockName string) ProviderLockId

NewProviderLockID returns a new ProviderLockId struct

func ParseProviderLockID

func ParseProviderLockID(input string) (*ProviderLockId, error)

ParseProviderLockID parses 'input' into a ProviderLockId

func ParseProviderLockIDInsensitively

func ParseProviderLockIDInsensitively(input string) (*ProviderLockId, error)

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

func (*ProviderLockId) FromParseResult

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

func (ProviderLockId) ID

func (id ProviderLockId) ID() string

ID returns the formatted Provider Lock ID

func (ProviderLockId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Provider Lock ID

func (ProviderLockId) String

func (id ProviderLockId) String() string

String returns a human-readable description of this Provider Lock ID

type ScopedLockId

type ScopedLockId struct {
	Scope    string
	LockName string
}

ScopedLockId is a struct representing the Resource ID for a Scoped Lock

func NewScopedLockID

func NewScopedLockID(scope string, lockName string) ScopedLockId

NewScopedLockID returns a new ScopedLockId struct

func ParseScopedLockID

func ParseScopedLockID(input string) (*ScopedLockId, error)

ParseScopedLockID parses 'input' into a ScopedLockId

func ParseScopedLockIDInsensitively

func ParseScopedLockIDInsensitively(input string) (*ScopedLockId, error)

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

func (*ScopedLockId) FromParseResult

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

func (ScopedLockId) ID

func (id ScopedLockId) ID() string

ID returns the formatted Scoped Lock ID

func (ScopedLockId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Scoped Lock ID

func (ScopedLockId) String

func (id ScopedLockId) String() string

String returns a human-readable description of this Scoped Lock ID

Jump to

Keyboard shortcuts

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