scriptexecutions

package
v0.20240404.1103618 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-09-01/scriptexecutions Documentation

The scriptexecutions SDK allows for interaction with the Azure Resource Manager Service vmware (API Version 2023-09-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/vmware/2023-09-01/scriptexecutions"

Client Initialization

client := scriptexecutions.NewScriptExecutionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ScriptExecutionsClient.CreateOrUpdate

ctx := context.TODO()
id := scriptexecutions.NewScriptExecutionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudValue", "scriptExecutionValue")

payload := scriptexecutions.ScriptExecution{
	// ...
}


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

Example Usage: ScriptExecutionsClient.Delete

ctx := context.TODO()
id := scriptexecutions.NewScriptExecutionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudValue", "scriptExecutionValue")

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

Example Usage: ScriptExecutionsClient.Get

ctx := context.TODO()
id := scriptexecutions.NewScriptExecutionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudValue", "scriptExecutionValue")

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: ScriptExecutionsClient.GetExecutionLogs

ctx := context.TODO()
id := scriptexecutions.NewScriptExecutionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudValue", "scriptExecutionValue")
var payload []ScriptOutputStreamType

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

Example Usage: ScriptExecutionsClient.List

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

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

func PossibleValuesForScriptExecutionParameterType() []string

func PossibleValuesForScriptExecutionProvisioningState

func PossibleValuesForScriptExecutionProvisioningState() []string

func PossibleValuesForScriptOutputStreamType

func PossibleValuesForScriptOutputStreamType() []string

func ValidatePrivateCloudID

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

ValidatePrivateCloudID checks that 'input' can be parsed as a Private Cloud ID

func ValidateScriptExecutionID

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

ValidateScriptExecutionID checks that 'input' can be parsed as a Script Execution ID

Types

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type GetExecutionLogsOperationResponse

type GetExecutionLogsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ScriptExecution
}

type GetOperationResponse

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

type ListCompleteResult

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

type ListOperationResponse

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

type PSCredentialExecutionParameter

type PSCredentialExecutionParameter struct {
	Password *string `json:"password,omitempty"`
	Username *string `json:"username,omitempty"`

	// Fields inherited from ScriptExecutionParameter
	Name string `json:"name"`
}

func (PSCredentialExecutionParameter) MarshalJSON

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

type PrivateCloudId

type PrivateCloudId struct {
	SubscriptionId    string
	ResourceGroupName string
	PrivateCloudName  string
}

PrivateCloudId is a struct representing the Resource ID for a Private Cloud

func NewPrivateCloudID

func NewPrivateCloudID(subscriptionId string, resourceGroupName string, privateCloudName string) PrivateCloudId

NewPrivateCloudID returns a new PrivateCloudId struct

func ParsePrivateCloudID

func ParsePrivateCloudID(input string) (*PrivateCloudId, error)

ParsePrivateCloudID parses 'input' into a PrivateCloudId

func ParsePrivateCloudIDInsensitively

func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error)

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

func (*PrivateCloudId) FromParseResult

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

func (PrivateCloudId) ID

func (id PrivateCloudId) ID() string

ID returns the formatted Private Cloud ID

