assignment

package
v0.20241004.1180715 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: MPL-2.0 Imports: 15 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/assignment Documentation

The assignment SDK allows for interaction with Azure Resource Manager blueprints (API Version 2018-11-01-preview).

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/blueprints/2018-11-01-preview/assignment"

Client Initialization

client := assignment.NewAssignmentClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AssignmentClient.CreateOrUpdate

ctx := context.TODO()
id := assignment.NewScopedBlueprintAssignmentID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "assignmentName")

payload := assignment.Assignment{
	// ...
}


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: AssignmentClient.Delete

ctx := context.TODO()
id := assignment.NewScopedBlueprintAssignmentID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "assignmentName")

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

Example Usage: AssignmentClient.Get

ctx := context.TODO()
id := assignment.NewScopedBlueprintAssignmentID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "assignmentName")

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

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

// 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
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForAssignmentDeleteBehavior

func PossibleValuesForAssignmentDeleteBehavior() []string

func PossibleValuesForAssignmentLockMode

func PossibleValuesForAssignmentLockMode() []string

func PossibleValuesForAssignmentProvisioningState

func PossibleValuesForAssignmentProvisioningState() []string

func ValidateScopedBlueprintAssignmentID

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

ValidateScopedBlueprintAssignmentID checks that 'input' can be parsed as a Scoped Blueprint Assignment ID

Types

type Assignment

type Assignment struct {
	Id         *string                          `json:"id,omitempty"`
	Identity   identity.SystemOrUserAssignedMap `json:"identity"`
	Location   string                           `json:"location"`
	Name       *string                          `json:"name,omitempty"`
	Properties AssignmentProperties             `json:"properties"`
	Type       *string                          `json:"type,omitempty"`
}

type AssignmentClient

type AssignmentClient struct {
	Client *resourcemanager.Client
}

func NewAssignmentClientWithBaseURI

func NewAssignmentClientWithBaseURI(sdkApi sdkEnv.Api) (*AssignmentClient, error)

func (AssignmentClient) CreateOrUpdate

CreateOrUpdate ...

func (AssignmentClient) Delete

Delete ...

func (AssignmentClient) Get

Get ...

func (AssignmentClient) List

List ...

func (AssignmentClient) ListComplete

ListComplete retrieves all the results into a single object

func (AssignmentClient) ListCompleteMatchingPredicate

