applicationpackage

package
v0.20241023.1122425 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/batch/2024-07-01/applicationpackage Documentation

The applicationpackage SDK allows for interaction with Azure Resource Manager batch (API Version 2024-07-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/batch/2024-07-01/applicationpackage"

Client Initialization

client := applicationpackage.NewApplicationPackageClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ApplicationPackageClient.Activate

ctx := context.TODO()
id := applicationpackage.NewVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "applicationName", "versionName")

payload := applicationpackage.ActivateApplicationPackageParameters{
	// ...
}


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

Example Usage: ApplicationPackageClient.Create

ctx := context.TODO()
id := applicationpackage.NewVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "applicationName", "versionName")

payload := applicationpackage.ApplicationPackage{
	// ...
}


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

Example Usage: ApplicationPackageClient.Delete

ctx := context.TODO()
id := applicationpackage.NewVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "applicationName", "versionName")

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

ctx := context.TODO()
id := applicationpackage.NewVersionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "applicationName", "versionName")

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

ctx := context.TODO()
id := applicationpackage.NewApplicationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "batchAccountName", "applicationName")

// alternatively `client.List(ctx, id, applicationpackage.DefaultListOperationOptions())` can be used to do batched pagination
items, err := client.ListComplete(ctx, id, applicationpackage.DefaultListOperationOptions())
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 PossibleValuesForPackageState

func PossibleValuesForPackageState() []string

func ValidateApplicationID

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

ValidateApplicationID checks that 'input' can be parsed as a Application ID

func ValidateVersionID

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

ValidateVersionID checks that 'input' can be parsed as a Version ID

Types

type ActivateApplicationPackageParameters

type ActivateApplicationPackageParameters struct {
	Format string `json:"format"`
}

type ActivateOperationResponse

type ActivateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ApplicationPackage
}

type ApplicationId

type ApplicationId struct {
	SubscriptionId    string
	ResourceGroupName string
	BatchAccountName  string
	ApplicationName   string
}

ApplicationId is a struct representing the Resource ID for a Application

func NewApplicationID

func NewApplicationID(subscriptionId string, resourceGroupName string, batchAccountName string, applicationName string) ApplicationId

NewApplicationID returns a new ApplicationId struct

func ParseApplicationID

func ParseApplicationID(input string) (*ApplicationId, error)

ParseApplicationID parses 'input' into a ApplicationId

func ParseApplicationIDInsensitively

func ParseApplicationIDInsensitively(input string) (*ApplicationId, error)

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

func (*ApplicationId) FromParseResult

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

func (ApplicationId) ID

func (id ApplicationId) ID() string

ID returns the formatted Application ID

func (ApplicationId) Segments

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

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

func (ApplicationId) String

func (id ApplicationId) String() string

String returns a human-readable description of this Application ID

type ApplicationPackage

type ApplicationPackage struct {
	Etag       *string                       `json:"etag,omitempty"`
	Id         *string                       `json:"id,omitempty"`
	Name       *string                       `json:"name,omitempty"`
	Properties *ApplicationPackageProperties `json:"properties,omitempty"`
	Tags       *map[string]string            `json:"tags,omitempty"`
	Type       *string                       `json:"type,omitempty"`
}

type ApplicationPackageClient

type ApplicationPackageClient struct {
	Client *resourcemanager.Client
}

func NewApplicationPackageClientWithBaseURI

func NewApplicationPackageClientWithBaseURI(sdkApi sdkEnv.Api) (*ApplicationPackageClient, error)

func (ApplicationPackageClient) Activate

Activate ...

func (ApplicationPackageClient) Create

Create ...

func (ApplicationPackageClient) Delete

Delete ...

func (ApplicationPackageClient) Get

Get ...

func (ApplicationPackageClient) List

List ...

func (ApplicationPackageClient) ListComplete

ListComplete retrieves all the results into a single object

func (ApplicationPackageClient) ListCompleteMatchingPredicate

func (c ApplicationPackageClient) ListCompleteMatchingPredicate(ctx context.Context, id ApplicationId, options ListOperationOptions, predicate ApplicationPackageOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ApplicationPackageOperationPredicate

type ApplicationPackageOperationPredicate struct {
	Etag *string
	Id   *string
	Name *string
	Type *string
}

func (ApplicationPackageOperationPredicate) Matches

type ApplicationPackageProperties

type ApplicationPackageProperties struct {
	Format             *string       `json:"format,omitempty"`
	LastActivationTime *string       `json:"lastActivationTime,omitempty"`
	State              *PackageState `json:"state,omitempty"`
	StorageURL         *string       `json:"storageUrl,omitempty"`
	StorageURLExpiry   *string       `json:"storageUrlExpiry,omitempty"`
}

func (*ApplicationPackageProperties) GetLastActivationTimeAsTime

func (o *ApplicationPackageProperties) GetLastActivationTimeAsTime() (*time.Time, error)

func (*ApplicationPackageProperties) GetStorageURLExpiryAsTime added in v0.20241009.1142232

func (o *ApplicationPackageProperties) GetStorageURLExpiryAsTime() (*time.Time, error)

func (*ApplicationPackageProperties) SetLastActivationTimeAsTime

func (o *ApplicationPackageProperties) SetLastActivationTimeAsTime(input time.Time)

func (*ApplicationPackageProperties) SetStorageURLExpiryAsTime added in v0.20241009.1142232

func (o *ApplicationPackageProperties) SetStorageURLExpiryAsTime(input time.Time)

type CreateOperationResponse

type CreateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ApplicationPackage
}

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListCompleteResult

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

type ListCustomPager

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

type ListOperationOptions

type ListOperationOptions struct {
	Maxresults *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        *[]ApplicationPackage
}

type PackageState

type PackageState string
const (
	PackageStateActive  PackageState = "Active"
	PackageStatePending PackageState = "Pending"
)

func (*PackageState) UnmarshalJSON

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

type VersionId

type VersionId struct {
	SubscriptionId    string
	ResourceGroupName string
	BatchAccountName  string
	ApplicationName   string
	VersionName       string
}

VersionId is a struct representing the Resource ID for a Version

func NewVersionID

func NewVersionID(subscriptionId string, resourceGroupName string, batchAccountName string, applicationName string, versionName string) VersionId

NewVersionID returns a new VersionId struct

func ParseVersionID

func ParseVersionID(input string) (*VersionId, error)

ParseVersionID parses 'input' into a VersionId

func ParseVersionIDInsensitively

func ParseVersionIDInsensitively(input string) (*VersionId, error)

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

func (*VersionId) FromParseResult

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

func (VersionId) ID

func (id VersionId) ID() string

ID returns the formatted Version ID

func (VersionId) Segments

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

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

func (VersionId) String

func (id VersionId) String() string

String returns a human-readable description of this Version ID

Jump to

Keyboard shortcuts

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