deploymentscripts

package
v0.20231109.1104441 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: MPL-2.0 Imports: 16 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-10-01/deploymentscripts Documentation

The deploymentscripts SDK allows for interaction with the Azure Resource Manager Service resources (API Version 2020-10-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/resources/2020-10-01/deploymentscripts"

Client Initialization

client := deploymentscripts.NewDeploymentScriptsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DeploymentScriptsClient.Create

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

payload := deploymentscripts.DeploymentScript{
	// ...
}


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

Example Usage: DeploymentScriptsClient.Delete

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

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: DeploymentScriptsClient.Get

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

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: DeploymentScriptsClient.GetLogs

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

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

Example Usage: DeploymentScriptsClient.GetLogsDefault

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

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

Example Usage: DeploymentScriptsClient.ListByResourceGroup

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

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

Example Usage: DeploymentScriptsClient.ListBySubscription

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

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

Example Usage: DeploymentScriptsClient.Update

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

payload := deploymentscripts.DeploymentScriptUpdateParameter{
	// ...
}


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

func PossibleValuesForCleanupOptions() []string

func PossibleValuesForScriptProvisioningState

func PossibleValuesForScriptProvisioningState() []string

func PossibleValuesForScriptType

func PossibleValuesForScriptType() []string

func ValidateDeploymentScriptID

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

ValidateDeploymentScriptID checks that 'input' can be parsed as a Deployment Script ID

Types

type AzureCliScript

type AzureCliScript struct {
	Properties AzureCliScriptProperties `json:"properties"`

	// Fields inherited from DeploymentScript
	Id         *string                   `json:"id,omitempty"`
	Identity   *identity.UserAssignedMap `json:"identity,omitempty"`
	Location   string                    `json:"location"`
	Name       *string                   `json:"name,omitempty"`
	SystemData *systemdata.SystemData    `json:"systemData,omitempty"`
	Tags       *map[string]string        `json:"tags,omitempty"`
	Type       *string                   `json:"type,omitempty"`
}

func (AzureCliScript) MarshalJSON

func (s AzureCliScript) MarshalJSON() ([]byte, error)

type AzureCliScriptProperties

type AzureCliScriptProperties struct {
	Arguments              *string                      `json:"arguments,omitempty"`
	AzCliVersion           string                       `json:"azCliVersion"`
	CleanupPreference      *CleanupOptions              `json:"cleanupPreference,omitempty"`
	ContainerSettings      *ContainerConfiguration      `json:"containerSettings,omitempty"`
	EnvironmentVariables   *[]EnvironmentVariable       `json:"environmentVariables,omitempty"`
	ForceUpdateTag         *string                      `json:"forceUpdateTag,omitempty"`
	Outputs                *map[string]interface{}      `json:"outputs,omitempty"`
	PrimaryScriptUri       *string                      `json:"primaryScriptUri,omitempty"`
	ProvisioningState      *ScriptProvisioningState     `json:"provisioningState,omitempty"`
	RetentionInterval      string                       `json:"retentionInterval"`
	ScriptContent          *string                      `json:"scriptContent,omitempty"`
	Status                 *ScriptStatus                `json:"status,omitempty"`
	StorageAccountSettings *StorageAccountConfiguration `json:"storageAccountSettings,omitempty"`
	SupportingScriptUris   *[]string                    `json:"supportingScriptUris,omitempty"`
	Timeout                *string                      `json:"timeout,omitempty"`
}

type AzurePowerShellScript

type AzurePowerShellScript struct {
	Properties AzurePowerShellScriptProperties `json:"properties"`

	// Fields inherited from DeploymentScript
	Id         *string                   `json:"id,omitempty"`
	Identity   *identity.UserAssignedMap `json:"identity,omitempty"`
	Location   string                    `json:"location"`
	Name       *string                   `json:"name,omitempty"`
	SystemData *systemdata.SystemData    `json:"systemData,omitempty"`
	Tags       *map[string]string        `json:"tags,omitempty"`
	Type       *string                   `json:"type,omitempty"`
}

func (AzurePowerShellScript) MarshalJSON

func (s AzurePowerShellScript) MarshalJSON() ([]byte, error)

type AzurePowerShellScriptProperties

type AzurePowerShellScriptProperties struct {
	Arguments              *string                      `json:"arguments,omitempty"`
	AzPowerShellVersion    string                       `json:"azPowerShellVersion"`
	CleanupPreference      *CleanupOptions              `json:"cleanupPreference,omitempty"`
	ContainerSettings      *ContainerConfiguration      `json:"containerSettings,omitempty"`
	EnvironmentVariables   *[]EnvironmentVariable       `json:"environmentVariables,omitempty"`
	ForceUpdateTag         *string                      `json:"forceUpdateTag,omitempty"`
	Outputs                *map[string]interface{}      `json:"outputs,omitempty"`
	PrimaryScriptUri       *string                      `json:"primaryScriptUri,omitempty"`
	ProvisioningState      *ScriptProvisioningState     `json:"provisioningState,omitempty"`
	RetentionInterval      string                       `json:"retentionInterval"`
	ScriptContent          *string                      `json:"scriptContent,omitempty"`
	Status                 *ScriptStatus                `json:"status,omitempty"`
	StorageAccountSettings *StorageAccountConfiguration `json:"storageAccountSettings,omitempty"`
	SupportingScriptUris   *[]string                    `json:"supportingScriptUris,omitempty"`
	Timeout                *string                      `json:"timeout,omitempty"`
}

type CleanupOptions

type CleanupOptions string
const (
	CleanupOptionsAlways       CleanupOptions = "Always"
	CleanupOptionsOnExpiration CleanupOptions = "OnExpiration"
	CleanupOptionsOnSuccess    CleanupOptions = "OnSuccess"
)

func (*CleanupOptions) UnmarshalJSON added in v0.20230509.1154719

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

type ContainerConfiguration

type ContainerConfiguration struct {
	ContainerGroupName *string `json:"containerGroupName,omitempty"`
}

type CreateOperationResponse

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

type DeleteOperationResponse

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

type DeploymentScript

type DeploymentScript interface {
}

type DeploymentScriptId

type DeploymentScriptId struct {
	SubscriptionId       string
	ResourceGroupName    string
	DeploymentScriptName string
}

DeploymentScriptId is a struct representing the Resource ID for a Deployment Script

func NewDeploymentScriptID

func NewDeploymentScriptID(subscriptionId string, resourceGroupName string, deploymentScriptName string) DeploymentScriptId

NewDeploymentScriptID returns a new DeploymentScriptId struct

func ParseDeploymentScriptID

func ParseDeploymentScriptID(input string) (*DeploymentScriptId, error)

ParseDeploymentScriptID parses 'input' into a DeploymentScriptId

func ParseDeploymentScriptIDInsensitively

func ParseDeploymentScriptIDInsensitively(input string) (*DeploymentScriptId, error)

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

func (DeploymentScriptId) ID

func (id DeploymentScriptId) ID() string

ID returns the formatted Deployment Script ID

func (DeploymentScriptId) Segments

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

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

func (DeploymentScriptId) String

func (id DeploymentScriptId) String() string

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

type DeploymentScriptOperationPredicate

type DeploymentScriptOperationPredicate struct {
}

func (DeploymentScriptOperationPredicate) Matches

type DeploymentScriptUpdateParameter

type DeploymentScriptUpdateParameter struct {
	Id   *string            `json:"id,omitempty"`
	Name *string            `json:"name,omitempty"`
	Tags *map[string]string `json:"tags,omitempty"`
	Type *string            `json:"type,omitempty"`
}

type DeploymentScriptsClient

type DeploymentScriptsClient struct {
	Client *resourcemanager.Client
}

func NewDeploymentScriptsClientWithBaseURI

func NewDeploymentScriptsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentScriptsClient, error)

