Documentation
¶
Index ¶
- type ActionType
- type ClientFactory
- type CreatedByType
- type ExecutionPoint
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type Origin
- type PostScriptAction
- type PreparedImageSpecification
- type PreparedImageSpecificationListResult
- type PreparedImageSpecificationManagedIdentityProfile
- type PreparedImageSpecificationPatch
- type PreparedImageSpecificationProperties
- type PreparedImageSpecificationScript
- type PreparedImageSpecificationVersion
- type PreparedImageSpecificationVersionListResult
- type PreparedImageSpecificationsClient
- func (client *PreparedImageSpecificationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, ...) (*runtime.Poller[PreparedImageSpecificationsClientCreateOrUpdateResponse], ...)
- func (client *PreparedImageSpecificationsClient) BeginDelete(ctx context.Context, resourceGroupName string, ...) (*runtime.Poller[PreparedImageSpecificationsClientDeleteResponse], error)
- func (client *PreparedImageSpecificationsClient) BeginDeleteVersion(ctx context.Context, resourceGroupName string, ...) (*runtime.Poller[PreparedImageSpecificationsClientDeleteVersionResponse], error)
- func (client *PreparedImageSpecificationsClient) Get(ctx context.Context, resourceGroupName string, ...) (PreparedImageSpecificationsClientGetResponse, error)
- func (client *PreparedImageSpecificationsClient) GetVersion(ctx context.Context, resourceGroupName string, ...) (PreparedImageSpecificationsClientGetVersionResponse, error)
- func (client *PreparedImageSpecificationsClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[PreparedImageSpecificationsClientListByResourceGroupResponse]
- func (client *PreparedImageSpecificationsClient) NewListBySubscriptionPager(options *PreparedImageSpecificationsClientListBySubscriptionOptions) *runtime.Pager[PreparedImageSpecificationsClientListBySubscriptionResponse]
- func (client *PreparedImageSpecificationsClient) NewListVersionsPager(resourceGroupName string, preparedImageSpecificationName string, ...) *runtime.Pager[PreparedImageSpecificationsClientListVersionsResponse]
- func (client *PreparedImageSpecificationsClient) Update(ctx context.Context, resourceGroupName string, ...) (PreparedImageSpecificationsClientUpdateResponse, error)
- type PreparedImageSpecificationsClientBeginCreateOrUpdateOptions
- type PreparedImageSpecificationsClientBeginDeleteOptions
- type PreparedImageSpecificationsClientBeginDeleteVersionOptions
- type PreparedImageSpecificationsClientCreateOrUpdateResponse
- type PreparedImageSpecificationsClientDeleteResponse
- type PreparedImageSpecificationsClientDeleteVersionResponse
- type PreparedImageSpecificationsClientGetOptions
- type PreparedImageSpecificationsClientGetResponse
- type PreparedImageSpecificationsClientGetVersionOptions
- type PreparedImageSpecificationsClientGetVersionResponse
- type PreparedImageSpecificationsClientListByResourceGroupOptions
- type PreparedImageSpecificationsClientListByResourceGroupResponse
- type PreparedImageSpecificationsClientListBySubscriptionOptions
- type PreparedImageSpecificationsClientListBySubscriptionResponse
- type PreparedImageSpecificationsClientListVersionsOptions
- type PreparedImageSpecificationsClientListVersionsResponse
- type PreparedImageSpecificationsClientUpdateOptions
- type PreparedImageSpecificationsClientUpdateResponse
- type ProvisioningState
- type ScriptType
- type SystemData
Examples ¶
- OperationsClient.NewListPager
- PreparedImageSpecificationsClient.BeginCreateOrUpdate
- PreparedImageSpecificationsClient.BeginDelete
- PreparedImageSpecificationsClient.BeginDeleteVersion
- PreparedImageSpecificationsClient.Get
- PreparedImageSpecificationsClient.GetVersion
- PreparedImageSpecificationsClient.NewListByResourceGroupPager
- PreparedImageSpecificationsClient.NewListBySubscriptionPager
- PreparedImageSpecificationsClient.NewListVersionsPager
- PreparedImageSpecificationsClient.Update
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionType ¶
type ActionType string
ActionType - Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
const ( // ActionTypeInternal - Actions are for internal-only APIs. ActionTypeInternal ActionType = "Internal" )
func PossibleActionTypeValues ¶
func PossibleActionTypeValues() []ActionType
PossibleActionTypeValues returns the possible values for the ActionType const type.
type ClientFactory ¶
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewOperationsClient ¶
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewPreparedImageSpecificationsClient ¶
func (c *ClientFactory) NewPreparedImageSpecificationsClient() *PreparedImageSpecificationsClient
NewPreparedImageSpecificationsClient creates a new instance of PreparedImageSpecificationsClient.
type CreatedByType ¶
type CreatedByType string
CreatedByType - The kind of entity that created the resource.
const ( // CreatedByTypeApplication - The entity was created by an application. CreatedByTypeApplication CreatedByType = "Application" // CreatedByTypeKey - The entity was created by a key. CreatedByTypeKey CreatedByType = "Key" // CreatedByTypeManagedIdentity - The entity was created by a managed identity. CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" // CreatedByTypeUser - The entity was created by a user. CreatedByTypeUser CreatedByType = "User" )
func PossibleCreatedByTypeValues ¶
func PossibleCreatedByTypeValues() []CreatedByType
PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
type ExecutionPoint ¶
type ExecutionPoint string
ExecutionPoint - The execution point for the script.
const ( // ExecutionPointNodeImageBuildTime - Execute during node image build time. ExecutionPointNodeImageBuildTime ExecutionPoint = "NodeImageBuildTime" // ExecutionPointNodeProvisionTime - Execute during node provisioning time. ExecutionPointNodeProvisionTime ExecutionPoint = "NodeProvisionTime" )
func PossibleExecutionPointValues ¶
func PossibleExecutionPointValues() []ExecutionPoint
PossibleExecutionPointValues returns the possible values for the ExecutionPoint const type.
type Operation ¶
type Operation struct {
// Localized display information for this particular operation.
Display *OperationDisplay
// READ-ONLY; Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
ActionType *ActionType
// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure
// Resource Manager/control-plane operations.
IsDataAction *bool
// READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write",
// "Microsoft.Compute/virtualMachines/capture/action"
Name *string
// READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
// value is "user,system"
Origin *Origin
}
Operation - REST API Operation
Details of a REST API operation, returned from the Resource Provider Operations API
func (Operation) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Operation.
type OperationDisplay ¶
type OperationDisplay struct {
// READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views.
Description *string
// READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual
// Machine", "Restart Virtual Machine".
Operation *string
// READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft
// Compute".
Provider *string
// READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job
// Schedule Collections".
Resource *string
}
OperationDisplay - Localized display information for an operation.
func (OperationDisplay) MarshalJSON ¶
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶
func (o *OperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.
type OperationListResult ¶
type OperationListResult struct {
// REQUIRED; The Operation items on this page
Value []*Operation
// The link to the next page of items
NextLink *string
}
OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
func (OperationListResult) MarshalJSON ¶
func (o OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationListResult.
func (*OperationListResult) UnmarshalJSON ¶
func (o *OperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller 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.
Generated from API version 2026-02-02-preview
func NewOperationsClient ¶
func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)
NewOperationsClient creates a new instance of OperationsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - Contains optional client configuration. Pass nil to accept the default values.
func (*OperationsClient) NewListPager ¶
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - List the operations for the provider
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example ¶
Generated from example definition: 2026-02-02-preview/Operations_List.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservicepreparedimgspec/armcontainerservicepreparedimgspec"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservicepreparedimgspec.NewClientFactory("", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewOperationsClient().NewListPager(nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page = armcontainerservicepreparedimgspec.OperationsClientListResponse{
// OperationListResult: armcontainerservicepreparedimgspec.OperationListResult{
// Value: []*armcontainerservicepreparedimgspec.Operation{
// {
// Name: to.Ptr("Microsoft.ContainerService/locations/operations/read"),
// IsDataAction: to.Ptr(true),
// Display: &armcontainerservicepreparedimgspec.OperationDisplay{
// Provider: to.Ptr("Microsoft Container Service"),
// Resource: to.Ptr("Operation"),
// Operation: to.Ptr("Get Operation"),
// Description: to.Ptr("tulzcjyupeonkxrou"),
// },
// Origin: to.Ptr(armcontainerservicepreparedimgspec.OriginUser),
// ActionType: to.Ptr(armcontainerservicepreparedimgspec.ActionTypeInternal),
// },
// },
// NextLink: to.Ptr("http://nextlink.contoso.com"),
// },
// }
}
}
Output:
type OperationsClientListOptions ¶
type OperationsClientListOptions struct {
}
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶
type OperationsClientListResponse struct {
// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
OperationListResult
}
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type Origin ¶
type Origin string
Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"
const ( // OriginSystem - Indicates the operation is initiated by a system. OriginSystem Origin = "system" // OriginUser - Indicates the operation is initiated by a user. OriginUser Origin = "user" // OriginUserSystem - Indicates the operation is initiated by a user or system. OriginUserSystem Origin = "user,system" )
func PossibleOriginValues ¶
func PossibleOriginValues() []Origin
PossibleOriginValues returns the possible values for the Origin const type.
type PostScriptAction ¶
type PostScriptAction string
PostScriptAction - The action to take after the script finishes successfully.
const ( // PostScriptActionNone - No post-script action is taken. PostScriptActionNone PostScriptAction = "None" // PostScriptActionRebootAfter - Reboot the node after the script completes. PostScriptActionRebootAfter PostScriptAction = "RebootAfter" )
func PossiblePostScriptActionValues ¶
func PossiblePostScriptActionValues() []PostScriptAction
PossiblePostScriptActionValues returns the possible values for the PostScriptAction const type.
type PreparedImageSpecification ¶
type PreparedImageSpecification struct {
// REQUIRED; The geo-location where the resource lives
Location *string
// The resource-specific properties for this resource.
Properties *PreparedImageSpecificationProperties
// Resource tags.
Tags map[string]*string
// READ-ONLY; If eTag is provided in the response body, it may also be provided as a header per the normal etag convention.
// Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in
// the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header
// fields.
ETag *string
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
PreparedImageSpecification - The Prepared Image Specification resource.
func (PreparedImageSpecification) MarshalJSON ¶
func (p PreparedImageSpecification) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PreparedImageSpecification.
func (*PreparedImageSpecification) UnmarshalJSON ¶
func (p *PreparedImageSpecification) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PreparedImageSpecification.
type PreparedImageSpecificationListResult ¶
type PreparedImageSpecificationListResult struct {
// REQUIRED; The PreparedImageSpecification items on this page
Value []*PreparedImageSpecification
// The link to the next page of items
NextLink *string
}
PreparedImageSpecificationListResult - The response of a PreparedImageSpecification list operation.
func (PreparedImageSpecificationListResult) MarshalJSON ¶
func (p PreparedImageSpecificationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PreparedImageSpecificationListResult.
func (*PreparedImageSpecificationListResult) UnmarshalJSON ¶
func (p *PreparedImageSpecificationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PreparedImageSpecificationListResult.
type PreparedImageSpecificationManagedIdentityProfile ¶
type PreparedImageSpecificationManagedIdentityProfile struct {
// REQUIRED; The resource ID of the user-assigned managed identity.
ResourceID *string
// READ-ONLY; The client ID of the managed identity.
ClientID *string
// READ-ONLY; The object ID of the managed identity.
ObjectID *string
}
PreparedImageSpecificationManagedIdentityProfile - The managed identity profile used by the prepared image specification.
func (PreparedImageSpecificationManagedIdentityProfile) MarshalJSON ¶
func (p PreparedImageSpecificationManagedIdentityProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PreparedImageSpecificationManagedIdentityProfile.
func (*PreparedImageSpecificationManagedIdentityProfile) UnmarshalJSON ¶
func (p *PreparedImageSpecificationManagedIdentityProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PreparedImageSpecificationManagedIdentityProfile.
type PreparedImageSpecificationPatch ¶
PreparedImageSpecificationPatch - Prepared image specification patch resource
func (PreparedImageSpecificationPatch) MarshalJSON ¶
func (p PreparedImageSpecificationPatch) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PreparedImageSpecificationPatch.
func (*PreparedImageSpecificationPatch) UnmarshalJSON ¶
func (p *PreparedImageSpecificationPatch) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PreparedImageSpecificationPatch.
type PreparedImageSpecificationProperties ¶
type PreparedImageSpecificationProperties struct {
// The list of container images to cache on nodes. See https://kubernetes.io/docs/concepts/containers/images/#image-names
ContainerImages []*string
// The scripts to customize the node before or after image capture.
CustomizationScripts []*PreparedImageSpecificationScript
// The identity used to execute prepared image specification tasks during image build time and provisioning time.
// If not specified the default agentpool identity will be used.
// This does not affect provisioned nodes.
IdentityProfile *PreparedImageSpecificationManagedIdentityProfile
// The client-provided version of the prepared image specification.
Version *string
// READ-ONLY; The provisioning state of the prepared image specification.
ProvisioningState *ProvisioningState
}
PreparedImageSpecificationProperties - The properties of the Prepared Image Specification resource.
func (PreparedImageSpecificationProperties) MarshalJSON ¶
func (p PreparedImageSpecificationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PreparedImageSpecificationProperties.
func (*PreparedImageSpecificationProperties) UnmarshalJSON ¶
func (p *PreparedImageSpecificationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PreparedImageSpecificationProperties.
type PreparedImageSpecificationScript ¶
type PreparedImageSpecificationScript struct {
// REQUIRED; The stage at which the script is executed.
// Specifying `NodeImageBuildTime` will ensure changes are persisted into the node image.
ExecutionPoint *ExecutionPoint
// REQUIRED; The name for the customization script.
// Must be unique within the prepared image specification resource.
// Can only contain lowercase alphanumeric,'-' or '.' characters.
Name *string
// REQUIRED; The runtime environment for the script (e.g. Bash).
ScriptType *ScriptType
// The action to take after successful script execution.
PostScriptAction *PostScriptAction
// The script content to be executed in plain text. Do not include secrets.
Script *string
}
PreparedImageSpecificationScript - Prepared image specification script
func (PreparedImageSpecificationScript) MarshalJSON ¶
func (p PreparedImageSpecificationScript) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PreparedImageSpecificationScript.
func (*PreparedImageSpecificationScript) UnmarshalJSON ¶
func (p *PreparedImageSpecificationScript) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PreparedImageSpecificationScript.
type PreparedImageSpecificationVersion ¶
type PreparedImageSpecificationVersion struct {
// The resource-specific properties for this resource.
Properties *PreparedImageSpecificationProperties
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
PreparedImageSpecificationVersion - A version of the Prepared Image Specification resource.
func (PreparedImageSpecificationVersion) MarshalJSON ¶
func (p PreparedImageSpecificationVersion) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PreparedImageSpecificationVersion.
func (*PreparedImageSpecificationVersion) UnmarshalJSON ¶
func (p *PreparedImageSpecificationVersion) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PreparedImageSpecificationVersion.
type PreparedImageSpecificationVersionListResult ¶
type PreparedImageSpecificationVersionListResult struct {
// REQUIRED; The PreparedImageSpecificationVersion items on this page
Value []*PreparedImageSpecificationVersion
// The link to the next page of items
NextLink *string
}
PreparedImageSpecificationVersionListResult - The response of a PreparedImageSpecificationVersion list operation.
func (PreparedImageSpecificationVersionListResult) MarshalJSON ¶
func (p PreparedImageSpecificationVersionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PreparedImageSpecificationVersionListResult.
func (*PreparedImageSpecificationVersionListResult) UnmarshalJSON ¶
func (p *PreparedImageSpecificationVersionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PreparedImageSpecificationVersionListResult.
type PreparedImageSpecificationsClient ¶
type PreparedImageSpecificationsClient struct {
// contains filtered or unexported fields
}
PreparedImageSpecificationsClient contains the methods for the PreparedImageSpecifications group. Don't use this type directly, use NewPreparedImageSpecificationsClient() instead.
Generated from API version 2026-02-02-preview
func NewPreparedImageSpecificationsClient ¶
func NewPreparedImageSpecificationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PreparedImageSpecificationsClient, error)
NewPreparedImageSpecificationsClient creates a new instance of PreparedImageSpecificationsClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - Contains optional client configuration. Pass nil to accept the default values.
func (*PreparedImageSpecificationsClient) BeginCreateOrUpdate ¶
func (client *PreparedImageSpecificationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, preparedImageSpecificationName string, resource PreparedImageSpecification, options *PreparedImageSpecificationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[PreparedImageSpecificationsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create or update a prepared image specification resource with a client-provided version. Created versions are immutable; provide a different properties.version value to create a new version. If the operation fails it returns an *azcore.ResponseError type.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- preparedImageSpecificationName - The name of the Prepared Image Specification resource.
- resource - Resource create parameters.
- options - PreparedImageSpecificationsClientBeginCreateOrUpdateOptions contains the optional parameters for the PreparedImageSpecificationsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: 2026-02-02-preview/PreparedImageSpecifications_CreateOrUpdate.json
package main
import (
"context"
"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/containerservicepreparedimgspec/armcontainerservicepreparedimgspec"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservicepreparedimgspec.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewPreparedImageSpecificationsClient().BeginCreateOrUpdate(ctx, "rg1", "my-prepared-image-specification", armcontainerservicepreparedimgspec.PreparedImageSpecification{
Properties: &armcontainerservicepreparedimgspec.PreparedImageSpecificationProperties{
Version: to.Ptr("20250101-abcd1234"),
ContainerImages: []*string{
to.Ptr("redis:8.0.0"),
},
CustomizationScripts: []*armcontainerservicepreparedimgspec.PreparedImageSpecificationScript{
{
Name: to.Ptr("initialize-node"),
ExecutionPoint: to.Ptr(armcontainerservicepreparedimgspec.ExecutionPointNodeImageBuildTime),
ScriptType: to.Ptr(armcontainerservicepreparedimgspec.ScriptTypeBash),
Script: to.Ptr("echo \"test prepared image specification\" > /var/log/test-node-customization.txt"),
},
},
IdentityProfile: &armcontainerservicepreparedimgspec.PreparedImageSpecificationManagedIdentityProfile{
ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"),
},
},
Tags: map[string]*string{
"team": to.Ptr("blue"),
},
Location: to.Ptr("westus2"),
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerservicepreparedimgspec.PreparedImageSpecificationsClientCreateOrUpdateResponse{
// PreparedImageSpecification: armcontainerservicepreparedimgspec.PreparedImageSpecification{
// Properties: &armcontainerservicepreparedimgspec.PreparedImageSpecificationProperties{
// ContainerImages: []*string{
// to.Ptr("redis:8.0.0"),
// },
// CustomizationScripts: []*armcontainerservicepreparedimgspec.PreparedImageSpecificationScript{
// {
// Name: to.Ptr("initialize-node"),
// ExecutionPoint: to.Ptr(armcontainerservicepreparedimgspec.ExecutionPointNodeImageBuildTime),
// ScriptType: to.Ptr(armcontainerservicepreparedimgspec.ScriptTypeBash),
// Script: to.Ptr("echo \"test prepared image specification\" > /var/log/test-node-customization.txt"),
// },
// },
// IdentityProfile: &armcontainerservicepreparedimgspec.PreparedImageSpecificationManagedIdentityProfile{
// ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"),
// ObjectID: to.Ptr("3fa85f64-5717-4562-b3fc-2c963f66afa6"),
// ClientID: to.Ptr("df4316d4-0ef3-45a3-99d0-2d13a6543aff"),
// },
// Version: to.Ptr("20250101-abcd1234"),
// ProvisioningState: to.Ptr(armcontainerservicepreparedimgspec.ProvisioningStateSucceeded),
// },
// ETag: to.Ptr("ETagValue"),
// Tags: map[string]*string{
// "team": to.Ptr("blue"),
// },
// Location: to.Ptr("westus2"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/preparedImageSpecifications/my-prepared-image-specification"),
// Name: to.Ptr("my-prepared-image-specification"),
// Type: to.Ptr("Microsoft.ContainerService/preparedImageSpecifications"),
// SystemData: &armcontainerservicepreparedimgspec.SystemData{
// CreatedBy: to.Ptr("someUser"),
// CreatedByType: to.Ptr(armcontainerservicepreparedimgspec.CreatedByTypeUser),
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-05-02T04:08:43.702Z"); return t}()),
// LastModifiedBy: to.Ptr("someOtherUser"),
// LastModifiedByType: to.Ptr(armcontainerservicepreparedimgspec.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-05-02T04:08:43.702Z"); return t}()),
// },
// },
// }
}
Output:
func (*PreparedImageSpecificationsClient) BeginDelete ¶
func (client *PreparedImageSpecificationsClient) BeginDelete(ctx context.Context, resourceGroupName string, preparedImageSpecificationName string, options *PreparedImageSpecificationsClientBeginDeleteOptions) (*runtime.Poller[PreparedImageSpecificationsClientDeleteResponse], error)
BeginDelete - Delete a prepared image specification. This operation will be blocked if the resource is in use. If the operation fails it returns an *azcore.ResponseError type.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- preparedImageSpecificationName - The name of the Prepared Image Specification resource.
- options - PreparedImageSpecificationsClientBeginDeleteOptions contains the optional parameters for the PreparedImageSpecificationsClient.BeginDelete method.
Example ¶
Generated from example definition: 2026-02-02-preview/PreparedImageSpecifications_Delete.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservicepreparedimgspec/armcontainerservicepreparedimgspec"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservicepreparedimgspec.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewPreparedImageSpecificationsClient().BeginDelete(ctx, "rg1", "my-prepared-image-specification", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
}
Output:
func (*PreparedImageSpecificationsClient) BeginDeleteVersion ¶
func (client *PreparedImageSpecificationsClient) BeginDeleteVersion(ctx context.Context, resourceGroupName string, preparedImageSpecificationName string, version string, options *PreparedImageSpecificationsClientBeginDeleteVersionOptions) (*runtime.Poller[PreparedImageSpecificationsClientDeleteVersionResponse], error)
BeginDeleteVersion - Delete a prepared image specification version. This operation will be blocked if the prepared image specification version is in use. If the operation fails it returns an *azcore.ResponseError type.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- preparedImageSpecificationName - The name of the Prepared Image Specification resource.
- version - The version of the Prepared Image Specification.
- options - PreparedImageSpecificationsClientBeginDeleteVersionOptions contains the optional parameters for the PreparedImageSpecificationsClient.BeginDeleteVersion method.
Example ¶
Generated from example definition: 2026-02-02-preview/PreparedImageSpecifications_DeleteVersion.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservicepreparedimgspec/armcontainerservicepreparedimgspec"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservicepreparedimgspec.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewPreparedImageSpecificationsClient().BeginDeleteVersion(ctx, "rg1", "my-prepared-image-specification", "20250101-abcd1234", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
}
Output:
func (*PreparedImageSpecificationsClient) Get ¶
func (client *PreparedImageSpecificationsClient) Get(ctx context.Context, resourceGroupName string, preparedImageSpecificationName string, options *PreparedImageSpecificationsClientGetOptions) (PreparedImageSpecificationsClientGetResponse, error)
Get - Get a prepared image specification at the latest version. If the operation fails it returns an *azcore.ResponseError type.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- preparedImageSpecificationName - The name of the Prepared Image Specification resource.
- options - PreparedImageSpecificationsClientGetOptions contains the optional parameters for the PreparedImageSpecificationsClient.Get method.
Example ¶
Generated from example definition: 2026-02-02-preview/PreparedImageSpecifications_Get.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservicepreparedimgspec/armcontainerservicepreparedimgspec"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservicepreparedimgspec.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPreparedImageSpecificationsClient().Get(ctx, "rg1", "my-prepared-image-specification", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerservicepreparedimgspec.PreparedImageSpecificationsClientGetResponse{
// PreparedImageSpecification: armcontainerservicepreparedimgspec.PreparedImageSpecification{
// Properties: &armcontainerservicepreparedimgspec.PreparedImageSpecificationProperties{
// ContainerImages: []*string{
// to.Ptr("redis:8.0.0"),
// },
// CustomizationScripts: []*armcontainerservicepreparedimgspec.PreparedImageSpecificationScript{
// {
// Name: to.Ptr("initialize-node"),
// ExecutionPoint: to.Ptr(armcontainerservicepreparedimgspec.ExecutionPointNodeImageBuildTime),
// ScriptType: to.Ptr(armcontainerservicepreparedimgspec.ScriptTypeBash),
// Script: to.Ptr("echo \"test prepared image specification\" > /var/log/test-node-customization.txt"),
// PostScriptAction: to.Ptr(armcontainerservicepreparedimgspec.PostScriptActionNone),
// },
// },
// IdentityProfile: &armcontainerservicepreparedimgspec.PreparedImageSpecificationManagedIdentityProfile{
// ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"),
// ObjectID: to.Ptr("3fa85f64-5717-4562-b3fc-2c963f66afa6"),
// ClientID: to.Ptr("df4316d4-0ef3-45a3-99d0-2d13a6543aff"),
// },
// Version: to.Ptr("20250101-abcd1234"),
// ProvisioningState: to.Ptr(armcontainerservicepreparedimgspec.ProvisioningStateSucceeded),
// },
// ETag: to.Ptr("ETagValue"),
// Tags: map[string]*string{
// "team": to.Ptr("blue"),
// },
// Location: to.Ptr("westus2"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/preparedImageSpecifications/my-prepared-image-specification"),
// Name: to.Ptr("my-prepared-image-specification"),
// Type: to.Ptr("Microsoft.ContainerService/preparedImageSpecifications"),
// SystemData: &armcontainerservicepreparedimgspec.SystemData{
// CreatedBy: to.Ptr("someUser"),
// CreatedByType: to.Ptr(armcontainerservicepreparedimgspec.CreatedByTypeUser),
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-05-02T04:08:43.702Z"); return t}()),
// LastModifiedBy: to.Ptr("someOtherUser"),
// LastModifiedByType: to.Ptr(armcontainerservicepreparedimgspec.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-05-02T04:08:43.702Z"); return t}()),
// },
// },
// }
}
Output:
func (*PreparedImageSpecificationsClient) GetVersion ¶
func (client *PreparedImageSpecificationsClient) GetVersion(ctx context.Context, resourceGroupName string, preparedImageSpecificationName string, version string, options *PreparedImageSpecificationsClientGetVersionOptions) (PreparedImageSpecificationsClientGetVersionResponse, error)
GetVersion - Get a prepared image specification at a particular version. If the operation fails it returns an *azcore.ResponseError type.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- preparedImageSpecificationName - The name of the Prepared Image Specification resource.
- version - The version of the Prepared Image Specification.
- options - PreparedImageSpecificationsClientGetVersionOptions contains the optional parameters for the PreparedImageSpecificationsClient.GetVersion method.
Example ¶
Generated from example definition: 2026-02-02-preview/PreparedImageSpecifications_GetVersion.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservicepreparedimgspec/armcontainerservicepreparedimgspec"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservicepreparedimgspec.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPreparedImageSpecificationsClient().GetVersion(ctx, "rg1", "my-prepared-image-specification", "20250101-abcd1234", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerservicepreparedimgspec.PreparedImageSpecificationsClientGetVersionResponse{
// PreparedImageSpecificationVersion: armcontainerservicepreparedimgspec.PreparedImageSpecificationVersion{
// Properties: &armcontainerservicepreparedimgspec.PreparedImageSpecificationProperties{
// ContainerImages: []*string{
// to.Ptr("redis:8.0.0"),
// },
// CustomizationScripts: []*armcontainerservicepreparedimgspec.PreparedImageSpecificationScript{
// {
// Name: to.Ptr("initialize-node"),
// ExecutionPoint: to.Ptr(armcontainerservicepreparedimgspec.ExecutionPointNodeImageBuildTime),
// ScriptType: to.Ptr(armcontainerservicepreparedimgspec.ScriptTypeBash),
// Script: to.Ptr("echo \"test prepared image specification\" > /var/log/test-node-customization.txt"),
// PostScriptAction: to.Ptr(armcontainerservicepreparedimgspec.PostScriptActionNone),
// },
// },
// IdentityProfile: &armcontainerservicepreparedimgspec.PreparedImageSpecificationManagedIdentityProfile{
// ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"),
// ObjectID: to.Ptr("3fa85f64-5717-4562-b3fc-2c963f66afa6"),
// ClientID: to.Ptr("df4316d4-0ef3-45a3-99d0-2d13a6543aff"),
// },
// Version: to.Ptr("20250101-abcd1234"),
// ProvisioningState: to.Ptr(armcontainerservicepreparedimgspec.ProvisioningStateSucceeded),
// },
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/preparedImageSpecifications/my-prepared-image-specification/versions/20250101-abcd1234"),
// Name: to.Ptr("20250101-abcd1234"),
// Type: to.Ptr("Microsoft.ContainerService/preparedImageSpecifications/versions"),
// SystemData: &armcontainerservicepreparedimgspec.SystemData{
// CreatedBy: to.Ptr("someUser"),
// CreatedByType: to.Ptr(armcontainerservicepreparedimgspec.CreatedByTypeUser),
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-05-02T04:08:43.702Z"); return t}()),
// LastModifiedBy: to.Ptr("someOtherUser"),
// LastModifiedByType: to.Ptr(armcontainerservicepreparedimgspec.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-05-02T04:08:43.702Z"); return t}()),
// },
// },
// }
}
Output:
func (*PreparedImageSpecificationsClient) NewListByResourceGroupPager ¶
func (client *PreparedImageSpecificationsClient) NewListByResourceGroupPager(resourceGroupName string, options *PreparedImageSpecificationsClientListByResourceGroupOptions) *runtime.Pager[PreparedImageSpecificationsClientListByResourceGroupResponse]
NewListByResourceGroupPager - List the prepared image specifications in a resource group at the latest version.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - PreparedImageSpecificationsClientListByResourceGroupOptions contains the optional parameters for the PreparedImageSpecificationsClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: 2026-02-02-preview/PreparedImageSpecifications_ListByResourceGroup.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservicepreparedimgspec/armcontainerservicepreparedimgspec"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservicepreparedimgspec.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewPreparedImageSpecificationsClient().NewListByResourceGroupPager("rg1", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page = armcontainerservicepreparedimgspec.PreparedImageSpecificationsClientListByResourceGroupResponse{
// PreparedImageSpecificationListResult: armcontainerservicepreparedimgspec.PreparedImageSpecificationListResult{
// Value: []*armcontainerservicepreparedimgspec.PreparedImageSpecification{
// {
// Properties: &armcontainerservicepreparedimgspec.PreparedImageSpecificationProperties{
// ContainerImages: []*string{
// to.Ptr("redis:8.0.0"),
// },
// CustomizationScripts: []*armcontainerservicepreparedimgspec.PreparedImageSpecificationScript{
// {
// Name: to.Ptr("initialize-node"),
// ExecutionPoint: to.Ptr(armcontainerservicepreparedimgspec.ExecutionPointNodeImageBuildTime),
// ScriptType: to.Ptr(armcontainerservicepreparedimgspec.ScriptTypeBash),
// Script: to.Ptr("echo \"test prepared image specification\" > /var/log/test-node-customization.txt"),
// PostScriptAction: to.Ptr(armcontainerservicepreparedimgspec.PostScriptActionNone),
// },
// },
// IdentityProfile: &armcontainerservicepreparedimgspec.PreparedImageSpecificationManagedIdentityProfile{
// ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"),
// ObjectID: to.Ptr("3fa85f64-5717-4562-b3fc-2c963f66afa6"),
// ClientID: to.Ptr("df4316d4-0ef3-45a3-99d0-2d13a6543aff"),
// },
// Version: to.Ptr("20250101-abcd1234"),
// ProvisioningState: to.Ptr(armcontainerservicepreparedimgspec.ProvisioningStateSucceeded),
// },
// ETag: to.Ptr("ETagValue"),
// Tags: map[string]*string{
// "team": to.Ptr("blue"),
// },
// Location: to.Ptr("westus2"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/preparedImageSpecifications/my-prepared-image-specification"),
// Name: to.Ptr("my-prepared-image-specification"),
// Type: to.Ptr("Microsoft.ContainerService/preparedImageSpecifications"),
// SystemData: &armcontainerservicepreparedimgspec.SystemData{
// CreatedBy: to.Ptr("someUser"),
// CreatedByType: to.Ptr(armcontainerservicepreparedimgspec.CreatedByTypeUser),
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-05-02T04:08:43.702Z"); return t}()),
// LastModifiedBy: to.Ptr("someOtherUser"),
// LastModifiedByType: to.Ptr(armcontainerservicepreparedimgspec.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-05-02T04:08:43.702Z"); return t}()),
// },
// },
// },
// NextLink: to.Ptr("https://microsoft.com/ah"),
// },
// }
}
}
Output:
func (*PreparedImageSpecificationsClient) NewListBySubscriptionPager ¶
func (client *PreparedImageSpecificationsClient) NewListBySubscriptionPager(options *PreparedImageSpecificationsClientListBySubscriptionOptions) *runtime.Pager[PreparedImageSpecificationsClientListBySubscriptionResponse]
NewListBySubscriptionPager - List the prepared image specifications in a subscription at the latest version.
- options - PreparedImageSpecificationsClientListBySubscriptionOptions contains the optional parameters for the PreparedImageSpecificationsClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: 2026-02-02-preview/PreparedImageSpecifications_ListBySubscription.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservicepreparedimgspec/armcontainerservicepreparedimgspec"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservicepreparedimgspec.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewPreparedImageSpecificationsClient().NewListBySubscriptionPager(nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page = armcontainerservicepreparedimgspec.PreparedImageSpecificationsClientListBySubscriptionResponse{
// PreparedImageSpecificationListResult: armcontainerservicepreparedimgspec.PreparedImageSpecificationListResult{
// Value: []*armcontainerservicepreparedimgspec.PreparedImageSpecification{
// {
// Properties: &armcontainerservicepreparedimgspec.PreparedImageSpecificationProperties{
// ContainerImages: []*string{
// to.Ptr("redis:8.0.0"),
// },
// CustomizationScripts: []*armcontainerservicepreparedimgspec.PreparedImageSpecificationScript{
// {
// Name: to.Ptr("initialize-node"),
// ExecutionPoint: to.Ptr(armcontainerservicepreparedimgspec.ExecutionPointNodeImageBuildTime),
// ScriptType: to.Ptr(armcontainerservicepreparedimgspec.ScriptTypeBash),
// Script: to.Ptr("echo \"test prepared image specification\" > /var/log/test-node-customization.txt"),
// PostScriptAction: to.Ptr(armcontainerservicepreparedimgspec.PostScriptActionNone),
// },
// },
// IdentityProfile: &armcontainerservicepreparedimgspec.PreparedImageSpecificationManagedIdentityProfile{
// ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"),
// ObjectID: to.Ptr("3fa85f64-5717-4562-b3fc-2c963f66afa6"),
// ClientID: to.Ptr("df4316d4-0ef3-45a3-99d0-2d13a6543aff"),
// },
// Version: to.Ptr("20250101-abcd1234"),
// ProvisioningState: to.Ptr(armcontainerservicepreparedimgspec.ProvisioningStateSucceeded),
// },
// ETag: to.Ptr("ETagValue"),
// Tags: map[string]*string{
// "team": to.Ptr("blue"),
// },
// Location: to.Ptr("westus2"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/preparedImageSpecifications/my-prepared-image-specification"),
// Name: to.Ptr("my-prepared-image-specification"),
// Type: to.Ptr("Microsoft.ContainerService/preparedImageSpecifications"),
// SystemData: &armcontainerservicepreparedimgspec.SystemData{
// CreatedBy: to.Ptr("someUser"),
// CreatedByType: to.Ptr(armcontainerservicepreparedimgspec.CreatedByTypeUser),
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-05-02T04:08:43.702Z"); return t}()),
// LastModifiedBy: to.Ptr("someOtherUser"),
// LastModifiedByType: to.Ptr(armcontainerservicepreparedimgspec.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-05-02T04:08:43.702Z"); return t}()),
// },
// },
// },
// NextLink: to.Ptr("https://microsoft.com/ah"),
// },
// }
}
}
Output:
func (*PreparedImageSpecificationsClient) NewListVersionsPager ¶
func (client *PreparedImageSpecificationsClient) NewListVersionsPager(resourceGroupName string, preparedImageSpecificationName string, options *PreparedImageSpecificationsClientListVersionsOptions) *runtime.Pager[PreparedImageSpecificationsClientListVersionsResponse]
NewListVersionsPager - List all versions of a prepared image specification.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- preparedImageSpecificationName - The name of the Prepared Image Specification resource.
- options - PreparedImageSpecificationsClientListVersionsOptions contains the optional parameters for the PreparedImageSpecificationsClient.NewListVersionsPager method.
Example ¶
Generated from example definition: 2026-02-02-preview/PreparedImageSpecifications_ListVersions.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservicepreparedimgspec/armcontainerservicepreparedimgspec"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservicepreparedimgspec.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewPreparedImageSpecificationsClient().NewListVersionsPager("rg1", "my-prepared-image-specification", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page = armcontainerservicepreparedimgspec.PreparedImageSpecificationsClientListVersionsResponse{
// PreparedImageSpecificationVersionListResult: armcontainerservicepreparedimgspec.PreparedImageSpecificationVersionListResult{
// Value: []*armcontainerservicepreparedimgspec.PreparedImageSpecificationVersion{
// {
// Properties: &armcontainerservicepreparedimgspec.PreparedImageSpecificationProperties{
// ContainerImages: []*string{
// to.Ptr("redis:8.0.0"),
// },
// IdentityProfile: &armcontainerservicepreparedimgspec.PreparedImageSpecificationManagedIdentityProfile{
// ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"),
// ObjectID: to.Ptr("3fa85f64-5717-4562-b3fc-2c963f66afa6"),
// ClientID: to.Ptr("df4316d4-0ef3-45a3-99d0-2d13a6543aff"),
// },
// Version: to.Ptr("20250101-abcd1234"),
// ProvisioningState: to.Ptr(armcontainerservicepreparedimgspec.ProvisioningStateSucceeded),
// CustomizationScripts: []*armcontainerservicepreparedimgspec.PreparedImageSpecificationScript{
// {
// Name: to.Ptr("initialize-node"),
// ExecutionPoint: to.Ptr(armcontainerservicepreparedimgspec.ExecutionPointNodeImageBuildTime),
// ScriptType: to.Ptr(armcontainerservicepreparedimgspec.ScriptTypeBash),
// Script: to.Ptr("echo 'Hello World'"),
// PostScriptAction: to.Ptr(armcontainerservicepreparedimgspec.PostScriptActionNone),
// },
// },
// },
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/preparedImageSpecifications/my-prepared-image-specification/versions/20250101-abcd1234"),
// Name: to.Ptr("20250101-abcd1234"),
// Type: to.Ptr("Microsoft.ContainerService/preparedImageSpecifications/versions"),
// SystemData: &armcontainerservicepreparedimgspec.SystemData{
// CreatedBy: to.Ptr("someUser"),
// CreatedByType: to.Ptr(armcontainerservicepreparedimgspec.CreatedByTypeUser),
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-05-02T04:08:43.702Z"); return t}()),
// LastModifiedBy: to.Ptr("someOtherUser"),
// LastModifiedByType: to.Ptr(armcontainerservicepreparedimgspec.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-05-02T04:08:43.702Z"); return t}()),
// },
// },
// },
// NextLink: to.Ptr("https://microsoft.com/a"),
// },
// }
}
}
Output:
func (*PreparedImageSpecificationsClient) Update ¶
func (client *PreparedImageSpecificationsClient) Update(ctx context.Context, resourceGroupName string, preparedImageSpecificationName string, properties PreparedImageSpecificationPatch, options *PreparedImageSpecificationsClientUpdateOptions) (PreparedImageSpecificationsClientUpdateResponse, error)
Update - Update the tags of a prepared image specification. If the operation fails it returns an *azcore.ResponseError type.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- preparedImageSpecificationName - The name of the Prepared Image Specification resource.
- properties - The resource properties to be updated.
- options - PreparedImageSpecificationsClientUpdateOptions contains the optional parameters for the PreparedImageSpecificationsClient.Update method.
Example ¶
Generated from example definition: 2026-02-02-preview/PreparedImageSpecifications_Update.json
package main
import (
"context"
"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/containerservicepreparedimgspec/armcontainerservicepreparedimgspec"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcontainerservicepreparedimgspec.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPreparedImageSpecificationsClient().Update(ctx, "rg1", "my-prepared-image-specification", armcontainerservicepreparedimgspec.PreparedImageSpecificationPatch{
Tags: map[string]*string{
"key5558": to.Ptr("xufgvdnarflvwbcdkmhqhgbop"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcontainerservicepreparedimgspec.PreparedImageSpecificationsClientUpdateResponse{
// PreparedImageSpecification: armcontainerservicepreparedimgspec.PreparedImageSpecification{
// Properties: &armcontainerservicepreparedimgspec.PreparedImageSpecificationProperties{
// ContainerImages: []*string{
// to.Ptr("qmetlvqgbvhjnncyraxlhs"),
// },
// CustomizationScripts: []*armcontainerservicepreparedimgspec.PreparedImageSpecificationScript{
// {
// Name: to.Ptr("initialize-node"),
// ExecutionPoint: to.Ptr(armcontainerservicepreparedimgspec.ExecutionPointNodeImageBuildTime),
// ScriptType: to.Ptr(armcontainerservicepreparedimgspec.ScriptTypeBash),
// Script: to.Ptr("echo \"test prepared image specification\" > /var/log/test-node-customization.txt"),
// },
// },
// IdentityProfile: &armcontainerservicepreparedimgspec.PreparedImageSpecificationManagedIdentityProfile{
// ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"),
// ObjectID: to.Ptr("3fa85f64-5717-4562-b3fc-2c963f66afa6"),
// ClientID: to.Ptr("df4316d4-0ef3-45a3-99d0-2d13a6543aff"),
// },
// Version: to.Ptr("20250101-abcd1234"),
// ProvisioningState: to.Ptr(armcontainerservicepreparedimgspec.ProvisioningStateSucceeded),
// },
// ETag: to.Ptr("ETagValue"),
// Tags: map[string]*string{
// "team": to.Ptr("blue"),
// },
// Location: to.Ptr("westus2"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/preparedImageSpecifications/my-prepared-image-specification"),
// Name: to.Ptr("my-prepared-image-specification"),
// Type: to.Ptr("Microsoft.ContainerService/preparedImageSpecifications"),
// SystemData: &armcontainerservicepreparedimgspec.SystemData{
// CreatedBy: to.Ptr("someUser"),
// CreatedByType: to.Ptr(armcontainerservicepreparedimgspec.CreatedByTypeUser),
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-05-02T04:08:43.702Z"); return t}()),
// LastModifiedBy: to.Ptr("someOtherUser"),
// LastModifiedByType: to.Ptr(armcontainerservicepreparedimgspec.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-05-02T04:08:43.702Z"); return t}()),
// },
// },
// }
}
Output:
type PreparedImageSpecificationsClientBeginCreateOrUpdateOptions ¶
type PreparedImageSpecificationsClientBeginCreateOrUpdateOptions struct {
// The request should only proceed if the targeted resource's etag matches the value provided.
IfMatch *string
// The request should only proceed if the targeted resource's etag does not match the value provided.
IfNoneMatch *string
// Resumes the long-running operation from the provided token.
ResumeToken string
}
PreparedImageSpecificationsClientBeginCreateOrUpdateOptions contains the optional parameters for the PreparedImageSpecificationsClient.BeginCreateOrUpdate method.
type PreparedImageSpecificationsClientBeginDeleteOptions ¶
type PreparedImageSpecificationsClientBeginDeleteOptions struct {
// The request should only proceed if the targeted resource's etag matches the value provided.
IfMatch *string
// Resumes the long-running operation from the provided token.
ResumeToken string
}
PreparedImageSpecificationsClientBeginDeleteOptions contains the optional parameters for the PreparedImageSpecificationsClient.BeginDelete method.
type PreparedImageSpecificationsClientBeginDeleteVersionOptions ¶
type PreparedImageSpecificationsClientBeginDeleteVersionOptions struct {
// The request should only proceed if the targeted resource's etag matches the value provided.
IfMatch *string
// Resumes the long-running operation from the provided token.
ResumeToken string
}
PreparedImageSpecificationsClientBeginDeleteVersionOptions contains the optional parameters for the PreparedImageSpecificationsClient.BeginDeleteVersion method.
type PreparedImageSpecificationsClientCreateOrUpdateResponse ¶
type PreparedImageSpecificationsClientCreateOrUpdateResponse struct {
// The Prepared Image Specification resource.
PreparedImageSpecification
}
PreparedImageSpecificationsClientCreateOrUpdateResponse contains the response from method PreparedImageSpecificationsClient.BeginCreateOrUpdate.
type PreparedImageSpecificationsClientDeleteResponse ¶
type PreparedImageSpecificationsClientDeleteResponse struct {
}
PreparedImageSpecificationsClientDeleteResponse contains the response from method PreparedImageSpecificationsClient.BeginDelete.
type PreparedImageSpecificationsClientDeleteVersionResponse ¶
type PreparedImageSpecificationsClientDeleteVersionResponse struct {
}
PreparedImageSpecificationsClientDeleteVersionResponse contains the response from method PreparedImageSpecificationsClient.BeginDeleteVersion.
type PreparedImageSpecificationsClientGetOptions ¶
type PreparedImageSpecificationsClientGetOptions struct {
}
PreparedImageSpecificationsClientGetOptions contains the optional parameters for the PreparedImageSpecificationsClient.Get method.
type PreparedImageSpecificationsClientGetResponse ¶
type PreparedImageSpecificationsClientGetResponse struct {
// The Prepared Image Specification resource.
PreparedImageSpecification
}
PreparedImageSpecificationsClientGetResponse contains the response from method PreparedImageSpecificationsClient.Get.
type PreparedImageSpecificationsClientGetVersionOptions ¶
type PreparedImageSpecificationsClientGetVersionOptions struct {
}
PreparedImageSpecificationsClientGetVersionOptions contains the optional parameters for the PreparedImageSpecificationsClient.GetVersion method.
type PreparedImageSpecificationsClientGetVersionResponse ¶
type PreparedImageSpecificationsClientGetVersionResponse struct {
// A version of the Prepared Image Specification resource.
PreparedImageSpecificationVersion
}
PreparedImageSpecificationsClientGetVersionResponse contains the response from method PreparedImageSpecificationsClient.GetVersion.
type PreparedImageSpecificationsClientListByResourceGroupOptions ¶
type PreparedImageSpecificationsClientListByResourceGroupOptions struct {
}
PreparedImageSpecificationsClientListByResourceGroupOptions contains the optional parameters for the PreparedImageSpecificationsClient.NewListByResourceGroupPager method.
type PreparedImageSpecificationsClientListByResourceGroupResponse ¶
type PreparedImageSpecificationsClientListByResourceGroupResponse struct {
// The response of a PreparedImageSpecification list operation.
PreparedImageSpecificationListResult
}
PreparedImageSpecificationsClientListByResourceGroupResponse contains the response from method PreparedImageSpecificationsClient.NewListByResourceGroupPager.
type PreparedImageSpecificationsClientListBySubscriptionOptions ¶
type PreparedImageSpecificationsClientListBySubscriptionOptions struct {
}
PreparedImageSpecificationsClientListBySubscriptionOptions contains the optional parameters for the PreparedImageSpecificationsClient.NewListBySubscriptionPager method.
type PreparedImageSpecificationsClientListBySubscriptionResponse ¶
type PreparedImageSpecificationsClientListBySubscriptionResponse struct {
// The response of a PreparedImageSpecification list operation.
PreparedImageSpecificationListResult
}
PreparedImageSpecificationsClientListBySubscriptionResponse contains the response from method PreparedImageSpecificationsClient.NewListBySubscriptionPager.
type PreparedImageSpecificationsClientListVersionsOptions ¶
type PreparedImageSpecificationsClientListVersionsOptions struct {
}
PreparedImageSpecificationsClientListVersionsOptions contains the optional parameters for the PreparedImageSpecificationsClient.NewListVersionsPager method.
type PreparedImageSpecificationsClientListVersionsResponse ¶
type PreparedImageSpecificationsClientListVersionsResponse struct {
// The response of a PreparedImageSpecificationVersion list operation.
PreparedImageSpecificationVersionListResult
}
PreparedImageSpecificationsClientListVersionsResponse contains the response from method PreparedImageSpecificationsClient.NewListVersionsPager.
type PreparedImageSpecificationsClientUpdateOptions ¶
type PreparedImageSpecificationsClientUpdateOptions struct {
// The request should only proceed if the targeted resource's etag matches the value provided.
IfMatch *string
}
PreparedImageSpecificationsClientUpdateOptions contains the optional parameters for the PreparedImageSpecificationsClient.Update method.
type PreparedImageSpecificationsClientUpdateResponse ¶
type PreparedImageSpecificationsClientUpdateResponse struct {
// The Prepared Image Specification resource.
PreparedImageSpecification
}
PreparedImageSpecificationsClientUpdateResponse contains the response from method PreparedImageSpecificationsClient.Update.
type ProvisioningState ¶
type ProvisioningState string
ProvisioningState - The provisioning state of the image customization.
const ( // ProvisioningStateAccepted - The change request has been accepted ProvisioningStateAccepted ProvisioningState = "Accepted" // ProvisioningStateCanceled - Resource creation was canceled. ProvisioningStateCanceled ProvisioningState = "Canceled" // ProvisioningStateDeleting - Resource is being deleted ProvisioningStateDeleting ProvisioningState = "Deleting" // ProvisioningStateFailed - Resource creation failed. ProvisioningStateFailed ProvisioningState = "Failed" // ProvisioningStateProvisioning - Provisioning the resource is in progress ProvisioningStateProvisioning ProvisioningState = "Provisioning" // ProvisioningStateSucceeded - Resource has been created. ProvisioningStateSucceeded ProvisioningState = "Succeeded" // ProvisioningStateUpdating - Resource is being updated ProvisioningStateUpdating ProvisioningState = "Updating" )
func PossibleProvisioningStateValues ¶
func PossibleProvisioningStateValues() []ProvisioningState
PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.
type ScriptType ¶
type ScriptType string
ScriptType - The script type.
const ( // ScriptTypeBash - Bash script. ScriptTypeBash ScriptType = "Bash" // ScriptTypePowerShell - PowerShell script. ScriptTypePowerShell ScriptType = "PowerShell" )
func PossibleScriptTypeValues ¶
func PossibleScriptTypeValues() []ScriptType
PossibleScriptTypeValues returns the possible values for the ScriptType const type.
type SystemData ¶
type SystemData struct {
// The timestamp of resource creation (UTC).
CreatedAt *time.Time
// The identity that created the resource.
CreatedBy *string
// The type of identity that created the resource.
CreatedByType *CreatedByType
// The timestamp of resource last modification (UTC)
LastModifiedAt *time.Time
// The identity that last modified the resource.
LastModifiedBy *string
// The type of identity that last modified the resource.
LastModifiedByType *CreatedByType
}
SystemData - Metadata pertaining to creation and last modification of the resource.
func (SystemData) MarshalJSON ¶
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.