func (PrivateCloudId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Private Cloud ID

func (PrivateCloudId) String

func (id PrivateCloudId) String() string

String returns a human-readable description of this Private Cloud ID

type RawScriptExecutionParameterImpl

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

RawScriptExecutionParameterImpl 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 ScriptExecution

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

type ScriptExecutionId

type ScriptExecutionId struct {
	SubscriptionId      string
	ResourceGroupName   string
	PrivateCloudName    string
	ScriptExecutionName string
}

ScriptExecutionId is a struct representing the Resource ID for a Script Execution

func NewScriptExecutionID

func NewScriptExecutionID(subscriptionId string, resourceGroupName string, privateCloudName string, scriptExecutionName string) ScriptExecutionId

NewScriptExecutionID returns a new ScriptExecutionId struct

func ParseScriptExecutionID

func ParseScriptExecutionID(input string) (*ScriptExecutionId, error)

ParseScriptExecutionID parses 'input' into a ScriptExecutionId

func ParseScriptExecutionIDInsensitively

func ParseScriptExecutionIDInsensitively(input string) (*ScriptExecutionId, error)

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

func (*ScriptExecutionId) FromParseResult

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

func (ScriptExecutionId) ID

func (id ScriptExecutionId) ID() string

ID returns the formatted Script Execution ID

func (ScriptExecutionId) Segments

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

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

func (ScriptExecutionId) String

func (id ScriptExecutionId) String() string

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

type ScriptExecutionOperationPredicate

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

func (ScriptExecutionOperationPredicate) Matches

type ScriptExecutionParameter

type ScriptExecutionParameter interface {
}

type ScriptExecutionParameterType

type ScriptExecutionParameterType string
const (
	ScriptExecutionParameterTypeCredential  ScriptExecutionParameterType = "Credential"
	ScriptExecutionParameterTypeSecureValue ScriptExecutionParameterType = "SecureValue"
	ScriptExecutionParameterTypeValue       ScriptExecutionParameterType = "Value"
)

func (*ScriptExecutionParameterType) UnmarshalJSON

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

type ScriptExecutionProperties

type ScriptExecutionProperties struct {
	Errors            *[]string                         `json:"errors,omitempty"`
	FailureReason     *string                           `json:"failureReason,omitempty"`
	FinishedAt        *string                           `json:"finishedAt,omitempty"`
	HiddenParameters  *[]ScriptExecutionParameter       `json:"hiddenParameters,omitempty"`
	Information       *[]string                         `json:"information,omitempty"`
	NamedOutputs      *map[string]interface{}           `json:"namedOutputs,omitempty"`
	Output            *[]string                         `json:"output,omitempty"`
	Parameters        *[]ScriptExecutionParameter       `json:"parameters,omitempty"`
	ProvisioningState *ScriptExecutionProvisioningState `json:"provisioningState,omitempty"`
	Retention         *string                           `json:"retention,omitempty"`
	ScriptCmdletId    *string                           `json:"scriptCmdletId,omitempty"`
	StartedAt         *string                           `json:"startedAt,omitempty"`
	SubmittedAt       *string                           `json:"submittedAt,omitempty"`
	Timeout           string                            `json:"timeout"`
	Warnings          *[]string                         `json:"warnings,omitempty"`
}

func (*ScriptExecutionProperties) GetFinishedAtAsTime

func (o *ScriptExecutionProperties) GetFinishedAtAsTime() (*time.Time, error)

func (*ScriptExecutionProperties) GetStartedAtAsTime

func (o *ScriptExecutionProperties) GetStartedAtAsTime() (*time.Time, error)

func (*ScriptExecutionProperties) GetSubmittedAtAsTime

func (o *ScriptExecutionProperties) GetSubmittedAtAsTime() (*time.Time, error)

func (*ScriptExecutionProperties) SetFinishedAtAsTime

func (o *ScriptExecutionProperties) SetFinishedAtAsTime(input time.Time)

func (*ScriptExecutionProperties) SetStartedAtAsTime

func (o *ScriptExecutionProperties) SetStartedAtAsTime(input time.Time)

func (*ScriptExecutionProperties) SetSubmittedAtAsTime

func (o *ScriptExecutionProperties) SetSubmittedAtAsTime(input time.Time)

func (*ScriptExecutionProperties) UnmarshalJSON

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

type ScriptExecutionProvisioningState

type ScriptExecutionProvisioningState string
const (
	ScriptExecutionProvisioningStateCanceled   ScriptExecutionProvisioningState = "Canceled"
	ScriptExecutionProvisioningStateCancelled  ScriptExecutionProvisioningState = "Cancelled"
	ScriptExecutionProvisioningStateCancelling ScriptExecutionProvisioningState = "Cancelling"
	ScriptExecutionProvisioningStateDeleting   ScriptExecutionProvisioningState = "Deleting"
	ScriptExecutionProvisioningStateFailed     ScriptExecutionProvisioningState = "Failed"
	ScriptExecutionProvisioningStatePending    ScriptExecutionProvisioningState = "Pending"
	ScriptExecutionProvisioningStateRunning    ScriptExecutionProvisioningState = "Running"
	ScriptExecutionProvisioningStateSucceeded  ScriptExecutionProvisioningState = "Succeeded"
)

func (*ScriptExecutionProvisioningState) UnmarshalJSON

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

type ScriptExecutionsClient

type ScriptExecutionsClient struct {
	Client *resourcemanager.Client
}

func NewScriptExecutionsClientWithBaseURI

func NewScriptExecutionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ScriptExecutionsClient, error)

func (ScriptExecutionsClient) CreateOrUpdate

CreateOrUpdate ...

func (ScriptExecutionsClient) CreateOrUpdateThenPoll

func (c ScriptExecutionsClient) CreateOrUpdateThenPoll(ctx context.Context, id ScriptExecutionId, input ScriptExecution) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (ScriptExecutionsClient) Delete

Delete ...

func (ScriptExecutionsClient) DeleteThenPoll

func (c ScriptExecutionsClient) DeleteThenPoll(ctx context.Context, id ScriptExecutionId) error

DeleteThenPoll performs Delete then polls until it's completed

func (ScriptExecutionsClient) Get

Get ...

func (ScriptExecutionsClient) GetExecutionLogs

GetExecutionLogs ...

func (ScriptExecutionsClient) List

List ...

func (ScriptExecutionsClient) ListComplete

ListComplete retrieves all the results into a single object

func (ScriptExecutionsClient) ListCompleteMatchingPredicate

func (c ScriptExecutionsClient) ListCompleteMatchingPredicate(ctx context.Context, id PrivateCloudId, predicate ScriptExecutionOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ScriptOutputStreamType

type ScriptOutputStreamType string
const (
	ScriptOutputStreamTypeError       ScriptOutputStreamType = "Error"
	ScriptOutputStreamTypeInformation ScriptOutputStreamType = "Information"
	ScriptOutputStreamTypeOutput      ScriptOutputStreamType = "Output"
	ScriptOutputStreamTypeWarning     ScriptOutputStreamType = "Warning"
)

func (*ScriptOutputStreamType) UnmarshalJSON

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

type ScriptSecureStringExecutionParameter

type ScriptSecureStringExecutionParameter struct {
	SecureValue *string `json:"secureValue,omitempty"`

	// Fields inherited from ScriptExecutionParameter
	Name string `json:"name"`
}

func (ScriptSecureStringExecutionParameter) MarshalJSON

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

type ScriptStringExecutionParameter

type ScriptStringExecutionParameter struct {
	Value *string `json:"value,omitempty"`

	// Fields inherited from ScriptExecutionParameter
	Name string `json:"name"`
}

func (ScriptStringExecutionParameter) MarshalJSON

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

Jump to

Keyboard shortcuts

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