deployments

package
v0.20241029.1112340 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/resources/2015-11-01/deployments Documentation

The deployments SDK allows for interaction with Azure Resource Manager resources (API Version 2015-11-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/2015-11-01/deployments"

Client Initialization

client := deployments.NewDeploymentsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DeploymentsClient.CalculateTemplateHash

ctx := context.TODO()
var payload interface{}

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

Example Usage: DeploymentsClient.Cancel

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

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

Example Usage: DeploymentsClient.CheckExistence

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

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

Example Usage: DeploymentsClient.CreateOrUpdate

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

payload := deployments.Deployment{
	// ...
}


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

Example Usage: DeploymentsClient.Delete

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

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

Example Usage: DeploymentsClient.Get

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

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

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

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

Example Usage: DeploymentsClient.Validate

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

payload := deployments.Deployment{
	// ...
}


read, err := client.Validate(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 PossibleValuesForDeploymentMode

func PossibleValuesForDeploymentMode() []string

func ValidateProviderDeploymentID

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

ValidateProviderDeploymentID checks that 'input' can be parsed as a Provider Deployment ID

Types

type BasicDependency

type BasicDependency struct {
	Id           *string `json:"id,omitempty"`
	ResourceName *string `json:"resourceName,omitempty"`
	ResourceType *string `json:"resourceType,omitempty"`
}

type CalculateTemplateHashOperationResponse

type CalculateTemplateHashOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *TemplateHashResult
}

type CancelOperationResponse

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

type CheckExistenceOperationResponse

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

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DeploymentExtended
}

type DeleteOperationResponse

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

type Dependency

type Dependency struct {
	DependsOn    *[]BasicDependency `json:"dependsOn,omitempty"`
	Id           *string            `json:"id,omitempty"`
	ResourceName *string            `json:"resourceName,omitempty"`
	ResourceType *string            `json:"resourceType,omitempty"`
}

type Deployment

type Deployment struct {
	Properties *DeploymentProperties `json:"properties,omitempty"`
}

type DeploymentExtended

type DeploymentExtended struct {
	Id         *string                       `json:"id,omitempty"`
	Name       string                        `json:"name"`
	Properties *DeploymentPropertiesExtended `json:"properties,omitempty"`
}

type DeploymentExtendedOperationPredicate

type DeploymentExtendedOperationPredicate struct {
	Id   *string
	Name *string
}

func (DeploymentExtendedOperationPredicate) Matches

type DeploymentMode

type DeploymentMode string
const (
	DeploymentModeComplete    DeploymentMode = "Complete"
	DeploymentModeIncremental DeploymentMode = "Incremental"
)

func (*DeploymentMode) UnmarshalJSON

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

type DeploymentProperties

type DeploymentProperties struct {
	Mode           *DeploymentMode `json:"mode,omitempty"`
	Parameters     *interface{}    `json:"parameters,omitempty"`
	ParametersLink *ParametersLink `json:"parametersLink,omitempty"`
	Template       *interface{}    `json:"template,omitempty"`
	TemplateLink   *TemplateLink   `json:"templateLink,omitempty"`
}

type DeploymentPropertiesExtended

type DeploymentPropertiesExtended struct {
	CorrelationId     *string         `json:"correlationId,omitempty"`
	Dependencies      *[]Dependency   `json:"dependencies,omitempty"`
	Error             *ErrorResponse  `json:"error,omitempty"`
	Mode              *DeploymentMode `json:"mode,omitempty"`
	Outputs           *interface{}    `json:"outputs,omitempty"`
	Parameters        *interface{}    `json:"parameters,omitempty"`
	ParametersLink    *ParametersLink `json:"parametersLink,omitempty"`
	Providers         *[]Provider     `json:"providers,omitempty"`
	ProvisioningState *string         `json:"provisioningState,omitempty"`
	Template          *interface{}    `json:"template,omitempty"`
	TemplateLink      *TemplateLink   `json:"templateLink,omitempty"`
	Timestamp         *string         `json:"timestamp,omitempty"`
}

func (*DeploymentPropertiesExtended) GetTimestampAsTime

func (o *DeploymentPropertiesExtended) GetTimestampAsTime() (*time.Time, error)

func (*DeploymentPropertiesExtended) SetTimestampAsTime

func (o *DeploymentPropertiesExtended) SetTimestampAsTime(input time.Time)

type DeploymentValidateResult

type DeploymentValidateResult struct {
	Error      *ResourceManagementErrorWithDetails `json:"error,omitempty"`
	Properties *DeploymentPropertiesExtended       `json:"properties,omitempty"`
}

type DeploymentsClient

type DeploymentsClient struct {
	Client *resourcemanager.Client
}

func NewDeploymentsClientWithBaseURI

func NewDeploymentsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentsClient, error)

func (DeploymentsClient) CalculateTemplateHash