func (c AssignmentClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, predicate AssignmentOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type AssignmentDeleteBehavior

type AssignmentDeleteBehavior string
const (
	AssignmentDeleteBehaviorAll  AssignmentDeleteBehavior = "all"
	AssignmentDeleteBehaviorNone AssignmentDeleteBehavior = "none"
)

func (*AssignmentDeleteBehavior) UnmarshalJSON

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

type AssignmentLockMode

type AssignmentLockMode string
const (
	AssignmentLockModeAllResourcesDoNotDelete AssignmentLockMode = "AllResourcesDoNotDelete"
	AssignmentLockModeAllResourcesReadOnly    AssignmentLockMode = "AllResourcesReadOnly"
	AssignmentLockModeNone                    AssignmentLockMode = "None"
)

func (*AssignmentLockMode) UnmarshalJSON

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

type AssignmentLockSettings

type AssignmentLockSettings struct {
	ExcludedActions    *[]string           `json:"excludedActions,omitempty"`
	ExcludedPrincipals *[]string           `json:"excludedPrincipals,omitempty"`
	Mode               *AssignmentLockMode `json:"mode,omitempty"`
}

type AssignmentOperationPredicate

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

func (AssignmentOperationPredicate) Matches

func (p AssignmentOperationPredicate) Matches(input Assignment) bool

type AssignmentProperties

type AssignmentProperties struct {
	BlueprintId       *string                       `json:"blueprintId,omitempty"`
	Description       *string                       `json:"description,omitempty"`
	DisplayName       *string                       `json:"displayName,omitempty"`
	Locks             *AssignmentLockSettings       `json:"locks,omitempty"`
	Parameters        map[string]ParameterValue     `json:"parameters"`
	ProvisioningState *AssignmentProvisioningState  `json:"provisioningState,omitempty"`
	ResourceGroups    map[string]ResourceGroupValue `json:"resourceGroups"`
	Scope             *string                       `json:"scope,omitempty"`
	Status            *AssignmentStatus             `json:"status,omitempty"`
}

type AssignmentProvisioningState

type AssignmentProvisioningState string
const (
	AssignmentProvisioningStateCanceled   AssignmentProvisioningState = "canceled"
	AssignmentProvisioningStateCancelling AssignmentProvisioningState = "cancelling"
	AssignmentProvisioningStateCreating   AssignmentProvisioningState = "creating"
	AssignmentProvisioningStateDeleting   AssignmentProvisioningState = "deleting"
	AssignmentProvisioningStateDeploying  AssignmentProvisioningState = "deploying"
	AssignmentProvisioningStateFailed     AssignmentProvisioningState = "failed"
	AssignmentProvisioningStateLocking    AssignmentProvisioningState = "locking"
	AssignmentProvisioningStateSucceeded  AssignmentProvisioningState = "succeeded"
	AssignmentProvisioningStateValidating AssignmentProvisioningState = "validating"
	AssignmentProvisioningStateWaiting    AssignmentProvisioningState = "waiting"
)

func (*AssignmentProvisioningState) UnmarshalJSON

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

type AssignmentStatus

type AssignmentStatus struct {
	LastModified     *string   `json:"lastModified,omitempty"`
	ManagedResources *[]string `json:"managedResources,omitempty"`
	TimeCreated      *string   `json:"timeCreated,omitempty"`
}

func (*AssignmentStatus) GetLastModifiedAsTime

func (o *AssignmentStatus) GetLastModifiedAsTime() (*time.Time, error)

func (*AssignmentStatus) GetTimeCreatedAsTime

func (o *AssignmentStatus) GetTimeCreatedAsTime() (*time.Time, error)

func (*AssignmentStatus) SetLastModifiedAsTime

func (o *AssignmentStatus) SetLastModifiedAsTime(input time.Time)

func (*AssignmentStatus) SetTimeCreatedAsTime

func (o *AssignmentStatus) SetTimeCreatedAsTime(input time.Time)

type CreateOrUpdateOperationResponse

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

type DeleteOperationOptions

type DeleteOperationOptions struct {
	DeleteBehavior *AssignmentDeleteBehavior
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders

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

func (DeleteOperationOptions) ToOData

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

func (DeleteOperationOptions) ToQuery

type DeleteOperationResponse

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

type GetOperationResponse

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

type KeyVaultReference

type KeyVaultReference struct {
	Id string `json:"id"`
}

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Assignment
}

type ListCustomPager added in v0.20240628.1153531

type ListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListCustomPager) NextPageLink() *odata.Link

type ListOperationResponse

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

type ParameterValue

type ParameterValue struct {
	Reference *SecretValueReference `json:"reference,omitempty"`
	Value     *interface{}          `json:"value,omitempty"`
}

type ResourceGroupValue

type ResourceGroupValue struct {
	Location *string `json:"location,omitempty"`
	Name     *string `json:"name,omitempty"`
}

type ScopedBlueprintAssignmentId

type ScopedBlueprintAssignmentId struct {
	ResourceScope           string
	BlueprintAssignmentName string
}

ScopedBlueprintAssignmentId is a struct representing the Resource ID for a Scoped Blueprint Assignment

func NewScopedBlueprintAssignmentID

func NewScopedBlueprintAssignmentID(resourceScope string, blueprintAssignmentName string) ScopedBlueprintAssignmentId

NewScopedBlueprintAssignmentID returns a new ScopedBlueprintAssignmentId struct

func ParseScopedBlueprintAssignmentID

func ParseScopedBlueprintAssignmentID(input string) (*ScopedBlueprintAssignmentId, error)

ParseScopedBlueprintAssignmentID parses 'input' into a ScopedBlueprintAssignmentId

func ParseScopedBlueprintAssignmentIDInsensitively

func ParseScopedBlueprintAssignmentIDInsensitively(input string) (*ScopedBlueprintAssignmentId, error)

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

func (*ScopedBlueprintAssignmentId) FromParseResult

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

func (ScopedBlueprintAssignmentId) ID

ID returns the formatted Scoped Blueprint Assignment ID

func (ScopedBlueprintAssignmentId) Segments

Segments returns a slice of Resource ID Segments which comprise this Scoped Blueprint Assignment ID

func (ScopedBlueprintAssignmentId) String

func (id ScopedBlueprintAssignmentId) String() string

String returns a human-readable description of this Scoped Blueprint Assignment ID

type SecretValueReference

type SecretValueReference struct {
	KeyVault      KeyVaultReference `json:"keyVault"`
	SecretName    string            `json:"secretName"`
	SecretVersion *string           `json:"secretVersion,omitempty"`
}

Jump to

Keyboard shortcuts

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