func (DeploymentScriptsClient) Create

Create ...

func (DeploymentScriptsClient) CreateThenPoll

CreateThenPoll performs Create then polls until it's completed

func (DeploymentScriptsClient) Delete

Delete ...

func (DeploymentScriptsClient) Get

Get ...

func (DeploymentScriptsClient) GetLogs

GetLogs ...

func (DeploymentScriptsClient) GetLogsDefault

GetLogsDefault ...

func (DeploymentScriptsClient) ListByResourceGroup

ListByResourceGroup ...

func (DeploymentScriptsClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (DeploymentScriptsClient) ListByResourceGroupCompleteMatchingPredicate

func (c DeploymentScriptsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate DeploymentScriptOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DeploymentScriptsClient) ListBySubscription

ListBySubscription ...

func (DeploymentScriptsClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (DeploymentScriptsClient) ListBySubscriptionCompleteMatchingPredicate

func (c DeploymentScriptsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate DeploymentScriptOperationPredicate) (result ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DeploymentScriptsClient) Update

Update ...

type EnvironmentVariable

type EnvironmentVariable struct {
	Name        string  `json:"name"`
	SecureValue *string `json:"secureValue,omitempty"`
	Value       *string `json:"value,omitempty"`
}

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 GetLogsDefaultOperationOptions

type GetLogsDefaultOperationOptions struct {
	Tail *int64
}

func DefaultGetLogsDefaultOperationOptions

func DefaultGetLogsDefaultOperationOptions() GetLogsDefaultOperationOptions

func (GetLogsDefaultOperationOptions) ToHeaders added in v0.20230509.1154719

func (GetLogsDefaultOperationOptions) ToOData added in v0.20230509.1154719

func (GetLogsDefaultOperationOptions) ToQuery added in v0.20230509.1154719

type GetLogsDefaultOperationResponse

type GetLogsDefaultOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ScriptLog
}

type GetLogsOperationResponse

type GetLogsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ScriptLogsList
}