func (c DeploymentsClient) CalculateTemplateHash(ctx context.Context, input interface{}) (result CalculateTemplateHashOperationResponse, err error)

CalculateTemplateHash ...

func (DeploymentsClient) Cancel

Cancel ...

func (DeploymentsClient) CheckExistence

CheckExistence ...

func (DeploymentsClient) CreateOrUpdate

CreateOrUpdate ...

func (DeploymentsClient) CreateOrUpdateThenPoll

func (c DeploymentsClient) CreateOrUpdateThenPoll(ctx context.Context, id ProviderDeploymentId, input Deployment) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (DeploymentsClient) Delete

Delete ...

func (DeploymentsClient) DeleteThenPoll

func (c DeploymentsClient) DeleteThenPoll(ctx context.Context, id ProviderDeploymentId) error

DeleteThenPoll performs Delete then polls until it's completed

func (DeploymentsClient) Get

Get ...

func (DeploymentsClient) List

List ...

func (DeploymentsClient) ListComplete

ListComplete retrieves all the results into a single object

func (DeploymentsClient) ListCompleteMatchingPredicate

func (c DeploymentsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options ListOperationOptions, predicate DeploymentExtendedOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DeploymentsClient) Validate

Validate ...

type ErrorAdditionalInfo

type ErrorAdditionalInfo struct {
	Info *interface{} `json:"info,omitempty"`
	Type *string      `json:"type,omitempty"`
}

type ErrorResponse

type ErrorResponse struct {
	AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"`
	Code           *string                `json:"code,omitempty"`
	Details        *[]ErrorResponse       `json:"details,omitempty"`
	Message        *string                `json:"message,omitempty"`
	Target         *string                `json:"target,omitempty"`
}

type GetOperationResponse

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

type ListCompleteResult

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

type ListCustomPager added in v0.20240628.1153531

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

type ListOperationOptions

type ListOperationOptions struct {
	Filter *string
	Top    *int64
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders

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

func (ListOperationOptions) ToOData

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

func (ListOperationOptions) ToQuery

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]DeploymentExtended
}
type ParametersLink struct {
	ContentVersion *string `json:"contentVersion,omitempty"`
	Uri            string  `json:"uri"`
}

type Provider

type Provider struct {
	Id                *string                 `json:"id,omitempty"`
	Namespace         *string                 `json:"namespace,omitempty"`
	RegistrationState *string                 `json:"registrationState,omitempty"`
	ResourceTypes     *[]ProviderResourceType `json:"resourceTypes,omitempty"`
}

type ProviderDeploymentId

type ProviderDeploymentId struct {
	SubscriptionId    string
	ResourceGroupName string
	DeploymentName    string
}

ProviderDeploymentId is a struct representing the Resource ID for a Provider Deployment

func NewProviderDeploymentID

func NewProviderDeploymentID(subscriptionId string, resourceGroupName string, deploymentName string) ProviderDeploymentId

NewProviderDeploymentID returns a new ProviderDeploymentId struct

func ParseProviderDeploymentID

func ParseProviderDeploymentID(input string) (*ProviderDeploymentId, error)

ParseProviderDeploymentID parses 'input' into a ProviderDeploymentId

func ParseProviderDeploymentIDInsensitively

func ParseProviderDeploymentIDInsensitively(input string) (*ProviderDeploymentId, error)

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

func (*ProviderDeploymentId) FromParseResult

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

func (ProviderDeploymentId) ID

func (id ProviderDeploymentId) ID() string

ID returns the formatted Provider Deployment ID

func (ProviderDeploymentId) Segments

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

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

func (ProviderDeploymentId) String

func (id ProviderDeploymentId) String() string

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

type ProviderResourceType

type ProviderResourceType struct {
	ApiVersions  *[]string          `json:"apiVersions,omitempty"`
	Locations    *[]string          `json:"locations,omitempty"`
	Properties   *map[string]string `json:"properties,omitempty"`
	ResourceType *string            `json:"resourceType,omitempty"`
}

type ResourceManagementError

type ResourceManagementError struct {
	Code    string  `json:"code"`
	Message string  `json:"message"`
	Target  *string `json:"target,omitempty"`
}

type ResourceManagementErrorWithDetails

type ResourceManagementErrorWithDetails struct {
	Code    string                     `json:"code"`
	Details *[]ResourceManagementError `json:"details,omitempty"`
	Message string                     `json:"message"`
	Target  *string                    `json:"target,omitempty"`
}

type TemplateHashResult

type TemplateHashResult struct {
	MinifiedTemplate *string `json:"minifiedTemplate,omitempty"`
	TemplateHash     *string `json:"templateHash,omitempty"`
}
type TemplateLink struct {
	ContentVersion *string `json:"contentVersion,omitempty"`
	Uri            string  `json:"uri"`
}

type ValidateOperationResponse

type ValidateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DeploymentValidateResult
}

Jump to

Keyboard shortcuts

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