armcontainerinstance

package module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: MIT Imports: 15 Imported by: 3

README

Azure Container Instance Module for Go

PkgGoDev

The armcontainerinstance module provides operations for working with Azure Container Instance.

Source code

Getting started

Prerequisites

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Container Instance module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerinstance/armcontainerinstance

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Container Instance. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Clients

Azure Container Instance modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential.

client := armcontainerinstance.NewContainersClient(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options = arm.ClientOptions{
    Host: arm.AzureChina,
}
client := armcontainerinstance.NewContainersClient(<subscription ID>, cred, &options)

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Container Instance label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureFileVolume

type AzureFileVolume struct {
	// REQUIRED; The name of the Azure File share to be mounted as a volume.
	ShareName *string `json:"shareName,omitempty"`

	// REQUIRED; The name of the storage account that contains the Azure File share.
	StorageAccountName *string `json:"storageAccountName,omitempty"`

	// The flag indicating whether the Azure File shared mounted as a volume is read-only.
	ReadOnly *bool `json:"readOnly,omitempty"`

	// The storage account access key used to access the Azure File share.
	StorageAccountKey *string `json:"storageAccountKey,omitempty"`
}

AzureFileVolume - The properties of the Azure File volume. Azure File shares are mounted as volumes.

type CachedImages

type CachedImages struct {
	// REQUIRED; The cached image name.
	Image *string `json:"image,omitempty"`

	// REQUIRED; The OS type of the cached image.
	OSType *string `json:"osType,omitempty"`
}

CachedImages - The cached image and OS type.

type CachedImagesListResult

type CachedImagesListResult struct {
	// The URI to fetch the next page of cached images.
	NextLink *string `json:"nextLink,omitempty"`

	// The list of cached images.
	Value []*CachedImages `json:"value,omitempty"`
}

CachedImagesListResult - The response containing cached images.

func (CachedImagesListResult) MarshalJSON

func (c CachedImagesListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CachedImagesListResult.

type Capabilities

type Capabilities struct {
	// READ-ONLY; The supported capabilities.
	Capabilities *CapabilitiesCapabilities `json:"capabilities,omitempty" azure:"ro"`

	// READ-ONLY; The GPU sku that this capability describes.
	Gpu *string `json:"gpu,omitempty" azure:"ro"`

	// READ-ONLY; The ip address type that this capability describes.
	IPAddressType *string `json:"ipAddressType,omitempty" azure:"ro"`

	// READ-ONLY; The resource location.
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; The OS type that this capability describes.
	OSType *string `json:"osType,omitempty" azure:"ro"`

	// READ-ONLY; The resource type that this capability describes.
	ResourceType *string `json:"resourceType,omitempty" azure:"ro"`
}

Capabilities - The regional capabilities.

type CapabilitiesCapabilities

type CapabilitiesCapabilities struct {
	// READ-ONLY; The maximum allowed CPU request in cores.
	MaxCPU *float32 `json:"maxCpu,omitempty" azure:"ro"`

	// READ-ONLY; The maximum allowed GPU count.
	MaxGpuCount *float32 `json:"maxGpuCount,omitempty" azure:"ro"`

	// READ-ONLY; The maximum allowed memory request in GB.
	MaxMemoryInGB *float32 `json:"maxMemoryInGB,omitempty" azure:"ro"`
}

CapabilitiesCapabilities - The supported capabilities.

type CapabilitiesListResult

type CapabilitiesListResult struct {
	// The URI to fetch the next page of capabilities.
	NextLink *string `json:"nextLink,omitempty"`

	// The list of capabilities.
	Value []*Capabilities `json:"value,omitempty"`
}

CapabilitiesListResult - The response containing list of capabilities.

func (CapabilitiesListResult) MarshalJSON

func (c CapabilitiesListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CapabilitiesListResult.

type CloudError

type CloudError struct {
	// An error response from the Container Instance service.
	Error *CloudErrorBody `json:"error,omitempty"`
}

CloudError - An error response from the Container Instance service.

type CloudErrorBody

type CloudErrorBody struct {
	// An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
	Code *string `json:"code,omitempty"`

	// A list of additional details about the error.
	Details []*CloudErrorBody `json:"details,omitempty"`

	// A message describing the error, intended to be suitable for display in a user interface.
	Message *string `json:"message,omitempty"`

	// The target of the particular error. For example, the name of the property in error.
	Target *string `json:"target,omitempty"`
}

CloudErrorBody - An error response from the Container Instance service.

func (CloudErrorBody) MarshalJSON

func (c CloudErrorBody) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudErrorBody.

type Components10Wh5UdSchemasContainergroupidentityPropertiesUserassignedidentitiesAdditionalproperties

type Components10Wh5UdSchemasContainergroupidentityPropertiesUserassignedidentitiesAdditionalproperties struct {
	// READ-ONLY; The client id of user assigned identity.
	ClientID *string `json:"clientId,omitempty" azure:"ro"`

	// READ-ONLY; The principal id of user assigned identity.
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`
}

type Container

type Container struct {
	// REQUIRED; The user-provided name of the container instance.
	Name *string `json:"name,omitempty"`

	// REQUIRED; The properties of the container instance.
	Properties *ContainerProperties `json:"properties,omitempty"`
}

Container - A container instance.

type ContainerAttachResponse

type ContainerAttachResponse struct {
	// The password to the output stream from the attach. Send as an Authorization header value when connecting to the websocketUri.
	Password *string `json:"password,omitempty"`

	// The uri for the output stream from the attach.
	WebSocketURI *string `json:"webSocketUri,omitempty"`
}

ContainerAttachResponse - The information for the output stream from container attach.

type ContainerExec

type ContainerExec struct {
	// The commands to execute within the container.
	Command []*string `json:"command,omitempty"`
}

ContainerExec - The container execution command, for liveness or readiness probe

func (ContainerExec) MarshalJSON

func (c ContainerExec) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContainerExec.

type ContainerExecRequest

type ContainerExecRequest struct {
	// The command to be executed.
	Command *string `json:"command,omitempty"`

	// The size of the terminal.
	TerminalSize *ContainerExecRequestTerminalSize `json:"terminalSize,omitempty"`
}

ContainerExecRequest - The container exec request.

type ContainerExecRequestTerminalSize

type ContainerExecRequestTerminalSize struct {
	// The column size of the terminal
	Cols *int32 `json:"cols,omitempty"`

	// The row size of the terminal
	Rows *int32 `json:"rows,omitempty"`
}

ContainerExecRequestTerminalSize - The size of the terminal.

type ContainerExecResponse

type ContainerExecResponse struct {
	// The password to start the exec command.
	Password *string `json:"password,omitempty"`

	// The uri for the exec websocket.
	WebSocketURI *string `json:"webSocketUri,omitempty"`
}

ContainerExecResponse - The information for the container exec command.

type ContainerGroup

type ContainerGroup struct {
	// REQUIRED; The container group properties
	Properties *ContainerGroupProperties `json:"properties,omitempty"`

	// The identity of the container group, if configured.
	Identity *ContainerGroupIdentity `json:"identity,omitempty"`

	// The resource location.
	Location *string `json:"location,omitempty"`

	// The resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// The zones for the container group.
	Zones []*string `json:"zones,omitempty"`

	// READ-ONLY; The resource id.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The resource name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The resource type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

ContainerGroup - A container group.

func (ContainerGroup) MarshalJSON

func (c ContainerGroup) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContainerGroup.

type ContainerGroupDiagnostics

type ContainerGroupDiagnostics struct {
	// Container group log analytics information.
	LogAnalytics *LogAnalytics `json:"logAnalytics,omitempty"`
}

ContainerGroupDiagnostics - Container group diagnostic information.

type ContainerGroupIPAddressType

type ContainerGroupIPAddressType string

ContainerGroupIPAddressType - Specifies if the IP is exposed to the public internet or private VNET.

const (
	ContainerGroupIPAddressTypePrivate ContainerGroupIPAddressType = "Private"
	ContainerGroupIPAddressTypePublic  ContainerGroupIPAddressType = "Public"
)

func PossibleContainerGroupIPAddressTypeValues

func PossibleContainerGroupIPAddressTypeValues() []ContainerGroupIPAddressType

PossibleContainerGroupIPAddressTypeValues returns the possible values for the ContainerGroupIPAddressType const type.

func (ContainerGroupIPAddressType) ToPtr

ToPtr returns a *ContainerGroupIPAddressType pointing to the current value.

type ContainerGroupIdentity

type ContainerGroupIdentity struct {
	// The type of identity used for the container group. The type 'SystemAssigned, UserAssigned' includes both an implicitly
	// created identity and a set of user assigned identities. The type 'None' will
	// remove any identities from the container group.
	Type *ResourceIdentityType `json:"type,omitempty"`

	// The list of user identities associated with the container group. The user identity dictionary key references will be ARM
	// resource ids in the form:
	// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
	UserAssignedIdentities map[string]*Components10Wh5UdSchemasContainergroupidentityPropertiesUserassignedidentitiesAdditionalproperties `json:"userAssignedIdentities,omitempty"`

	// READ-ONLY; The principal id of the container group identity. This property will only be provided for a system assigned
	// identity.
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`

	// READ-ONLY; The tenant id associated with the container group. This property will only be provided for a system assigned
	// identity.
	TenantID *string `json:"tenantId,omitempty" azure:"ro"`
}

ContainerGroupIdentity - Identity for the container group.

func (ContainerGroupIdentity) MarshalJSON

func (c ContainerGroupIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContainerGroupIdentity.

type ContainerGroupListResult

type ContainerGroupListResult struct {
	// The URI to fetch the next page of container groups.
	NextLink *string `json:"nextLink,omitempty"`

	// The list of container groups.
	Value []*ContainerGroup `json:"value,omitempty"`
}

ContainerGroupListResult - The container group list response that contains the container group properties.

func (ContainerGroupListResult) MarshalJSON

func (c ContainerGroupListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContainerGroupListResult.

type ContainerGroupNetworkProtocol

type ContainerGroupNetworkProtocol string

ContainerGroupNetworkProtocol - The protocol associated with the port.

const (
	ContainerGroupNetworkProtocolTCP ContainerGroupNetworkProtocol = "TCP"
	ContainerGroupNetworkProtocolUDP ContainerGroupNetworkProtocol = "UDP"
)

func PossibleContainerGroupNetworkProtocolValues

func PossibleContainerGroupNetworkProtocolValues() []ContainerGroupNetworkProtocol

PossibleContainerGroupNetworkProtocolValues returns the possible values for the ContainerGroupNetworkProtocol const type.

func (ContainerGroupNetworkProtocol) ToPtr

ToPtr returns a *ContainerGroupNetworkProtocol pointing to the current value.

type ContainerGroupProperties

type ContainerGroupProperties struct {
	// REQUIRED; The containers within the container group.
	Containers []*Container `json:"containers,omitempty"`

	// REQUIRED; The operating system type required by the containers in the container group.
	OSType *OperatingSystemTypes `json:"osType,omitempty"`

	// The DNS config information for a container group.
	DNSConfig *DNSConfiguration `json:"dnsConfig,omitempty"`

	// The diagnostic information for a container group.
	Diagnostics *ContainerGroupDiagnostics `json:"diagnostics,omitempty"`

	// The encryption properties for a container group.
	EncryptionProperties *EncryptionProperties `json:"encryptionProperties,omitempty"`

	// The IP address type of the container group.
	IPAddress *IPAddress `json:"ipAddress,omitempty"`

	// The image registry credentials by which the container group is created from.
	ImageRegistryCredentials []*ImageRegistryCredential `json:"imageRegistryCredentials,omitempty"`

	// The init containers for a container group.
	InitContainers []*InitContainerDefinition `json:"initContainers,omitempty"`

	// Restart policy for all containers within the container group.
	// * Always Always restart
	// * OnFailure Restart on failure
	// * Never Never restart
	RestartPolicy *ContainerGroupRestartPolicy `json:"restartPolicy,omitempty"`

	// The SKU for a container group.
	SKU *ContainerGroupSKU `json:"sku,omitempty"`

	// The subnet resource IDs for a container group.
	SubnetIDs []*ContainerGroupSubnetID `json:"subnetIds,omitempty"`

	// The list of volumes that can be mounted by containers in this container group.
	Volumes []*Volume `json:"volumes,omitempty"`

	// READ-ONLY; The instance view of the container group. Only valid in response.
	InstanceView *ContainerGroupPropertiesInstanceView `json:"instanceView,omitempty" azure:"ro"`

	// READ-ONLY; The provisioning state of the container group. This only appears in the response.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`
}

ContainerGroupProperties - The container group properties

func (ContainerGroupProperties) MarshalJSON

func (c ContainerGroupProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContainerGroupProperties.

type ContainerGroupPropertiesInstanceView

type ContainerGroupPropertiesInstanceView struct {
	// READ-ONLY; The events of this container group.
	Events []*Event `json:"events,omitempty" azure:"ro"`

	// READ-ONLY; The state of the container group. Only valid in response.
	State *string `json:"state,omitempty" azure:"ro"`
}

ContainerGroupPropertiesInstanceView - The instance view of the container group. Only valid in response.

func (ContainerGroupPropertiesInstanceView) MarshalJSON

func (c ContainerGroupPropertiesInstanceView) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContainerGroupPropertiesInstanceView.

type ContainerGroupRestartPolicy

type ContainerGroupRestartPolicy string

ContainerGroupRestartPolicy - Restart policy for all containers within the container group. * Always Always restart * OnFailure Restart on failure * Never Never restart

const (
	ContainerGroupRestartPolicyAlways    ContainerGroupRestartPolicy = "Always"
	ContainerGroupRestartPolicyNever     ContainerGroupRestartPolicy = "Never"
	ContainerGroupRestartPolicyOnFailure ContainerGroupRestartPolicy = "OnFailure"
)

func PossibleContainerGroupRestartPolicyValues

func PossibleContainerGroupRestartPolicyValues() []ContainerGroupRestartPolicy

PossibleContainerGroupRestartPolicyValues returns the possible values for the ContainerGroupRestartPolicy const type.

func (ContainerGroupRestartPolicy) ToPtr

ToPtr returns a *ContainerGroupRestartPolicy pointing to the current value.

type ContainerGroupSKU

type ContainerGroupSKU string

ContainerGroupSKU - The container group SKU.

const (
	ContainerGroupSKUDedicated ContainerGroupSKU = "Dedicated"
	ContainerGroupSKUStandard  ContainerGroupSKU = "Standard"
)

func PossibleContainerGroupSKUValues

func PossibleContainerGroupSKUValues() []ContainerGroupSKU

PossibleContainerGroupSKUValues returns the possible values for the ContainerGroupSKU const type.

func (ContainerGroupSKU) ToPtr

ToPtr returns a *ContainerGroupSKU pointing to the current value.

type ContainerGroupSubnetID

type ContainerGroupSubnetID struct {
	// REQUIRED; Resource ID of virtual network and subnet.
	ID *string `json:"id,omitempty"`

	// Friendly name for the subnet.
	Name *string `json:"name,omitempty"`
}

ContainerGroupSubnetID - Container group subnet information.

type ContainerGroupsClient

type ContainerGroupsClient struct {
	// contains filtered or unexported fields
}

ContainerGroupsClient contains the methods for the ContainerGroups group. Don't use this type directly, use NewContainerGroupsClient() instead.

func NewContainerGroupsClient

func NewContainerGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ContainerGroupsClient

NewContainerGroupsClient creates a new instance of ContainerGroupsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ContainerGroupsClient) BeginCreateOrUpdate

func (client *ContainerGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, containerGroupName string, containerGroup ContainerGroup, options *ContainerGroupsClientBeginCreateOrUpdateOptions) (ContainerGroupsClientCreateOrUpdatePollerResponse, error)

BeginCreateOrUpdate - Create or update container groups with specified configurations. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. containerGroupName - The name of the container group. containerGroup - The properties of the container group to be created or updated. options - ContainerGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the ContainerGroupsClient.BeginCreateOrUpdate method.

Example

x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2021-10-01/examples/ContainerGroupsCreateOrUpdate.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerinstance/armcontainerinstance"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armcontainerinstance.NewContainerGroupsClient("<subscription-id>", cred, nil)
	poller, err := client.BeginCreateOrUpdate(ctx,
		"<resource-group-name>",
		"<container-group-name>",
		armcontainerinstance.ContainerGroup{
			Location: to.StringPtr("<location>"),
			Identity: &armcontainerinstance.ContainerGroupIdentity{
				Type: armcontainerinstance.ResourceIdentityTypeSystemAssignedUserAssigned.ToPtr(),
				UserAssignedIdentities: map[string]*armcontainerinstance.Components10Wh5UdSchemasContainergroupidentityPropertiesUserassignedidentitiesAdditionalproperties{
					"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name": {},
				},
			},
			Properties: &armcontainerinstance.ContainerGroupProperties{
				Containers: []*armcontainerinstance.Container{
					{
						Name: to.StringPtr("<name>"),
						Properties: &armcontainerinstance.ContainerProperties{
							Command:              []*string{},
							EnvironmentVariables: []*armcontainerinstance.EnvironmentVariable{},
							Image:                to.StringPtr("<image>"),
							Ports: []*armcontainerinstance.ContainerPort{
								{
									Port: to.Int32Ptr(80),
								}},
							Resources: &armcontainerinstance.ResourceRequirements{
								Requests: &armcontainerinstance.ResourceRequests{
									CPU: to.Float64Ptr(1),
									Gpu: &armcontainerinstance.GpuResource{
										Count: to.Int32Ptr(1),
										SKU:   armcontainerinstance.GpuSKU("K80").ToPtr(),
									},
									MemoryInGB: to.Float64Ptr(1.5),
								},
							},
							VolumeMounts: []*armcontainerinstance.VolumeMount{
								{
									Name:      to.StringPtr("<name>"),
									MountPath: to.StringPtr("<mount-path>"),
									ReadOnly:  to.BoolPtr(false),
								},
								{
									Name:      to.StringPtr("<name>"),
									MountPath: to.StringPtr("<mount-path>"),
									ReadOnly:  to.BoolPtr(false),
								},
								{
									Name:      to.StringPtr("<name>"),
									MountPath: to.StringPtr("<mount-path>"),
									ReadOnly:  to.BoolPtr(true),
								}},
						},
					}},
				Diagnostics: &armcontainerinstance.ContainerGroupDiagnostics{
					LogAnalytics: &armcontainerinstance.LogAnalytics{
						LogType: armcontainerinstance.LogAnalyticsLogType("ContainerInsights").ToPtr(),
						Metadata: map[string]*string{
							"test-key": to.StringPtr("test-metadata-value"),
						},
						WorkspaceID:         to.StringPtr("<workspace-id>"),
						WorkspaceKey:        to.StringPtr("<workspace-key>"),
						WorkspaceResourceID: to.StringPtr("<workspace-resource-id>"),
					},
				},
				DNSConfig: &armcontainerinstance.DNSConfiguration{
					NameServers: []*string{
						to.StringPtr("1.1.1.1")},
					Options:       to.StringPtr("<options>"),
					SearchDomains: to.StringPtr("<search-domains>"),
				},
				ImageRegistryCredentials: []*armcontainerinstance.ImageRegistryCredential{},
				IPAddress: &armcontainerinstance.IPAddress{
					Type:                    armcontainerinstance.ContainerGroupIPAddressType("Public").ToPtr(),
					DNSNameLabel:            to.StringPtr("<dnsname-label>"),
					DNSNameLabelReusePolicy: armcontainerinstance.DNSNameLabelReusePolicy("Unsecure").ToPtr(),
					Ports: []*armcontainerinstance.Port{
						{
							Port:     to.Int32Ptr(80),
							Protocol: armcontainerinstance.ContainerGroupNetworkProtocol("TCP").ToPtr(),
						}},
				},
				OSType: armcontainerinstance.OperatingSystemTypes("Linux").ToPtr(),
				SubnetIDs: []*armcontainerinstance.ContainerGroupSubnetID{
					{
						ID: to.StringPtr("<id>"),
					}},
				Volumes: []*armcontainerinstance.Volume{
					{
						Name: to.StringPtr("<name>"),
						AzureFile: &armcontainerinstance.AzureFileVolume{
							ShareName:          to.StringPtr("<share-name>"),
							StorageAccountKey:  to.StringPtr("<storage-account-key>"),
							StorageAccountName: to.StringPtr("<storage-account-name>"),
						},
					},
					{
						Name:     to.StringPtr("<name>"),
						EmptyDir: map[string]interface{}{},
					},
					{
						Name: to.StringPtr("<name>"),
						Secret: map[string]*string{
							"secretKey1": to.StringPtr("SecretValue1InBase64"),
							"secretKey2": to.StringPtr("SecretValue2InBase64"),
						},
					}},
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ContainerGroupsClientCreateOrUpdateResult)
}
Output:

func (*ContainerGroupsClient) BeginDelete

func (client *ContainerGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, containerGroupName string, options *ContainerGroupsClientBeginDeleteOptions) (ContainerGroupsClientDeletePollerResponse, error)

BeginDelete - Delete the specified container group in the specified subscription and resource group. The operation does not delete other resources provided by the user, such as volumes. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. containerGroupName - The name of the container group. options - ContainerGroupsClientBeginDeleteOptions contains the optional parameters for the ContainerGroupsClient.BeginDelete method.

Example

x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2021-10-01/examples/ContainerGroupsDelete.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerinstance/armcontainerinstance"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armcontainerinstance.NewContainerGroupsClient("<subscription-id>", cred, nil)
	poller, err := client.BeginDelete(ctx,
		"<resource-group-name>",
		"<container-group-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ContainerGroupsClientDeleteResult)
}
Output:

func (*ContainerGroupsClient) BeginRestart

func (client *ContainerGroupsClient) BeginRestart(ctx context.Context, resourceGroupName string, containerGroupName string, options *ContainerGroupsClientBeginRestartOptions) (ContainerGroupsClientRestartPollerResponse, error)

BeginRestart - Restarts all containers in a container group in place. If container image has updates, new image will be downloaded. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. containerGroupName - The name of the container group. options - ContainerGroupsClientBeginRestartOptions contains the optional parameters for the ContainerGroupsClient.BeginRestart method.

Example

x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2021-10-01/examples/ContainerGroupsRestart.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerinstance/armcontainerinstance"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armcontainerinstance.NewContainerGroupsClient("<subscription-id>", cred, nil)
	poller, err := client.BeginRestart(ctx,
		"<resource-group-name>",
		"<container-group-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	_, err = poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*ContainerGroupsClient) BeginStart

func (client *ContainerGroupsClient) BeginStart(ctx context.Context, resourceGroupName string, containerGroupName string, options *ContainerGroupsClientBeginStartOptions) (ContainerGroupsClientStartPollerResponse, error)

BeginStart - Starts all containers in a container group. Compute resources will be allocated and billing will start. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. containerGroupName - The name of the container group. options - ContainerGroupsClientBeginStartOptions contains the optional parameters for the ContainerGroupsClient.BeginStart method.

Example

x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2021-10-01/examples/ContainerGroupsStart.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerinstance/armcontainerinstance"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armcontainerinstance.NewContainerGroupsClient("<subscription-id>", cred, nil)
	poller, err := client.BeginStart(ctx,
		"<resource-group-name>",
		"<container-group-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	_, err = poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*ContainerGroupsClient) Get

func (client *ContainerGroupsClient) Get(ctx context.Context, resourceGroupName string, containerGroupName string, options *ContainerGroupsClientGetOptions) (ContainerGroupsClientGetResponse, error)

Get - Gets the properties of the specified container group in the specified subscription and resource group. The operation returns the properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. containerGroupName - The name of the container group. options - ContainerGroupsClientGetOptions contains the optional parameters for the ContainerGroupsClient.Get method.

Example

x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2021-10-01/examples/ContainerGroupsGet_Failed.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerinstance/armcontainerinstance"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armcontainerinstance.NewContainerGroupsClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<container-group-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ContainerGroupsClientGetResult)
}
Output:

func (*ContainerGroupsClient) GetOutboundNetworkDependenciesEndpoints

GetOutboundNetworkDependenciesEndpoints - Gets all the network dependencies for this container group to allow complete control of network setting and configuration. For container groups, this will always be an empty list. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. containerGroupName - The name of the container group. options - ContainerGroupsClientGetOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the ContainerGroupsClient.GetOutboundNetworkDependenciesEndpoints method.

func (*ContainerGroupsClient) List

List - Get a list of container groups in the specified subscription. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes. If the operation fails it returns an *azcore.ResponseError type. options - ContainerGroupsClientListOptions contains the optional parameters for the ContainerGroupsClient.List method.

Example

x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2021-10-01/examples/ContainerGroupsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerinstance/armcontainerinstance"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armcontainerinstance.NewContainerGroupsClient("<subscription-id>", cred, nil)
	pager := client.List(nil)
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*ContainerGroupsClient) ListByResourceGroup

ListByResourceGroup - Get a list of container groups in a specified subscription and resource group. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. options - ContainerGroupsClientListByResourceGroupOptions contains the optional parameters for the ContainerGroupsClient.ListByResourceGroup method.

Example

x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2021-10-01/examples/ContainerGroupsListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerinstance/armcontainerinstance"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armcontainerinstance.NewContainerGroupsClient("<subscription-id>", cred, nil)
	pager := client.ListByResourceGroup("<resource-group-name>",
		nil)
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*ContainerGroupsClient) Stop

func (client *ContainerGroupsClient) Stop(ctx context.Context, resourceGroupName string, containerGroupName string, options *ContainerGroupsClientStopOptions) (ContainerGroupsClientStopResponse, error)

Stop - Stops all containers in a container group. Compute resources will be deallocated and billing will stop. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. containerGroupName - The name of the container group. options - ContainerGroupsClientStopOptions contains the optional parameters for the ContainerGroupsClient.Stop method.

Example

x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2021-10-01/examples/ContainerGroupsStop.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerinstance/armcontainerinstance"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armcontainerinstance.NewContainerGroupsClient("<subscription-id>", cred, nil)
	_, err = client.Stop(ctx,
		"<resource-group-name>",
		"<container-group-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*ContainerGroupsClient) Update

func (client *ContainerGroupsClient) Update(ctx context.Context, resourceGroupName string, containerGroupName string, resource Resource, options *ContainerGroupsClientUpdateOptions) (ContainerGroupsClientUpdateResponse, error)

Update - Updates container group tags with specified values. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. containerGroupName - The name of the container group. resource - The container group resource with just the tags to be updated. options - ContainerGroupsClientUpdateOptions contains the optional parameters for the ContainerGroupsClient.Update method.

Example

x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2021-10-01/examples/ContainerGroupsUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerinstance/armcontainerinstance"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armcontainerinstance.NewContainerGroupsClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<container-group-name>",
		armcontainerinstance.Resource{
			Tags: map[string]*string{
				"tag1key": to.StringPtr("tag1Value"),
				"tag2key": to.StringPtr("tag2Value"),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ContainerGroupsClientUpdateResult)
}
Output:

type ContainerGroupsClientBeginCreateOrUpdateOptions added in v0.2.0

type ContainerGroupsClientBeginCreateOrUpdateOptions struct {
}

ContainerGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the ContainerGroupsClient.BeginCreateOrUpdate method.

type ContainerGroupsClientBeginDeleteOptions added in v0.2.0

type ContainerGroupsClientBeginDeleteOptions struct {
}

ContainerGroupsClientBeginDeleteOptions contains the optional parameters for the ContainerGroupsClient.BeginDelete method.

type ContainerGroupsClientBeginRestartOptions added in v0.2.0

type ContainerGroupsClientBeginRestartOptions struct {
}

ContainerGroupsClientBeginRestartOptions contains the optional parameters for the ContainerGroupsClient.BeginRestart method.

type ContainerGroupsClientBeginStartOptions added in v0.2.0

type ContainerGroupsClientBeginStartOptions struct {
}

ContainerGroupsClientBeginStartOptions contains the optional parameters for the ContainerGroupsClient.BeginStart method.

type ContainerGroupsClientCreateOrUpdatePoller added in v0.2.0

type ContainerGroupsClientCreateOrUpdatePoller struct {
	// contains filtered or unexported fields
}

ContainerGroupsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state.

func (*ContainerGroupsClientCreateOrUpdatePoller) Done added in v0.2.0

Done returns true if the LRO has reached a terminal state.

func (*ContainerGroupsClientCreateOrUpdatePoller) FinalResponse added in v0.2.0

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final ContainerGroupsClientCreateOrUpdateResponse will be returned.

func (*ContainerGroupsClientCreateOrUpdatePoller) Poll added in v0.2.0

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*ContainerGroupsClientCreateOrUpdatePoller) ResumeToken added in v0.2.0

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type ContainerGroupsClientCreateOrUpdatePollerResponse added in v0.2.0

type ContainerGroupsClientCreateOrUpdatePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *ContainerGroupsClientCreateOrUpdatePoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ContainerGroupsClientCreateOrUpdatePollerResponse contains the response from method ContainerGroupsClient.CreateOrUpdate.

func (ContainerGroupsClientCreateOrUpdatePollerResponse) PollUntilDone added in v0.2.0

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*ContainerGroupsClientCreateOrUpdatePollerResponse) Resume added in v0.2.0

Resume rehydrates a ContainerGroupsClientCreateOrUpdatePollerResponse from the provided client and resume token.

type ContainerGroupsClientCreateOrUpdateResponse added in v0.2.0

type ContainerGroupsClientCreateOrUpdateResponse struct {
	ContainerGroupsClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ContainerGroupsClientCreateOrUpdateResponse contains the response from method ContainerGroupsClient.CreateOrUpdate.

type ContainerGroupsClientCreateOrUpdateResult added in v0.2.0

type ContainerGroupsClientCreateOrUpdateResult struct {
	ContainerGroup
}

ContainerGroupsClientCreateOrUpdateResult contains the result from method ContainerGroupsClient.CreateOrUpdate.

type ContainerGroupsClientDeletePoller added in v0.2.0

type ContainerGroupsClientDeletePoller struct {
	// contains filtered or unexported fields
}

ContainerGroupsClientDeletePoller provides polling facilities until the operation reaches a terminal state.

func (*ContainerGroupsClientDeletePoller) Done added in v0.2.0

Done returns true if the LRO has reached a terminal state.

func (*ContainerGroupsClientDeletePoller) FinalResponse added in v0.2.0

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final ContainerGroupsClientDeleteResponse will be returned.

func (*ContainerGroupsClientDeletePoller) Poll added in v0.2.0

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*ContainerGroupsClientDeletePoller) ResumeToken added in v0.2.0

func (p *ContainerGroupsClientDeletePoller) ResumeToken() (string, error)

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type ContainerGroupsClientDeletePollerResponse added in v0.2.0

type ContainerGroupsClientDeletePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *ContainerGroupsClientDeletePoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ContainerGroupsClientDeletePollerResponse contains the response from method ContainerGroupsClient.Delete.

func (ContainerGroupsClientDeletePollerResponse) PollUntilDone added in v0.2.0

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*ContainerGroupsClientDeletePollerResponse) Resume added in v0.2.0

Resume rehydrates a ContainerGroupsClientDeletePollerResponse from the provided client and resume token.

type ContainerGroupsClientDeleteResponse added in v0.2.0

type ContainerGroupsClientDeleteResponse struct {
	ContainerGroupsClientDeleteResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ContainerGroupsClientDeleteResponse contains the response from method ContainerGroupsClient.Delete.

type ContainerGroupsClientDeleteResult added in v0.2.0

type ContainerGroupsClientDeleteResult struct {
	ContainerGroup
}

ContainerGroupsClientDeleteResult contains the result from method ContainerGroupsClient.Delete.

type ContainerGroupsClientGetOptions added in v0.2.0

type ContainerGroupsClientGetOptions struct {
}

ContainerGroupsClientGetOptions contains the optional parameters for the ContainerGroupsClient.Get method.

type ContainerGroupsClientGetOutboundNetworkDependenciesEndpointsOptions added in v0.2.0

type ContainerGroupsClientGetOutboundNetworkDependenciesEndpointsOptions struct {
}

ContainerGroupsClientGetOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the ContainerGroupsClient.GetOutboundNetworkDependenciesEndpoints method.

type ContainerGroupsClientGetOutboundNetworkDependenciesEndpointsResponse added in v0.2.0

type ContainerGroupsClientGetOutboundNetworkDependenciesEndpointsResponse struct {
	ContainerGroupsClientGetOutboundNetworkDependenciesEndpointsResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ContainerGroupsClientGetOutboundNetworkDependenciesEndpointsResponse contains the response from method ContainerGroupsClient.GetOutboundNetworkDependenciesEndpoints.

type ContainerGroupsClientGetOutboundNetworkDependenciesEndpointsResult added in v0.2.0

type ContainerGroupsClientGetOutboundNetworkDependenciesEndpointsResult struct {
	// Response for network dependencies, always empty list.
	StringArray []*string
}

ContainerGroupsClientGetOutboundNetworkDependenciesEndpointsResult contains the result from method ContainerGroupsClient.GetOutboundNetworkDependenciesEndpoints.

type ContainerGroupsClientGetResponse added in v0.2.0

type ContainerGroupsClientGetResponse struct {
	ContainerGroupsClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ContainerGroupsClientGetResponse contains the response from method ContainerGroupsClient.Get.

type ContainerGroupsClientGetResult added in v0.2.0

type ContainerGroupsClientGetResult struct {
	ContainerGroup
}

ContainerGroupsClientGetResult contains the result from method ContainerGroupsClient.Get.

type ContainerGroupsClientListByResourceGroupOptions added in v0.2.0

type ContainerGroupsClientListByResourceGroupOptions struct {
}

ContainerGroupsClientListByResourceGroupOptions contains the optional parameters for the ContainerGroupsClient.ListByResourceGroup method.

type ContainerGroupsClientListByResourceGroupPager added in v0.2.0

type ContainerGroupsClientListByResourceGroupPager struct {
	// contains filtered or unexported fields
}

ContainerGroupsClientListByResourceGroupPager provides operations for iterating over paged responses.

func (*ContainerGroupsClientListByResourceGroupPager) Err added in v0.2.0

Err returns the last error encountered while paging.

func (*ContainerGroupsClientListByResourceGroupPager) NextPage added in v0.2.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*ContainerGroupsClientListByResourceGroupPager) PageResponse added in v0.2.0

PageResponse returns the current ContainerGroupsClientListByResourceGroupResponse page.

type ContainerGroupsClientListByResourceGroupResponse added in v0.2.0

type ContainerGroupsClientListByResourceGroupResponse struct {
	ContainerGroupsClientListByResourceGroupResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ContainerGroupsClientListByResourceGroupResponse contains the response from method ContainerGroupsClient.ListByResourceGroup.

type ContainerGroupsClientListByResourceGroupResult added in v0.2.0

type ContainerGroupsClientListByResourceGroupResult struct {
	ContainerGroupListResult
}

ContainerGroupsClientListByResourceGroupResult contains the result from method ContainerGroupsClient.ListByResourceGroup.

type ContainerGroupsClientListOptions added in v0.2.0

type ContainerGroupsClientListOptions struct {
}

ContainerGroupsClientListOptions contains the optional parameters for the ContainerGroupsClient.List method.

type ContainerGroupsClientListPager added in v0.2.0

type ContainerGroupsClientListPager struct {
	// contains filtered or unexported fields
}

ContainerGroupsClientListPager provides operations for iterating over paged responses.

func (*ContainerGroupsClientListPager) Err added in v0.2.0

Err returns the last error encountered while paging.

func (*ContainerGroupsClientListPager) NextPage added in v0.2.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*ContainerGroupsClientListPager) PageResponse added in v0.2.0

PageResponse returns the current ContainerGroupsClientListResponse page.

type ContainerGroupsClientListResponse added in v0.2.0

type ContainerGroupsClientListResponse struct {
	ContainerGroupsClientListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ContainerGroupsClientListResponse contains the response from method ContainerGroupsClient.List.

type ContainerGroupsClientListResult added in v0.2.0

type ContainerGroupsClientListResult struct {
	ContainerGroupListResult
}

ContainerGroupsClientListResult contains the result from method ContainerGroupsClient.List.

type ContainerGroupsClientRestartPoller added in v0.2.0

type ContainerGroupsClientRestartPoller struct {
	// contains filtered or unexported fields
}

ContainerGroupsClientRestartPoller provides polling facilities until the operation reaches a terminal state.

func (*ContainerGroupsClientRestartPoller) Done added in v0.2.0

Done returns true if the LRO has reached a terminal state.

func (*ContainerGroupsClientRestartPoller) FinalResponse added in v0.2.0

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final ContainerGroupsClientRestartResponse will be returned.

func (*ContainerGroupsClientRestartPoller) Poll added in v0.2.0

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*ContainerGroupsClientRestartPoller) ResumeToken added in v0.2.0

func (p *ContainerGroupsClientRestartPoller) ResumeToken() (string, error)

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type ContainerGroupsClientRestartPollerResponse added in v0.2.0

type ContainerGroupsClientRestartPollerResponse struct {
	// Poller contains an initialized poller.
	Poller *ContainerGroupsClientRestartPoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ContainerGroupsClientRestartPollerResponse contains the response from method ContainerGroupsClient.Restart.

func (ContainerGroupsClientRestartPollerResponse) PollUntilDone added in v0.2.0

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*ContainerGroupsClientRestartPollerResponse) Resume added in v0.2.0

Resume rehydrates a ContainerGroupsClientRestartPollerResponse from the provided client and resume token.

type ContainerGroupsClientRestartResponse added in v0.2.0

type ContainerGroupsClientRestartResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ContainerGroupsClientRestartResponse contains the response from method ContainerGroupsClient.Restart.

type ContainerGroupsClientStartPoller added in v0.2.0

type ContainerGroupsClientStartPoller struct {
	// contains filtered or unexported fields
}

ContainerGroupsClientStartPoller provides polling facilities until the operation reaches a terminal state.

func (*ContainerGroupsClientStartPoller) Done added in v0.2.0

Done returns true if the LRO has reached a terminal state.

func (*ContainerGroupsClientStartPoller) FinalResponse added in v0.2.0

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final ContainerGroupsClientStartResponse will be returned.

func (*ContainerGroupsClientStartPoller) Poll added in v0.2.0

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*ContainerGroupsClientStartPoller) ResumeToken added in v0.2.0

func (p *ContainerGroupsClientStartPoller) ResumeToken() (string, error)

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type ContainerGroupsClientStartPollerResponse added in v0.2.0

type ContainerGroupsClientStartPollerResponse struct {
	// Poller contains an initialized poller.
	Poller *ContainerGroupsClientStartPoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ContainerGroupsClientStartPollerResponse contains the response from method ContainerGroupsClient.Start.

func (ContainerGroupsClientStartPollerResponse) PollUntilDone added in v0.2.0

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*ContainerGroupsClientStartPollerResponse) Resume added in v0.2.0

Resume rehydrates a ContainerGroupsClientStartPollerResponse from the provided client and resume token.

type ContainerGroupsClientStartResponse added in v0.2.0

type ContainerGroupsClientStartResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ContainerGroupsClientStartResponse contains the response from method ContainerGroupsClient.Start.

type ContainerGroupsClientStopOptions added in v0.2.0

type ContainerGroupsClientStopOptions struct {
}

ContainerGroupsClientStopOptions contains the optional parameters for the ContainerGroupsClient.Stop method.

type ContainerGroupsClientStopResponse added in v0.2.0

type ContainerGroupsClientStopResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ContainerGroupsClientStopResponse contains the response from method ContainerGroupsClient.Stop.

type ContainerGroupsClientUpdateOptions added in v0.2.0

type ContainerGroupsClientUpdateOptions struct {
}

ContainerGroupsClientUpdateOptions contains the optional parameters for the ContainerGroupsClient.Update method.

type ContainerGroupsClientUpdateResponse added in v0.2.0

type ContainerGroupsClientUpdateResponse struct {
	ContainerGroupsClientUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ContainerGroupsClientUpdateResponse contains the response from method ContainerGroupsClient.Update.

type ContainerGroupsClientUpdateResult added in v0.2.0

type ContainerGroupsClientUpdateResult struct {
	ContainerGroup
}

ContainerGroupsClientUpdateResult contains the result from method ContainerGroupsClient.Update.

type ContainerHTTPGet

type ContainerHTTPGet struct {
	// REQUIRED; The port number to probe.
	Port *int32 `json:"port,omitempty"`

	// The HTTP headers.
	HTTPHeaders []*HTTPHeader `json:"httpHeaders,omitempty"`

	// The path to probe.
	Path *string `json:"path,omitempty"`

	// The scheme.
	Scheme *Scheme `json:"scheme,omitempty"`
}

ContainerHTTPGet - The container Http Get settings, for liveness or readiness probe

func (ContainerHTTPGet) MarshalJSON

func (c ContainerHTTPGet) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContainerHTTPGet.

type ContainerInstanceOperationsOrigin

type ContainerInstanceOperationsOrigin string

ContainerInstanceOperationsOrigin - The intended executor of the operation.

const (
	ContainerInstanceOperationsOriginSystem ContainerInstanceOperationsOrigin = "System"
	ContainerInstanceOperationsOriginUser   ContainerInstanceOperationsOrigin = "User"
)

func PossibleContainerInstanceOperationsOriginValues

func PossibleContainerInstanceOperationsOriginValues() []ContainerInstanceOperationsOrigin

PossibleContainerInstanceOperationsOriginValues returns the possible values for the ContainerInstanceOperationsOrigin const type.

func (ContainerInstanceOperationsOrigin) ToPtr

ToPtr returns a *ContainerInstanceOperationsOrigin pointing to the current value.

type ContainerNetworkProtocol

type ContainerNetworkProtocol string

ContainerNetworkProtocol - The protocol associated with the port.

const (
	ContainerNetworkProtocolTCP ContainerNetworkProtocol = "TCP"
	ContainerNetworkProtocolUDP ContainerNetworkProtocol = "UDP"
)

func PossibleContainerNetworkProtocolValues

func PossibleContainerNetworkProtocolValues() []ContainerNetworkProtocol

PossibleContainerNetworkProtocolValues returns the possible values for the ContainerNetworkProtocol const type.

func (ContainerNetworkProtocol) ToPtr

ToPtr returns a *ContainerNetworkProtocol pointing to the current value.

type ContainerPort

type ContainerPort struct {
	// REQUIRED; The port number exposed within the container group.
	Port *int32 `json:"port,omitempty"`

	// The protocol associated with the port.
	Protocol *ContainerNetworkProtocol `json:"protocol,omitempty"`
}

ContainerPort - The port exposed on the container instance.

type ContainerProbe

type ContainerProbe struct {
	// The execution command to probe
	Exec *ContainerExec `json:"exec,omitempty"`

	// The failure threshold.
	FailureThreshold *int32 `json:"failureThreshold,omitempty"`

	// The Http Get settings to probe
	HTTPGet *ContainerHTTPGet `json:"httpGet,omitempty"`

	// The initial delay seconds.
	InitialDelaySeconds *int32 `json:"initialDelaySeconds,omitempty"`

	// The period seconds.
	PeriodSeconds *int32 `json:"periodSeconds,omitempty"`

	// The success threshold.
	SuccessThreshold *int32 `json:"successThreshold,omitempty"`

	// The timeout seconds.
	TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"`
}

ContainerProbe - The container probe, for liveness or readiness

type ContainerProperties

type ContainerProperties struct {
	// REQUIRED; The name of the image used to create the container instance.
	Image *string `json:"image,omitempty"`

	// REQUIRED; The resource requirements of the container instance.
	Resources *ResourceRequirements `json:"resources,omitempty"`

	// The commands to execute within the container instance in exec form.
	Command []*string `json:"command,omitempty"`

	// The environment variables to set in the container instance.
	EnvironmentVariables []*EnvironmentVariable `json:"environmentVariables,omitempty"`

	// The liveness probe.
	LivenessProbe *ContainerProbe `json:"livenessProbe,omitempty"`

	// The exposed ports on the container instance.
	Ports []*ContainerPort `json:"ports,omitempty"`

	// The readiness probe.
	ReadinessProbe *ContainerProbe `json:"readinessProbe,omitempty"`

	// The volume mounts available to the container instance.
	VolumeMounts []*VolumeMount `json:"volumeMounts,omitempty"`

	// READ-ONLY; The instance view of the container instance. Only valid in response.
	InstanceView *ContainerPropertiesInstanceView `json:"instanceView,omitempty" azure:"ro"`
}

ContainerProperties - The container instance properties.

func (ContainerProperties) MarshalJSON

func (c ContainerProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContainerProperties.

type ContainerPropertiesInstanceView

type ContainerPropertiesInstanceView struct {
	// READ-ONLY; Current container instance state.
	CurrentState *ContainerState `json:"currentState,omitempty" azure:"ro"`

	// READ-ONLY; The events of the container instance.
	Events []*Event `json:"events,omitempty" azure:"ro"`

	// READ-ONLY; Previous container instance state.
	PreviousState *ContainerState `json:"previousState,omitempty" azure:"ro"`

	// READ-ONLY; The number of times that the container instance has been restarted.
	RestartCount *int32 `json:"restartCount,omitempty" azure:"ro"`
}

ContainerPropertiesInstanceView - The instance view of the container instance. Only valid in response.

func (ContainerPropertiesInstanceView) MarshalJSON

func (c ContainerPropertiesInstanceView) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContainerPropertiesInstanceView.

type ContainerState

type ContainerState struct {
	// READ-ONLY; The human-readable status of the container instance state.
	DetailStatus *string `json:"detailStatus,omitempty" azure:"ro"`

	// READ-ONLY; The container instance exit codes correspond to those from the docker run command.
	ExitCode *int32 `json:"exitCode,omitempty" azure:"ro"`

	// READ-ONLY; The date-time when the container instance state finished.
	FinishTime *time.Time `json:"finishTime,omitempty" azure:"ro"`

	// READ-ONLY; The date-time when the container instance state started.
	StartTime *time.Time `json:"startTime,omitempty" azure:"ro"`

	// READ-ONLY; The state of the container instance.
	State *string `json:"state,omitempty" azure:"ro"`
}

ContainerState - The container instance state.

func (ContainerState) MarshalJSON

func (c ContainerState) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContainerState.

func (*ContainerState) UnmarshalJSON

func (c *ContainerState) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContainerState.

type ContainersClient

type ContainersClient struct {
	// contains filtered or unexported fields
}

ContainersClient contains the methods for the Containers group. Don't use this type directly, use NewContainersClient() instead.

func NewContainersClient

func NewContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ContainersClient

NewContainersClient creates a new instance of ContainersClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ContainersClient) Attach

func (client *ContainersClient) Attach(ctx context.Context, resourceGroupName string, containerGroupName string, containerName string, options *ContainersClientAttachOptions) (ContainersClientAttachResponse, error)

Attach - Attach to the output stream of a specific container instance in a specified resource group and container group. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. containerGroupName - The name of the container group. containerName - The name of the container instance. options - ContainersClientAttachOptions contains the optional parameters for the ContainersClient.Attach method.

Example

x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2021-10-01/examples/ContainerAttach.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerinstance/armcontainerinstance"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armcontainerinstance.NewContainersClient("<subscription-id>", cred, nil)
	res, err := client.Attach(ctx,
		"<resource-group-name>",
		"<container-group-name>",
		"<container-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ContainersClientAttachResult)
}
Output:

func (*ContainersClient) ExecuteCommand

func (client *ContainersClient) ExecuteCommand(ctx context.Context, resourceGroupName string, containerGroupName string, containerName string, containerExecRequest ContainerExecRequest, options *ContainersClientExecuteCommandOptions) (ContainersClientExecuteCommandResponse, error)

ExecuteCommand - Executes a command for a specific container instance in a specified resource group and container group. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. containerGroupName - The name of the container group. containerName - The name of the container instance. containerExecRequest - The request for the exec command. options - ContainersClientExecuteCommandOptions contains the optional parameters for the ContainersClient.ExecuteCommand method.

Example

x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2021-10-01/examples/ContainerExec.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerinstance/armcontainerinstance"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armcontainerinstance.NewContainersClient("<subscription-id>", cred, nil)
	res, err := client.ExecuteCommand(ctx,
		"<resource-group-name>",
		"<container-group-name>",
		"<container-name>",
		armcontainerinstance.ContainerExecRequest{
			Command: to.StringPtr("<command>"),
			TerminalSize: &armcontainerinstance.ContainerExecRequestTerminalSize{
				Cols: to.Int32Ptr(12),
				Rows: to.Int32Ptr(12),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ContainersClientExecuteCommandResult)
}
Output:

func (*ContainersClient) ListLogs

func (client *ContainersClient) ListLogs(ctx context.Context, resourceGroupName string, containerGroupName string, containerName string, options *ContainersClientListLogsOptions) (ContainersClientListLogsResponse, error)

ListLogs - Get the logs for a specified container instance in a specified resource group and container group. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. containerGroupName - The name of the container group. containerName - The name of the container instance. options - ContainersClientListLogsOptions contains the optional parameters for the ContainersClient.ListLogs method.

Example

x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2021-10-01/examples/ContainerListLogs.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerinstance/armcontainerinstance"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armcontainerinstance.NewContainersClient("<subscription-id>", cred, nil)
	res, err := client.ListLogs(ctx,
		"<resource-group-name>",
		"<container-group-name>",
		"<container-name>",
		&armcontainerinstance.ContainersClientListLogsOptions{Tail: to.Int32Ptr(10),
			Timestamps: nil,
		})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ContainersClientListLogsResult)
}
Output:

type ContainersClientAttachOptions added in v0.2.0

type ContainersClientAttachOptions struct {
}

ContainersClientAttachOptions contains the optional parameters for the ContainersClient.Attach method.

type ContainersClientAttachResponse added in v0.2.0

type ContainersClientAttachResponse struct {
	ContainersClientAttachResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ContainersClientAttachResponse contains the response from method ContainersClient.Attach.

type ContainersClientAttachResult added in v0.2.0

type ContainersClientAttachResult struct {
	ContainerAttachResponse
}

ContainersClientAttachResult contains the result from method ContainersClient.Attach.

type ContainersClientExecuteCommandOptions added in v0.2.0

type ContainersClientExecuteCommandOptions struct {
}

ContainersClientExecuteCommandOptions contains the optional parameters for the ContainersClient.ExecuteCommand method.

type ContainersClientExecuteCommandResponse added in v0.2.0

type ContainersClientExecuteCommandResponse struct {
	ContainersClientExecuteCommandResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ContainersClientExecuteCommandResponse contains the response from method ContainersClient.ExecuteCommand.

type ContainersClientExecuteCommandResult added in v0.2.0

type ContainersClientExecuteCommandResult struct {
	ContainerExecResponse
}

ContainersClientExecuteCommandResult contains the result from method ContainersClient.ExecuteCommand.

type ContainersClientListLogsOptions added in v0.2.0

type ContainersClientListLogsOptions struct {
	// The number of lines to show from the tail of the container instance log. If not provided, all available logs are shown
	// up to 4mb.
	Tail *int32
	// If true, adds a timestamp at the beginning of every line of log output. If not provided, defaults to false.
	Timestamps *bool
}

ContainersClientListLogsOptions contains the optional parameters for the ContainersClient.ListLogs method.

type ContainersClientListLogsResponse added in v0.2.0

type ContainersClientListLogsResponse struct {
	ContainersClientListLogsResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ContainersClientListLogsResponse contains the response from method ContainersClient.ListLogs.

type ContainersClientListLogsResult added in v0.2.0

type ContainersClientListLogsResult struct {
	Logs
}

ContainersClientListLogsResult contains the result from method ContainersClient.ListLogs.

type DNSConfiguration

type DNSConfiguration struct {
	// REQUIRED; The DNS servers for the container group.
	NameServers []*string `json:"nameServers,omitempty"`

	// The DNS options for the container group.
	Options *string `json:"options,omitempty"`

	// The DNS search domains for hostname lookup in the container group.
	SearchDomains *string `json:"searchDomains,omitempty"`
}

DNSConfiguration - DNS configuration for the container group.

func (DNSConfiguration) MarshalJSON

func (d DNSConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DNSConfiguration.

type DNSNameLabelReusePolicy added in v0.2.0

type DNSNameLabelReusePolicy string

DNSNameLabelReusePolicy - The value representing the security enum.

const (
	DNSNameLabelReusePolicyNoreuse            DNSNameLabelReusePolicy = "Noreuse"
	DNSNameLabelReusePolicyResourceGroupReuse DNSNameLabelReusePolicy = "ResourceGroupReuse"
	DNSNameLabelReusePolicySubscriptionReuse  DNSNameLabelReusePolicy = "SubscriptionReuse"
	DNSNameLabelReusePolicyTenantReuse        DNSNameLabelReusePolicy = "TenantReuse"
	DNSNameLabelReusePolicyUnsecure           DNSNameLabelReusePolicy = "Unsecure"
)

func PossibleDNSNameLabelReusePolicyValues added in v0.2.0

func PossibleDNSNameLabelReusePolicyValues() []DNSNameLabelReusePolicy

PossibleDNSNameLabelReusePolicyValues returns the possible values for the DNSNameLabelReusePolicy const type.

func (DNSNameLabelReusePolicy) ToPtr added in v0.2.0

ToPtr returns a *DNSNameLabelReusePolicy pointing to the current value.

type EncryptionProperties

type EncryptionProperties struct {
	// REQUIRED; The encryption key name.
	KeyName *string `json:"keyName,omitempty"`

	// REQUIRED; The encryption key version.
	KeyVersion *string `json:"keyVersion,omitempty"`

	// REQUIRED; The keyvault base url.
	VaultBaseURL *string `json:"vaultBaseUrl,omitempty"`
}

EncryptionProperties - The container group encryption properties.

type EnvironmentVariable

type EnvironmentVariable struct {
	// REQUIRED; The name of the environment variable.
	Name *string `json:"name,omitempty"`

	// The value of the secure environment variable.
	SecureValue *string `json:"secureValue,omitempty"`

	// The value of the environment variable.
	Value *string `json:"value,omitempty"`
}

EnvironmentVariable - The environment variable to set within the container instance.

type Event

type Event struct {
	// READ-ONLY; The count of the event.
	Count *int32 `json:"count,omitempty" azure:"ro"`

	// READ-ONLY; The date-time of the earliest logged event.
	FirstTimestamp *time.Time `json:"firstTimestamp,omitempty" azure:"ro"`

	// READ-ONLY; The date-time of the latest logged event.
	LastTimestamp *time.Time `json:"lastTimestamp,omitempty" azure:"ro"`

	// READ-ONLY; The event message.
	Message *string `json:"message,omitempty" azure:"ro"`

	// READ-ONLY; The event name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The event type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

Event - A container group or container instance event.

func (Event) MarshalJSON

func (e Event) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Event.

func (*Event) UnmarshalJSON

func (e *Event) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Event.

type GitRepoVolume

type GitRepoVolume struct {
	// REQUIRED; Repository URL
	Repository *string `json:"repository,omitempty"`

	// Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository.
	// Otherwise, if specified, the volume will contain the git repository in
	// the subdirectory with the given name.
	Directory *string `json:"directory,omitempty"`

	// Commit hash for the specified revision.
	Revision *string `json:"revision,omitempty"`
}

GitRepoVolume - Represents a volume that is populated with the contents of a git repository

type GpuResource

type GpuResource struct {
	// REQUIRED; The count of the GPU resource.
	Count *int32 `json:"count,omitempty"`

	// REQUIRED; The SKU of the GPU resource.
	SKU *GpuSKU `json:"sku,omitempty"`
}

GpuResource - The GPU resource.

type GpuSKU

type GpuSKU string

GpuSKU - The SKU of the GPU resource.

const (
	GpuSKUK80  GpuSKU = "K80"
	GpuSKUP100 GpuSKU = "P100"
	GpuSKUV100 GpuSKU = "V100"
)

func PossibleGpuSKUValues

func PossibleGpuSKUValues() []GpuSKU

PossibleGpuSKUValues returns the possible values for the GpuSKU const type.

func (GpuSKU) ToPtr

func (c GpuSKU) ToPtr() *GpuSKU

ToPtr returns a *GpuSKU pointing to the current value.

type HTTPHeader

type HTTPHeader struct {
	// The header name.
	Name *string `json:"name,omitempty"`

	// The header value.
	Value *string `json:"value,omitempty"`
}

HTTPHeader - The HTTP header.

type IPAddress

type IPAddress struct {
	// REQUIRED; The list of ports exposed on the container group.
	Ports []*Port `json:"ports,omitempty"`

	// REQUIRED; Specifies if the IP is exposed to the public internet or private VNET.
	Type *ContainerGroupIPAddressType `json:"type,omitempty"`

	// The Dns name label for the IP.
	DNSNameLabel *string `json:"dnsNameLabel,omitempty"`

	// The value representing the security enum.
	DNSNameLabelReusePolicy *DNSNameLabelReusePolicy `json:"dnsNameLabelReusePolicy,omitempty"`

	// The IP exposed to the public internet.
	IP *string `json:"ip,omitempty"`

	// READ-ONLY; The FQDN for the IP.
	Fqdn *string `json:"fqdn,omitempty" azure:"ro"`
}

IPAddress - IP address for the container group.

func (IPAddress) MarshalJSON

func (i IPAddress) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IPAddress.

type ImageRegistryCredential

type ImageRegistryCredential struct {
	// REQUIRED; The Docker image registry server without a protocol such as "http" and "https".
	Server *string `json:"server,omitempty"`

	// REQUIRED; The username for the private registry.
	Username *string `json:"username,omitempty"`

	// The identity for the private registry.
	Identity *string `json:"identity,omitempty"`

	// The identity URL for the private registry.
	IdentityURL *string `json:"identityUrl,omitempty"`

	// The password for the private registry.
	Password *string `json:"password,omitempty"`
}

ImageRegistryCredential - Image registry credential.

type InitContainerDefinition

type InitContainerDefinition struct {
	// REQUIRED; The name for the init container.
	Name *string `json:"name,omitempty"`

	// REQUIRED; The properties for the init container.
	Properties *InitContainerPropertiesDefinition `json:"properties,omitempty"`
}

InitContainerDefinition - The init container definition.

type InitContainerPropertiesDefinition

type InitContainerPropertiesDefinition struct {
	// The command to execute within the init container in exec form.
	Command []*string `json:"command,omitempty"`

	// The environment variables to set in the init container.
	EnvironmentVariables []*EnvironmentVariable `json:"environmentVariables,omitempty"`

	// The image of the init container.
	Image *string `json:"image,omitempty"`

	// The volume mounts available to the init container.
	VolumeMounts []*VolumeMount `json:"volumeMounts,omitempty"`

	// READ-ONLY; The instance view of the init container. Only valid in response.
	InstanceView *InitContainerPropertiesDefinitionInstanceView `json:"instanceView,omitempty" azure:"ro"`
}

InitContainerPropertiesDefinition - The init container definition properties.

func (InitContainerPropertiesDefinition) MarshalJSON

func (i InitContainerPropertiesDefinition) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type InitContainerPropertiesDefinition.

type InitContainerPropertiesDefinitionInstanceView

type InitContainerPropertiesDefinitionInstanceView struct {
	// READ-ONLY; The current state of the init container.
	CurrentState *ContainerState `json:"currentState,omitempty" azure:"ro"`

	// READ-ONLY; The events of the init container.
	Events []*Event `json:"events,omitempty" azure:"ro"`

	// READ-ONLY; The previous state of the init container.
	PreviousState *ContainerState `json:"previousState,omitempty" azure:"ro"`

	// READ-ONLY; The number of times that the init container has been restarted.
	RestartCount *int32 `json:"restartCount,omitempty" azure:"ro"`
}

InitContainerPropertiesDefinitionInstanceView - The instance view of the init container. Only valid in response.

func (InitContainerPropertiesDefinitionInstanceView) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type InitContainerPropertiesDefinitionInstanceView.

type LocationClient

type LocationClient struct {
	// contains filtered or unexported fields
}

LocationClient contains the methods for the Location group. Don't use this type directly, use NewLocationClient() instead.

func NewLocationClient

func NewLocationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *LocationClient

NewLocationClient creates a new instance of LocationClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*LocationClient) ListCachedImages

ListCachedImages - Get the list of cached images on specific OS type for a subscription in a region. If the operation fails it returns an *azcore.ResponseError type. location - The identifier for the physical azure location. options - LocationClientListCachedImagesOptions contains the optional parameters for the LocationClient.ListCachedImages method.

Example

x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2021-10-01/examples/CachedImagesList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerinstance/armcontainerinstance"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armcontainerinstance.NewLocationClient("<subscription-id>", cred, nil)
	pager := client.ListCachedImages("<location>",
		nil)
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*LocationClient) ListCapabilities

ListCapabilities - Get the list of CPU/memory/GPU capabilities of a region. If the operation fails it returns an *azcore.ResponseError type. location - The identifier for the physical azure location. options - LocationClientListCapabilitiesOptions contains the optional parameters for the LocationClient.ListCapabilities method.

Example

x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2021-10-01/examples/CapabilitiesList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerinstance/armcontainerinstance"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armcontainerinstance.NewLocationClient("<subscription-id>", cred, nil)
	pager := client.ListCapabilities("<location>",
		nil)
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*LocationClient) ListUsage

ListUsage - Get the usage for a subscription If the operation fails it returns an *azcore.ResponseError type. location - The identifier for the physical azure location. options - LocationClientListUsageOptions contains the optional parameters for the LocationClient.ListUsage method.

Example

x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2021-10-01/examples/ContainerGroupUsage.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerinstance/armcontainerinstance"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armcontainerinstance.NewLocationClient("<subscription-id>", cred, nil)
	res, err := client.ListUsage(ctx,
		"<location>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.LocationClientListUsageResult)
}
Output:

type LocationClientListCachedImagesOptions added in v0.2.0

type LocationClientListCachedImagesOptions struct {
}

LocationClientListCachedImagesOptions contains the optional parameters for the LocationClient.ListCachedImages method.

type LocationClientListCachedImagesPager added in v0.2.0

type LocationClientListCachedImagesPager struct {
	// contains filtered or unexported fields
}

LocationClientListCachedImagesPager provides operations for iterating over paged responses.

func (*LocationClientListCachedImagesPager) Err added in v0.2.0

Err returns the last error encountered while paging.

func (*LocationClientListCachedImagesPager) NextPage added in v0.2.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*LocationClientListCachedImagesPager) PageResponse added in v0.2.0

PageResponse returns the current LocationClientListCachedImagesResponse page.

type LocationClientListCachedImagesResponse added in v0.2.0

type LocationClientListCachedImagesResponse struct {
	LocationClientListCachedImagesResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

LocationClientListCachedImagesResponse contains the response from method LocationClient.ListCachedImages.

type LocationClientListCachedImagesResult added in v0.2.0

type LocationClientListCachedImagesResult struct {
	CachedImagesListResult
}

LocationClientListCachedImagesResult contains the result from method LocationClient.ListCachedImages.

type LocationClientListCapabilitiesOptions added in v0.2.0

type LocationClientListCapabilitiesOptions struct {
}

LocationClientListCapabilitiesOptions contains the optional parameters for the LocationClient.ListCapabilities method.

type LocationClientListCapabilitiesPager added in v0.2.0

type LocationClientListCapabilitiesPager struct {
	// contains filtered or unexported fields
}

LocationClientListCapabilitiesPager provides operations for iterating over paged responses.

func (*LocationClientListCapabilitiesPager) Err added in v0.2.0

Err returns the last error encountered while paging.

func (*LocationClientListCapabilitiesPager) NextPage added in v0.2.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*LocationClientListCapabilitiesPager) PageResponse added in v0.2.0

PageResponse returns the current LocationClientListCapabilitiesResponse page.

type LocationClientListCapabilitiesResponse added in v0.2.0

type LocationClientListCapabilitiesResponse struct {
	LocationClientListCapabilitiesResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

LocationClientListCapabilitiesResponse contains the response from method LocationClient.ListCapabilities.

type LocationClientListCapabilitiesResult added in v0.2.0

type LocationClientListCapabilitiesResult struct {
	CapabilitiesListResult
}

LocationClientListCapabilitiesResult contains the result from method LocationClient.ListCapabilities.

type LocationClientListUsageOptions added in v0.2.0

type LocationClientListUsageOptions struct {
}

LocationClientListUsageOptions contains the optional parameters for the LocationClient.ListUsage method.

type LocationClientListUsageResponse added in v0.2.0

type LocationClientListUsageResponse struct {
	LocationClientListUsageResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

LocationClientListUsageResponse contains the response from method LocationClient.ListUsage.

type LocationClientListUsageResult added in v0.2.0

type LocationClientListUsageResult struct {
	UsageListResult
}

LocationClientListUsageResult contains the result from method LocationClient.ListUsage.

type LogAnalytics

type LogAnalytics struct {
	// REQUIRED; The workspace id for log analytics
	WorkspaceID *string `json:"workspaceId,omitempty"`

	// REQUIRED; The workspace key for log analytics
	WorkspaceKey *string `json:"workspaceKey,omitempty"`

	// The log type to be used.
	LogType *LogAnalyticsLogType `json:"logType,omitempty"`

	// Metadata for log analytics.
	Metadata map[string]*string `json:"metadata,omitempty"`

	// The workspace resource id for log analytics
	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
}

LogAnalytics - Container group log analytics information.

func (LogAnalytics) MarshalJSON

func (l LogAnalytics) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LogAnalytics.

type LogAnalyticsLogType

type LogAnalyticsLogType string

LogAnalyticsLogType - The log type to be used.

const (
	LogAnalyticsLogTypeContainerInsights     LogAnalyticsLogType = "ContainerInsights"
	LogAnalyticsLogTypeContainerInstanceLogs LogAnalyticsLogType = "ContainerInstanceLogs"
)

func PossibleLogAnalyticsLogTypeValues

func PossibleLogAnalyticsLogTypeValues() []LogAnalyticsLogType

PossibleLogAnalyticsLogTypeValues returns the possible values for the LogAnalyticsLogType const type.

func (LogAnalyticsLogType) ToPtr

ToPtr returns a *LogAnalyticsLogType pointing to the current value.

type Logs

type Logs struct {
	// The content of the log.
	Content *string `json:"content,omitempty"`
}

Logs - The logs.

type OperatingSystemTypes

type OperatingSystemTypes string

OperatingSystemTypes - The operating system type required by the containers in the container group.

const (
	OperatingSystemTypesLinux   OperatingSystemTypes = "Linux"
	OperatingSystemTypesWindows OperatingSystemTypes = "Windows"
)

func PossibleOperatingSystemTypesValues

func PossibleOperatingSystemTypesValues() []OperatingSystemTypes

PossibleOperatingSystemTypesValues returns the possible values for the OperatingSystemTypes const type.

func (OperatingSystemTypes) ToPtr

ToPtr returns a *OperatingSystemTypes pointing to the current value.

type Operation

type Operation struct {
	// REQUIRED; The display information of the operation.
	Display *OperationDisplay `json:"display,omitempty"`

	// REQUIRED; The name of the operation.
	Name *string `json:"name,omitempty"`

	// The intended executor of the operation.
	Origin *ContainerInstanceOperationsOrigin `json:"origin,omitempty"`

	// The additional properties.
	Properties map[string]interface{} `json:"properties,omitempty"`
}

Operation - An operation for Azure Container Instance service.

type OperationDisplay

type OperationDisplay struct {
	// The description of the operation.
	Description *string `json:"description,omitempty"`

	// The friendly name of the operation.
	Operation *string `json:"operation,omitempty"`

	// The name of the provider of the operation.
	Provider *string `json:"provider,omitempty"`

	// The name of the resource type of the operation.
	Resource *string `json:"resource,omitempty"`
}

OperationDisplay - The display information of the operation.

type OperationListResult

type OperationListResult struct {
	// The URI to fetch the next page of operations.
	NextLink *string `json:"nextLink,omitempty"`

	// The list of operations.
	Value []*Operation `json:"value,omitempty"`
}

OperationListResult - The operation list response that contains all operations for Azure Container Instance service.

func (OperationListResult) MarshalJSON

func (o OperationListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

type OperationsClient

type OperationsClient struct {
	// contains filtered or unexported fields
}

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) *OperationsClient

NewOperationsClient creates a new instance of OperationsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*OperationsClient) List

List - List the operations for Azure Container Instance service. If the operation fails it returns an *azcore.ResponseError type. options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

Example

x-ms-original-file: specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2021-10-01/examples/OperationsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerinstance/armcontainerinstance"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armcontainerinstance.NewOperationsClient(cred, nil)
	pager := client.List(nil)
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type OperationsClientListOptions added in v0.2.0

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

type OperationsClientListPager added in v0.2.0

type OperationsClientListPager struct {
	// contains filtered or unexported fields
}

OperationsClientListPager provides operations for iterating over paged responses.

func (*OperationsClientListPager) Err added in v0.2.0

Err returns the last error encountered while paging.

func (*OperationsClientListPager) NextPage added in v0.2.0

func (p *OperationsClientListPager) NextPage(ctx context.Context) bool

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*OperationsClientListPager) PageResponse added in v0.2.0

PageResponse returns the current OperationsClientListResponse page.

type OperationsClientListResponse added in v0.2.0

type OperationsClientListResponse struct {
	OperationsClientListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

OperationsClientListResponse contains the response from method OperationsClient.List.

type OperationsClientListResult added in v0.2.0

type OperationsClientListResult struct {
	OperationListResult
}

OperationsClientListResult contains the result from method OperationsClient.List.

type Port

type Port struct {
	// REQUIRED; The port number.
	Port *int32 `json:"port,omitempty"`

	// The protocol associated with the port.
	Protocol *ContainerGroupNetworkProtocol `json:"protocol,omitempty"`
}

Port - The port exposed on the container group.

type Resource

type Resource struct {
	// The resource location.
	Location *string `json:"location,omitempty"`

	// The resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// The zones for the container group.
	Zones []*string `json:"zones,omitempty"`

	// READ-ONLY; The resource id.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The resource name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The resource type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

Resource - The Resource model definition.

func (Resource) MarshalJSON

func (r Resource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Resource.

type ResourceIdentityType

type ResourceIdentityType string

ResourceIdentityType - The type of identity used for the container group. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the container group.

const (
	ResourceIdentityTypeSystemAssigned             ResourceIdentityType = "SystemAssigned"
	ResourceIdentityTypeUserAssigned               ResourceIdentityType = "UserAssigned"
	ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned"
	ResourceIdentityTypeNone                       ResourceIdentityType = "None"
)

func PossibleResourceIdentityTypeValues

func PossibleResourceIdentityTypeValues() []ResourceIdentityType

PossibleResourceIdentityTypeValues returns the possible values for the ResourceIdentityType const type.

func (ResourceIdentityType) ToPtr

ToPtr returns a *ResourceIdentityType pointing to the current value.

type ResourceLimits

type ResourceLimits struct {
	// The CPU limit of this container instance.
	CPU *float64 `json:"cpu,omitempty"`

	// The GPU limit of this container instance.
	Gpu *GpuResource `json:"gpu,omitempty"`

	// The memory limit in GB of this container instance.
	MemoryInGB *float64 `json:"memoryInGB,omitempty"`
}

ResourceLimits - The resource limits.

type ResourceRequests

type ResourceRequests struct {
	// REQUIRED; The CPU request of this container instance.
	CPU *float64 `json:"cpu,omitempty"`

	// REQUIRED; The memory request in GB of this container instance.
	MemoryInGB *float64 `json:"memoryInGB,omitempty"`

	// The GPU request of this container instance.
	Gpu *GpuResource `json:"gpu,omitempty"`
}

ResourceRequests - The resource requests.

type ResourceRequirements

type ResourceRequirements struct {
	// REQUIRED; The resource requests of this container instance.
	Requests *ResourceRequests `json:"requests,omitempty"`

	// The resource limits of this container instance.
	Limits *ResourceLimits `json:"limits,omitempty"`
}

ResourceRequirements - The resource requirements.

type Scheme

type Scheme string

Scheme - The scheme.

const (
	SchemeHTTP  Scheme = "http"
	SchemeHTTPS Scheme = "https"
)

func PossibleSchemeValues

func PossibleSchemeValues() []Scheme

PossibleSchemeValues returns the possible values for the Scheme const type.

func (Scheme) ToPtr

func (c Scheme) ToPtr() *Scheme

ToPtr returns a *Scheme pointing to the current value.

type Usage

type Usage struct {
	// READ-ONLY; The current usage of the resource
	CurrentValue *int32 `json:"currentValue,omitempty" azure:"ro"`

	// READ-ONLY; The maximum permitted usage of the resource.
	Limit *int32 `json:"limit,omitempty" azure:"ro"`

	// READ-ONLY; The name object of the resource
	Name *UsageName `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Unit of the usage result
	Unit *string `json:"unit,omitempty" azure:"ro"`
}

Usage - A single usage result

type UsageListResult

type UsageListResult struct {
	// READ-ONLY; The usage data.
	Value []*Usage `json:"value,omitempty" azure:"ro"`
}

UsageListResult - The response containing the usage data

func (UsageListResult) MarshalJSON

func (u UsageListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UsageListResult.

type UsageName

type UsageName struct {
	// READ-ONLY; The localized name of the resource
	LocalizedValue *string `json:"localizedValue,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Value *string `json:"value,omitempty" azure:"ro"`
}

UsageName - The name object of the resource

type Volume

type Volume struct {
	// REQUIRED; The name of the volume.
	Name *string `json:"name,omitempty"`

	// The Azure File volume.
	AzureFile *AzureFileVolume `json:"azureFile,omitempty"`

	// The empty directory volume.
	EmptyDir map[string]interface{} `json:"emptyDir,omitempty"`

	// The git repo volume.
	GitRepo *GitRepoVolume `json:"gitRepo,omitempty"`

	// The secret volume.
	Secret map[string]*string `json:"secret,omitempty"`
}

Volume - The properties of the volume.

func (Volume) MarshalJSON

func (v Volume) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Volume.

type VolumeMount

type VolumeMount struct {
	// REQUIRED; The path within the container where the volume should be mounted. Must not contain colon (:).
	MountPath *string `json:"mountPath,omitempty"`

	// REQUIRED; The name of the volume mount.
	Name *string `json:"name,omitempty"`

	// The flag indicating whether the volume mount is read-only.
	ReadOnly *bool `json:"readOnly,omitempty"`
}

VolumeMount - The properties of the volume mount.

Jump to

Keyboard shortcuts

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