type GetOperationResponse

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

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	Items []DeploymentScript
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]DeploymentScript
}

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	Items []DeploymentScript
}

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]DeploymentScript
}

type LogProperties

type LogProperties struct {
	Log *string `json:"log,omitempty"`
}

type RawDeploymentScriptImpl added in v0.20230807.1063129

type RawDeploymentScriptImpl struct {
	Type   string
	Values map[string]interface{}
}

RawDeploymentScriptImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g. this cannot be used as a Request Payload).

type ScriptLog

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

type ScriptLogsList

type ScriptLogsList struct {
	Value *[]ScriptLog `json:"value,omitempty"`
}

type ScriptProvisioningState

type ScriptProvisioningState string
const (
	ScriptProvisioningStateCanceled              ScriptProvisioningState = "Canceled"
	ScriptProvisioningStateCreating              ScriptProvisioningState = "Creating"
	ScriptProvisioningStateFailed                ScriptProvisioningState = "Failed"
	ScriptProvisioningStateProvisioningResources ScriptProvisioningState = "ProvisioningResources"
	ScriptProvisioningStateRunning               ScriptProvisioningState = "Running"
	ScriptProvisioningStateSucceeded             ScriptProvisioningState = "Succeeded"
)

func (*ScriptProvisioningState) UnmarshalJSON added in v0.20230509.1154719

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

type ScriptStatus

type ScriptStatus struct {
	ContainerInstanceId *string        `json:"containerInstanceId,omitempty"`
	EndTime             *string        `json:"endTime,omitempty"`
	Error               *ErrorResponse `json:"error,omitempty"`
	ExpirationTime      *string        `json:"expirationTime,omitempty"`
	StartTime           *string        `json:"startTime,omitempty"`
	StorageAccountId    *string        `json:"storageAccountId,omitempty"`
}

func (*ScriptStatus) GetEndTimeAsTime

func (o *ScriptStatus) GetEndTimeAsTime() (*time.Time, error)

func (*ScriptStatus) GetExpirationTimeAsTime

func (o *ScriptStatus) GetExpirationTimeAsTime() (*time.Time, error)

func (*ScriptStatus) GetStartTimeAsTime

func (o *ScriptStatus) GetStartTimeAsTime() (*time.Time, error)

func (*ScriptStatus) SetEndTimeAsTime

func (o *ScriptStatus) SetEndTimeAsTime(input time.Time)

func (*ScriptStatus) SetExpirationTimeAsTime

func (o *ScriptStatus) SetExpirationTimeAsTime(input time.Time)

func (*ScriptStatus) SetStartTimeAsTime

func (o *ScriptStatus) SetStartTimeAsTime(input time.Time)

type ScriptType

type ScriptType string
const (
	ScriptTypeAzureCLI        ScriptType = "AzureCLI"
	ScriptTypeAzurePowerShell ScriptType = "AzurePowerShell"
)

func (*ScriptType) UnmarshalJSON added in v0.20230509.1154719

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

type StorageAccountConfiguration

type StorageAccountConfiguration struct {
	StorageAccountKey  *string `json:"storageAccountKey,omitempty"`
	StorageAccountName *string `json:"storageAccountName,omitempty"`
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DeploymentScript
}

Jump to

Keyboard shortcuts

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