armappplatform

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: MIT Imports: 14 Imported by: 4

README

Azure App Platform Module for Go

PkgGoDev

The armappplatform module provides operations for working with Azure App Platform.

Source code

Getting started

Prerequisites

  • an Azure subscription
  • Go 1.18 or above (You could download and install the latest version of Go from here. It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this doc.)

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure App Platform module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure App Platform. 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.

Client Factory

Azure App Platform module consists of one or more clients. We provide a client factory which could be used to create any client in this module.

clientFactory, err := armappplatform.NewClientFactory(<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 {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
clientFactory, err := armappplatform.NewClientFactory(<subscription ID>, cred, &options)

Clients

A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.

client := clientFactory.NewAppsClient()

Fakes

The fake package contains types used for constructing in-memory fake servers used in unit tests. This allows writing tests to cover various success/error conditions without the need for connecting to a live service.

Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes.

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the App Platform 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 ActionType added in v0.4.0

type ActionType string

ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.

const (
	ActionTypeInternal ActionType = "Internal"
)

func PossibleActionTypeValues added in v0.4.0

func PossibleActionTypeValues() []ActionType

PossibleActionTypeValues returns the possible values for the ActionType const type.

type ActiveDeploymentCollection added in v0.3.0

type ActiveDeploymentCollection struct {
	// Collection of Deployment name.
	ActiveDeploymentNames []*string
}

ActiveDeploymentCollection - Object that includes an array of Deployment resource name and set them as active.

func (ActiveDeploymentCollection) MarshalJSON added in v0.3.0

func (a ActiveDeploymentCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ActiveDeploymentCollection.

func (*ActiveDeploymentCollection) UnmarshalJSON added in v1.1.0

func (a *ActiveDeploymentCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ActiveDeploymentCollection.

type AppResource

type AppResource struct {
	// The Managed Identity type of the app resource
	Identity *ManagedIdentityProperties

	// The GEO location of the application, always the same with its parent resource
	Location *string

	// Properties of the App resource
	Properties *AppResourceProperties

	// READ-ONLY; Fully qualified resource Id for the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource.
	Type *string
}

AppResource - App resource payload

func (AppResource) MarshalJSON

func (a AppResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AppResource.

func (*AppResource) UnmarshalJSON added in v0.2.0

func (a *AppResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AppResource.

type AppResourceCollection

type AppResourceCollection struct {
	// URL client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string

	// Collection of App resources
	Value []*AppResource
}

AppResourceCollection - Object that includes an array of App resources and a possible link for next set

func (AppResourceCollection) MarshalJSON

func (a AppResourceCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AppResourceCollection.

func (*AppResourceCollection) UnmarshalJSON added in v1.1.0

func (a *AppResourceCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AppResourceCollection.

type AppResourceProperties

type AppResourceProperties struct {
	// Collection of addons
	AddonConfigs map[string]map[string]any

	// Indicate if end to end TLS is enabled.
	EnableEndToEndTLS *bool

	// Fully qualified dns Name.
	Fqdn *string

	// Indicate if only https is allowed.
	HTTPSOnly *bool

	// Collection of loaded certificates
	LoadedCertificates []*LoadedCertificate

	// Persistent disk settings
	PersistentDisk *PersistentDisk

	// Indicates whether the App exposes public endpoint
	Public *bool

	// Temporary disk settings
	TemporaryDisk *TemporaryDisk

	// READ-ONLY; Provisioning state of the App
	ProvisioningState *AppResourceProvisioningState

	// READ-ONLY; URL of the App
	URL *string
}

AppResourceProperties - App resource properties payload

func (AppResourceProperties) MarshalJSON

func (a AppResourceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AppResourceProperties.

func (*AppResourceProperties) UnmarshalJSON

func (a *AppResourceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AppResourceProperties.

type AppResourceProvisioningState

type AppResourceProvisioningState string

AppResourceProvisioningState - Provisioning state of the App

const (
	AppResourceProvisioningStateCreating  AppResourceProvisioningState = "Creating"
	AppResourceProvisioningStateDeleting  AppResourceProvisioningState = "Deleting"
	AppResourceProvisioningStateFailed    AppResourceProvisioningState = "Failed"
	AppResourceProvisioningStateSucceeded AppResourceProvisioningState = "Succeeded"
	AppResourceProvisioningStateUpdating  AppResourceProvisioningState = "Updating"
)

func PossibleAppResourceProvisioningStateValues

func PossibleAppResourceProvisioningStateValues() []AppResourceProvisioningState

PossibleAppResourceProvisioningStateValues returns the possible values for the AppResourceProvisioningState const type.

type ApplicationInsightsAgentVersions

type ApplicationInsightsAgentVersions struct {
	// READ-ONLY; Indicates the version of application insight java agent
	Java *string
}

ApplicationInsightsAgentVersions - Application Insights agent versions properties payload

func (ApplicationInsightsAgentVersions) MarshalJSON added in v1.1.0

func (a ApplicationInsightsAgentVersions) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ApplicationInsightsAgentVersions.

func (*ApplicationInsightsAgentVersions) UnmarshalJSON added in v1.1.0

func (a *ApplicationInsightsAgentVersions) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationInsightsAgentVersions.

type AppsClient

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

AppsClient contains the methods for the Apps group. Don't use this type directly, use NewAppsClient() instead.

func NewAppsClient

func NewAppsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AppsClient, error)

NewAppsClient creates a new instance of AppsClient with the specified values.

  • subscriptionID - Gets subscription ID which uniquely identify the 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 (*AppsClient) BeginCreateOrUpdate

func (client *AppsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource AppResource, options *AppsClientBeginCreateOrUpdateOptions) (*runtime.Poller[AppsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create a new App or update an exiting App. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • appResource - Parameters for the create or update operation
  • options - AppsClientBeginCreateOrUpdateOptions contains the optional parameters for the AppsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Apps_CreateOrUpdate.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAppsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "myapp", armappplatform.AppResource{
		Identity: &armappplatform.ManagedIdentityProperties{
			Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssigned),
		},
		Location: to.Ptr("eastus"),
		Properties: &armappplatform.AppResourceProperties{
			AddonConfigs: map[string]map[string]any{
				"ApplicationConfigurationService": {
					"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/configurationServices/myacs",
				},
				"ServiceRegistry": {
					"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/serviceRegistries/myServiceRegistry",
				},
			},
			EnableEndToEndTLS: to.Ptr(false),
			Fqdn:              to.Ptr("myapp.mydomain.com"),
			HTTPSOnly:         to.Ptr(false),
			LoadedCertificates: []*armappplatform.LoadedCertificate{
				{
					LoadTrustStore: to.Ptr(false),
					ResourceID:     to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycert1"),
				},
				{
					LoadTrustStore: to.Ptr(true),
					ResourceID:     to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycert2"),
				}},
			PersistentDisk: &armappplatform.PersistentDisk{
				MountPath: to.Ptr("/mypersistentdisk"),
				SizeInGB:  to.Ptr[int32](2),
			},
			Public: to.Ptr(true),
			TemporaryDisk: &armappplatform.TemporaryDisk{
				MountPath: to.Ptr("/mytemporarydisk"),
				SizeInGB:  to.Ptr[int32](2),
			},
		},
	}, 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 pull 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.AppResource = armappplatform.AppResource{
	// 	Name: to.Ptr("myapp"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/apps"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Identity: &armappplatform.ManagedIdentityProperties{
	// 		Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssigned),
	// 		PrincipalID: to.Ptr("principalid"),
	// 		TenantID: to.Ptr("tenantid"),
	// 	},
	// 	Location: to.Ptr("eastus"),
	// 	Properties: &armappplatform.AppResourceProperties{
	// 		AddonConfigs: map[string]map[string]any{
	// 			"ApplicationConfigurationService": map[string]any{
	// 				"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/configurationServices/myacs",
	// 			},
	// 			"ServiceRegistry": map[string]any{
	// 				"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/serviceRegistries/myServiceRegistry",
	// 			},
	// 		},
	// 		EnableEndToEndTLS: to.Ptr(false),
	// 		Fqdn: to.Ptr("myapp.mydomain.com"),
	// 		HTTPSOnly: to.Ptr(false),
	// 		PersistentDisk: &armappplatform.PersistentDisk{
	// 			MountPath: to.Ptr("/mypersistentdisk"),
	// 			SizeInGB: to.Ptr[int32](2),
	// 			UsedInGB: to.Ptr[int32](1),
	// 		},
	// 		ProvisioningState: to.Ptr(armappplatform.AppResourceProvisioningStateSucceeded),
	// 		Public: to.Ptr(true),
	// 		TemporaryDisk: &armappplatform.TemporaryDisk{
	// 			MountPath: to.Ptr("/mytemporarydisk"),
	// 			SizeInGB: to.Ptr[int32](2),
	// 		},
	// 		URL: to.Ptr("myapp.myservice.azuremicroservices.io"),
	// 	},
	// }
}
Output:

func (*AppsClient) BeginDelete

func (client *AppsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *AppsClientBeginDeleteOptions) (*runtime.Poller[AppsClientDeleteResponse], error)

BeginDelete - Operation to delete an App. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • options - AppsClientBeginDeleteOptions contains the optional parameters for the AppsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Apps_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAppsClient().BeginDelete(ctx, "myResourceGroup", "myservice", "myapp", 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 pull the result: %v", err)
	}
}
Output:

func (*AppsClient) BeginSetActiveDeployments added in v0.3.0

func (client *AppsClient) BeginSetActiveDeployments(ctx context.Context, resourceGroupName string, serviceName string, appName string, activeDeploymentCollection ActiveDeploymentCollection, options *AppsClientBeginSetActiveDeploymentsOptions) (*runtime.Poller[AppsClientSetActiveDeploymentsResponse], error)

BeginSetActiveDeployments - Set existing Deployment under the app as active If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • activeDeploymentCollection - A list of Deployment name to be active.
  • options - AppsClientBeginSetActiveDeploymentsOptions contains the optional parameters for the AppsClient.BeginSetActiveDeployments method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Apps_SetActiveDeployments.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAppsClient().BeginSetActiveDeployments(ctx, "myResourceGroup", "myservice", "myapp", armappplatform.ActiveDeploymentCollection{
		ActiveDeploymentNames: []*string{
			to.Ptr("default")},
	}, 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 pull 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.AppResource = armappplatform.AppResource{
	// 	Name: to.Ptr("myapp"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/apps"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Identity: &armappplatform.ManagedIdentityProperties{
	// 		Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssigned),
	// 		PrincipalID: to.Ptr("principalid"),
	// 		TenantID: to.Ptr("tenantid"),
	// 	},
	// 	Location: to.Ptr("eastus"),
	// 	Properties: &armappplatform.AppResourceProperties{
	// 		EnableEndToEndTLS: to.Ptr(false),
	// 		Fqdn: to.Ptr("myapp.mydomain.com"),
	// 		HTTPSOnly: to.Ptr(false),
	// 		PersistentDisk: &armappplatform.PersistentDisk{
	// 			MountPath: to.Ptr("/mypersistentdisk"),
	// 			SizeInGB: to.Ptr[int32](2),
	// 			UsedInGB: to.Ptr[int32](1),
	// 		},
	// 		ProvisioningState: to.Ptr(armappplatform.AppResourceProvisioningStateSucceeded),
	// 		Public: to.Ptr(true),
	// 		TemporaryDisk: &armappplatform.TemporaryDisk{
	// 			MountPath: to.Ptr("/mytemporarydisk"),
	// 			SizeInGB: to.Ptr[int32](2),
	// 		},
	// 		URL: to.Ptr("myapp.myservice.azuremicroservices.io"),
	// 	},
	// }
}
Output:

func (*AppsClient) BeginUpdate

func (client *AppsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource AppResource, options *AppsClientBeginUpdateOptions) (*runtime.Poller[AppsClientUpdateResponse], error)

BeginUpdate - Operation to update an exiting App. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • appResource - Parameters for the update operation
  • options - AppsClientBeginUpdateOptions contains the optional parameters for the AppsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Apps_Update.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAppsClient().BeginUpdate(ctx, "myResourceGroup", "myservice", "myapp", armappplatform.AppResource{
		Identity: &armappplatform.ManagedIdentityProperties{
			Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssigned),
		},
		Location: to.Ptr("eastus"),
		Properties: &armappplatform.AppResourceProperties{
			EnableEndToEndTLS: to.Ptr(false),
			Fqdn:              to.Ptr("myapp.mydomain.com"),
			HTTPSOnly:         to.Ptr(false),
			PersistentDisk: &armappplatform.PersistentDisk{
				MountPath: to.Ptr("/mypersistentdisk"),
				SizeInGB:  to.Ptr[int32](2),
			},
			Public: to.Ptr(true),
			TemporaryDisk: &armappplatform.TemporaryDisk{
				MountPath: to.Ptr("/mytemporarydisk"),
				SizeInGB:  to.Ptr[int32](2),
			},
		},
	}, 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 pull 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.AppResource = armappplatform.AppResource{
	// 	Name: to.Ptr("myapp"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/apps"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Identity: &armappplatform.ManagedIdentityProperties{
	// 		Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssigned),
	// 		PrincipalID: to.Ptr("principalid"),
	// 		TenantID: to.Ptr("tenantid"),
	// 	},
	// 	Location: to.Ptr("eastus"),
	// 	Properties: &armappplatform.AppResourceProperties{
	// 		EnableEndToEndTLS: to.Ptr(false),
	// 		Fqdn: to.Ptr("myapp.mydomain.com"),
	// 		HTTPSOnly: to.Ptr(false),
	// 		PersistentDisk: &armappplatform.PersistentDisk{
	// 			MountPath: to.Ptr("/mypersistentdisk"),
	// 			SizeInGB: to.Ptr[int32](2),
	// 			UsedInGB: to.Ptr[int32](1),
	// 		},
	// 		ProvisioningState: to.Ptr(armappplatform.AppResourceProvisioningStateSucceeded),
	// 		Public: to.Ptr(true),
	// 		TemporaryDisk: &armappplatform.TemporaryDisk{
	// 			MountPath: to.Ptr("/mytemporarydisk"),
	// 			SizeInGB: to.Ptr[int32](2),
	// 		},
	// 		URL: to.Ptr("myapp.myservice.azuremicroservices.io"),
	// 	},
	// }
}
Output:

func (*AppsClient) Get

func (client *AppsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *AppsClientGetOptions) (AppsClientGetResponse, error)

Get - Get an App and its properties. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • options - AppsClientGetOptions contains the optional parameters for the AppsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Apps_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAppsClient().Get(ctx, "myResourceGroup", "myservice", "myapp", &armappplatform.AppsClientGetOptions{SyncStatus: 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.AppResource = armappplatform.AppResource{
	// 	Name: to.Ptr("myapp"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/apps"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Identity: &armappplatform.ManagedIdentityProperties{
	// 		Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssigned),
	// 		PrincipalID: to.Ptr("principalid"),
	// 		TenantID: to.Ptr("tenantid"),
	// 	},
	// 	Location: to.Ptr("eastus"),
	// 	Properties: &armappplatform.AppResourceProperties{
	// 		EnableEndToEndTLS: to.Ptr(false),
	// 		Fqdn: to.Ptr("myapp.mydomain.com"),
	// 		HTTPSOnly: to.Ptr(false),
	// 		LoadedCertificates: []*armappplatform.LoadedCertificate{
	// 			{
	// 				LoadTrustStore: to.Ptr(false),
	// 				ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycert1"),
	// 			},
	// 			{
	// 				LoadTrustStore: to.Ptr(true),
	// 				ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycert2"),
	// 		}},
	// 		PersistentDisk: &armappplatform.PersistentDisk{
	// 			MountPath: to.Ptr("/mypersistentdisk"),
	// 			SizeInGB: to.Ptr[int32](2),
	// 			UsedInGB: to.Ptr[int32](1),
	// 		},
	// 		ProvisioningState: to.Ptr(armappplatform.AppResourceProvisioningStateSucceeded),
	// 		Public: to.Ptr(true),
	// 		TemporaryDisk: &armappplatform.TemporaryDisk{
	// 			MountPath: to.Ptr("/mytemporarydisk"),
	// 			SizeInGB: to.Ptr[int32](2),
	// 		},
	// 		URL: to.Ptr("myapp.myservice.azuremicroservices.io"),
	// 	},
	// }
}
Output:

func (*AppsClient) GetResourceUploadURL

func (client *AppsClient) GetResourceUploadURL(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *AppsClientGetResourceUploadURLOptions) (AppsClientGetResourceUploadURLResponse, error)

GetResourceUploadURL - Get an resource upload URL for an App, which may be artifacts or source archive. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • options - AppsClientGetResourceUploadURLOptions contains the optional parameters for the AppsClient.GetResourceUploadURL method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Apps_GetResourceUploadUrl.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAppsClient().GetResourceUploadURL(ctx, "myResourceGroup", "myservice", "myapp", 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.ResourceUploadDefinition = armappplatform.ResourceUploadDefinition{
	// 	RelativePath: to.Ptr("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855-20190801-3ed9f4a2-986b-4bbd-b833-a42dccb2f777"),
	// 	UploadURL: to.Ptr("https://springcloudstorageaccount.file.core.windows.net/bd172614181f42e2853f6fd90029cda8/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855-20190801-3ed9f4a2-986b-4bbd-b833-a42dccb2f777?sv=2018-03-28&sr=f&sig=SampleSignature&se=2019-08-01T10%3A42%3A21Z&sp=w"),
	// }
}
Output:

func (*AppsClient) NewListPager added in v0.5.0

func (client *AppsClient) NewListPager(resourceGroupName string, serviceName string, options *AppsClientListOptions) *runtime.Pager[AppsClientListResponse]

NewListPager - Handles requests to list all resources in a Service.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • options - AppsClientListOptions contains the optional parameters for the AppsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Apps_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAppsClient().NewListPager("myResourceGroup", "myservice", 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.AppResourceCollection = armappplatform.AppResourceCollection{
		// 	Value: []*armappplatform.AppResource{
		// 		{
		// 			Name: to.Ptr("myapp"),
		// 			Type: to.Ptr("Microsoft.AppPlatform/Spring/apps"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp"),
		// 			SystemData: &armappplatform.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
		// 				CreatedBy: to.Ptr("sample-user"),
		// 				CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("sample-user"),
		// 				LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
		// 			},
		// 			Identity: &armappplatform.ManagedIdentityProperties{
		// 				Type: to.Ptr(armappplatform.ManagedIdentityTypeSystemAssigned),
		// 				PrincipalID: to.Ptr("principalid"),
		// 				TenantID: to.Ptr("tenantid"),
		// 			},
		// 			Location: to.Ptr("eastus"),
		// 			Properties: &armappplatform.AppResourceProperties{
		// 				EnableEndToEndTLS: to.Ptr(false),
		// 				Fqdn: to.Ptr("myapp.mydomain.com"),
		// 				HTTPSOnly: to.Ptr(false),
		// 				LoadedCertificates: []*armappplatform.LoadedCertificate{
		// 					{
		// 						LoadTrustStore: to.Ptr(false),
		// 						ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycert1"),
		// 					},
		// 					{
		// 						LoadTrustStore: to.Ptr(true),
		// 						ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycert2"),
		// 				}},
		// 				PersistentDisk: &armappplatform.PersistentDisk{
		// 					MountPath: to.Ptr("/mypersistentdisk"),
		// 					SizeInGB: to.Ptr[int32](2),
		// 					UsedInGB: to.Ptr[int32](1),
		// 				},
		// 				ProvisioningState: to.Ptr(armappplatform.AppResourceProvisioningStateSucceeded),
		// 				Public: to.Ptr(true),
		// 				TemporaryDisk: &armappplatform.TemporaryDisk{
		// 					MountPath: to.Ptr("/mytemporarydisk"),
		// 					SizeInGB: to.Ptr[int32](2),
		// 				},
		// 				URL: to.Ptr("myapp.myservice.azuremicroservices.io"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*AppsClient) ValidateDomain

func (client *AppsClient) ValidateDomain(ctx context.Context, resourceGroupName string, serviceName string, appName string, validatePayload CustomDomainValidatePayload, options *AppsClientValidateDomainOptions) (AppsClientValidateDomainResponse, error)

ValidateDomain - Check the resource name is valid as well as not in use. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • validatePayload - Custom domain payload to be validated
  • options - AppsClientValidateDomainOptions contains the optional parameters for the AppsClient.ValidateDomain method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Apps_ValidateDomain.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAppsClient().ValidateDomain(ctx, "myResourceGroup", "myservice", "myapp", armappplatform.CustomDomainValidatePayload{
		Name: to.Ptr("mydomain.io"),
	}, 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.CustomDomainValidateResult = armappplatform.CustomDomainValidateResult{
	// 	IsValid: to.Ptr(false),
	// 	Message: to.Ptr("Certificate is invalid, please check if it is a self signed cert or if it contains a suitable dns name"),
	// }
}
Output:

type AppsClientBeginCreateOrUpdateOptions added in v0.3.0

type AppsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

AppsClientBeginCreateOrUpdateOptions contains the optional parameters for the AppsClient.BeginCreateOrUpdate method.

type AppsClientBeginDeleteOptions added in v0.3.0

type AppsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

AppsClientBeginDeleteOptions contains the optional parameters for the AppsClient.BeginDelete method.

type AppsClientBeginSetActiveDeploymentsOptions added in v0.3.0

type AppsClientBeginSetActiveDeploymentsOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

AppsClientBeginSetActiveDeploymentsOptions contains the optional parameters for the AppsClient.BeginSetActiveDeployments method.

type AppsClientBeginUpdateOptions added in v0.3.0

type AppsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

AppsClientBeginUpdateOptions contains the optional parameters for the AppsClient.BeginUpdate method.

type AppsClientCreateOrUpdateResponse added in v0.3.0

type AppsClientCreateOrUpdateResponse struct {
	// App resource payload
	AppResource
}

AppsClientCreateOrUpdateResponse contains the response from method AppsClient.BeginCreateOrUpdate.

type AppsClientDeleteResponse added in v0.3.0

type AppsClientDeleteResponse struct {
}

AppsClientDeleteResponse contains the response from method AppsClient.BeginDelete.

type AppsClientGetOptions added in v0.3.0

type AppsClientGetOptions struct {
	// Indicates whether sync status
	SyncStatus *string
}

AppsClientGetOptions contains the optional parameters for the AppsClient.Get method.

type AppsClientGetResourceUploadURLOptions added in v0.3.0

type AppsClientGetResourceUploadURLOptions struct {
}

AppsClientGetResourceUploadURLOptions contains the optional parameters for the AppsClient.GetResourceUploadURL method.

type AppsClientGetResourceUploadURLResponse added in v0.3.0

type AppsClientGetResourceUploadURLResponse struct {
	// Resource upload definition payload
	ResourceUploadDefinition
}

AppsClientGetResourceUploadURLResponse contains the response from method AppsClient.GetResourceUploadURL.

type AppsClientGetResponse added in v0.3.0

type AppsClientGetResponse struct {
	// App resource payload
	AppResource
}

AppsClientGetResponse contains the response from method AppsClient.Get.

type AppsClientListOptions added in v0.3.0

type AppsClientListOptions struct {
}

AppsClientListOptions contains the optional parameters for the AppsClient.NewListPager method.

type AppsClientListResponse added in v0.3.0

type AppsClientListResponse struct {
	// Object that includes an array of App resources and a possible link for next set
	AppResourceCollection
}

AppsClientListResponse contains the response from method AppsClient.NewListPager.

type AppsClientSetActiveDeploymentsResponse added in v0.3.0

type AppsClientSetActiveDeploymentsResponse struct {
	// App resource payload
	AppResource
}

AppsClientSetActiveDeploymentsResponse contains the response from method AppsClient.BeginSetActiveDeployments.

type AppsClientUpdateResponse added in v0.3.0

type AppsClientUpdateResponse struct {
	// App resource payload
	AppResource
}

AppsClientUpdateResponse contains the response from method AppsClient.BeginUpdate.

type AppsClientValidateDomainOptions added in v0.3.0

type AppsClientValidateDomainOptions struct {
}

AppsClientValidateDomainOptions contains the optional parameters for the AppsClient.ValidateDomain method.

type AppsClientValidateDomainResponse added in v0.3.0

type AppsClientValidateDomainResponse struct {
	// Validation result for custom domain.
	CustomDomainValidateResult
}

AppsClientValidateDomainResponse contains the response from method AppsClient.ValidateDomain.

type AvailableOperations

type AvailableOperations struct {
	// URL client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string

	// Collection of available operation details
	Value []*OperationDetail
}

AvailableOperations - Available operations of the service

func (AvailableOperations) MarshalJSON

func (a AvailableOperations) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AvailableOperations.

func (*AvailableOperations) UnmarshalJSON added in v1.1.0

func (a *AvailableOperations) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AvailableOperations.

type AvailableRuntimeVersions

type AvailableRuntimeVersions struct {
	// READ-ONLY; A list of all supported runtime versions.
	Value []*SupportedRuntimeVersion
}

func (AvailableRuntimeVersions) MarshalJSON

func (a AvailableRuntimeVersions) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AvailableRuntimeVersions.

func (*AvailableRuntimeVersions) UnmarshalJSON added in v1.1.0

func (a *AvailableRuntimeVersions) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AvailableRuntimeVersions.

type BindingResource

type BindingResource struct {
	// Properties of the Binding resource
	Properties *BindingResourceProperties

	// READ-ONLY; Fully qualified resource Id for the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource.
	Type *string
}

BindingResource - Binding resource payload

func (BindingResource) MarshalJSON

func (b BindingResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BindingResource.

func (*BindingResource) UnmarshalJSON added in v0.2.0

func (b *BindingResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BindingResource.

type BindingResourceCollection

type BindingResourceCollection struct {
	// URL client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string

	// Collection of Binding resources
	Value []*BindingResource
}

BindingResourceCollection - Object that includes an array of Binding resources and a possible link for next set

func (BindingResourceCollection) MarshalJSON

func (b BindingResourceCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BindingResourceCollection.

func (*BindingResourceCollection) UnmarshalJSON added in v1.1.0

func (b *BindingResourceCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BindingResourceCollection.

type BindingResourceProperties

type BindingResourceProperties struct {
	// Binding parameters of the Binding resource
	BindingParameters map[string]any

	// The key of the bound resource
	Key *string

	// The Azure resource id of the bound resource
	ResourceID *string

	// READ-ONLY; Creation time of the Binding resource
	CreatedAt *string

	// READ-ONLY; The generated Spring Boot property file for this binding. The secret will be deducted.
	GeneratedProperties *string

	// READ-ONLY; The name of the bound resource
	ResourceName *string

	// READ-ONLY; The standard Azure resource type of the bound resource
	ResourceType *string

	// READ-ONLY; Update time of the Binding resource
	UpdatedAt *string
}

BindingResourceProperties - Binding resource properties payload

func (BindingResourceProperties) MarshalJSON

func (b BindingResourceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BindingResourceProperties.

func (*BindingResourceProperties) UnmarshalJSON added in v1.1.0

func (b *BindingResourceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BindingResourceProperties.

type BindingType added in v0.3.0

type BindingType string

BindingType - Buildpack Binding Type

const (
	BindingTypeApacheSkyWalking    BindingType = "ApacheSkyWalking"
	BindingTypeAppDynamics         BindingType = "AppDynamics"
	BindingTypeApplicationInsights BindingType = "ApplicationInsights"
	BindingTypeDynatrace           BindingType = "Dynatrace"
	BindingTypeElasticAPM          BindingType = "ElasticAPM"
	BindingTypeNewRelic            BindingType = "NewRelic"
)

func PossibleBindingTypeValues added in v0.3.0

func PossibleBindingTypeValues() []BindingType

PossibleBindingTypeValues returns the possible values for the BindingType const type.

type BindingsClient

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

BindingsClient contains the methods for the Bindings group. Don't use this type directly, use NewBindingsClient() instead.

func NewBindingsClient

func NewBindingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BindingsClient, error)

NewBindingsClient creates a new instance of BindingsClient with the specified values.

  • subscriptionID - Gets subscription ID which uniquely identify the 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 (*BindingsClient) BeginCreateOrUpdate

func (client *BindingsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource BindingResource, options *BindingsClientBeginCreateOrUpdateOptions) (*runtime.Poller[BindingsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create a new Binding or update an exiting Binding. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • bindingName - The name of the Binding resource.
  • bindingResource - Parameters for the create or update operation
  • options - BindingsClientBeginCreateOrUpdateOptions contains the optional parameters for the BindingsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Bindings_CreateOrUpdate.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewBindingsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "myapp", "mybinding", armappplatform.BindingResource{
		Properties: &armappplatform.BindingResourceProperties{
			BindingParameters: map[string]any{
				"apiType":      "SQL",
				"databaseName": "db1",
			},
			Key:        to.Ptr("xxxx"),
			ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DocumentDB/databaseAccounts/my-cosmosdb-1"),
		},
	}, 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 pull 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.BindingResource = armappplatform.BindingResource{
	// 	Name: to.Ptr("mybinding"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/apps/bindings"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/bindings/mybinding"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.BindingResourceProperties{
	// 		BindingParameters: map[string]any{
	// 			"apiType": "SQL",
	// 			"databaseName": "db1",
	// 		},
	// 		CreatedAt: to.Ptr("2019-01-01T12:34:56.000Z"),
	// 		GeneratedProperties: to.Ptr("<connection-string>"),
	// 		ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DocumentDB/databaseAccounts/my-cosmosdb-1"),
	// 		ResourceName: to.Ptr("my-cosmosdb-1"),
	// 		ResourceType: to.Ptr("Microsoft.DocumentDB"),
	// 		UpdatedAt: to.Ptr("2019-01-01T12:34:56.000Z"),
	// 	},
	// }
}
Output:

func (*BindingsClient) BeginDelete

func (client *BindingsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, options *BindingsClientBeginDeleteOptions) (*runtime.Poller[BindingsClientDeleteResponse], error)

BeginDelete - Operation to delete a Binding. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • bindingName - The name of the Binding resource.
  • options - BindingsClientBeginDeleteOptions contains the optional parameters for the BindingsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Bindings_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewBindingsClient().BeginDelete(ctx, "myResourceGroup", "myservice", "myapp", "mybinding", 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 pull the result: %v", err)
	}
}
Output:

func (*BindingsClient) BeginUpdate

func (client *BindingsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource BindingResource, options *BindingsClientBeginUpdateOptions) (*runtime.Poller[BindingsClientUpdateResponse], error)

BeginUpdate - Operation to update an exiting Binding. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • bindingName - The name of the Binding resource.
  • bindingResource - Parameters for the update operation
  • options - BindingsClientBeginUpdateOptions contains the optional parameters for the BindingsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Bindings_Update.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewBindingsClient().BeginUpdate(ctx, "myResourceGroup", "myservice", "myapp", "mybinding", armappplatform.BindingResource{
		Properties: &armappplatform.BindingResourceProperties{
			BindingParameters: map[string]any{
				"apiType":      "SQL",
				"databaseName": "db1",
			},
			Key: to.Ptr("xxxx"),
		},
	}, 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 pull 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.BindingResource = armappplatform.BindingResource{
	// 	Name: to.Ptr("mybinding"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/apps/bindings"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/bindings/mybinding"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.BindingResourceProperties{
	// 		BindingParameters: map[string]any{
	// 			"apiType": "SQL",
	// 			"databaseName": "db1",
	// 		},
	// 		CreatedAt: to.Ptr("2019-01-01T12:34:56.000Z"),
	// 		GeneratedProperties: to.Ptr("<connection-string>"),
	// 		ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DocumentDB/databaseAccounts/my-cosmosdb-1"),
	// 		ResourceName: to.Ptr("my-cosmosdb-1"),
	// 		ResourceType: to.Ptr("Microsoft.DocumentDB"),
	// 		UpdatedAt: to.Ptr("2019-01-01T12:34:56.000Z"),
	// 	},
	// }
}
Output:

func (*BindingsClient) Get

func (client *BindingsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, options *BindingsClientGetOptions) (BindingsClientGetResponse, error)

Get - Get a Binding and its properties. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • bindingName - The name of the Binding resource.
  • options - BindingsClientGetOptions contains the optional parameters for the BindingsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Bindings_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewBindingsClient().Get(ctx, "myResourceGroup", "myservice", "myapp", "mybinding", 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.BindingResource = armappplatform.BindingResource{
	// 	Name: to.Ptr("mybinding"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/apps/bindings"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/bindings/mybinding"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.BindingResourceProperties{
	// 		BindingParameters: map[string]any{
	// 			"apiType": "SQL",
	// 			"databaseName": "db1",
	// 		},
	// 		CreatedAt: to.Ptr("2019-01-01T12:34:56.000Z"),
	// 		GeneratedProperties: to.Ptr("<connection-string>"),
	// 		ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DocumentDB/databaseAccounts/my-cosmosdb-1"),
	// 		ResourceName: to.Ptr("my-cosmosdb-1"),
	// 		ResourceType: to.Ptr("Microsoft.DocumentDB"),
	// 		UpdatedAt: to.Ptr("2019-01-01T12:34:56.000Z"),
	// 	},
	// }
}
Output:

func (*BindingsClient) NewListPager added in v0.5.0

func (client *BindingsClient) NewListPager(resourceGroupName string, serviceName string, appName string, options *BindingsClientListOptions) *runtime.Pager[BindingsClientListResponse]

NewListPager - Handles requests to list all resources in an App.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • options - BindingsClientListOptions contains the optional parameters for the BindingsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Bindings_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewBindingsClient().NewListPager("myResourceGroup", "myservice", "myapp", 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.BindingResourceCollection = armappplatform.BindingResourceCollection{
		// 	Value: []*armappplatform.BindingResource{
		// 		{
		// 			Name: to.Ptr("mybinding"),
		// 			Type: to.Ptr("Microsoft.AppPlatform/Spring/apps/bindings"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/bindings/mybinding"),
		// 			SystemData: &armappplatform.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
		// 				CreatedBy: to.Ptr("sample-user"),
		// 				CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("sample-user"),
		// 				LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
		// 			},
		// 			Properties: &armappplatform.BindingResourceProperties{
		// 				BindingParameters: map[string]any{
		// 					"apiType": "SQL",
		// 					"databaseName": "db1",
		// 				},
		// 				CreatedAt: to.Ptr("2019-01-01T12:34:56.000Z"),
		// 				GeneratedProperties: to.Ptr("<connection-string>"),
		// 				ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DocumentDB/databaseAccounts/my-cosmosdb-1"),
		// 				ResourceName: to.Ptr("my-cosmosdb-1"),
		// 				ResourceType: to.Ptr("Microsoft.DocumentDB"),
		// 				UpdatedAt: to.Ptr("2019-01-01T12:34:56.000Z"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type BindingsClientBeginCreateOrUpdateOptions added in v0.3.0

type BindingsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

BindingsClientBeginCreateOrUpdateOptions contains the optional parameters for the BindingsClient.BeginCreateOrUpdate method.

type BindingsClientBeginDeleteOptions added in v0.3.0

type BindingsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

BindingsClientBeginDeleteOptions contains the optional parameters for the BindingsClient.BeginDelete method.

type BindingsClientBeginUpdateOptions added in v0.3.0

type BindingsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

BindingsClientBeginUpdateOptions contains the optional parameters for the BindingsClient.BeginUpdate method.

type BindingsClientCreateOrUpdateResponse added in v0.3.0

type BindingsClientCreateOrUpdateResponse struct {
	// Binding resource payload
	BindingResource
}

BindingsClientCreateOrUpdateResponse contains the response from method BindingsClient.BeginCreateOrUpdate.

type BindingsClientDeleteResponse added in v0.3.0

type BindingsClientDeleteResponse struct {
}

BindingsClientDeleteResponse contains the response from method BindingsClient.BeginDelete.

type BindingsClientGetOptions added in v0.3.0

type BindingsClientGetOptions struct {
}

BindingsClientGetOptions contains the optional parameters for the BindingsClient.Get method.

type BindingsClientGetResponse added in v0.3.0

type BindingsClientGetResponse struct {
	// Binding resource payload
	BindingResource
}

BindingsClientGetResponse contains the response from method BindingsClient.Get.

type BindingsClientListOptions added in v0.3.0

type BindingsClientListOptions struct {
}

BindingsClientListOptions contains the optional parameters for the BindingsClient.NewListPager method.

type BindingsClientListResponse added in v0.3.0

type BindingsClientListResponse struct {
	// Object that includes an array of Binding resources and a possible link for next set
	BindingResourceCollection
}

BindingsClientListResponse contains the response from method BindingsClient.NewListPager.

type BindingsClientUpdateResponse added in v0.3.0

type BindingsClientUpdateResponse struct {
	// Binding resource payload
	BindingResource
}

BindingsClientUpdateResponse contains the response from method BindingsClient.BeginUpdate.

type Build added in v0.3.0

type Build struct {
	// Properties of the build resource
	Properties *BuildProperties

	// READ-ONLY; Fully qualified resource Id for the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource.
	Type *string
}

Build resource payload

func (Build) MarshalJSON added in v1.1.0

func (b Build) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Build.

func (*Build) UnmarshalJSON added in v1.1.0

func (b *Build) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Build.

type BuildCollection added in v0.3.0

type BuildCollection struct {
	// URL client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string

	// Collection of Build resources
	Value []*Build
}

BuildCollection - Object that includes an array of Build resources and a possible link for next set

func (BuildCollection) MarshalJSON added in v0.3.0

func (b BuildCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BuildCollection.

func (*BuildCollection) UnmarshalJSON added in v1.1.0

func (b *BuildCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BuildCollection.

type BuildProperties added in v0.3.0

type BuildProperties struct {
	// The resource id of agent pool
	AgentPool *string

	// The resource id of builder to build the source code
	Builder *string

	// The environment variables for this build
	Env map[string]*string

	// The relative path of source code
	RelativePath *string

	// READ-ONLY; Provisioning state of the KPack build result
	ProvisioningState *BuildProvisioningState

	// READ-ONLY; The build result triggered by this build
	TriggeredBuildResult *TriggeredBuildResult
}

BuildProperties - Build resource properties payload

func (BuildProperties) MarshalJSON added in v0.3.0

func (b BuildProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BuildProperties.

func (*BuildProperties) UnmarshalJSON added in v1.1.0

func (b *BuildProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BuildProperties.

type BuildProvisioningState added in v0.3.0

type BuildProvisioningState string

BuildProvisioningState - Provisioning state of the KPack build result

const (
	BuildProvisioningStateCreating  BuildProvisioningState = "Creating"
	BuildProvisioningStateDeleting  BuildProvisioningState = "Deleting"
	BuildProvisioningStateFailed    BuildProvisioningState = "Failed"
	BuildProvisioningStateSucceeded BuildProvisioningState = "Succeeded"
	BuildProvisioningStateUpdating  BuildProvisioningState = "Updating"
)

func PossibleBuildProvisioningStateValues added in v0.3.0

func PossibleBuildProvisioningStateValues() []BuildProvisioningState

PossibleBuildProvisioningStateValues returns the possible values for the BuildProvisioningState const type.

type BuildResult added in v0.3.0

type BuildResult struct {
	// Properties of the build result resource
	Properties *BuildResultProperties

	// READ-ONLY; Fully qualified resource Id for the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource.
	Type *string
}

BuildResult - Build result resource payload

func (BuildResult) MarshalJSON added in v1.1.0

func (b BuildResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BuildResult.

func (*BuildResult) UnmarshalJSON added in v1.1.0

func (b *BuildResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BuildResult.

type BuildResultCollection added in v0.3.0

type BuildResultCollection struct {
	// URL client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string

	// Collection of Build result resources
	Value []*BuildResult
}

BuildResultCollection - Object that includes an array of Build result resources and a possible link for next set

func (BuildResultCollection) MarshalJSON added in v0.3.0

func (b BuildResultCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BuildResultCollection.

func (*BuildResultCollection) UnmarshalJSON added in v1.1.0

func (b *BuildResultCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BuildResultCollection.

type BuildResultLog added in v0.3.0

type BuildResultLog struct {
	// The public download URL of this build result log
	BlobURL *string
}

BuildResultLog - Build result log resource properties payload

func (BuildResultLog) MarshalJSON added in v1.1.0

func (b BuildResultLog) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BuildResultLog.

func (*BuildResultLog) UnmarshalJSON added in v1.1.0

func (b *BuildResultLog) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BuildResultLog.

type BuildResultProperties added in v0.3.0

type BuildResultProperties struct {
	// The build pod name which can be used to get the build log streaming.
	BuildPodName *string

	// The name of this build result
	Name *string

	// READ-ONLY; All of the build stage (init-container and container) resources in build pod.
	BuildStages []*BuildStageProperties

	// READ-ONLY; Provisioning state of the KPack build result
	ProvisioningState *BuildResultProvisioningState
}

BuildResultProperties - Build result resource properties payload

func (BuildResultProperties) MarshalJSON added in v0.3.0

func (b BuildResultProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BuildResultProperties.

func (*BuildResultProperties) UnmarshalJSON added in v1.1.0

func (b *BuildResultProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BuildResultProperties.

type BuildResultProvisioningState added in v0.3.0

type BuildResultProvisioningState string

BuildResultProvisioningState - Provisioning state of the KPack build result

const (
	BuildResultProvisioningStateBuilding  BuildResultProvisioningState = "Building"
	BuildResultProvisioningStateDeleting  BuildResultProvisioningState = "Deleting"
	BuildResultProvisioningStateFailed    BuildResultProvisioningState = "Failed"
	BuildResultProvisioningStateQueuing   BuildResultProvisioningState = "Queuing"
	BuildResultProvisioningStateSucceeded BuildResultProvisioningState = "Succeeded"
)

func PossibleBuildResultProvisioningStateValues added in v0.3.0

func PossibleBuildResultProvisioningStateValues() []BuildResultProvisioningState

PossibleBuildResultProvisioningStateValues returns the possible values for the BuildResultProvisioningState const type.

type BuildResultUserSourceInfo added in v0.3.0

type BuildResultUserSourceInfo struct {
	// REQUIRED; Type of the source uploaded
	Type *string

	// Resource id of an existing succeeded build result under the same Spring instance.
	BuildResultID *string

	// Version of the source
	Version *string
}

BuildResultUserSourceInfo - Reference to a build result

func (*BuildResultUserSourceInfo) GetUserSourceInfo added in v0.3.0

func (b *BuildResultUserSourceInfo) GetUserSourceInfo() *UserSourceInfo

GetUserSourceInfo implements the UserSourceInfoClassification interface for type BuildResultUserSourceInfo.

func (BuildResultUserSourceInfo) MarshalJSON added in v0.3.0

func (b BuildResultUserSourceInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BuildResultUserSourceInfo.

func (*BuildResultUserSourceInfo) UnmarshalJSON added in v0.3.0

func (b *BuildResultUserSourceInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BuildResultUserSourceInfo.

type BuildService added in v0.3.0

type BuildService struct {
	// Properties of the build resource
	Properties *BuildServiceProperties

	// READ-ONLY; Fully qualified resource Id for the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource.
	Type *string
}

BuildService - Build service resource payload

func (BuildService) MarshalJSON added in v1.1.0

func (b BuildService) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BuildService.

func (*BuildService) UnmarshalJSON added in v1.1.0

func (b *BuildService) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BuildService.

type BuildServiceAgentPoolClient added in v0.3.0

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

BuildServiceAgentPoolClient contains the methods for the BuildServiceAgentPool group. Don't use this type directly, use NewBuildServiceAgentPoolClient() instead.

func NewBuildServiceAgentPoolClient added in v0.3.0

func NewBuildServiceAgentPoolClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BuildServiceAgentPoolClient, error)

NewBuildServiceAgentPoolClient creates a new instance of BuildServiceAgentPoolClient with the specified values.

  • subscriptionID - Gets subscription ID which uniquely identify the 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 (*BuildServiceAgentPoolClient) BeginUpdatePut added in v0.3.0

func (client *BuildServiceAgentPoolClient) BeginUpdatePut(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, agentPoolName string, agentPoolResource BuildServiceAgentPoolResource, options *BuildServiceAgentPoolClientBeginUpdatePutOptions) (*runtime.Poller[BuildServiceAgentPoolClientUpdatePutResponse], error)

BeginUpdatePut - Create or update build service agent pool. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • buildServiceName - The name of the build service resource.
  • agentPoolName - The name of the build service agent pool resource.
  • agentPoolResource - Parameters for the update operation
  • options - BuildServiceAgentPoolClientBeginUpdatePutOptions contains the optional parameters for the BuildServiceAgentPoolClient.BeginUpdatePut method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildServiceAgentPool_UpdatePut.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewBuildServiceAgentPoolClient().BeginUpdatePut(ctx, "myResourceGroup", "myservice", "default", "default", armappplatform.BuildServiceAgentPoolResource{
		Properties: &armappplatform.BuildServiceAgentPoolProperties{
			PoolSize: &armappplatform.BuildServiceAgentPoolSizeProperties{
				Name: to.Ptr("S3"),
			},
		},
	}, 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 pull 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.BuildServiceAgentPoolResource = armappplatform.BuildServiceAgentPoolResource{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/buildServices/agentPools"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/agentPools/default"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.BuildServiceAgentPoolProperties{
	// 		PoolSize: &armappplatform.BuildServiceAgentPoolSizeProperties{
	// 			Name: to.Ptr("S3"),
	// 			CPU: to.Ptr("4"),
	// 			Memory: to.Ptr("8Gi"),
	// 		},
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 	},
	// }
}
Output:

func (*BuildServiceAgentPoolClient) Get added in v0.3.0

func (client *BuildServiceAgentPoolClient) Get(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, agentPoolName string, options *BuildServiceAgentPoolClientGetOptions) (BuildServiceAgentPoolClientGetResponse, error)

Get - Get build service agent pool. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • buildServiceName - The name of the build service resource.
  • agentPoolName - The name of the build service agent pool resource.
  • options - BuildServiceAgentPoolClientGetOptions contains the optional parameters for the BuildServiceAgentPoolClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildServiceAgentPool_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewBuildServiceAgentPoolClient().Get(ctx, "myResourceGroup", "myservice", "default", "default", 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.BuildServiceAgentPoolResource = armappplatform.BuildServiceAgentPoolResource{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/buildServices/agentPools"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/agentPools/default"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.BuildServiceAgentPoolProperties{
	// 		PoolSize: &armappplatform.BuildServiceAgentPoolSizeProperties{
	// 			Name: to.Ptr("S3"),
	// 			CPU: to.Ptr("4"),
	// 			Memory: to.Ptr("8Gi"),
	// 		},
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 	},
	// }
}
Output:

func (*BuildServiceAgentPoolClient) NewListPager added in v0.5.0

func (client *BuildServiceAgentPoolClient) NewListPager(resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceAgentPoolClientListOptions) *runtime.Pager[BuildServiceAgentPoolClientListResponse]

NewListPager - List build service agent pool.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • buildServiceName - The name of the build service resource.
  • options - BuildServiceAgentPoolClientListOptions contains the optional parameters for the BuildServiceAgentPoolClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildServiceAgentPool_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewBuildServiceAgentPoolClient().NewListPager("myResourceGroup", "myservice", "default", 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.BuildServiceAgentPoolResourceCollection = armappplatform.BuildServiceAgentPoolResourceCollection{
		// 	Value: []*armappplatform.BuildServiceAgentPoolResource{
		// 		{
		// 			Name: to.Ptr("default"),
		// 			Type: to.Ptr("Microsoft.AppPlatform/Spring/buildServices/agentPools"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/agentPools/default"),
		// 			SystemData: &armappplatform.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
		// 				CreatedBy: to.Ptr("sample-user"),
		// 				CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("sample-user"),
		// 				LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
		// 			},
		// 			Properties: &armappplatform.BuildServiceAgentPoolProperties{
		// 				PoolSize: &armappplatform.BuildServiceAgentPoolSizeProperties{
		// 					Name: to.Ptr("S3"),
		// 					CPU: to.Ptr("4"),
		// 					Memory: to.Ptr("8Gi"),
		// 				},
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type BuildServiceAgentPoolClientBeginUpdatePutOptions added in v0.3.0

type BuildServiceAgentPoolClientBeginUpdatePutOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

BuildServiceAgentPoolClientBeginUpdatePutOptions contains the optional parameters for the BuildServiceAgentPoolClient.BeginUpdatePut method.

type BuildServiceAgentPoolClientGetOptions added in v0.3.0

type BuildServiceAgentPoolClientGetOptions struct {
}

BuildServiceAgentPoolClientGetOptions contains the optional parameters for the BuildServiceAgentPoolClient.Get method.

type BuildServiceAgentPoolClientGetResponse added in v0.3.0

type BuildServiceAgentPoolClientGetResponse struct {
	// The build service agent pool resource
	BuildServiceAgentPoolResource
}

BuildServiceAgentPoolClientGetResponse contains the response from method BuildServiceAgentPoolClient.Get.

type BuildServiceAgentPoolClientListOptions added in v0.3.0

type BuildServiceAgentPoolClientListOptions struct {
}

BuildServiceAgentPoolClientListOptions contains the optional parameters for the BuildServiceAgentPoolClient.NewListPager method.

type BuildServiceAgentPoolClientListResponse added in v0.3.0

type BuildServiceAgentPoolClientListResponse struct {
	// Object that includes an array of build service agent pool resources and a possible link for next set
	BuildServiceAgentPoolResourceCollection
}

BuildServiceAgentPoolClientListResponse contains the response from method BuildServiceAgentPoolClient.NewListPager.

type BuildServiceAgentPoolClientUpdatePutResponse added in v0.3.0

type BuildServiceAgentPoolClientUpdatePutResponse struct {
	// The build service agent pool resource
	BuildServiceAgentPoolResource
}

BuildServiceAgentPoolClientUpdatePutResponse contains the response from method BuildServiceAgentPoolClient.BeginUpdatePut.

type BuildServiceAgentPoolProperties added in v0.3.0

type BuildServiceAgentPoolProperties struct {
	// build service agent pool size properties
	PoolSize *BuildServiceAgentPoolSizeProperties

	// READ-ONLY; Provisioning state of the build service agent pool
	ProvisioningState *string
}

BuildServiceAgentPoolProperties - Build service agent pool properties

func (BuildServiceAgentPoolProperties) MarshalJSON added in v1.1.0

func (b BuildServiceAgentPoolProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BuildServiceAgentPoolProperties.

func (*BuildServiceAgentPoolProperties) UnmarshalJSON added in v1.1.0

func (b *BuildServiceAgentPoolProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BuildServiceAgentPoolProperties.

type BuildServiceAgentPoolResource added in v0.3.0

type BuildServiceAgentPoolResource struct {
	// build service agent pool properties
	Properties *BuildServiceAgentPoolProperties

	// READ-ONLY; Fully qualified resource Id for the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource.
	Type *string
}

BuildServiceAgentPoolResource - The build service agent pool resource

func (BuildServiceAgentPoolResource) MarshalJSON added in v1.1.0

func (b BuildServiceAgentPoolResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BuildServiceAgentPoolResource.

func (*BuildServiceAgentPoolResource) UnmarshalJSON added in v1.1.0

func (b *BuildServiceAgentPoolResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BuildServiceAgentPoolResource.

type BuildServiceAgentPoolResourceCollection added in v0.3.0

type BuildServiceAgentPoolResourceCollection struct {
	// URL client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string

	// Collection of build service agent pool resource
	Value []*BuildServiceAgentPoolResource
}

BuildServiceAgentPoolResourceCollection - Object that includes an array of build service agent pool resources and a possible link for next set

func (BuildServiceAgentPoolResourceCollection) MarshalJSON added in v0.3.0

func (b BuildServiceAgentPoolResourceCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BuildServiceAgentPoolResourceCollection.

func (*BuildServiceAgentPoolResourceCollection) UnmarshalJSON added in v1.1.0

func (b *BuildServiceAgentPoolResourceCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BuildServiceAgentPoolResourceCollection.

type BuildServiceAgentPoolSizeProperties added in v0.3.0

type BuildServiceAgentPoolSizeProperties struct {
	// The name of build service agent pool size
	Name *string

	// READ-ONLY; The cpu property of build service agent pool size
	CPU *string

	// READ-ONLY; The memory property of build service agent pool size
	Memory *string
}

BuildServiceAgentPoolSizeProperties - Build service agent pool size properties

func (BuildServiceAgentPoolSizeProperties) MarshalJSON added in v1.1.0

func (b BuildServiceAgentPoolSizeProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BuildServiceAgentPoolSizeProperties.

func (*BuildServiceAgentPoolSizeProperties) UnmarshalJSON added in v1.1.0

func (b *BuildServiceAgentPoolSizeProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BuildServiceAgentPoolSizeProperties.

type BuildServiceBuilderClient added in v0.3.0

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

BuildServiceBuilderClient contains the methods for the BuildServiceBuilder group. Don't use this type directly, use NewBuildServiceBuilderClient() instead.

func NewBuildServiceBuilderClient added in v0.3.0

func NewBuildServiceBuilderClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BuildServiceBuilderClient, error)

NewBuildServiceBuilderClient creates a new instance of BuildServiceBuilderClient with the specified values.

  • subscriptionID - Gets subscription ID which uniquely identify the 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 (*BuildServiceBuilderClient) BeginCreateOrUpdate added in v0.3.0

func (client *BuildServiceBuilderClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, builderResource BuilderResource, options *BuildServiceBuilderClientBeginCreateOrUpdateOptions) (*runtime.Poller[BuildServiceBuilderClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update a KPack builder. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • buildServiceName - The name of the build service resource.
  • builderName - The name of the builder resource.
  • builderResource - The target builder for the create or update operation
  • options - BuildServiceBuilderClientBeginCreateOrUpdateOptions contains the optional parameters for the BuildServiceBuilderClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildServiceBuilder_CreateOrUpdate.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewBuildServiceBuilderClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", "mybuilder", armappplatform.BuilderResource{
		Properties: &armappplatform.BuilderProperties{
			BuildpackGroups: []*armappplatform.BuildpacksGroupProperties{
				{
					Name: to.Ptr("mix"),
					Buildpacks: []*armappplatform.BuildpackProperties{
						{
							ID: to.Ptr("tanzu-buildpacks/java-azure"),
						}},
				}},
			Stack: &armappplatform.StackProperties{
				ID:      to.Ptr("io.buildpacks.stacks.bionic"),
				Version: to.Ptr("base"),
			},
		},
	}, 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 pull 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.BuilderResource = armappplatform.BuilderResource{
	// 	Name: to.Ptr("mybuilder"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/buildServices/builders"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/builders/mybuilder"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.BuilderProperties{
	// 		BuildpackGroups: []*armappplatform.BuildpacksGroupProperties{
	// 			{
	// 				Name: to.Ptr("mix"),
	// 				Buildpacks: []*armappplatform.BuildpackProperties{
	// 					{
	// 						ID: to.Ptr("tanzu-buildpacks/java-azure"),
	// 					},
	// 					{
	// 						ID: to.Ptr("tanzu-buildpacks/dotnet-core"),
	// 				}},
	// 		}},
	// 		ProvisioningState: to.Ptr(armappplatform.BuilderProvisioningStateSucceeded),
	// 		Stack: &armappplatform.StackProperties{
	// 			ID: to.Ptr("io.buildpacks.stacks.bionic"),
	// 			Version: to.Ptr("base"),
	// 		},
	// 	},
	// }
}
Output:

func (*BuildServiceBuilderClient) BeginDelete added in v0.3.0

func (client *BuildServiceBuilderClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildServiceBuilderClientBeginDeleteOptions) (*runtime.Poller[BuildServiceBuilderClientDeleteResponse], error)

BeginDelete - Delete a KPack builder. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • buildServiceName - The name of the build service resource.
  • builderName - The name of the builder resource.
  • options - BuildServiceBuilderClientBeginDeleteOptions contains the optional parameters for the BuildServiceBuilderClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildServiceBuilder_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewBuildServiceBuilderClient().BeginDelete(ctx, "myResourceGroup", "myservice", "default", "mybuilder", 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 pull the result: %v", err)
	}
}
Output:

func (*BuildServiceBuilderClient) Get added in v0.3.0

func (client *BuildServiceBuilderClient) Get(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildServiceBuilderClientGetOptions) (BuildServiceBuilderClientGetResponse, error)

Get - Get a KPack builder. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • buildServiceName - The name of the build service resource.
  • builderName - The name of the builder resource.
  • options - BuildServiceBuilderClientGetOptions contains the optional parameters for the BuildServiceBuilderClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildServiceBuilder_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewBuildServiceBuilderClient().Get(ctx, "myResourceGroup", "myservice", "default", "mybuilder", 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.BuilderResource = armappplatform.BuilderResource{
	// 	Name: to.Ptr("mybuilder"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/buildServices/builders"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/builders/mybuilder"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.BuilderProperties{
	// 		BuildpackGroups: []*armappplatform.BuildpacksGroupProperties{
	// 			{
	// 				Name: to.Ptr("mix"),
	// 				Buildpacks: []*armappplatform.BuildpackProperties{
	// 					{
	// 						ID: to.Ptr("tanzu-buildpacks/java-azure"),
	// 				}},
	// 		}},
	// 		ProvisioningState: to.Ptr(armappplatform.BuilderProvisioningStateSucceeded),
	// 		Stack: &armappplatform.StackProperties{
	// 			ID: to.Ptr("io.buildpacks.stacks.bionic"),
	// 			Version: to.Ptr("base"),
	// 		},
	// 	},
	// }
}
Output:

func (*BuildServiceBuilderClient) NewListPager added in v0.5.0

func (client *BuildServiceBuilderClient) NewListPager(resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceBuilderClientListOptions) *runtime.Pager[BuildServiceBuilderClientListResponse]

NewListPager - List KPack builders result.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • buildServiceName - The name of the build service resource.
  • options - BuildServiceBuilderClientListOptions contains the optional parameters for the BuildServiceBuilderClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildServiceBuilder_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewBuildServiceBuilderClient().NewListPager("myResourceGroup", "myservice", "default", 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.BuilderResourceCollection = armappplatform.BuilderResourceCollection{
		// 	Value: []*armappplatform.BuilderResource{
		// 		{
		// 			Name: to.Ptr("mybuilder"),
		// 			Type: to.Ptr("Microsoft.AppPlatform/Spring/buildServices/builders"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/builders/mybuilder"),
		// 			SystemData: &armappplatform.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
		// 				CreatedBy: to.Ptr("sample-user"),
		// 				CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("sample-user"),
		// 				LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
		// 			},
		// 			Properties: &armappplatform.BuilderProperties{
		// 				BuildpackGroups: []*armappplatform.BuildpacksGroupProperties{
		// 					{
		// 						Name: to.Ptr("mix"),
		// 						Buildpacks: []*armappplatform.BuildpackProperties{
		// 							{
		// 								ID: to.Ptr("tanzu-buildpacks/java-azure"),
		// 						}},
		// 				}},
		// 				ProvisioningState: to.Ptr(armappplatform.BuilderProvisioningStateSucceeded),
		// 				Stack: &armappplatform.StackProperties{
		// 					ID: to.Ptr("io.buildpacks.stacks.bionic"),
		// 					Version: to.Ptr("base"),
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

type BuildServiceBuilderClientBeginCreateOrUpdateOptions added in v0.3.0

type BuildServiceBuilderClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

BuildServiceBuilderClientBeginCreateOrUpdateOptions contains the optional parameters for the BuildServiceBuilderClient.BeginCreateOrUpdate method.

type BuildServiceBuilderClientBeginDeleteOptions added in v0.3.0

type BuildServiceBuilderClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

BuildServiceBuilderClientBeginDeleteOptions contains the optional parameters for the BuildServiceBuilderClient.BeginDelete method.

type BuildServiceBuilderClientCreateOrUpdateResponse added in v0.3.0

type BuildServiceBuilderClientCreateOrUpdateResponse struct {
	// KPack Builder resource
	BuilderResource
}

BuildServiceBuilderClientCreateOrUpdateResponse contains the response from method BuildServiceBuilderClient.BeginCreateOrUpdate.

type BuildServiceBuilderClientDeleteResponse added in v0.3.0

type BuildServiceBuilderClientDeleteResponse struct {
}

BuildServiceBuilderClientDeleteResponse contains the response from method BuildServiceBuilderClient.BeginDelete.

type BuildServiceBuilderClientGetOptions added in v0.3.0

type BuildServiceBuilderClientGetOptions struct {
}

BuildServiceBuilderClientGetOptions contains the optional parameters for the BuildServiceBuilderClient.Get method.

type BuildServiceBuilderClientGetResponse added in v0.3.0

type BuildServiceBuilderClientGetResponse struct {
	// KPack Builder resource
	BuilderResource
}

BuildServiceBuilderClientGetResponse contains the response from method BuildServiceBuilderClient.Get.

type BuildServiceBuilderClientListOptions added in v0.3.0

type BuildServiceBuilderClientListOptions struct {
}

BuildServiceBuilderClientListOptions contains the optional parameters for the BuildServiceBuilderClient.NewListPager method.

type BuildServiceBuilderClientListResponse added in v0.3.0

type BuildServiceBuilderClientListResponse struct {
	// Object that includes an array of Builder resources and a possible link for next set
	BuilderResourceCollection
}

BuildServiceBuilderClientListResponse contains the response from method BuildServiceBuilderClient.NewListPager.

type BuildServiceClient added in v0.3.0

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

BuildServiceClient contains the methods for the BuildService group. Don't use this type directly, use NewBuildServiceClient() instead.

func NewBuildServiceClient added in v0.3.0

func NewBuildServiceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BuildServiceClient, error)

NewBuildServiceClient creates a new instance of BuildServiceClient with the specified values.

  • subscriptionID - Gets subscription ID which uniquely identify the 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 (*BuildServiceClient) CreateOrUpdateBuild added in v0.3.0

func (client *BuildServiceClient) CreateOrUpdateBuild(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, buildParam Build, options *BuildServiceClientCreateOrUpdateBuildOptions) (BuildServiceClientCreateOrUpdateBuildResponse, error)

CreateOrUpdateBuild - Create or update a KPack build. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • buildServiceName - The name of the build service resource.
  • buildName - The name of the build resource.
  • buildParam - Parameters for the create or update operation
  • options - BuildServiceClientCreateOrUpdateBuildOptions contains the optional parameters for the BuildServiceClient.CreateOrUpdateBuild method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildService_CreateOrUpdateBuild.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewBuildServiceClient().CreateOrUpdateBuild(ctx, "myResourceGroup", "myservice", "default", "mybuild", armappplatform.Build{
		Properties: &armappplatform.BuildProperties{
			AgentPool: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/agentPools/default"),
			Builder:   to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/builders/default"),
			Env: map[string]*string{
				"environmentVariable": to.Ptr("test"),
			},
			RelativePath: to.Ptr("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855-20210601-3ed9f4a2-986b-4bbd-b833-a42dccb2f777"),
		},
	}, 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.Build = armappplatform.Build{
	// 	Name: to.Ptr("mybuild"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/buildServices/builds"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/builds/mybuild"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.BuildProperties{
	// 		AgentPool: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/agentPools/default"),
	// 		Builder: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/builders/default"),
	// 		Env: map[string]*string{
	// 			"environmentVariable": to.Ptr("test"),
	// 		},
	// 		ProvisioningState: to.Ptr(armappplatform.BuildProvisioningStateSucceeded),
	// 		RelativePath: to.Ptr("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855-20210601-3ed9f4a2-986b-4bbd-b833-a42dccb2f777"),
	// 	},
	// }
}
Output:

func (*BuildServiceClient) GetBuild added in v0.3.0

func (client *BuildServiceClient) GetBuild(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, options *BuildServiceClientGetBuildOptions) (BuildServiceClientGetBuildResponse, error)

GetBuild - Get a KPack build. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • buildServiceName - The name of the build service resource.
  • buildName - The name of the build resource.
  • options - BuildServiceClientGetBuildOptions contains the optional parameters for the BuildServiceClient.GetBuild method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildService_GetBuild.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewBuildServiceClient().GetBuild(ctx, "myResourceGroup", "myservice", "default", "mybuild", 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.Build = armappplatform.Build{
	// 	Name: to.Ptr("123"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/buildServices/builds/results"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/builds/mybuild/results/123"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.BuildProperties{
	// 		AgentPool: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/agentPools/default"),
	// 		Builder: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/builders/default"),
	// 		Env: map[string]*string{
	// 			"environmentVariable": to.Ptr("test"),
	// 		},
	// 		ProvisioningState: to.Ptr(armappplatform.BuildProvisioningStateSucceeded),
	// 		RelativePath: to.Ptr("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855-20210601-3ed9f4a2-986b-4bbd-b833-a42dccb2f777"),
	// 	},
	// }
}
Output:

func (*BuildServiceClient) GetBuildResult added in v0.3.0

func (client *BuildServiceClient) GetBuildResult(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, buildResultName string, options *BuildServiceClientGetBuildResultOptions) (BuildServiceClientGetBuildResultResponse, error)

GetBuildResult - Get a KPack build result. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • buildServiceName - The name of the build service resource.
  • buildName - The name of the build resource.
  • buildResultName - The name of the build result resource.
  • options - BuildServiceClientGetBuildResultOptions contains the optional parameters for the BuildServiceClient.GetBuildResult method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildService_GetBuildResult.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewBuildServiceClient().GetBuildResult(ctx, "myResourceGroup", "myservice", "default", "mybuild", "123", 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.BuildResult = armappplatform.BuildResult{
	// 	Name: to.Ptr("123"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/buildServices/builds/results"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/builds/mybuild/results/123"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.BuildResultProperties{
	// 		Name: to.Ptr("123"),
	// 		BuildPodName: to.Ptr("mybuild-default-1"),
	// 		BuildStages: []*armappplatform.BuildStageProperties{
	// 			{
	// 				Name: to.Ptr("prepare"),
	// 				Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateRunning),
	// 			},
	// 			{
	// 				Name: to.Ptr("detect"),
	// 				Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateNotStarted),
	// 			},
	// 			{
	// 				Name: to.Ptr("analyze"),
	// 				Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateNotStarted),
	// 			},
	// 			{
	// 				Name: to.Ptr("restore"),
	// 				Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateNotStarted),
	// 			},
	// 			{
	// 				Name: to.Ptr("build"),
	// 				Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateNotStarted),
	// 			},
	// 			{
	// 				Name: to.Ptr("export"),
	// 				Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateNotStarted),
	// 		}},
	// 		ProvisioningState: to.Ptr(armappplatform.BuildResultProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*BuildServiceClient) GetBuildResultLog added in v0.3.0

func (client *BuildServiceClient) GetBuildResultLog(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, buildResultName string, options *BuildServiceClientGetBuildResultLogOptions) (BuildServiceClientGetBuildResultLogResponse, error)

GetBuildResultLog - Get a KPack build result log download URL. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • buildServiceName - The name of the build service resource.
  • buildName - The name of the build resource.
  • buildResultName - The name of the build result resource.
  • options - BuildServiceClientGetBuildResultLogOptions contains the optional parameters for the BuildServiceClient.GetBuildResultLog method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildService_GetBuildResultLog.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewBuildServiceClient().GetBuildResultLog(ctx, "myResourceGroup", "myservice", "default", "mybuild", "123", 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.BuildResultLog = armappplatform.BuildResultLog{
	// 	BlobURL: to.Ptr("https://sample-storage-account-name.blob.core.windows.net/sample-log-blob-file?readonly-sas-token"),
	// }
}
Output:

func (*BuildServiceClient) GetBuildService added in v0.3.0

func (client *BuildServiceClient) GetBuildService(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientGetBuildServiceOptions) (BuildServiceClientGetBuildServiceResponse, error)

GetBuildService - Get a build service resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • buildServiceName - The name of the build service resource.
  • options - BuildServiceClientGetBuildServiceOptions contains the optional parameters for the BuildServiceClient.GetBuildService method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildService_GetBuildService.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewBuildServiceClient().GetBuildService(ctx, "myResourceGroup", "myservice", "default", 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.BuildService = armappplatform.BuildService{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/buildServices"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.BuildServiceProperties{
	// 		KPackVersion: to.Ptr("0.3.1"),
	// 		ProvisioningState: to.Ptr(armappplatform.BuildServiceProvisioningStateSucceeded),
	// 		ResourceRequests: &armappplatform.BuildServicePropertiesResourceRequests{
	// 			CPU: to.Ptr("200m"),
	// 			Memory: to.Ptr("4Gi"),
	// 		},
	// 	},
	// }
}
Output:

func (*BuildServiceClient) GetResourceUploadURL added in v0.3.0

func (client *BuildServiceClient) GetResourceUploadURL(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientGetResourceUploadURLOptions) (BuildServiceClientGetResourceUploadURLResponse, error)

GetResourceUploadURL - Get an resource upload URL for build service, which may be artifacts or source archive. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • buildServiceName - The name of the build service resource.
  • options - BuildServiceClientGetResourceUploadURLOptions contains the optional parameters for the BuildServiceClient.GetResourceUploadURL method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildService_GetResourceUploadUrl.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewBuildServiceClient().GetResourceUploadURL(ctx, "myResourceGroup", "myservice", "default", 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.ResourceUploadDefinition = armappplatform.ResourceUploadDefinition{
	// 	RelativePath: to.Ptr("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855-20210601-3ed9f4a2-986b-4bbd-b833-a42dccb2f777"),
	// 	UploadURL: to.Ptr("https://springcloudstorageaccount.file.core.windows.net/bd172614181f42e2853f6fd90029cda8/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855-20210601-3ed9f4a2-986b-4bbd-b833-a42dccb2f777?sv=2021-06-01&sr=f&sig=SampleSignature&se=2021-06-01T10%3A42%3A21Z&sp=w"),
	// }
}
Output:

func (*BuildServiceClient) GetSupportedBuildpack added in v0.3.0

func (client *BuildServiceClient) GetSupportedBuildpack(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildpackName string, options *BuildServiceClientGetSupportedBuildpackOptions) (BuildServiceClientGetSupportedBuildpackResponse, error)

GetSupportedBuildpack - Get the supported buildpack resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • buildServiceName - The name of the build service resource.
  • buildpackName - The name of the buildpack resource.
  • options - BuildServiceClientGetSupportedBuildpackOptions contains the optional parameters for the BuildServiceClient.GetSupportedBuildpack method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildService_GetSupportedBuildpack.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewBuildServiceClient().GetSupportedBuildpack(ctx, "myResourceGroup", "myservice", "default", "tanzu-buildpacks-java-azure", 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.SupportedBuildpackResource = armappplatform.SupportedBuildpackResource{
	// 	Name: to.Ptr("tanzu-buildpacks-java-azure"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/buildServices/supportedBuildpacks"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/supportedBuildpacks/tanzu-buildpacks-java-azure"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.SupportedBuildpackResourceProperties{
	// 		BuildpackID: to.Ptr("tanzu-buildpacks/java-azure"),
	// 	},
	// }
}
Output:

func (*BuildServiceClient) GetSupportedStack added in v0.3.0

func (client *BuildServiceClient) GetSupportedStack(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, stackName string, options *BuildServiceClientGetSupportedStackOptions) (BuildServiceClientGetSupportedStackResponse, error)

GetSupportedStack - Get the supported stack resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • buildServiceName - The name of the build service resource.
  • stackName - The name of the stack resource.
  • options - BuildServiceClientGetSupportedStackOptions contains the optional parameters for the BuildServiceClient.GetSupportedStack method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildService_GetSupportedStack.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewBuildServiceClient().GetSupportedStack(ctx, "myResourceGroup", "myservice", "default", "io.buildpacks.stacks.bionic-base", 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.SupportedStackResource = armappplatform.SupportedStackResource{
	// 	Name: to.Ptr("io.buildpacks.stacks.bionic-base"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/buildServices/supportedStacks"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/supportedBuildpacks/io.buildpacks.stacks.bionic-base"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.SupportedStackResourceProperties{
	// 		StackID: to.Ptr("io.buildpacks.stacks.bionic"),
	// 		Version: to.Ptr("base"),
	// 	},
	// }
}
Output:

func (*BuildServiceClient) ListSupportedBuildpacks added in v0.3.0

func (client *BuildServiceClient) ListSupportedBuildpacks(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientListSupportedBuildpacksOptions) (BuildServiceClientListSupportedBuildpacksResponse, error)

ListSupportedBuildpacks - Get all supported buildpacks. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • buildServiceName - The name of the build service resource.
  • options - BuildServiceClientListSupportedBuildpacksOptions contains the optional parameters for the BuildServiceClient.ListSupportedBuildpacks method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildService_ListSupportedBuildpacks.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewBuildServiceClient().ListSupportedBuildpacks(ctx, "myResourceGroup", "myservice", "default", 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.SupportedBuildpacksCollection = armappplatform.SupportedBuildpacksCollection{
	// 	Value: []*armappplatform.SupportedBuildpackResource{
	// 		{
	// 			Name: to.Ptr("tanzu-buildpacks-java-azure"),
	// 			Type: to.Ptr("Microsoft.AppPlatform/Spring/buildServices/supportedBuildpacks"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/supportedBuildpacks/tanzu-buildpacks-java-azure"),
	// 			SystemData: &armappplatform.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 				CreatedBy: to.Ptr("sample-user"),
	// 				CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("sample-user"),
	// 				LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 			},
	// 			Properties: &armappplatform.SupportedBuildpackResourceProperties{
	// 				BuildpackID: to.Ptr("tanzu-buildpacks/java-azure"),
	// 			},
	// 	}},
	// }
}
Output:

func (*BuildServiceClient) ListSupportedStacks added in v0.3.0

func (client *BuildServiceClient) ListSupportedStacks(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientListSupportedStacksOptions) (BuildServiceClientListSupportedStacksResponse, error)

ListSupportedStacks - Get all supported stacks. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • buildServiceName - The name of the build service resource.
  • options - BuildServiceClientListSupportedStacksOptions contains the optional parameters for the BuildServiceClient.ListSupportedStacks method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildService_ListSupportedStacks.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewBuildServiceClient().ListSupportedStacks(ctx, "myResourceGroup", "myservice", "default", 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.SupportedStacksCollection = armappplatform.SupportedStacksCollection{
	// 	Value: []*armappplatform.SupportedStackResource{
	// 		{
	// 			Name: to.Ptr("io.buildpacks.stacks.bionic-base"),
	// 			Type: to.Ptr("Microsoft.AppPlatform/Spring/buildServices/supportedStacks"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/supportedStacks/io.buildpacks.stacks.bionic-base"),
	// 			SystemData: &armappplatform.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 				CreatedBy: to.Ptr("sample-user"),
	// 				CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("sample-user"),
	// 				LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 			},
	// 			Properties: &armappplatform.SupportedStackResourceProperties{
	// 				StackID: to.Ptr("io.buildpacks.stacks.bionic"),
	// 				Version: to.Ptr("base"),
	// 			},
	// 	}},
	// }
}
Output:

func (*BuildServiceClient) NewListBuildResultsPager added in v0.5.0

func (client *BuildServiceClient) NewListBuildResultsPager(resourceGroupName string, serviceName string, buildServiceName string, buildName string, options *BuildServiceClientListBuildResultsOptions) *runtime.Pager[BuildServiceClientListBuildResultsResponse]

NewListBuildResultsPager - List KPack build results.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • buildServiceName - The name of the build service resource.
  • buildName - The name of the build resource.
  • options - BuildServiceClientListBuildResultsOptions contains the optional parameters for the BuildServiceClient.NewListBuildResultsPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildService_ListBuildResults.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewBuildServiceClient().NewListBuildResultsPager("myResourceGroup", "myservice", "default", "mybuild", 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.BuildResultCollection = armappplatform.BuildResultCollection{
		// 	Value: []*armappplatform.BuildResult{
		// 		{
		// 			Name: to.Ptr("123"),
		// 			Type: to.Ptr("Microsoft.AppPlatform/Spring/buildServices/builds/results"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/builds/mybuild/results/123"),
		// 			SystemData: &armappplatform.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
		// 				CreatedBy: to.Ptr("sample-user"),
		// 				CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("sample-user"),
		// 				LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
		// 			},
		// 			Properties: &armappplatform.BuildResultProperties{
		// 				Name: to.Ptr("123"),
		// 				BuildPodName: to.Ptr("mybuild-default-1"),
		// 				BuildStages: []*armappplatform.BuildStageProperties{
		// 					{
		// 						Name: to.Ptr("prepare"),
		// 						Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateRunning),
		// 					},
		// 					{
		// 						Name: to.Ptr("detect"),
		// 						Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateNotStarted),
		// 					},
		// 					{
		// 						Name: to.Ptr("analyze"),
		// 						Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateNotStarted),
		// 					},
		// 					{
		// 						Name: to.Ptr("restore"),
		// 						Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateNotStarted),
		// 					},
		// 					{
		// 						Name: to.Ptr("build"),
		// 						Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateNotStarted),
		// 					},
		// 					{
		// 						Name: to.Ptr("export"),
		// 						Status: to.Ptr(armappplatform.KPackBuildStageProvisioningStateNotStarted),
		// 				}},
		// 				ProvisioningState: to.Ptr(armappplatform.BuildResultProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*BuildServiceClient) NewListBuildServicesPager added in v0.5.0

func (client *BuildServiceClient) NewListBuildServicesPager(resourceGroupName string, serviceName string, options *BuildServiceClientListBuildServicesOptions) *runtime.Pager[BuildServiceClientListBuildServicesResponse]

NewListBuildServicesPager - List build services resource.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • options - BuildServiceClientListBuildServicesOptions contains the optional parameters for the BuildServiceClient.NewListBuildServicesPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildService_ListBuildServices.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewBuildServiceClient().NewListBuildServicesPager("myResourceGroup", "myservice", 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.BuildServiceCollection = armappplatform.BuildServiceCollection{
		// 	Value: []*armappplatform.BuildService{
		// 		{
		// 			Name: to.Ptr("default"),
		// 			Type: to.Ptr("Microsoft.AppPlatform/Spring/buildServices"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default"),
		// 			SystemData: &armappplatform.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
		// 				CreatedBy: to.Ptr("sample-user"),
		// 				CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("sample-user"),
		// 				LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
		// 			},
		// 			Properties: &armappplatform.BuildServiceProperties{
		// 				KPackVersion: to.Ptr("0.3.1"),
		// 				ProvisioningState: to.Ptr(armappplatform.BuildServiceProvisioningStateSucceeded),
		// 				ResourceRequests: &armappplatform.BuildServicePropertiesResourceRequests{
		// 					CPU: to.Ptr("200m"),
		// 					Memory: to.Ptr("4Gi"),
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*BuildServiceClient) NewListBuildsPager added in v0.5.0

func (client *BuildServiceClient) NewListBuildsPager(resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientListBuildsOptions) *runtime.Pager[BuildServiceClientListBuildsResponse]

NewListBuildsPager - List KPack builds.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • buildServiceName - The name of the build service resource.
  • options - BuildServiceClientListBuildsOptions contains the optional parameters for the BuildServiceClient.NewListBuildsPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildService_ListBuilds.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewBuildServiceClient().NewListBuildsPager("myResourceGroup", "myservice", "default", 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.BuildCollection = armappplatform.BuildCollection{
		// 	Value: []*armappplatform.Build{
		// 		{
		// 			Name: to.Ptr("myBuild"),
		// 			Type: to.Ptr("Microsoft.AppPlatform/Spring/buildServices/builds"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/builds/myBuild"),
		// 			SystemData: &armappplatform.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
		// 				CreatedBy: to.Ptr("sample-user"),
		// 				CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("sample-user"),
		// 				LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
		// 			},
		// 			Properties: &armappplatform.BuildProperties{
		// 				AgentPool: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/agentPools/default"),
		// 				Builder: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/builders/default"),
		// 				Env: map[string]*string{
		// 					"environmentVariable": to.Ptr("test"),
		// 				},
		// 				ProvisioningState: to.Ptr(armappplatform.BuildProvisioningStateSucceeded),
		// 				RelativePath: to.Ptr("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855-20210601-3ed9f4a2-986b-4bbd-b833-a42dccb2f777"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type BuildServiceClientCreateOrUpdateBuildOptions added in v0.3.0

type BuildServiceClientCreateOrUpdateBuildOptions struct {
}

BuildServiceClientCreateOrUpdateBuildOptions contains the optional parameters for the BuildServiceClient.CreateOrUpdateBuild method.

type BuildServiceClientCreateOrUpdateBuildResponse added in v0.3.0

type BuildServiceClientCreateOrUpdateBuildResponse struct {
	// Build resource payload
	Build
}

BuildServiceClientCreateOrUpdateBuildResponse contains the response from method BuildServiceClient.CreateOrUpdateBuild.

type BuildServiceClientGetBuildOptions added in v0.3.0

type BuildServiceClientGetBuildOptions struct {
}

BuildServiceClientGetBuildOptions contains the optional parameters for the BuildServiceClient.GetBuild method.

type BuildServiceClientGetBuildResponse added in v0.3.0

type BuildServiceClientGetBuildResponse struct {
	// Build resource payload
	Build
}

BuildServiceClientGetBuildResponse contains the response from method BuildServiceClient.GetBuild.

type BuildServiceClientGetBuildResultLogOptions added in v0.3.0

type BuildServiceClientGetBuildResultLogOptions struct {
}

BuildServiceClientGetBuildResultLogOptions contains the optional parameters for the BuildServiceClient.GetBuildResultLog method.

type BuildServiceClientGetBuildResultLogResponse added in v0.3.0

type BuildServiceClientGetBuildResultLogResponse struct {
	// Build result log resource properties payload
	BuildResultLog
}

BuildServiceClientGetBuildResultLogResponse contains the response from method BuildServiceClient.GetBuildResultLog.

type BuildServiceClientGetBuildResultOptions added in v0.3.0

type BuildServiceClientGetBuildResultOptions struct {
}

BuildServiceClientGetBuildResultOptions contains the optional parameters for the BuildServiceClient.GetBuildResult method.

type BuildServiceClientGetBuildResultResponse added in v0.3.0

type BuildServiceClientGetBuildResultResponse struct {
	// Build result resource payload
	BuildResult
}

BuildServiceClientGetBuildResultResponse contains the response from method BuildServiceClient.GetBuildResult.

type BuildServiceClientGetBuildServiceOptions added in v0.3.0

type BuildServiceClientGetBuildServiceOptions struct {
}

BuildServiceClientGetBuildServiceOptions contains the optional parameters for the BuildServiceClient.GetBuildService method.

type BuildServiceClientGetBuildServiceResponse added in v0.3.0

type BuildServiceClientGetBuildServiceResponse struct {
	// Build service resource payload
	BuildService
}

BuildServiceClientGetBuildServiceResponse contains the response from method BuildServiceClient.GetBuildService.

type BuildServiceClientGetResourceUploadURLOptions added in v0.3.0

type BuildServiceClientGetResourceUploadURLOptions struct {
}

BuildServiceClientGetResourceUploadURLOptions contains the optional parameters for the BuildServiceClient.GetResourceUploadURL method.

type BuildServiceClientGetResourceUploadURLResponse added in v0.3.0

type BuildServiceClientGetResourceUploadURLResponse struct {
	// Resource upload definition payload
	ResourceUploadDefinition
}

BuildServiceClientGetResourceUploadURLResponse contains the response from method BuildServiceClient.GetResourceUploadURL.

type BuildServiceClientGetSupportedBuildpackOptions added in v0.3.0

type BuildServiceClientGetSupportedBuildpackOptions struct {
}

BuildServiceClientGetSupportedBuildpackOptions contains the optional parameters for the BuildServiceClient.GetSupportedBuildpack method.

type BuildServiceClientGetSupportedBuildpackResponse added in v0.3.0

type BuildServiceClientGetSupportedBuildpackResponse struct {
	// Supported buildpack resource payload
	SupportedBuildpackResource
}

BuildServiceClientGetSupportedBuildpackResponse contains the response from method BuildServiceClient.GetSupportedBuildpack.

type BuildServiceClientGetSupportedStackOptions added in v0.3.0

type BuildServiceClientGetSupportedStackOptions struct {
}

BuildServiceClientGetSupportedStackOptions contains the optional parameters for the BuildServiceClient.GetSupportedStack method.

type BuildServiceClientGetSupportedStackResponse added in v0.3.0

type BuildServiceClientGetSupportedStackResponse struct {
	// Supported stack resource payload
	SupportedStackResource
}

BuildServiceClientGetSupportedStackResponse contains the response from method BuildServiceClient.GetSupportedStack.

type BuildServiceClientListBuildResultsOptions added in v0.3.0

type BuildServiceClientListBuildResultsOptions struct {
}

BuildServiceClientListBuildResultsOptions contains the optional parameters for the BuildServiceClient.NewListBuildResultsPager method.

type BuildServiceClientListBuildResultsResponse added in v0.3.0

type BuildServiceClientListBuildResultsResponse struct {
	// Object that includes an array of Build result resources and a possible link for next set
	BuildResultCollection
}

BuildServiceClientListBuildResultsResponse contains the response from method BuildServiceClient.NewListBuildResultsPager.

type BuildServiceClientListBuildServicesOptions added in v0.3.0

type BuildServiceClientListBuildServicesOptions struct {
}

BuildServiceClientListBuildServicesOptions contains the optional parameters for the BuildServiceClient.NewListBuildServicesPager method.

type BuildServiceClientListBuildServicesResponse added in v0.3.0

type BuildServiceClientListBuildServicesResponse struct {
	// Object that includes an array of Build service resources and a possible link for next set
	BuildServiceCollection
}

BuildServiceClientListBuildServicesResponse contains the response from method BuildServiceClient.NewListBuildServicesPager.

type BuildServiceClientListBuildsOptions added in v0.3.0

type BuildServiceClientListBuildsOptions struct {
}

BuildServiceClientListBuildsOptions contains the optional parameters for the BuildServiceClient.NewListBuildsPager method.

type BuildServiceClientListBuildsResponse added in v0.3.0

type BuildServiceClientListBuildsResponse struct {
	// Object that includes an array of Build resources and a possible link for next set
	BuildCollection
}

BuildServiceClientListBuildsResponse contains the response from method BuildServiceClient.NewListBuildsPager.

type BuildServiceClientListSupportedBuildpacksOptions added in v0.3.0

type BuildServiceClientListSupportedBuildpacksOptions struct {
}

BuildServiceClientListSupportedBuildpacksOptions contains the optional parameters for the BuildServiceClient.ListSupportedBuildpacks method.

type BuildServiceClientListSupportedBuildpacksResponse added in v0.3.0

type BuildServiceClientListSupportedBuildpacksResponse struct {
	// Object that includes an array of supported buildpacks resources and a possible link for next set
	SupportedBuildpacksCollection
}

BuildServiceClientListSupportedBuildpacksResponse contains the response from method BuildServiceClient.ListSupportedBuildpacks.

type BuildServiceClientListSupportedStacksOptions added in v0.3.0

type BuildServiceClientListSupportedStacksOptions struct {
}

BuildServiceClientListSupportedStacksOptions contains the optional parameters for the BuildServiceClient.ListSupportedStacks method.

type BuildServiceClientListSupportedStacksResponse added in v0.3.0

type BuildServiceClientListSupportedStacksResponse struct {
	// Object that includes an array of supported stacks resources and a possible link for next set
	SupportedStacksCollection
}

BuildServiceClientListSupportedStacksResponse contains the response from method BuildServiceClient.ListSupportedStacks.

type BuildServiceCollection added in v0.3.0

type BuildServiceCollection struct {
	// URL client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string

	// Collection of Build service resources
	Value []*BuildService
}

BuildServiceCollection - Object that includes an array of Build service resources and a possible link for next set

func (BuildServiceCollection) MarshalJSON added in v0.3.0

func (b BuildServiceCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BuildServiceCollection.

func (*BuildServiceCollection) UnmarshalJSON added in v1.1.0

func (b *BuildServiceCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BuildServiceCollection.

type BuildServiceProperties added in v0.3.0

type BuildServiceProperties struct {
	// The installed KPack version in this build service.
	KPackVersion *string

	// The runtime resource configuration of this build service.
	ResourceRequests *BuildServicePropertiesResourceRequests

	// READ-ONLY; Provisioning state of the KPack build result
	ProvisioningState *BuildServiceProvisioningState
}

BuildServiceProperties - Build service resource properties payload

func (BuildServiceProperties) MarshalJSON added in v1.1.0

func (b BuildServiceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BuildServiceProperties.

func (*BuildServiceProperties) UnmarshalJSON added in v1.1.0

func (b *BuildServiceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BuildServiceProperties.

type BuildServicePropertiesResourceRequests added in v0.3.0

type BuildServicePropertiesResourceRequests struct {
	// READ-ONLY; vCPU allocated to the entire build service node pool.
	CPU *string

	// READ-ONLY; Memory allocated to the entire build service node pool.
	Memory *string
}

BuildServicePropertiesResourceRequests - The runtime resource configuration of this build service.

func (BuildServicePropertiesResourceRequests) MarshalJSON added in v1.1.0

func (b BuildServicePropertiesResourceRequests) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BuildServicePropertiesResourceRequests.

func (*BuildServicePropertiesResourceRequests) UnmarshalJSON added in v1.1.0

func (b *BuildServicePropertiesResourceRequests) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BuildServicePropertiesResourceRequests.

type BuildServiceProvisioningState added in v0.3.0

type BuildServiceProvisioningState string

BuildServiceProvisioningState - Provisioning state of the KPack build result

const (
	BuildServiceProvisioningStateCreating  BuildServiceProvisioningState = "Creating"
	BuildServiceProvisioningStateDeleting  BuildServiceProvisioningState = "Deleting"
	BuildServiceProvisioningStateFailed    BuildServiceProvisioningState = "Failed"
	BuildServiceProvisioningStateSucceeded BuildServiceProvisioningState = "Succeeded"
	BuildServiceProvisioningStateUpdating  BuildServiceProvisioningState = "Updating"
)

func PossibleBuildServiceProvisioningStateValues added in v0.3.0

func PossibleBuildServiceProvisioningStateValues() []BuildServiceProvisioningState

PossibleBuildServiceProvisioningStateValues returns the possible values for the BuildServiceProvisioningState const type.

type BuildStageProperties added in v0.3.0

type BuildStageProperties struct {
	// READ-ONLY; The name of this build stage resource.
	Name *string

	// READ-ONLY; The provisioning state of this build stage resource.
	Status *KPackBuildStageProvisioningState
}

BuildStageProperties - The build stage (init-container and container) resources in build pod.

func (BuildStageProperties) MarshalJSON added in v1.1.0

func (b BuildStageProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BuildStageProperties.

func (*BuildStageProperties) UnmarshalJSON added in v1.1.0

func (b *BuildStageProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BuildStageProperties.

type BuilderProperties added in v0.3.0

type BuilderProperties struct {
	// Builder buildpack groups.
	BuildpackGroups []*BuildpacksGroupProperties

	// Builder cluster stack property.
	Stack *StackProperties

	// READ-ONLY; Builder provision status.
	ProvisioningState *BuilderProvisioningState
}

BuilderProperties - KPack Builder properties payload

func (BuilderProperties) MarshalJSON added in v0.3.0

func (b BuilderProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BuilderProperties.

func (*BuilderProperties) UnmarshalJSON added in v1.1.0

func (b *BuilderProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BuilderProperties.

type BuilderProvisioningState added in v0.3.0

type BuilderProvisioningState string

BuilderProvisioningState - Builder provision status.

const (
	BuilderProvisioningStateCreating  BuilderProvisioningState = "Creating"
	BuilderProvisioningStateDeleting  BuilderProvisioningState = "Deleting"
	BuilderProvisioningStateFailed    BuilderProvisioningState = "Failed"
	BuilderProvisioningStateSucceeded BuilderProvisioningState = "Succeeded"
	BuilderProvisioningStateUpdating  BuilderProvisioningState = "Updating"
)

func PossibleBuilderProvisioningStateValues added in v0.3.0

func PossibleBuilderProvisioningStateValues() []BuilderProvisioningState

PossibleBuilderProvisioningStateValues returns the possible values for the BuilderProvisioningState const type.

type BuilderResource added in v0.3.0

type BuilderResource struct {
	// Property of the Builder resource.
	Properties *BuilderProperties

	// READ-ONLY; Fully qualified resource Id for the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource.
	Type *string
}

BuilderResource - KPack Builder resource

func (BuilderResource) MarshalJSON added in v1.1.0

func (b BuilderResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BuilderResource.

func (*BuilderResource) UnmarshalJSON added in v1.1.0

func (b *BuilderResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BuilderResource.

type BuilderResourceCollection added in v0.3.0

type BuilderResourceCollection struct {
	// URL client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string

	// Collection of Builder resources
	Value []*BuilderResource
}

BuilderResourceCollection - Object that includes an array of Builder resources and a possible link for next set

func (BuilderResourceCollection) MarshalJSON added in v0.3.0

func (b BuilderResourceCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BuilderResourceCollection.

func (*BuilderResourceCollection) UnmarshalJSON added in v1.1.0

func (b *BuilderResourceCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BuilderResourceCollection.

type BuildpackBindingClient added in v0.3.0

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

BuildpackBindingClient contains the methods for the BuildpackBinding group. Don't use this type directly, use NewBuildpackBindingClient() instead.

func NewBuildpackBindingClient added in v0.3.0

func NewBuildpackBindingClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BuildpackBindingClient, error)

NewBuildpackBindingClient creates a new instance of BuildpackBindingClient with the specified values.

  • subscriptionID - Gets subscription ID which uniquely identify the 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 (*BuildpackBindingClient) BeginCreateOrUpdate added in v0.3.0

func (client *BuildpackBindingClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, buildpackBinding BuildpackBindingResource, options *BuildpackBindingClientBeginCreateOrUpdateOptions) (*runtime.Poller[BuildpackBindingClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update a buildpack binding. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • buildServiceName - The name of the build service resource.
  • builderName - The name of the builder resource.
  • buildpackBindingName - The name of the Buildpack Binding Name
  • buildpackBinding - The target buildpack binding for the create or update operation
  • options - BuildpackBindingClientBeginCreateOrUpdateOptions contains the optional parameters for the BuildpackBindingClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildpackBinding_CreateOrUpdate.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewBuildpackBindingClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", "default", "myBuildpackBinding", armappplatform.BuildpackBindingResource{
		Properties: &armappplatform.BuildpackBindingProperties{
			BindingType: to.Ptr(armappplatform.BindingTypeApplicationInsights),
			LaunchProperties: &armappplatform.BuildpackBindingLaunchProperties{
				Properties: map[string]*string{
					"abc":           to.Ptr("def"),
					"any-string":    to.Ptr("any-string"),
					"sampling-rate": to.Ptr("12.0"),
				},
				Secrets: map[string]*string{
					"connection-string": to.Ptr("XXXXXXXXXXXXXXXXX=XXXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXX;XXXXXXXXXXXXXXXXX=XXXXXXXXXXXXXXXXXXX"),
				},
			},
		},
	}, 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 pull 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.BuildpackBindingResource = armappplatform.BuildpackBindingResource{
	// 	Name: to.Ptr("myBuildpackBinding"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/buildServices/builders/buildpackBindings"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/builders/default/buildpackBindings/myBuildpackBinding"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.BuildpackBindingProperties{
	// 		BindingType: to.Ptr(armappplatform.BindingTypeApplicationInsights),
	// 		LaunchProperties: &armappplatform.BuildpackBindingLaunchProperties{
	// 			Properties: map[string]*string{
	// 				"abc": to.Ptr("def"),
	// 				"any-string": to.Ptr("any-string"),
	// 				"sampling-rate": to.Ptr("12.0"),
	// 			},
	// 			Secrets: map[string]*string{
	// 				"connection-string": to.Ptr("*"),
	// 			},
	// 		},
	// 	},
	// }
}
Output:

func (*BuildpackBindingClient) BeginDelete added in v0.3.0

func (client *BuildpackBindingClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, options *BuildpackBindingClientBeginDeleteOptions) (*runtime.Poller[BuildpackBindingClientDeleteResponse], error)

BeginDelete - Operation to delete a Buildpack Binding If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • buildServiceName - The name of the build service resource.
  • builderName - The name of the builder resource.
  • buildpackBindingName - The name of the Buildpack Binding Name
  • options - BuildpackBindingClientBeginDeleteOptions contains the optional parameters for the BuildpackBindingClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildpackBinding_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewBuildpackBindingClient().BeginDelete(ctx, "myResourceGroup", "myservice", "default", "default", "myBuildpackBinding", 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 pull the result: %v", err)
	}
}
Output:

func (*BuildpackBindingClient) Get added in v0.3.0

func (client *BuildpackBindingClient) Get(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, options *BuildpackBindingClientGetOptions) (BuildpackBindingClientGetResponse, error)

Get - Get a buildpack binding by name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • buildServiceName - The name of the build service resource.
  • builderName - The name of the builder resource.
  • buildpackBindingName - The name of the Buildpack Binding Name
  • options - BuildpackBindingClientGetOptions contains the optional parameters for the BuildpackBindingClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildpackBinding_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewBuildpackBindingClient().Get(ctx, "myResourceGroup", "myservice", "default", "default", "myBuildpackBinding", 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.BuildpackBindingResource = armappplatform.BuildpackBindingResource{
	// 	Name: to.Ptr("myBuildpackBinding"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/buildServices/builders/buildpackBindings"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/builders/default/buildpackBindings/myBuildpackBinding"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.BuildpackBindingProperties{
	// 		BindingType: to.Ptr(armappplatform.BindingTypeApplicationInsights),
	// 		LaunchProperties: &armappplatform.BuildpackBindingLaunchProperties{
	// 			Properties: map[string]*string{
	// 				"abc": to.Ptr("def"),
	// 				"any-string": to.Ptr("any-string"),
	// 				"sampling-rate": to.Ptr("12.0"),
	// 			},
	// 			Secrets: map[string]*string{
	// 				"connection-string": to.Ptr("*"),
	// 			},
	// 		},
	// 	},
	// }
}
Output:

func (*BuildpackBindingClient) NewListPager added in v0.5.0

func (client *BuildpackBindingClient) NewListPager(resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildpackBindingClientListOptions) *runtime.Pager[BuildpackBindingClientListResponse]

NewListPager - Handles requests to list all buildpack bindings in a builder.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • buildServiceName - The name of the build service resource.
  • builderName - The name of the builder resource.
  • options - BuildpackBindingClientListOptions contains the optional parameters for the BuildpackBindingClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/BuildpackBinding_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewBuildpackBindingClient().NewListPager("myResourceGroup", "myservice", "default", "default", 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.BuildpackBindingResourceCollection = armappplatform.BuildpackBindingResourceCollection{
		// 	Value: []*armappplatform.BuildpackBindingResource{
		// 		{
		// 			Name: to.Ptr("myBuildpackBinding"),
		// 			Type: to.Ptr("Microsoft.AppPlatform/Spring/buildServices/builders/buildpackBindings"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/builders/default/buildpackBindings/myBuildpackBinding"),
		// 			SystemData: &armappplatform.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
		// 				CreatedBy: to.Ptr("sample-user"),
		// 				CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("sample-user"),
		// 				LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
		// 			},
		// 			Properties: &armappplatform.BuildpackBindingProperties{
		// 				BindingType: to.Ptr(armappplatform.BindingTypeApplicationInsights),
		// 				LaunchProperties: &armappplatform.BuildpackBindingLaunchProperties{
		// 					Properties: map[string]*string{
		// 						"abc": to.Ptr("def"),
		// 						"any-string": to.Ptr("any-string"),
		// 						"sampling-rate": to.Ptr("12.0"),
		// 					},
		// 					Secrets: map[string]*string{
		// 						"connection-string": to.Ptr("*"),
		// 					},
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

type BuildpackBindingClientBeginCreateOrUpdateOptions added in v0.3.0

type BuildpackBindingClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

BuildpackBindingClientBeginCreateOrUpdateOptions contains the optional parameters for the BuildpackBindingClient.BeginCreateOrUpdate method.

type BuildpackBindingClientBeginDeleteOptions added in v0.3.0

type BuildpackBindingClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

BuildpackBindingClientBeginDeleteOptions contains the optional parameters for the BuildpackBindingClient.BeginDelete method.

type BuildpackBindingClientCreateOrUpdateResponse added in v0.3.0

type BuildpackBindingClientCreateOrUpdateResponse struct {
	// Buildpack Binding Resource object
	BuildpackBindingResource
}

BuildpackBindingClientCreateOrUpdateResponse contains the response from method BuildpackBindingClient.BeginCreateOrUpdate.

type BuildpackBindingClientDeleteResponse added in v0.3.0

type BuildpackBindingClientDeleteResponse struct {
}

BuildpackBindingClientDeleteResponse contains the response from method BuildpackBindingClient.BeginDelete.

type BuildpackBindingClientGetOptions added in v0.3.0

type BuildpackBindingClientGetOptions struct {
}

BuildpackBindingClientGetOptions contains the optional parameters for the BuildpackBindingClient.Get method.

type BuildpackBindingClientGetResponse added in v0.3.0

type BuildpackBindingClientGetResponse struct {
	// Buildpack Binding Resource object
	BuildpackBindingResource
}

BuildpackBindingClientGetResponse contains the response from method BuildpackBindingClient.Get.

type BuildpackBindingClientListOptions added in v0.3.0

type BuildpackBindingClientListOptions struct {
}

BuildpackBindingClientListOptions contains the optional parameters for the BuildpackBindingClient.NewListPager method.

type BuildpackBindingClientListResponse added in v0.3.0

type BuildpackBindingClientListResponse struct {
	// Object that includes an array of BuildpackBinding resources and a possible link for next set
	BuildpackBindingResourceCollection
}

BuildpackBindingClientListResponse contains the response from method BuildpackBindingClient.NewListPager.

type BuildpackBindingLaunchProperties added in v0.3.0

type BuildpackBindingLaunchProperties struct {
	// Non-sensitive properties for launchProperties
	Properties map[string]*string

	// Sensitive properties for launchProperties
	Secrets map[string]*string
}

BuildpackBindingLaunchProperties - Buildpack Binding Launch Properties

func (BuildpackBindingLaunchProperties) MarshalJSON added in v0.3.0

func (b BuildpackBindingLaunchProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BuildpackBindingLaunchProperties.

func (*BuildpackBindingLaunchProperties) UnmarshalJSON added in v1.1.0

func (b *BuildpackBindingLaunchProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BuildpackBindingLaunchProperties.

type BuildpackBindingProperties added in v0.3.0

type BuildpackBindingProperties struct {
	// Buildpack Binding Type
	BindingType *BindingType

	// The object describes the buildpack binding launch properties
	LaunchProperties *BuildpackBindingLaunchProperties

	// READ-ONLY; State of the Buildpack Binding.
	ProvisioningState *BuildpackBindingProvisioningState
}

BuildpackBindingProperties - Properties of a buildpack binding

func (BuildpackBindingProperties) MarshalJSON added in v1.1.0

func (b BuildpackBindingProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BuildpackBindingProperties.

func (*BuildpackBindingProperties) UnmarshalJSON added in v1.1.0

func (b *BuildpackBindingProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BuildpackBindingProperties.

type BuildpackBindingProvisioningState added in v0.3.0

type BuildpackBindingProvisioningState string

BuildpackBindingProvisioningState - State of the Buildpack Binding.

const (
	BuildpackBindingProvisioningStateCreating  BuildpackBindingProvisioningState = "Creating"
	BuildpackBindingProvisioningStateDeleting  BuildpackBindingProvisioningState = "Deleting"
	BuildpackBindingProvisioningStateFailed    BuildpackBindingProvisioningState = "Failed"
	BuildpackBindingProvisioningStateSucceeded BuildpackBindingProvisioningState = "Succeeded"
	BuildpackBindingProvisioningStateUpdating  BuildpackBindingProvisioningState = "Updating"
)

func PossibleBuildpackBindingProvisioningStateValues added in v0.3.0

func PossibleBuildpackBindingProvisioningStateValues() []BuildpackBindingProvisioningState

PossibleBuildpackBindingProvisioningStateValues returns the possible values for the BuildpackBindingProvisioningState const type.

type BuildpackBindingResource added in v0.3.0

type BuildpackBindingResource struct {
	// Properties of a buildpack binding
	Properties *BuildpackBindingProperties

	// READ-ONLY; Fully qualified resource Id for the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource.
	Type *string
}

BuildpackBindingResource - Buildpack Binding Resource object

func (BuildpackBindingResource) MarshalJSON added in v1.1.0

func (b BuildpackBindingResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BuildpackBindingResource.

func (*BuildpackBindingResource) UnmarshalJSON added in v1.1.0

func (b *BuildpackBindingResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BuildpackBindingResource.

type BuildpackBindingResourceCollection added in v0.3.0

type BuildpackBindingResourceCollection struct {
	// URL client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string

	// Collection of BuildpackBinding resources
	Value []*BuildpackBindingResource
}

BuildpackBindingResourceCollection - Object that includes an array of BuildpackBinding resources and a possible link for next set

func (BuildpackBindingResourceCollection) MarshalJSON added in v0.3.0

func (b BuildpackBindingResourceCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BuildpackBindingResourceCollection.

func (*BuildpackBindingResourceCollection) UnmarshalJSON added in v1.1.0

func (b *BuildpackBindingResourceCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BuildpackBindingResourceCollection.

type BuildpackProperties added in v0.3.0

type BuildpackProperties struct {
	// Id of the buildpack
	ID *string
}

BuildpackProperties - Buildpack properties payload

func (BuildpackProperties) MarshalJSON added in v1.1.0

func (b BuildpackProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BuildpackProperties.

func (*BuildpackProperties) UnmarshalJSON added in v1.1.0

func (b *BuildpackProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BuildpackProperties.

type BuildpacksGroupProperties added in v0.3.0

type BuildpacksGroupProperties struct {
	// Buildpacks in the buildpack group
	Buildpacks []*BuildpackProperties

	// Buildpack group name
	Name *string
}

BuildpacksGroupProperties - Buildpack group properties of the Builder

func (BuildpacksGroupProperties) MarshalJSON added in v0.3.0

func (b BuildpacksGroupProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BuildpacksGroupProperties.

func (*BuildpacksGroupProperties) UnmarshalJSON added in v1.1.0

func (b *BuildpacksGroupProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BuildpacksGroupProperties.

type CertificateProperties

type CertificateProperties struct {
	// REQUIRED; The type of the certificate source.
	Type *string

	// READ-ONLY; The activate date of certificate.
	ActivateDate *string

	// READ-ONLY; The domain list of certificate.
	DNSNames []*string

	// READ-ONLY; The expiration date of certificate.
	ExpirationDate *string

	// READ-ONLY; The issue date of certificate.
	IssuedDate *string

	// READ-ONLY; The issuer of certificate.
	Issuer *string

	// READ-ONLY; The subject name of certificate.
	SubjectName *string

	// READ-ONLY; The thumbprint of certificate.
	Thumbprint *string
}

CertificateProperties - Certificate resource payload.

func (*CertificateProperties) GetCertificateProperties added in v0.2.0

func (c *CertificateProperties) GetCertificateProperties() *CertificateProperties

GetCertificateProperties implements the CertificatePropertiesClassification interface for type CertificateProperties.

func (CertificateProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CertificateProperties.

func (*CertificateProperties) UnmarshalJSON added in v0.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CertificateProperties.

type CertificatePropertiesClassification added in v0.2.0

type CertificatePropertiesClassification interface {
	// GetCertificateProperties returns the CertificateProperties content of the underlying type.
	GetCertificateProperties() *CertificateProperties
}

CertificatePropertiesClassification provides polymorphic access to related types. Call the interface's GetCertificateProperties() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *CertificateProperties, *ContentCertificateProperties, *KeyVaultCertificateProperties

type CertificateResource

type CertificateResource struct {
	// Properties of the certificate resource payload.
	Properties CertificatePropertiesClassification

	// READ-ONLY; Fully qualified resource Id for the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource.
	Type *string
}

CertificateResource - Certificate resource payload.

func (CertificateResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CertificateResource.

func (*CertificateResource) UnmarshalJSON added in v0.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CertificateResource.

type CertificateResourceCollection

type CertificateResourceCollection struct {
	// The link to next page of certificate list.
	NextLink *string

	// The certificate resources list.
	Value []*CertificateResource
}

CertificateResourceCollection - Collection compose of certificate resources list and a possible link for next page.

func (CertificateResourceCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CertificateResourceCollection.

func (*CertificateResourceCollection) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CertificateResourceCollection.

type CertificatesClient

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

CertificatesClient contains the methods for the Certificates group. Don't use this type directly, use NewCertificatesClient() instead.

func NewCertificatesClient

func NewCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CertificatesClient, error)

NewCertificatesClient creates a new instance of CertificatesClient with the specified values.

  • subscriptionID - Gets subscription ID which uniquely identify the 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 (*CertificatesClient) BeginCreateOrUpdate

func (client *CertificatesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, certificateResource CertificateResource, options *CertificatesClientBeginCreateOrUpdateOptions) (*runtime.Poller[CertificatesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update certificate resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • certificateName - The name of the certificate resource.
  • certificateResource - Parameters for the create or update operation
  • options - CertificatesClientBeginCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Certificates_CreateOrUpdate.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCertificatesClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "mycertificate", armappplatform.CertificateResource{
		Properties: &armappplatform.KeyVaultCertificateProperties{
			Type:             to.Ptr("KeyVaultCertificate"),
			CertVersion:      to.Ptr("08a219d06d874795a96db47e06fbb01e"),
			KeyVaultCertName: to.Ptr("mycert"),
			VaultURI:         to.Ptr("https://myvault.vault.azure.net"),
		},
	}, 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 pull 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.CertificateResource = armappplatform.CertificateResource{
	// 	Name: to.Ptr("mycertificate"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/certificates"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycertificate"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.KeyVaultCertificateProperties{
	// 		Type: to.Ptr("KeyVaultCertificate"),
	// 		ActivateDate: to.Ptr("2019-02-22T07:40:42Z"),
	// 		DNSNames: []*string{
	// 			to.Ptr("mydomain.com"),
	// 			to.Ptr("mydomain.net"),
	// 			to.Ptr("mydomain.io")},
	// 			ExpirationDate: to.Ptr("2019-02-21T07:40:42Z"),
	// 			IssuedDate: to.Ptr("2019-02-20T07:40:42Z"),
	// 			Issuer: to.Ptr("mydomain.com"),
	// 			SubjectName: to.Ptr("mysubjectname"),
	// 			Thumbprint: to.Ptr("934367bf1c97033f877db0f15cb1b586957d3133"),
	// 			CertVersion: to.Ptr("08a219d06d874795a96db47e06fbb01e"),
	// 			ExcludePrivateKey: to.Ptr(false),
	// 			KeyVaultCertName: to.Ptr("mycert"),
	// 			VaultURI: to.Ptr("https://myvault.vault.azure.net"),
	// 		},
	// 	}
}
Output:

func (*CertificatesClient) BeginDelete

func (client *CertificatesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, options *CertificatesClientBeginDeleteOptions) (*runtime.Poller[CertificatesClientDeleteResponse], error)

BeginDelete - Delete the certificate resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • certificateName - The name of the certificate resource.
  • options - CertificatesClientBeginDeleteOptions contains the optional parameters for the CertificatesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Certificates_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCertificatesClient().BeginDelete(ctx, "myResourceGroup", "myservice", "mycertificate", 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 pull the result: %v", err)
	}
}
Output:

func (*CertificatesClient) Get

func (client *CertificatesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, options *CertificatesClientGetOptions) (CertificatesClientGetResponse, error)

Get - Get the certificate resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • certificateName - The name of the certificate resource.
  • options - CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Certificates_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCertificatesClient().Get(ctx, "myResourceGroup", "myservice", "mycertificate", 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.CertificateResource = armappplatform.CertificateResource{
	// 	Name: to.Ptr("mycertificate"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/certificates"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycertificate"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.KeyVaultCertificateProperties{
	// 		Type: to.Ptr("KeyVaultCertificate"),
	// 		ActivateDate: to.Ptr("2019-02-22T07:40:42Z"),
	// 		DNSNames: []*string{
	// 			to.Ptr("mydomain.com"),
	// 			to.Ptr("mydomain.net"),
	// 			to.Ptr("mydomain.io")},
	// 			ExpirationDate: to.Ptr("2019-02-21T07:40:42Z"),
	// 			IssuedDate: to.Ptr("2019-02-20T07:40:42Z"),
	// 			Issuer: to.Ptr("mydomain.com"),
	// 			SubjectName: to.Ptr("mysubjectname"),
	// 			Thumbprint: to.Ptr("934367bf1c97033f877db0f15cb1b586957d3133"),
	// 			CertVersion: to.Ptr("08a219d06d874795a96db47e06fbb01e"),
	// 			ExcludePrivateKey: to.Ptr(false),
	// 			KeyVaultCertName: to.Ptr("mycert"),
	// 			VaultURI: to.Ptr("https://myvault.vault.azure.net"),
	// 		},
	// 	}
}
Output:

func (*CertificatesClient) NewListPager added in v0.5.0

func (client *CertificatesClient) NewListPager(resourceGroupName string, serviceName string, options *CertificatesClientListOptions) *runtime.Pager[CertificatesClientListResponse]

NewListPager - List all the certificates of one user.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • options - CertificatesClientListOptions contains the optional parameters for the CertificatesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Certificates_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCertificatesClient().NewListPager("myResourceGroup", "myService", 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.CertificateResourceCollection = armappplatform.CertificateResourceCollection{
		// 	Value: []*armappplatform.CertificateResource{
		// 		{
		// 			Name: to.Ptr("mycertificate"),
		// 			Type: to.Ptr("Microsoft.AppPlatform/Spring/certificates"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycertificate"),
		// 			SystemData: &armappplatform.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
		// 				CreatedBy: to.Ptr("sample-user"),
		// 				CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("sample-user"),
		// 				LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
		// 			},
		// 			Properties: &armappplatform.KeyVaultCertificateProperties{
		// 				Type: to.Ptr("KeyVaultCertificate"),
		// 				ActivateDate: to.Ptr("2019-02-22T07:40:42Z"),
		// 				DNSNames: []*string{
		// 					to.Ptr("mydomain.com"),
		// 					to.Ptr("mydomain.net"),
		// 					to.Ptr("mydomain.io")},
		// 					ExpirationDate: to.Ptr("2019-02-21T07:40:42Z"),
		// 					IssuedDate: to.Ptr("2019-02-20T07:40:42Z"),
		// 					Issuer: to.Ptr("mydomain.com"),
		// 					SubjectName: to.Ptr("mysubjectname"),
		// 					Thumbprint: to.Ptr("934367bf1c97033f877db0f15cb1b586957d3133"),
		// 					CertVersion: to.Ptr("08a219d06d874795a96db47e06fbb01e"),
		// 					ExcludePrivateKey: to.Ptr(false),
		// 					KeyVaultCertName: to.Ptr("mycert"),
		// 					VaultURI: to.Ptr("https://myvault.vault.azure.net"),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

type CertificatesClientBeginCreateOrUpdateOptions added in v0.3.0

type CertificatesClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CertificatesClientBeginCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.BeginCreateOrUpdate method.

type CertificatesClientBeginDeleteOptions added in v0.3.0

type CertificatesClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CertificatesClientBeginDeleteOptions contains the optional parameters for the CertificatesClient.BeginDelete method.

type CertificatesClientCreateOrUpdateResponse added in v0.3.0

type CertificatesClientCreateOrUpdateResponse struct {
	// Certificate resource payload.
	CertificateResource
}

CertificatesClientCreateOrUpdateResponse contains the response from method CertificatesClient.BeginCreateOrUpdate.

type CertificatesClientDeleteResponse added in v0.3.0

type CertificatesClientDeleteResponse struct {
}

CertificatesClientDeleteResponse contains the response from method CertificatesClient.BeginDelete.

type CertificatesClientGetOptions added in v0.3.0

type CertificatesClientGetOptions struct {
}

CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method.

type CertificatesClientGetResponse added in v0.3.0

type CertificatesClientGetResponse struct {
	// Certificate resource payload.
	CertificateResource
}

CertificatesClientGetResponse contains the response from method CertificatesClient.Get.

type CertificatesClientListOptions added in v0.3.0

type CertificatesClientListOptions struct {
}

CertificatesClientListOptions contains the optional parameters for the CertificatesClient.NewListPager method.

type CertificatesClientListResponse added in v0.3.0

type CertificatesClientListResponse struct {
	// Collection compose of certificate resources list and a possible link for next page.
	CertificateResourceCollection
}

CertificatesClientListResponse contains the response from method CertificatesClient.NewListPager.

type ClientFactory added in v1.1.0

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 added in v1.1.0

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 - Gets subscription ID which uniquely identify the 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 (*ClientFactory) NewAppsClient added in v1.1.0

func (c *ClientFactory) NewAppsClient() *AppsClient

NewAppsClient creates a new instance of AppsClient.

func (*ClientFactory) NewBindingsClient added in v1.1.0

func (c *ClientFactory) NewBindingsClient() *BindingsClient

NewBindingsClient creates a new instance of BindingsClient.

func (*ClientFactory) NewBuildServiceAgentPoolClient added in v1.1.0

func (c *ClientFactory) NewBuildServiceAgentPoolClient() *BuildServiceAgentPoolClient

NewBuildServiceAgentPoolClient creates a new instance of BuildServiceAgentPoolClient.

func (*ClientFactory) NewBuildServiceBuilderClient added in v1.1.0

func (c *ClientFactory) NewBuildServiceBuilderClient() *BuildServiceBuilderClient

NewBuildServiceBuilderClient creates a new instance of BuildServiceBuilderClient.

func (*ClientFactory) NewBuildServiceClient added in v1.1.0

func (c *ClientFactory) NewBuildServiceClient() *BuildServiceClient

NewBuildServiceClient creates a new instance of BuildServiceClient.

func (*ClientFactory) NewBuildpackBindingClient added in v1.1.0

func (c *ClientFactory) NewBuildpackBindingClient() *BuildpackBindingClient

NewBuildpackBindingClient creates a new instance of BuildpackBindingClient.

func (*ClientFactory) NewCertificatesClient added in v1.1.0

func (c *ClientFactory) NewCertificatesClient() *CertificatesClient

NewCertificatesClient creates a new instance of CertificatesClient.

func (*ClientFactory) NewConfigServersClient added in v1.1.0

func (c *ClientFactory) NewConfigServersClient() *ConfigServersClient

NewConfigServersClient creates a new instance of ConfigServersClient.

func (*ClientFactory) NewConfigurationServicesClient added in v1.1.0

func (c *ClientFactory) NewConfigurationServicesClient() *ConfigurationServicesClient

NewConfigurationServicesClient creates a new instance of ConfigurationServicesClient.

func (*ClientFactory) NewCustomDomainsClient added in v1.1.0

func (c *ClientFactory) NewCustomDomainsClient() *CustomDomainsClient

NewCustomDomainsClient creates a new instance of CustomDomainsClient.

func (*ClientFactory) NewDeploymentsClient added in v1.1.0

func (c *ClientFactory) NewDeploymentsClient() *DeploymentsClient

NewDeploymentsClient creates a new instance of DeploymentsClient.

func (*ClientFactory) NewMonitoringSettingsClient added in v1.1.0

func (c *ClientFactory) NewMonitoringSettingsClient() *MonitoringSettingsClient

NewMonitoringSettingsClient creates a new instance of MonitoringSettingsClient.

func (*ClientFactory) NewOperationsClient added in v1.1.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewRuntimeVersionsClient added in v1.1.0

func (c *ClientFactory) NewRuntimeVersionsClient() *RuntimeVersionsClient

NewRuntimeVersionsClient creates a new instance of RuntimeVersionsClient.

func (*ClientFactory) NewSKUsClient added in v1.1.0

func (c *ClientFactory) NewSKUsClient() *SKUsClient

NewSKUsClient creates a new instance of SKUsClient.

func (*ClientFactory) NewServiceRegistriesClient added in v1.1.0

func (c *ClientFactory) NewServiceRegistriesClient() *ServiceRegistriesClient

NewServiceRegistriesClient creates a new instance of ServiceRegistriesClient.

func (*ClientFactory) NewServicesClient added in v1.1.0

func (c *ClientFactory) NewServicesClient() *ServicesClient

NewServicesClient creates a new instance of ServicesClient.

type ClusterResourceProperties

type ClusterResourceProperties struct {
	// Network profile of the Service
	NetworkProfile *NetworkProfile
	ZoneRedundant  *bool

	// READ-ONLY; Fully qualified dns name of the service instance
	Fqdn *string

	// READ-ONLY; Provisioning state of the Service
	ProvisioningState *ProvisioningState

	// READ-ONLY; ServiceInstanceEntity GUID which uniquely identifies a created resource
	ServiceID *string

	// READ-ONLY; Version of the Service
	Version *int32
}

ClusterResourceProperties - Service properties payload

func (ClusterResourceProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ClusterResourceProperties.

func (*ClusterResourceProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ClusterResourceProperties.

type ConfigServerGitProperty

type ConfigServerGitProperty struct {
	// REQUIRED; URI of the repository
	URI *string

	// Public sshKey of git repository.
	HostKey *string

	// SshKey algorithm of git repository.
	HostKeyAlgorithm *string

	// Label of the repository
	Label *string

	// Password of git repository basic auth.
	Password *string

	// Private sshKey algorithm of git repository.
	PrivateKey *string

	// Repositories of git.
	Repositories []*GitPatternRepository

	// Searching path of the repository
	SearchPaths []*string

	// Strict host key checking or not.
	StrictHostKeyChecking *bool

	// Username of git repository basic auth.
	Username *string
}

ConfigServerGitProperty - Property of git.

func (ConfigServerGitProperty) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ConfigServerGitProperty.

func (*ConfigServerGitProperty) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConfigServerGitProperty.

type ConfigServerProperties

type ConfigServerProperties struct {
	// Settings of config server.
	ConfigServer *ConfigServerSettings

	// Error when apply config server settings.
	Error *Error

	// READ-ONLY; State of the config server.
	ProvisioningState *ConfigServerState
}

ConfigServerProperties - Config server git properties payload

func (ConfigServerProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ConfigServerProperties.

func (*ConfigServerProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConfigServerProperties.

type ConfigServerResource

type ConfigServerResource struct {
	// Properties of the Config Server resource
	Properties *ConfigServerProperties

	// READ-ONLY; Fully qualified resource Id for the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource.
	Type *string
}

ConfigServerResource - Config Server resource

func (ConfigServerResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ConfigServerResource.

func (*ConfigServerResource) UnmarshalJSON added in v0.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConfigServerResource.

type ConfigServerSettings

type ConfigServerSettings struct {
	// Property of git environment.
	GitProperty *ConfigServerGitProperty
}

ConfigServerSettings - The settings of config server.

func (ConfigServerSettings) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ConfigServerSettings.

func (*ConfigServerSettings) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConfigServerSettings.

type ConfigServerSettingsErrorRecord

type ConfigServerSettingsErrorRecord struct {
	// The detail error messages of the record
	Messages []*string

	// The name of the config server settings error record
	Name *string

	// The uri of the config server settings error record
	URI *string
}

ConfigServerSettingsErrorRecord - Error record of the config server settings

func (ConfigServerSettingsErrorRecord) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ConfigServerSettingsErrorRecord.

func (*ConfigServerSettingsErrorRecord) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConfigServerSettingsErrorRecord.

type ConfigServerSettingsValidateResult

type ConfigServerSettingsValidateResult struct {
	// The detail validation results
	Details []*ConfigServerSettingsErrorRecord

	// Indicate if the config server settings are valid
	IsValid *bool
}

ConfigServerSettingsValidateResult - Validation result for config server settings

func (ConfigServerSettingsValidateResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ConfigServerSettingsValidateResult.

func (*ConfigServerSettingsValidateResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConfigServerSettingsValidateResult.

type ConfigServerState

type ConfigServerState string

ConfigServerState - State of the config server.

const (
	ConfigServerStateDeleted      ConfigServerState = "Deleted"
	ConfigServerStateFailed       ConfigServerState = "Failed"
	ConfigServerStateNotAvailable ConfigServerState = "NotAvailable"
	ConfigServerStateSucceeded    ConfigServerState = "Succeeded"
	ConfigServerStateUpdating     ConfigServerState = "Updating"
)

func PossibleConfigServerStateValues

func PossibleConfigServerStateValues() []ConfigServerState

PossibleConfigServerStateValues returns the possible values for the ConfigServerState const type.

type ConfigServersClient

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

ConfigServersClient contains the methods for the ConfigServers group. Don't use this type directly, use NewConfigServersClient() instead.

func NewConfigServersClient

func NewConfigServersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigServersClient, error)

NewConfigServersClient creates a new instance of ConfigServersClient with the specified values.

  • subscriptionID - Gets subscription ID which uniquely identify the 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 (*ConfigServersClient) BeginUpdatePatch

func (client *ConfigServersClient) BeginUpdatePatch(ctx context.Context, resourceGroupName string, serviceName string, configServerResource ConfigServerResource, options *ConfigServersClientBeginUpdatePatchOptions) (*runtime.Poller[ConfigServersClientUpdatePatchResponse], error)

BeginUpdatePatch - Update the config server. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • configServerResource - Parameters for the update operation
  • options - ConfigServersClientBeginUpdatePatchOptions contains the optional parameters for the ConfigServersClient.BeginUpdatePatch method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/ConfigServers_UpdatePatch.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewConfigServersClient().BeginUpdatePatch(ctx, "myResourceGroup", "myservice", armappplatform.ConfigServerResource{
		Properties: &armappplatform.ConfigServerProperties{
			ConfigServer: &armappplatform.ConfigServerSettings{
				GitProperty: &armappplatform.ConfigServerGitProperty{
					Label: to.Ptr("master"),
					SearchPaths: []*string{
						to.Ptr("/")},
					URI: to.Ptr("https://github.com/fake-user/fake-repository.git"),
				},
			},
		},
	}, 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 pull 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.ConfigServerResource = armappplatform.ConfigServerResource{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/configServers"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/configServers/default"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.ConfigServerProperties{
	// 		ConfigServer: &armappplatform.ConfigServerSettings{
	// 			GitProperty: &armappplatform.ConfigServerGitProperty{
	// 				Label: to.Ptr("master"),
	// 				SearchPaths: []*string{
	// 					to.Ptr("/")},
	// 					URI: to.Ptr("https://github.com/fake-user/fake-repository.git"),
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armappplatform.ConfigServerStateSucceeded),
	// 		},
	// 	}
}
Output:

func (*ConfigServersClient) BeginUpdatePut

func (client *ConfigServersClient) BeginUpdatePut(ctx context.Context, resourceGroupName string, serviceName string, configServerResource ConfigServerResource, options *ConfigServersClientBeginUpdatePutOptions) (*runtime.Poller[ConfigServersClientUpdatePutResponse], error)

BeginUpdatePut - Update the config server. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • configServerResource - Parameters for the update operation
  • options - ConfigServersClientBeginUpdatePutOptions contains the optional parameters for the ConfigServersClient.BeginUpdatePut method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/ConfigServers_UpdatePut.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewConfigServersClient().BeginUpdatePut(ctx, "myResourceGroup", "myservice", armappplatform.ConfigServerResource{
		Properties: &armappplatform.ConfigServerProperties{
			ConfigServer: &armappplatform.ConfigServerSettings{
				GitProperty: &armappplatform.ConfigServerGitProperty{
					Label: to.Ptr("master"),
					SearchPaths: []*string{
						to.Ptr("/")},
					URI: to.Ptr("https://github.com/fake-user/fake-repository.git"),
				},
			},
		},
	}, 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 pull 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.ConfigServerResource = armappplatform.ConfigServerResource{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/configServers"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/configServers/default"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.ConfigServerProperties{
	// 		ConfigServer: &armappplatform.ConfigServerSettings{
	// 			GitProperty: &armappplatform.ConfigServerGitProperty{
	// 				Label: to.Ptr("master"),
	// 				SearchPaths: []*string{
	// 					to.Ptr("/")},
	// 					URI: to.Ptr("https://github.com/fake-user/fake-repository.git"),
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armappplatform.ConfigServerStateSucceeded),
	// 		},
	// 	}
}
Output:

func (*ConfigServersClient) BeginValidate

func (client *ConfigServersClient) BeginValidate(ctx context.Context, resourceGroupName string, serviceName string, configServerSettings ConfigServerSettings, options *ConfigServersClientBeginValidateOptions) (*runtime.Poller[ConfigServersClientValidateResponse], error)

BeginValidate - Check if the config server settings are valid. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • configServerSettings - Config server settings to be validated
  • options - ConfigServersClientBeginValidateOptions contains the optional parameters for the ConfigServersClient.BeginValidate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/ConfigServers_Validate.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewConfigServersClient().BeginValidate(ctx, "myResourceGroup", "myservice", armappplatform.ConfigServerSettings{
		GitProperty: &armappplatform.ConfigServerGitProperty{
			Label: to.Ptr("master"),
			SearchPaths: []*string{
				to.Ptr("/")},
			URI: to.Ptr("https://github.com/fake-user/fake-repository.git"),
		},
	}, 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 pull 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.ConfigServerSettingsValidateResult = armappplatform.ConfigServerSettingsValidateResult{
	// 	IsValid: to.Ptr(true),
	// }
}
Output:

func (*ConfigServersClient) Get

func (client *ConfigServersClient) Get(ctx context.Context, resourceGroupName string, serviceName string, options *ConfigServersClientGetOptions) (ConfigServersClientGetResponse, error)

Get - Get the config server and its properties. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • options - ConfigServersClientGetOptions contains the optional parameters for the ConfigServersClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/ConfigServers_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewConfigServersClient().Get(ctx, "myResourceGroup", "myservice", 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.ConfigServerResource = armappplatform.ConfigServerResource{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/configServers"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/configServers/default"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.ConfigServerProperties{
	// 		ConfigServer: &armappplatform.ConfigServerSettings{
	// 			GitProperty: &armappplatform.ConfigServerGitProperty{
	// 				Label: to.Ptr("master"),
	// 				SearchPaths: []*string{
	// 					to.Ptr("/")},
	// 					URI: to.Ptr("https://github.com/fake-user/fake-repository.git"),
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armappplatform.ConfigServerStateSucceeded),
	// 		},
	// 	}
}
Output:

type ConfigServersClientBeginUpdatePatchOptions added in v0.3.0

type ConfigServersClientBeginUpdatePatchOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ConfigServersClientBeginUpdatePatchOptions contains the optional parameters for the ConfigServersClient.BeginUpdatePatch method.

type ConfigServersClientBeginUpdatePutOptions added in v0.3.0

type ConfigServersClientBeginUpdatePutOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ConfigServersClientBeginUpdatePutOptions contains the optional parameters for the ConfigServersClient.BeginUpdatePut method.

type ConfigServersClientBeginValidateOptions added in v0.3.0

type ConfigServersClientBeginValidateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ConfigServersClientBeginValidateOptions contains the optional parameters for the ConfigServersClient.BeginValidate method.

type ConfigServersClientGetOptions added in v0.3.0

type ConfigServersClientGetOptions struct {
}

ConfigServersClientGetOptions contains the optional parameters for the ConfigServersClient.Get method.

type ConfigServersClientGetResponse added in v0.3.0

type ConfigServersClientGetResponse struct {
	// Config Server resource
	ConfigServerResource
}

ConfigServersClientGetResponse contains the response from method ConfigServersClient.Get.

type ConfigServersClientUpdatePatchResponse added in v0.3.0

type ConfigServersClientUpdatePatchResponse struct {
	// Config Server resource
	ConfigServerResource
}

ConfigServersClientUpdatePatchResponse contains the response from method ConfigServersClient.BeginUpdatePatch.

type ConfigServersClientUpdatePutResponse added in v0.3.0

type ConfigServersClientUpdatePutResponse struct {
	// Config Server resource
	ConfigServerResource
}

ConfigServersClientUpdatePutResponse contains the response from method ConfigServersClient.BeginUpdatePut.

type ConfigServersClientValidateResponse added in v0.3.0

type ConfigServersClientValidateResponse struct {
	// Validation result for config server settings
	ConfigServerSettingsValidateResult
}

ConfigServersClientValidateResponse contains the response from method ConfigServersClient.BeginValidate.

type ConfigurationServiceGitProperty added in v0.3.0

type ConfigurationServiceGitProperty struct {
	// Repositories of Application Configuration Service git property.
	Repositories []*ConfigurationServiceGitRepository
}

ConfigurationServiceGitProperty - Property of git environment.

func (ConfigurationServiceGitProperty) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceGitProperty.

func (*ConfigurationServiceGitProperty) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceGitProperty.

type ConfigurationServiceGitPropertyValidateResult added in v0.3.0

type ConfigurationServiceGitPropertyValidateResult struct {
	// The detail validation results
	GitReposValidationResult []*ValidationMessages

	// Indicate if the configuration service settings are valid
	IsValid *bool
}

ConfigurationServiceGitPropertyValidateResult - Validation result for configuration service settings

func (ConfigurationServiceGitPropertyValidateResult) MarshalJSON added in v0.3.0

MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceGitPropertyValidateResult.

func (*ConfigurationServiceGitPropertyValidateResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceGitPropertyValidateResult.

type ConfigurationServiceGitRepository added in v0.3.0

type ConfigurationServiceGitRepository struct {
	// REQUIRED; Label of the repository
	Label *string

	// REQUIRED; Name of the repository
	Name *string

	// REQUIRED; Collection of patterns of the repository
	Patterns []*string

	// REQUIRED; URI of the repository
	URI *string

	// Public sshKey of git repository.
	HostKey *string

	// SshKey algorithm of git repository.
	HostKeyAlgorithm *string

	// Password of git repository basic auth.
	Password *string

	// Private sshKey algorithm of git repository.
	PrivateKey *string

	// Searching path of the repository
	SearchPaths []*string

	// Strict host key checking or not.
	StrictHostKeyChecking *bool

	// Username of git repository basic auth.
	Username *string
}

ConfigurationServiceGitRepository - Git repository property payload for Application Configuration Service

func (ConfigurationServiceGitRepository) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceGitRepository.

func (*ConfigurationServiceGitRepository) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceGitRepository.

type ConfigurationServiceInstance added in v0.3.0

type ConfigurationServiceInstance struct {
	// READ-ONLY; Name of the Application Configuration Service instance
	Name *string

	// READ-ONLY; Status of the Application Configuration Service instance
	Status *string
}

ConfigurationServiceInstance - Collection of instances belong to the Application Configuration Service

func (ConfigurationServiceInstance) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceInstance.

func (*ConfigurationServiceInstance) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceInstance.

type ConfigurationServiceProperties added in v0.3.0

type ConfigurationServiceProperties struct {
	// The settings of Application Configuration Service.
	Settings *ConfigurationServiceSettings

	// READ-ONLY; Collection of instances belong to Application Configuration Service.
	Instances []*ConfigurationServiceInstance

	// READ-ONLY; State of the Application Configuration Service.
	ProvisioningState *ConfigurationServiceProvisioningState

	// READ-ONLY; The requested resource quantity for required CPU and Memory.
	ResourceRequests *ConfigurationServiceResourceRequests
}

ConfigurationServiceProperties - Application Configuration Service properties payload

func (ConfigurationServiceProperties) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceProperties.

func (*ConfigurationServiceProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceProperties.

type ConfigurationServiceProvisioningState added in v0.3.0

type ConfigurationServiceProvisioningState string

ConfigurationServiceProvisioningState - State of the Application Configuration Service.

const (
	ConfigurationServiceProvisioningStateCreating  ConfigurationServiceProvisioningState = "Creating"
	ConfigurationServiceProvisioningStateDeleting  ConfigurationServiceProvisioningState = "Deleting"
	ConfigurationServiceProvisioningStateFailed    ConfigurationServiceProvisioningState = "Failed"
	ConfigurationServiceProvisioningStateSucceeded ConfigurationServiceProvisioningState = "Succeeded"
	ConfigurationServiceProvisioningStateUpdating  ConfigurationServiceProvisioningState = "Updating"
)

func PossibleConfigurationServiceProvisioningStateValues added in v0.3.0

func PossibleConfigurationServiceProvisioningStateValues() []ConfigurationServiceProvisioningState

PossibleConfigurationServiceProvisioningStateValues returns the possible values for the ConfigurationServiceProvisioningState const type.

type ConfigurationServiceResource added in v0.3.0

type ConfigurationServiceResource struct {
	// Application Configuration Service properties payload
	Properties *ConfigurationServiceProperties

	// READ-ONLY; Fully qualified resource Id for the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource.
	Type *string
}

ConfigurationServiceResource - Application Configuration Service resource

func (ConfigurationServiceResource) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceResource.

func (*ConfigurationServiceResource) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceResource.

type ConfigurationServiceResourceCollection added in v0.3.0

type ConfigurationServiceResourceCollection struct {
	// URL client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string

	// Collection of configuration service resources
	Value []*ConfigurationServiceResource
}

ConfigurationServiceResourceCollection - Object that includes an array of configuration service resources and a possible link for next set

func (ConfigurationServiceResourceCollection) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceResourceCollection.

func (*ConfigurationServiceResourceCollection) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceResourceCollection.

type ConfigurationServiceResourceRequests added in v0.3.0

type ConfigurationServiceResourceRequests struct {
	// READ-ONLY; Cpu allocated to each Application Configuration Service instance
	CPU *string

	// READ-ONLY; Instance count of the Application Configuration Service
	InstanceCount *int32

	// READ-ONLY; Memory allocated to each Application Configuration Service instance
	Memory *string
}

ConfigurationServiceResourceRequests - Resource request payload of Application Configuration Service

func (ConfigurationServiceResourceRequests) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceResourceRequests.

func (*ConfigurationServiceResourceRequests) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceResourceRequests.

type ConfigurationServiceSettings added in v0.3.0

type ConfigurationServiceSettings struct {
	// Property of git environment.
	GitProperty *ConfigurationServiceGitProperty
}

ConfigurationServiceSettings - The settings of Application Configuration Service.

func (ConfigurationServiceSettings) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceSettings.

func (*ConfigurationServiceSettings) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceSettings.

type ConfigurationServiceSettingsValidateResult added in v0.3.0

type ConfigurationServiceSettingsValidateResult struct {
	// Validation result for configuration service settings
	GitPropertyValidationResult *ConfigurationServiceGitPropertyValidateResult
}

ConfigurationServiceSettingsValidateResult - Validation result for configuration service settings

func (ConfigurationServiceSettingsValidateResult) MarshalJSON added in v1.1.0

MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceSettingsValidateResult.

func (*ConfigurationServiceSettingsValidateResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceSettingsValidateResult.

type ConfigurationServicesClient added in v0.3.0

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

ConfigurationServicesClient contains the methods for the ConfigurationServices group. Don't use this type directly, use NewConfigurationServicesClient() instead.

func NewConfigurationServicesClient added in v0.3.0

func NewConfigurationServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigurationServicesClient, error)

NewConfigurationServicesClient creates a new instance of ConfigurationServicesClient with the specified values.

  • subscriptionID - Gets subscription ID which uniquely identify the 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 (*ConfigurationServicesClient) BeginCreateOrUpdate added in v0.3.0

func (client *ConfigurationServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, configurationServiceResource ConfigurationServiceResource, options *ConfigurationServicesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ConfigurationServicesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create the default Application Configuration Service or update the existing Application Configuration Service. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • configurationServiceName - The name of Application Configuration Service.
  • configurationServiceResource - Parameters for the update operation
  • options - ConfigurationServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ConfigurationServicesClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/ConfigurationServices_CreateOrUpdate.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewConfigurationServicesClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", armappplatform.ConfigurationServiceResource{
		Properties: &armappplatform.ConfigurationServiceProperties{
			Settings: &armappplatform.ConfigurationServiceSettings{
				GitProperty: &armappplatform.ConfigurationServiceGitProperty{
					Repositories: []*armappplatform.ConfigurationServiceGitRepository{
						{
							Name:  to.Ptr("fake"),
							Label: to.Ptr("master"),
							Patterns: []*string{
								to.Ptr("app/dev")},
							URI: to.Ptr("https://github.com/fake-user/fake-repository"),
						}},
				},
			},
		},
	}, 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 pull 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.ConfigurationServiceResource = armappplatform.ConfigurationServiceResource{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/configurationServices"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/configurationServices/default"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.ConfigurationServiceProperties{
	// 		Instances: []*armappplatform.ConfigurationServiceInstance{
	// 			{
	// 				Name: to.Ptr("instance1"),
	// 				Status: to.Ptr("Running"),
	// 			},
	// 			{
	// 				Name: to.Ptr("instance2"),
	// 				Status: to.Ptr("Running"),
	// 		}},
	// 		ProvisioningState: to.Ptr(armappplatform.ConfigurationServiceProvisioningStateSucceeded),
	// 		ResourceRequests: &armappplatform.ConfigurationServiceResourceRequests{
	// 			CPU: to.Ptr("1"),
	// 			InstanceCount: to.Ptr[int32](2),
	// 			Memory: to.Ptr("1G"),
	// 		},
	// 		Settings: &armappplatform.ConfigurationServiceSettings{
	// 			GitProperty: &armappplatform.ConfigurationServiceGitProperty{
	// 				Repositories: []*armappplatform.ConfigurationServiceGitRepository{
	// 					{
	// 						Name: to.Ptr("fake"),
	// 						Label: to.Ptr("master"),
	// 						Patterns: []*string{
	// 							to.Ptr("app/dev")},
	// 							URI: to.Ptr("https://github.com/fake-user/fake-repository"),
	// 					}},
	// 				},
	// 			},
	// 		},
	// 	}
}
Output:

func (*ConfigurationServicesClient) BeginDelete added in v0.3.0

func (client *ConfigurationServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, options *ConfigurationServicesClientBeginDeleteOptions) (*runtime.Poller[ConfigurationServicesClientDeleteResponse], error)

BeginDelete - Disable the default Application Configuration Service. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • configurationServiceName - The name of Application Configuration Service.
  • options - ConfigurationServicesClientBeginDeleteOptions contains the optional parameters for the ConfigurationServicesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/ConfigurationServices_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewConfigurationServicesClient().BeginDelete(ctx, "myResourceGroup", "myservice", "default", 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 pull the result: %v", err)
	}
}
Output:

func (*ConfigurationServicesClient) BeginValidate added in v0.3.0

func (client *ConfigurationServicesClient) BeginValidate(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, settings ConfigurationServiceSettings, options *ConfigurationServicesClientBeginValidateOptions) (*runtime.Poller[ConfigurationServicesClientValidateResponse], error)

BeginValidate - Check if the Application Configuration Service settings are valid. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • configurationServiceName - The name of Application Configuration Service.
  • settings - Application Configuration Service settings to be validated
  • options - ConfigurationServicesClientBeginValidateOptions contains the optional parameters for the ConfigurationServicesClient.BeginValidate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/ConfigurationServices_Validate.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewConfigurationServicesClient().BeginValidate(ctx, "myResourceGroup", "myservice", "default", armappplatform.ConfigurationServiceSettings{
		GitProperty: &armappplatform.ConfigurationServiceGitProperty{
			Repositories: []*armappplatform.ConfigurationServiceGitRepository{
				{
					Name:  to.Ptr("fake"),
					Label: to.Ptr("master"),
					Patterns: []*string{
						to.Ptr("app/dev")},
					URI: to.Ptr("https://github.com/fake-user/fake-repository"),
				}},
		},
	}, 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 pull 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.ConfigurationServiceSettingsValidateResult = armappplatform.ConfigurationServiceSettingsValidateResult{
	// 	GitPropertyValidationResult: &armappplatform.ConfigurationServiceGitPropertyValidateResult{
	// 		IsValid: to.Ptr(true),
	// 	},
	// }
}
Output:

func (*ConfigurationServicesClient) Get added in v0.3.0

func (client *ConfigurationServicesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, options *ConfigurationServicesClientGetOptions) (ConfigurationServicesClientGetResponse, error)

Get - Get the Application Configuration Service and its properties. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • configurationServiceName - The name of Application Configuration Service.
  • options - ConfigurationServicesClientGetOptions contains the optional parameters for the ConfigurationServicesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/ConfigurationServices_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewConfigurationServicesClient().Get(ctx, "myResourceGroup", "myservice", "default", 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.ConfigurationServiceResource = armappplatform.ConfigurationServiceResource{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/configurationServices"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/configurationServices/default"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.ConfigurationServiceProperties{
	// 		Instances: []*armappplatform.ConfigurationServiceInstance{
	// 			{
	// 				Name: to.Ptr("instance1"),
	// 				Status: to.Ptr("Running"),
	// 			},
	// 			{
	// 				Name: to.Ptr("instance2"),
	// 				Status: to.Ptr("Running"),
	// 		}},
	// 		ProvisioningState: to.Ptr(armappplatform.ConfigurationServiceProvisioningStateSucceeded),
	// 		ResourceRequests: &armappplatform.ConfigurationServiceResourceRequests{
	// 			CPU: to.Ptr("1"),
	// 			InstanceCount: to.Ptr[int32](2),
	// 			Memory: to.Ptr("1G"),
	// 		},
	// 		Settings: &armappplatform.ConfigurationServiceSettings{
	// 			GitProperty: &armappplatform.ConfigurationServiceGitProperty{
	// 				Repositories: []*armappplatform.ConfigurationServiceGitRepository{
	// 					{
	// 						Name: to.Ptr("fake"),
	// 						Label: to.Ptr("master"),
	// 						Patterns: []*string{
	// 							to.Ptr("app1"),
	// 							to.Ptr("app2/dev")},
	// 							URI: to.Ptr("https://github.com/fake-user/fake-repository.git"),
	// 					}},
	// 				},
	// 			},
	// 		},
	// 	}
}
Output:

func (*ConfigurationServicesClient) NewListPager added in v0.5.0

NewListPager - Handles requests to list all resources in a Service.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • options - ConfigurationServicesClientListOptions contains the optional parameters for the ConfigurationServicesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/ConfigurationServices_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewConfigurationServicesClient().NewListPager("myResourceGroup", "myservice", 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.ConfigurationServiceResourceCollection = armappplatform.ConfigurationServiceResourceCollection{
		// 	Value: []*armappplatform.ConfigurationServiceResource{
		// 		{
		// 			Name: to.Ptr("default"),
		// 			Type: to.Ptr("Microsoft.AppPlatform/Spring/configurationServices"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/configurationServices/default"),
		// 			SystemData: &armappplatform.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
		// 				CreatedBy: to.Ptr("sample-user"),
		// 				CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("sample-user"),
		// 				LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
		// 			},
		// 			Properties: &armappplatform.ConfigurationServiceProperties{
		// 				Instances: []*armappplatform.ConfigurationServiceInstance{
		// 					{
		// 						Name: to.Ptr("instance1"),
		// 						Status: to.Ptr("Running"),
		// 					},
		// 					{
		// 						Name: to.Ptr("instance2"),
		// 						Status: to.Ptr("Running"),
		// 				}},
		// 				ProvisioningState: to.Ptr(armappplatform.ConfigurationServiceProvisioningStateSucceeded),
		// 				ResourceRequests: &armappplatform.ConfigurationServiceResourceRequests{
		// 					CPU: to.Ptr("1"),
		// 					InstanceCount: to.Ptr[int32](2),
		// 					Memory: to.Ptr("1G"),
		// 				},
		// 				Settings: &armappplatform.ConfigurationServiceSettings{
		// 					GitProperty: &armappplatform.ConfigurationServiceGitProperty{
		// 						Repositories: []*armappplatform.ConfigurationServiceGitRepository{
		// 							{
		// 								Name: to.Ptr("fake"),
		// 								Label: to.Ptr("master"),
		// 								Patterns: []*string{
		// 									to.Ptr("app1"),
		// 									to.Ptr("app2/dev")},
		// 									URI: to.Ptr("https://github.com/fake-user/fake-repository.git"),
		// 							}},
		// 						},
		// 					},
		// 				},
		// 		}},
		// 	}
	}
}
Output:

type ConfigurationServicesClientBeginCreateOrUpdateOptions added in v0.3.0

type ConfigurationServicesClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ConfigurationServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ConfigurationServicesClient.BeginCreateOrUpdate method.

type ConfigurationServicesClientBeginDeleteOptions added in v0.3.0

type ConfigurationServicesClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ConfigurationServicesClientBeginDeleteOptions contains the optional parameters for the ConfigurationServicesClient.BeginDelete method.

type ConfigurationServicesClientBeginValidateOptions added in v0.3.0

type ConfigurationServicesClientBeginValidateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ConfigurationServicesClientBeginValidateOptions contains the optional parameters for the ConfigurationServicesClient.BeginValidate method.

type ConfigurationServicesClientCreateOrUpdateResponse added in v0.3.0

type ConfigurationServicesClientCreateOrUpdateResponse struct {
	// Application Configuration Service resource
	ConfigurationServiceResource
}

ConfigurationServicesClientCreateOrUpdateResponse contains the response from method ConfigurationServicesClient.BeginCreateOrUpdate.

type ConfigurationServicesClientDeleteResponse added in v0.3.0

type ConfigurationServicesClientDeleteResponse struct {
}

ConfigurationServicesClientDeleteResponse contains the response from method ConfigurationServicesClient.BeginDelete.

type ConfigurationServicesClientGetOptions added in v0.3.0

type ConfigurationServicesClientGetOptions struct {
}

ConfigurationServicesClientGetOptions contains the optional parameters for the ConfigurationServicesClient.Get method.

type ConfigurationServicesClientGetResponse added in v0.3.0

type ConfigurationServicesClientGetResponse struct {
	// Application Configuration Service resource
	ConfigurationServiceResource
}

ConfigurationServicesClientGetResponse contains the response from method ConfigurationServicesClient.Get.

type ConfigurationServicesClientListOptions added in v0.3.0

type ConfigurationServicesClientListOptions struct {
}

ConfigurationServicesClientListOptions contains the optional parameters for the ConfigurationServicesClient.NewListPager method.

type ConfigurationServicesClientListResponse added in v0.3.0

type ConfigurationServicesClientListResponse struct {
	// Object that includes an array of configuration service resources and a possible link for next set
	ConfigurationServiceResourceCollection
}

ConfigurationServicesClientListResponse contains the response from method ConfigurationServicesClient.NewListPager.

type ConfigurationServicesClientValidateResponse added in v0.3.0

type ConfigurationServicesClientValidateResponse struct {
	// Validation result for configuration service settings
	ConfigurationServiceSettingsValidateResult
}

ConfigurationServicesClientValidateResponse contains the response from method ConfigurationServicesClient.BeginValidate.

type ContentCertificateProperties added in v0.2.0

type ContentCertificateProperties struct {
	// REQUIRED; The type of the certificate source.
	Type *string

	// The content of uploaded certificate.
	Content *string

	// READ-ONLY; The activate date of certificate.
	ActivateDate *string

	// READ-ONLY; The domain list of certificate.
	DNSNames []*string

	// READ-ONLY; The expiration date of certificate.
	ExpirationDate *string

	// READ-ONLY; The issue date of certificate.
	IssuedDate *string

	// READ-ONLY; The issuer of certificate.
	Issuer *string

	// READ-ONLY; The subject name of certificate.
	SubjectName *string

	// READ-ONLY; The thumbprint of certificate.
	Thumbprint *string
}

ContentCertificateProperties - Properties of certificate imported from key vault.

func (*ContentCertificateProperties) GetCertificateProperties added in v0.3.0

func (c *ContentCertificateProperties) GetCertificateProperties() *CertificateProperties

GetCertificateProperties implements the CertificatePropertiesClassification interface for type ContentCertificateProperties.

func (ContentCertificateProperties) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type ContentCertificateProperties.

func (*ContentCertificateProperties) UnmarshalJSON added in v0.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ContentCertificateProperties.

type CreatedByType added in v0.2.0

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues added in v0.2.0

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type CustomDomainProperties

type CustomDomainProperties struct {
	// The bound certificate name of domain.
	CertName *string

	// The thumbprint of bound certificate.
	Thumbprint *string

	// READ-ONLY; The app name of domain.
	AppName *string
}

CustomDomainProperties - Custom domain of app resource payload.

func (CustomDomainProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CustomDomainProperties.

func (*CustomDomainProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainProperties.

type CustomDomainResource

type CustomDomainResource struct {
	// Properties of the custom domain resource.
	Properties *CustomDomainProperties

	// READ-ONLY; Fully qualified resource Id for the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource.
	Type *string
}

CustomDomainResource - Custom domain resource payload.

func (CustomDomainResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CustomDomainResource.

func (*CustomDomainResource) UnmarshalJSON added in v0.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainResource.

type CustomDomainResourceCollection

type CustomDomainResourceCollection struct {
	// The link to next page of custom domain list.
	NextLink *string

	// The custom domain resources list.
	Value []*CustomDomainResource
}

CustomDomainResourceCollection - Collection compose of a custom domain resources list and a possible link for next page.

func (CustomDomainResourceCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CustomDomainResourceCollection.

func (*CustomDomainResourceCollection) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainResourceCollection.

type CustomDomainValidatePayload

type CustomDomainValidatePayload struct {
	// REQUIRED; Name to be validated
	Name *string
}

CustomDomainValidatePayload - Custom domain validate payload.

func (CustomDomainValidatePayload) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CustomDomainValidatePayload.

func (*CustomDomainValidatePayload) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainValidatePayload.

type CustomDomainValidateResult

type CustomDomainValidateResult struct {
	// Indicates if domain name is valid.
	IsValid *bool

	// Message of why domain name is invalid.
	Message *string
}

CustomDomainValidateResult - Validation result for custom domain.

func (CustomDomainValidateResult) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CustomDomainValidateResult.

func (*CustomDomainValidateResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainValidateResult.

type CustomDomainsClient

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

CustomDomainsClient contains the methods for the CustomDomains group. Don't use this type directly, use NewCustomDomainsClient() instead.

func NewCustomDomainsClient

func NewCustomDomainsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CustomDomainsClient, error)

NewCustomDomainsClient creates a new instance of CustomDomainsClient with the specified values.

  • subscriptionID - Gets subscription ID which uniquely identify the 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 (*CustomDomainsClient) BeginCreateOrUpdate

func (client *CustomDomainsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, domainResource CustomDomainResource, options *CustomDomainsClientBeginCreateOrUpdateOptions) (*runtime.Poller[CustomDomainsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update custom domain of one lifecycle application. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • domainName - The name of the custom domain resource.
  • domainResource - Parameters for the create or update operation
  • options - CustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomDomainsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/CustomDomains_CreateOrUpdate.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCustomDomainsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "myapp", "mydomain.com", armappplatform.CustomDomainResource{
		Properties: &armappplatform.CustomDomainProperties{
			CertName:   to.Ptr("mycert"),
			Thumbprint: to.Ptr("934367bf1c97033f877db0f15cb1b586957d3133"),
		},
	}, 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 pull 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.CustomDomainResource = armappplatform.CustomDomainResource{
	// 	Name: to.Ptr("mydomain.com"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/apps/domains"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/domains/mydomain.com"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.CustomDomainProperties{
	// 		AppName: to.Ptr("myapp"),
	// 		CertName: to.Ptr("mycert"),
	// 		Thumbprint: to.Ptr("934367bf1c97033f877db0f15cb1b586957d3133"),
	// 	},
	// }
}
Output:

func (*CustomDomainsClient) BeginDelete

func (client *CustomDomainsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, options *CustomDomainsClientBeginDeleteOptions) (*runtime.Poller[CustomDomainsClientDeleteResponse], error)

BeginDelete - Delete the custom domain of one lifecycle application. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • domainName - The name of the custom domain resource.
  • options - CustomDomainsClientBeginDeleteOptions contains the optional parameters for the CustomDomainsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/CustomDomains_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCustomDomainsClient().BeginDelete(ctx, "myResourceGroup", "myservice", "myapp", "mydomain.com", 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 pull the result: %v", err)
	}
}
Output:

func (*CustomDomainsClient) BeginUpdate

func (client *CustomDomainsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, domainResource CustomDomainResource, options *CustomDomainsClientBeginUpdateOptions) (*runtime.Poller[CustomDomainsClientUpdateResponse], error)

BeginUpdate - Update custom domain of one lifecycle application. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • domainName - The name of the custom domain resource.
  • domainResource - Parameters for the create or update operation
  • options - CustomDomainsClientBeginUpdateOptions contains the optional parameters for the CustomDomainsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/CustomDomains_Update.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCustomDomainsClient().BeginUpdate(ctx, "myResourceGroup", "myservice", "myapp", "mydomain.com", armappplatform.CustomDomainResource{
		Properties: &armappplatform.CustomDomainProperties{
			CertName:   to.Ptr("mycert"),
			Thumbprint: to.Ptr("934367bf1c97033f877db0f15cb1b586957d3133"),
		},
	}, 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 pull 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.CustomDomainResource = armappplatform.CustomDomainResource{
	// 	Name: to.Ptr("mydomain.com"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/apps/domains"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/domains/mydomain.com"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.CustomDomainProperties{
	// 		AppName: to.Ptr("myapp"),
	// 		CertName: to.Ptr("mycert"),
	// 		Thumbprint: to.Ptr("934367bf1c97033f877db0f15cb1b586957d3133"),
	// 	},
	// }
}
Output:

func (*CustomDomainsClient) Get

func (client *CustomDomainsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, options *CustomDomainsClientGetOptions) (CustomDomainsClientGetResponse, error)

Get - Get the custom domain of one lifecycle application. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • domainName - The name of the custom domain resource.
  • options - CustomDomainsClientGetOptions contains the optional parameters for the CustomDomainsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/CustomDomains_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCustomDomainsClient().Get(ctx, "myResourceGroup", "myservice", "myapp", "mydomain.com", 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.CustomDomainResource = armappplatform.CustomDomainResource{
	// 	Name: to.Ptr("mydomain.com"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/apps/domains"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/domains/mydomain.com"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.CustomDomainProperties{
	// 		AppName: to.Ptr("myapp"),
	// 		CertName: to.Ptr("mycert"),
	// 		Thumbprint: to.Ptr("934367bf1c97033f877db0f15cb1b586957d3133"),
	// 	},
	// }
}
Output:

func (*CustomDomainsClient) NewListPager added in v0.5.0

func (client *CustomDomainsClient) NewListPager(resourceGroupName string, serviceName string, appName string, options *CustomDomainsClientListOptions) *runtime.Pager[CustomDomainsClientListResponse]

NewListPager - List the custom domains of one lifecycle application.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • options - CustomDomainsClientListOptions contains the optional parameters for the CustomDomainsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/CustomDomains_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCustomDomainsClient().NewListPager("myResourceGroup", "myservice", "myapp", 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.CustomDomainResourceCollection = armappplatform.CustomDomainResourceCollection{
		// 	Value: []*armappplatform.CustomDomainResource{
		// 		{
		// 			Name: to.Ptr("mydomain.com"),
		// 			Type: to.Ptr("Microsoft.AppPlatform/Spring/apps/domains"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/domains/mydomain.com"),
		// 			SystemData: &armappplatform.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
		// 				CreatedBy: to.Ptr("sample-user"),
		// 				CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("sample-user"),
		// 				LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
		// 			},
		// 			Properties: &armappplatform.CustomDomainProperties{
		// 				AppName: to.Ptr("myapp"),
		// 				CertName: to.Ptr("mycert"),
		// 				Thumbprint: to.Ptr("934367bf1c97033f877db0f15cb1b586957d3133"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type CustomDomainsClientBeginCreateOrUpdateOptions added in v0.3.0

type CustomDomainsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomDomainsClient.BeginCreateOrUpdate method.

type CustomDomainsClientBeginDeleteOptions added in v0.3.0

type CustomDomainsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CustomDomainsClientBeginDeleteOptions contains the optional parameters for the CustomDomainsClient.BeginDelete method.

type CustomDomainsClientBeginUpdateOptions added in v0.3.0

type CustomDomainsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CustomDomainsClientBeginUpdateOptions contains the optional parameters for the CustomDomainsClient.BeginUpdate method.

type CustomDomainsClientCreateOrUpdateResponse added in v0.3.0

type CustomDomainsClientCreateOrUpdateResponse struct {
	// Custom domain resource payload.
	CustomDomainResource
}

CustomDomainsClientCreateOrUpdateResponse contains the response from method CustomDomainsClient.BeginCreateOrUpdate.

type CustomDomainsClientDeleteResponse added in v0.3.0

type CustomDomainsClientDeleteResponse struct {
}

CustomDomainsClientDeleteResponse contains the response from method CustomDomainsClient.BeginDelete.

type CustomDomainsClientGetOptions added in v0.3.0

type CustomDomainsClientGetOptions struct {
}

CustomDomainsClientGetOptions contains the optional parameters for the CustomDomainsClient.Get method.

type CustomDomainsClientGetResponse added in v0.3.0

type CustomDomainsClientGetResponse struct {
	// Custom domain resource payload.
	CustomDomainResource
}

CustomDomainsClientGetResponse contains the response from method CustomDomainsClient.Get.

type CustomDomainsClientListOptions added in v0.3.0

type CustomDomainsClientListOptions struct {
}

CustomDomainsClientListOptions contains the optional parameters for the CustomDomainsClient.NewListPager method.

type CustomDomainsClientListResponse added in v0.3.0

type CustomDomainsClientListResponse struct {
	// Collection compose of a custom domain resources list and a possible link for next page.
	CustomDomainResourceCollection
}

CustomDomainsClientListResponse contains the response from method CustomDomainsClient.NewListPager.

type CustomDomainsClientUpdateResponse added in v0.3.0

type CustomDomainsClientUpdateResponse struct {
	// Custom domain resource payload.
	CustomDomainResource
}

CustomDomainsClientUpdateResponse contains the response from method CustomDomainsClient.BeginUpdate.

type DeploymentInstance

type DeploymentInstance struct {
	// READ-ONLY; Discovery status of the deployment instance
	DiscoveryStatus *string

	// READ-ONLY; Name of the deployment instance
	Name *string

	// READ-ONLY; Failed reason of the deployment instance
	Reason *string

	// READ-ONLY; Start time of the deployment instance
	StartTime *string

	// READ-ONLY; Status of the deployment instance
	Status *string

	// READ-ONLY; Availability zone information of the deployment instance
	Zone *string
}

DeploymentInstance - Deployment instance payload

func (DeploymentInstance) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type DeploymentInstance.

func (*DeploymentInstance) UnmarshalJSON added in v1.1.0

func (d *DeploymentInstance) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentInstance.

type DeploymentResource

type DeploymentResource struct {
	// Properties of the Deployment resource
	Properties *DeploymentResourceProperties

	// Sku of the Deployment resource
	SKU *SKU

	// READ-ONLY; Fully qualified resource Id for the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource.
	Type *string
}

DeploymentResource - Deployment resource payload

func (DeploymentResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeploymentResource.

func (*DeploymentResource) UnmarshalJSON added in v0.2.0

func (d *DeploymentResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentResource.

type DeploymentResourceCollection

type DeploymentResourceCollection struct {
	// URL client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string

	// Collection of Deployment resources
	Value []*DeploymentResource
}

DeploymentResourceCollection - Object that includes an array of App resources and a possible link for next set

func (DeploymentResourceCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeploymentResourceCollection.

func (*DeploymentResourceCollection) UnmarshalJSON added in v1.1.0

func (d *DeploymentResourceCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentResourceCollection.

type DeploymentResourceProperties

type DeploymentResourceProperties struct {
	// Indicates whether the Deployment is active
	Active *bool

	// Deployment settings of the Deployment
	DeploymentSettings *DeploymentSettings

	// Uploaded source information of the deployment.
	Source UserSourceInfoClassification

	// READ-ONLY; Collection of instances belong to the Deployment
	Instances []*DeploymentInstance

	// READ-ONLY; Provisioning state of the Deployment
	ProvisioningState *DeploymentResourceProvisioningState

	// READ-ONLY; Status of the Deployment
	Status *DeploymentResourceStatus
}

DeploymentResourceProperties - Deployment resource properties payload

func (DeploymentResourceProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeploymentResourceProperties.

func (*DeploymentResourceProperties) UnmarshalJSON

func (d *DeploymentResourceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentResourceProperties.

type DeploymentResourceProvisioningState

type DeploymentResourceProvisioningState string

DeploymentResourceProvisioningState - Provisioning state of the Deployment

const (
	DeploymentResourceProvisioningStateCreating  DeploymentResourceProvisioningState = "Creating"
	DeploymentResourceProvisioningStateFailed    DeploymentResourceProvisioningState = "Failed"
	DeploymentResourceProvisioningStateSucceeded DeploymentResourceProvisioningState = "Succeeded"
	DeploymentResourceProvisioningStateUpdating  DeploymentResourceProvisioningState = "Updating"
)

func PossibleDeploymentResourceProvisioningStateValues

func PossibleDeploymentResourceProvisioningStateValues() []DeploymentResourceProvisioningState

PossibleDeploymentResourceProvisioningStateValues returns the possible values for the DeploymentResourceProvisioningState const type.

type DeploymentResourceStatus

type DeploymentResourceStatus string

DeploymentResourceStatus - Status of the Deployment

const (
	DeploymentResourceStatusRunning DeploymentResourceStatus = "Running"
	DeploymentResourceStatusStopped DeploymentResourceStatus = "Stopped"
)

func PossibleDeploymentResourceStatusValues

func PossibleDeploymentResourceStatusValues() []DeploymentResourceStatus

PossibleDeploymentResourceStatusValues returns the possible values for the DeploymentResourceStatus const type.

type DeploymentSettings

type DeploymentSettings struct {
	// Collection of addons
	AddonConfigs map[string]map[string]any

	// Collection of environment variables
	EnvironmentVariables map[string]*string

	// The requested resource quantity for required CPU and Memory. It is recommended that using this field to represent the required
	// CPU and Memory, the old field cpu and memoryInGB will be deprecated
	// later.
	ResourceRequests *ResourceRequests
}

DeploymentSettings - Deployment settings payload

func (DeploymentSettings) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeploymentSettings.

func (*DeploymentSettings) UnmarshalJSON added in v1.1.0

func (d *DeploymentSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentSettings.

type DeploymentsClient

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

DeploymentsClient contains the methods for the Deployments group. Don't use this type directly, use NewDeploymentsClient() instead.

func NewDeploymentsClient

func NewDeploymentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DeploymentsClient, error)

NewDeploymentsClient creates a new instance of DeploymentsClient with the specified values.

  • subscriptionID - Gets subscription ID which uniquely identify the 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 (*DeploymentsClient) BeginCreateOrUpdate

func (client *DeploymentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource DeploymentResource, options *DeploymentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DeploymentsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create a new Deployment or update an exiting Deployment. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • deploymentName - The name of the Deployment resource.
  • deploymentResource - Parameters for the create or update operation
  • options - DeploymentsClientBeginCreateOrUpdateOptions contains the optional parameters for the DeploymentsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Deployments_CreateOrUpdate.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDeploymentsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", armappplatform.DeploymentResource{
		Properties: &armappplatform.DeploymentResourceProperties{
			DeploymentSettings: &armappplatform.DeploymentSettings{
				AddonConfigs: map[string]map[string]any{
					"ApplicationConfigurationService": {
						"patterns": []any{
							"mypattern",
						},
					},
				},
				EnvironmentVariables: map[string]*string{
					"env": to.Ptr("test"),
				},
				ResourceRequests: &armappplatform.ResourceRequests{
					CPU:    to.Ptr("1000m"),
					Memory: to.Ptr("3Gi"),
				},
			},
			Source: &armappplatform.SourceUploadedUserSourceInfo{
				Type:             to.Ptr("Source"),
				Version:          to.Ptr("1.0"),
				RelativePath:     to.Ptr("resources/a172cedcae47474b615c54d510a5d84a8dea3032e958587430b413538be3f333-2019082605-e3095339-1723-44b7-8b5e-31b1003978bc"),
				ArtifactSelector: to.Ptr("sub-module-1"),
			},
		},
		SKU: &armappplatform.SKU{
			Name:     to.Ptr("S0"),
			Capacity: to.Ptr[int32](1),
			Tier:     to.Ptr("Standard"),
		},
	}, 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 pull 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.DeploymentResource = armappplatform.DeploymentResource{
	// 	Name: to.Ptr("mydeployment"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/apps/deployments"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/deployments/mydeployment"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.DeploymentResourceProperties{
	// 		Active: to.Ptr(false),
	// 		DeploymentSettings: &armappplatform.DeploymentSettings{
	// 			EnvironmentVariables: map[string]*string{
	// 				"env": to.Ptr("test"),
	// 			},
	// 			ResourceRequests: &armappplatform.ResourceRequests{
	// 				CPU: to.Ptr("1000m"),
	// 				Memory: to.Ptr("3Gi"),
	// 			},
	// 		},
	// 		Instances: []*armappplatform.DeploymentInstance{
	// 			{
	// 				Name: to.Ptr("instance1"),
	// 				DiscoveryStatus: to.Ptr("pending"),
	// 				StartTime: to.Ptr("2020-08-26T01:55:02Z"),
	// 				Status: to.Ptr("Running"),
	// 		}},
	// 		ProvisioningState: to.Ptr(armappplatform.DeploymentResourceProvisioningStateSucceeded),
	// 		Source: &armappplatform.SourceUploadedUserSourceInfo{
	// 			Type: to.Ptr("Source"),
	// 			Version: to.Ptr("1.0"),
	// 			RelativePath: to.Ptr("resources/a172cedcae47474b615c54d510a5d84a8dea3032e958587430b413538be3f333-2019082605-e3095339-1723-44b7-8b5e-31b1003978bc"),
	// 			ArtifactSelector: to.Ptr("sub-module-1"),
	// 		},
	// 		Status: to.Ptr(armappplatform.DeploymentResourceStatusRunning),
	// 	},
	// 	SKU: &armappplatform.SKU{
	// 		Name: to.Ptr("S0"),
	// 		Capacity: to.Ptr[int32](1),
	// 		Tier: to.Ptr("Standard"),
	// 	},
	// }
}
Output:

func (*DeploymentsClient) BeginDelete

func (client *DeploymentsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginDeleteOptions) (*runtime.Poller[DeploymentsClientDeleteResponse], error)

BeginDelete - Operation to delete a Deployment. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • deploymentName - The name of the Deployment resource.
  • options - DeploymentsClientBeginDeleteOptions contains the optional parameters for the DeploymentsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Deployments_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDeploymentsClient().BeginDelete(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", 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 pull the result: %v", err)
	}
}
Output:

func (*DeploymentsClient) BeginGenerateHeapDump added in v0.2.0

func (client *DeploymentsClient) BeginGenerateHeapDump(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginGenerateHeapDumpOptions) (*runtime.Poller[DeploymentsClientGenerateHeapDumpResponse], error)

BeginGenerateHeapDump - Generate Heap Dump If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • deploymentName - The name of the Deployment resource.
  • diagnosticParameters - Parameters for the diagnostic operation
  • options - DeploymentsClientBeginGenerateHeapDumpOptions contains the optional parameters for the DeploymentsClient.BeginGenerateHeapDump method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Deployments_GenerateHeapDump.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDeploymentsClient().BeginGenerateHeapDump(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", armappplatform.DiagnosticParameters{
		AppInstance: to.Ptr("myappinstance"),
		FilePath:    to.Ptr("/byos/diagnose"),
	}, 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 pull the result: %v", err)
	}
}
Output:

func (*DeploymentsClient) BeginGenerateThreadDump added in v0.2.0

func (client *DeploymentsClient) BeginGenerateThreadDump(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginGenerateThreadDumpOptions) (*runtime.Poller[DeploymentsClientGenerateThreadDumpResponse], error)

BeginGenerateThreadDump - Generate Thread Dump If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • deploymentName - The name of the Deployment resource.
  • diagnosticParameters - Parameters for the diagnostic operation
  • options - DeploymentsClientBeginGenerateThreadDumpOptions contains the optional parameters for the DeploymentsClient.BeginGenerateThreadDump method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Deployments_GenerateThreadDump.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDeploymentsClient().BeginGenerateThreadDump(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", armappplatform.DiagnosticParameters{
		AppInstance: to.Ptr("myappinstance"),
		FilePath:    to.Ptr("/byos/diagnose"),
	}, 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 pull the result: %v", err)
	}
}
Output:

func (*DeploymentsClient) BeginRestart

func (client *DeploymentsClient) BeginRestart(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginRestartOptions) (*runtime.Poller[DeploymentsClientRestartResponse], error)

BeginRestart - Restart the deployment. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • deploymentName - The name of the Deployment resource.
  • options - DeploymentsClientBeginRestartOptions contains the optional parameters for the DeploymentsClient.BeginRestart method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Deployments_Restart.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDeploymentsClient().BeginRestart(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", 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 pull the result: %v", err)
	}
}
Output:

func (*DeploymentsClient) BeginStart

func (client *DeploymentsClient) BeginStart(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginStartOptions) (*runtime.Poller[DeploymentsClientStartResponse], error)

BeginStart - Start the deployment. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • deploymentName - The name of the Deployment resource.
  • options - DeploymentsClientBeginStartOptions contains the optional parameters for the DeploymentsClient.BeginStart method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Deployments_Start.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDeploymentsClient().BeginStart(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", 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 pull the result: %v", err)
	}
}
Output:

func (*DeploymentsClient) BeginStartJFR added in v0.2.0

func (client *DeploymentsClient) BeginStartJFR(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginStartJFROptions) (*runtime.Poller[DeploymentsClientStartJFRResponse], error)

BeginStartJFR - Start JFR If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • deploymentName - The name of the Deployment resource.
  • diagnosticParameters - Parameters for the diagnostic operation
  • options - DeploymentsClientBeginStartJFROptions contains the optional parameters for the DeploymentsClient.BeginStartJFR method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Deployments_StartJFR.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDeploymentsClient().BeginStartJFR(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", armappplatform.DiagnosticParameters{
		AppInstance: to.Ptr("myappinstance"),
		Duration:    to.Ptr("60s"),
		FilePath:    to.Ptr("/byos/diagnose"),
	}, 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 pull the result: %v", err)
	}
}
Output:

func (*DeploymentsClient) BeginStop

func (client *DeploymentsClient) BeginStop(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginStopOptions) (*runtime.Poller[DeploymentsClientStopResponse], error)

BeginStop - Stop the deployment. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • deploymentName - The name of the Deployment resource.
  • options - DeploymentsClientBeginStopOptions contains the optional parameters for the DeploymentsClient.BeginStop method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Deployments_Stop.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDeploymentsClient().BeginStop(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", 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 pull the result: %v", err)
	}
}
Output:

func (*DeploymentsClient) BeginUpdate

func (client *DeploymentsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource DeploymentResource, options *DeploymentsClientBeginUpdateOptions) (*runtime.Poller[DeploymentsClientUpdateResponse], error)

BeginUpdate - Operation to update an exiting Deployment. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • deploymentName - The name of the Deployment resource.
  • deploymentResource - Parameters for the update operation
  • options - DeploymentsClientBeginUpdateOptions contains the optional parameters for the DeploymentsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Deployments_Update.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDeploymentsClient().BeginUpdate(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", armappplatform.DeploymentResource{
		Properties: &armappplatform.DeploymentResourceProperties{
			Source: &armappplatform.SourceUploadedUserSourceInfo{
				Type:             to.Ptr("Source"),
				Version:          to.Ptr("1.0"),
				RelativePath:     to.Ptr("resources/a172cedcae47474b615c54d510a5d84a8dea3032e958587430b413538be3f333-2019082605-e3095339-1723-44b7-8b5e-31b1003978bc"),
				ArtifactSelector: to.Ptr("sub-module-1"),
			},
		},
	}, 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 pull 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.DeploymentResource = armappplatform.DeploymentResource{
	// 	Name: to.Ptr("mydeployment"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/apps/deployments"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/deployments/mydeployment"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.DeploymentResourceProperties{
	// 		Active: to.Ptr(true),
	// 		DeploymentSettings: &armappplatform.DeploymentSettings{
	// 			EnvironmentVariables: map[string]*string{
	// 				"env": to.Ptr("test"),
	// 			},
	// 			ResourceRequests: &armappplatform.ResourceRequests{
	// 				CPU: to.Ptr("1000m"),
	// 				Memory: to.Ptr("3Gi"),
	// 			},
	// 		},
	// 		Instances: []*armappplatform.DeploymentInstance{
	// 			{
	// 				Name: to.Ptr("instance1"),
	// 				DiscoveryStatus: to.Ptr("pending"),
	// 				StartTime: to.Ptr("2020-08-26T01:55:02Z"),
	// 				Status: to.Ptr("Running"),
	// 		}},
	// 		ProvisioningState: to.Ptr(armappplatform.DeploymentResourceProvisioningStateSucceeded),
	// 		Source: &armappplatform.SourceUploadedUserSourceInfo{
	// 			Type: to.Ptr("Source"),
	// 			Version: to.Ptr("1.0"),
	// 			RelativePath: to.Ptr("resources/a172cedcae47474b615c54d510a5d84a8dea3032e958587430b413538be3f333-2019082605-e3095339-1723-44b7-8b5e-31b1003978bc"),
	// 			ArtifactSelector: to.Ptr("sub-module-1"),
	// 		},
	// 		Status: to.Ptr(armappplatform.DeploymentResourceStatusRunning),
	// 	},
	// 	SKU: &armappplatform.SKU{
	// 		Name: to.Ptr("S0"),
	// 		Capacity: to.Ptr[int32](1),
	// 		Tier: to.Ptr("Standard"),
	// 	},
	// }
}
Output:

func (*DeploymentsClient) Get

func (client *DeploymentsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientGetOptions) (DeploymentsClientGetResponse, error)

Get - Get a Deployment and its properties. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • deploymentName - The name of the Deployment resource.
  • options - DeploymentsClientGetOptions contains the optional parameters for the DeploymentsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Deployments_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDeploymentsClient().Get(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", 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.DeploymentResource = armappplatform.DeploymentResource{
	// 	Name: to.Ptr("mydeployment"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/apps/deployments"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/deployments/mydeployment"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.DeploymentResourceProperties{
	// 		Active: to.Ptr(true),
	// 		DeploymentSettings: &armappplatform.DeploymentSettings{
	// 			EnvironmentVariables: map[string]*string{
	// 				"env": to.Ptr("test"),
	// 			},
	// 			ResourceRequests: &armappplatform.ResourceRequests{
	// 				CPU: to.Ptr("1000m"),
	// 				Memory: to.Ptr("3Gi"),
	// 			},
	// 		},
	// 		Instances: []*armappplatform.DeploymentInstance{
	// 			{
	// 				Name: to.Ptr("instance1"),
	// 				DiscoveryStatus: to.Ptr("pending"),
	// 				StartTime: to.Ptr("2020-08-26T01:55:02Z"),
	// 				Status: to.Ptr("Running"),
	// 		}},
	// 		ProvisioningState: to.Ptr(armappplatform.DeploymentResourceProvisioningStateSucceeded),
	// 		Source: &armappplatform.SourceUploadedUserSourceInfo{
	// 			Type: to.Ptr("Source"),
	// 			Version: to.Ptr("1.0"),
	// 			RelativePath: to.Ptr("resources/a172cedcae47474b615c54d510a5d84a8dea3032e958587430b413538be3f333-2019082605-e3095339-1723-44b7-8b5e-31b1003978bc"),
	// 			ArtifactSelector: to.Ptr("sub-module-1"),
	// 		},
	// 		Status: to.Ptr(armappplatform.DeploymentResourceStatusRunning),
	// 	},
	// 	SKU: &armappplatform.SKU{
	// 		Name: to.Ptr("S0"),
	// 		Capacity: to.Ptr[int32](1),
	// 		Tier: to.Ptr("Standard"),
	// 	},
	// }
}
Output:

func (*DeploymentsClient) GetLogFileURL

func (client *DeploymentsClient) GetLogFileURL(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientGetLogFileURLOptions) (DeploymentsClientGetLogFileURLResponse, error)

GetLogFileURL - Get deployment log file URL If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • deploymentName - The name of the Deployment resource.
  • options - DeploymentsClientGetLogFileURLOptions contains the optional parameters for the DeploymentsClient.GetLogFileURL method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Deployments_GetLogFileUrl.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDeploymentsClient().GetLogFileURL(ctx, "myResourceGroup", "myservice", "myapp", "mydeployment", 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.LogFileURLResponse = armappplatform.LogFileURLResponse{
	// 	URL: to.Ptr("https://spring.blob.core.windows.net/logs/110ec0c337154d45b1f01daf2196c0bf/b58b0cb4ecdea3c65311b4ca8833fe47b6ae0a7500f87a8eb31e8379d3fe48f1-2019081312-42b7b90c-f108-4c09-b33d-1ea134f57f23?sv=2018-03-28&sr=b&sig=example-signature&se=2019-08-14T09%3A43%3A52Z&sp=r"),
	// }
}
Output:

func (*DeploymentsClient) NewListForClusterPager added in v0.5.0

func (client *DeploymentsClient) NewListForClusterPager(resourceGroupName string, serviceName string, options *DeploymentsClientListForClusterOptions) *runtime.Pager[DeploymentsClientListForClusterResponse]

NewListForClusterPager - List deployments for a certain service

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • options - DeploymentsClientListForClusterOptions contains the optional parameters for the DeploymentsClient.NewListForClusterPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Deployments_ListForCluster.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDeploymentsClient().NewListForClusterPager("myResourceGroup", "myservice", &armappplatform.DeploymentsClientListForClusterOptions{Version: []string{}})
	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.DeploymentResourceCollection = armappplatform.DeploymentResourceCollection{
		// 	Value: []*armappplatform.DeploymentResource{
		// 		{
		// 			Name: to.Ptr("mydeployment"),
		// 			Type: to.Ptr("Microsoft.AppPlatform/Spring/apps/deployments"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/deployments/mydeployment"),
		// 			SystemData: &armappplatform.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
		// 				CreatedBy: to.Ptr("sample-user"),
		// 				CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("sample-user"),
		// 				LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
		// 			},
		// 			Properties: &armappplatform.DeploymentResourceProperties{
		// 				Active: to.Ptr(true),
		// 				DeploymentSettings: &armappplatform.DeploymentSettings{
		// 					EnvironmentVariables: map[string]*string{
		// 						"env": to.Ptr("test"),
		// 					},
		// 					ResourceRequests: &armappplatform.ResourceRequests{
		// 						CPU: to.Ptr("1000m"),
		// 						Memory: to.Ptr("3Gi"),
		// 					},
		// 				},
		// 				Instances: []*armappplatform.DeploymentInstance{
		// 					{
		// 						Name: to.Ptr("instance1"),
		// 						DiscoveryStatus: to.Ptr("pending"),
		// 						StartTime: to.Ptr("2020-08-26T01:55:02Z"),
		// 						Status: to.Ptr("Running"),
		// 				}},
		// 				ProvisioningState: to.Ptr(armappplatform.DeploymentResourceProvisioningStateSucceeded),
		// 				Source: &armappplatform.SourceUploadedUserSourceInfo{
		// 					Type: to.Ptr("Source"),
		// 					Version: to.Ptr("1.0"),
		// 					RelativePath: to.Ptr("resources/a172cedcae47474b615c54d510a5d84a8dea3032e958587430b413538be3f333-2019082605-e3095339-1723-44b7-8b5e-31b1003978bc"),
		// 					ArtifactSelector: to.Ptr("sub-module-1"),
		// 				},
		// 				Status: to.Ptr(armappplatform.DeploymentResourceStatusRunning),
		// 			},
		// 			SKU: &armappplatform.SKU{
		// 				Name: to.Ptr("S0"),
		// 				Capacity: to.Ptr[int32](1),
		// 				Tier: to.Ptr("Standard"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*DeploymentsClient) NewListPager added in v0.5.0

func (client *DeploymentsClient) NewListPager(resourceGroupName string, serviceName string, appName string, options *DeploymentsClientListOptions) *runtime.Pager[DeploymentsClientListResponse]

NewListPager - Handles requests to list all resources in an App.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • appName - The name of the App resource.
  • options - DeploymentsClientListOptions contains the optional parameters for the DeploymentsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Deployments_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDeploymentsClient().NewListPager("myResourceGroup", "myservice", "myapp", &armappplatform.DeploymentsClientListOptions{Version: []string{}})
	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.DeploymentResourceCollection = armappplatform.DeploymentResourceCollection{
		// 	Value: []*armappplatform.DeploymentResource{
		// 		{
		// 			Name: to.Ptr("mydeployment"),
		// 			Type: to.Ptr("Microsoft.AppPlatform/Spring/apps/deployments"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myapp/deployments/mydeployment"),
		// 			SystemData: &armappplatform.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
		// 				CreatedBy: to.Ptr("sample-user"),
		// 				CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("sample-user"),
		// 				LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
		// 			},
		// 			Properties: &armappplatform.DeploymentResourceProperties{
		// 				Active: to.Ptr(true),
		// 				DeploymentSettings: &armappplatform.DeploymentSettings{
		// 					EnvironmentVariables: map[string]*string{
		// 						"env": to.Ptr("test"),
		// 					},
		// 					ResourceRequests: &armappplatform.ResourceRequests{
		// 						CPU: to.Ptr("1000m"),
		// 						Memory: to.Ptr("3Gi"),
		// 					},
		// 				},
		// 				Instances: []*armappplatform.DeploymentInstance{
		// 					{
		// 						Name: to.Ptr("instance1"),
		// 						DiscoveryStatus: to.Ptr("pending"),
		// 						StartTime: to.Ptr("2020-08-26T01:55:02Z"),
		// 						Status: to.Ptr("Running"),
		// 				}},
		// 				ProvisioningState: to.Ptr(armappplatform.DeploymentResourceProvisioningStateSucceeded),
		// 				Source: &armappplatform.SourceUploadedUserSourceInfo{
		// 					Type: to.Ptr("Source"),
		// 					Version: to.Ptr("1.0"),
		// 					RelativePath: to.Ptr("resources/a172cedcae47474b615c54d510a5d84a8dea3032e958587430b413538be3f333-2019082605-e3095339-1723-44b7-8b5e-31b1003978bc"),
		// 					ArtifactSelector: to.Ptr("sub-module-1"),
		// 				},
		// 				Status: to.Ptr(armappplatform.DeploymentResourceStatusRunning),
		// 			},
		// 			SKU: &armappplatform.SKU{
		// 				Name: to.Ptr("S0"),
		// 				Capacity: to.Ptr[int32](1),
		// 				Tier: to.Ptr("Standard"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type DeploymentsClientBeginCreateOrUpdateOptions added in v0.3.0

type DeploymentsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DeploymentsClientBeginCreateOrUpdateOptions contains the optional parameters for the DeploymentsClient.BeginCreateOrUpdate method.

type DeploymentsClientBeginDeleteOptions added in v0.3.0

type DeploymentsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DeploymentsClientBeginDeleteOptions contains the optional parameters for the DeploymentsClient.BeginDelete method.

type DeploymentsClientBeginGenerateHeapDumpOptions added in v0.3.0

type DeploymentsClientBeginGenerateHeapDumpOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DeploymentsClientBeginGenerateHeapDumpOptions contains the optional parameters for the DeploymentsClient.BeginGenerateHeapDump method.

type DeploymentsClientBeginGenerateThreadDumpOptions added in v0.3.0

type DeploymentsClientBeginGenerateThreadDumpOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DeploymentsClientBeginGenerateThreadDumpOptions contains the optional parameters for the DeploymentsClient.BeginGenerateThreadDump method.

type DeploymentsClientBeginRestartOptions added in v0.3.0

type DeploymentsClientBeginRestartOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DeploymentsClientBeginRestartOptions contains the optional parameters for the DeploymentsClient.BeginRestart method.

type DeploymentsClientBeginStartJFROptions added in v0.3.0

type DeploymentsClientBeginStartJFROptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DeploymentsClientBeginStartJFROptions contains the optional parameters for the DeploymentsClient.BeginStartJFR method.

type DeploymentsClientBeginStartOptions added in v0.3.0

type DeploymentsClientBeginStartOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DeploymentsClientBeginStartOptions contains the optional parameters for the DeploymentsClient.BeginStart method.

type DeploymentsClientBeginStopOptions added in v0.3.0

type DeploymentsClientBeginStopOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DeploymentsClientBeginStopOptions contains the optional parameters for the DeploymentsClient.BeginStop method.

type DeploymentsClientBeginUpdateOptions added in v0.3.0

type DeploymentsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DeploymentsClientBeginUpdateOptions contains the optional parameters for the DeploymentsClient.BeginUpdate method.

type DeploymentsClientCreateOrUpdateResponse added in v0.3.0

type DeploymentsClientCreateOrUpdateResponse struct {
	// Deployment resource payload
	DeploymentResource
}

DeploymentsClientCreateOrUpdateResponse contains the response from method DeploymentsClient.BeginCreateOrUpdate.

type DeploymentsClientDeleteResponse added in v0.3.0

type DeploymentsClientDeleteResponse struct {
}

DeploymentsClientDeleteResponse contains the response from method DeploymentsClient.BeginDelete.

type DeploymentsClientGenerateHeapDumpResponse added in v0.3.0

type DeploymentsClientGenerateHeapDumpResponse struct {
}

DeploymentsClientGenerateHeapDumpResponse contains the response from method DeploymentsClient.BeginGenerateHeapDump.

type DeploymentsClientGenerateThreadDumpResponse added in v0.3.0

type DeploymentsClientGenerateThreadDumpResponse struct {
}

DeploymentsClientGenerateThreadDumpResponse contains the response from method DeploymentsClient.BeginGenerateThreadDump.

type DeploymentsClientGetLogFileURLOptions added in v0.3.0

type DeploymentsClientGetLogFileURLOptions struct {
}

DeploymentsClientGetLogFileURLOptions contains the optional parameters for the DeploymentsClient.GetLogFileURL method.

type DeploymentsClientGetLogFileURLResponse added in v0.3.0

type DeploymentsClientGetLogFileURLResponse struct {
	// Log file URL payload
	LogFileURLResponse
}

DeploymentsClientGetLogFileURLResponse contains the response from method DeploymentsClient.GetLogFileURL.

type DeploymentsClientGetOptions added in v0.3.0

type DeploymentsClientGetOptions struct {
}

DeploymentsClientGetOptions contains the optional parameters for the DeploymentsClient.Get method.

type DeploymentsClientGetResponse added in v0.3.0

type DeploymentsClientGetResponse struct {
	// Deployment resource payload
	DeploymentResource
}

DeploymentsClientGetResponse contains the response from method DeploymentsClient.Get.

type DeploymentsClientListForClusterOptions added in v0.3.0

type DeploymentsClientListForClusterOptions struct {
	// Version of the deployments to be listed
	Version []string
}

DeploymentsClientListForClusterOptions contains the optional parameters for the DeploymentsClient.NewListForClusterPager method.

type DeploymentsClientListForClusterResponse added in v0.3.0

type DeploymentsClientListForClusterResponse struct {
	// Object that includes an array of App resources and a possible link for next set
	DeploymentResourceCollection
}

DeploymentsClientListForClusterResponse contains the response from method DeploymentsClient.NewListForClusterPager.

type DeploymentsClientListOptions added in v0.3.0

type DeploymentsClientListOptions struct {
	// Version of the deployments to be listed
	Version []string
}

DeploymentsClientListOptions contains the optional parameters for the DeploymentsClient.NewListPager method.

type DeploymentsClientListResponse added in v0.3.0

type DeploymentsClientListResponse struct {
	// Object that includes an array of App resources and a possible link for next set
	DeploymentResourceCollection
}

DeploymentsClientListResponse contains the response from method DeploymentsClient.NewListPager.

type DeploymentsClientRestartResponse added in v0.3.0

type DeploymentsClientRestartResponse struct {
}

DeploymentsClientRestartResponse contains the response from method DeploymentsClient.BeginRestart.

type DeploymentsClientStartJFRResponse added in v0.3.0

type DeploymentsClientStartJFRResponse struct {
}

DeploymentsClientStartJFRResponse contains the response from method DeploymentsClient.BeginStartJFR.

type DeploymentsClientStartResponse added in v0.3.0

type DeploymentsClientStartResponse struct {
}

DeploymentsClientStartResponse contains the response from method DeploymentsClient.BeginStart.

type DeploymentsClientStopResponse added in v0.3.0

type DeploymentsClientStopResponse struct {
}

DeploymentsClientStopResponse contains the response from method DeploymentsClient.BeginStop.

type DeploymentsClientUpdateResponse added in v0.3.0

type DeploymentsClientUpdateResponse struct {
	// Deployment resource payload
	DeploymentResource
}

DeploymentsClientUpdateResponse contains the response from method DeploymentsClient.BeginUpdate.

type DiagnosticParameters added in v0.2.0

type DiagnosticParameters struct {
	// App instance name
	AppInstance *string

	// Duration of your JFR. 1 min can be represented by 1m or 60s.
	Duration *string

	// Your target file path in your own BYOS
	FilePath *string
}

DiagnosticParameters - Diagnostic parameters of diagnostic operations

func (DiagnosticParameters) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type DiagnosticParameters.

func (*DiagnosticParameters) UnmarshalJSON added in v1.1.0

func (d *DiagnosticParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticParameters.

type Error

type Error struct {
	// The code of error.
	Code *string

	// The message of error.
	Message *string
}

Error - The error code compose of code and message.

func (Error) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type Error.

func (*Error) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Error.

type GitPatternRepository

type GitPatternRepository struct {
	// REQUIRED; Name of the repository
	Name *string

	// REQUIRED; URI of the repository
	URI *string

	// Public sshKey of git repository.
	HostKey *string

	// SshKey algorithm of git repository.
	HostKeyAlgorithm *string

	// Label of the repository
	Label *string

	// Password of git repository basic auth.
	Password *string

	// Collection of pattern of the repository
	Pattern []*string

	// Private sshKey algorithm of git repository.
	PrivateKey *string

	// Searching path of the repository
	SearchPaths []*string

	// Strict host key checking or not.
	StrictHostKeyChecking *bool

	// Username of git repository basic auth.
	Username *string
}

GitPatternRepository - Git repository property payload for config server

func (GitPatternRepository) MarshalJSON

func (g GitPatternRepository) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GitPatternRepository.

func (*GitPatternRepository) UnmarshalJSON added in v1.1.0

func (g *GitPatternRepository) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GitPatternRepository.

type JarUploadedUserSourceInfo added in v0.3.0

type JarUploadedUserSourceInfo struct {
	// REQUIRED; Type of the source uploaded
	Type *string

	// JVM parameter
	JvmOptions *string

	// Relative path of the storage which stores the source
	RelativePath *string

	// Runtime version of the Jar file
	RuntimeVersion *string

	// Version of the source
	Version *string
}

JarUploadedUserSourceInfo - Uploaded Jar binary for a deployment

func (*JarUploadedUserSourceInfo) GetUploadedUserSourceInfo added in v0.3.0

func (j *JarUploadedUserSourceInfo) GetUploadedUserSourceInfo() *UploadedUserSourceInfo

GetUploadedUserSourceInfo implements the UploadedUserSourceInfoClassification interface for type JarUploadedUserSourceInfo.

func (*JarUploadedUserSourceInfo) GetUserSourceInfo added in v0.3.0

func (j *JarUploadedUserSourceInfo) GetUserSourceInfo() *UserSourceInfo

GetUserSourceInfo implements the UserSourceInfoClassification interface for type JarUploadedUserSourceInfo.

func (JarUploadedUserSourceInfo) MarshalJSON added in v0.3.0

func (j JarUploadedUserSourceInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JarUploadedUserSourceInfo.

func (*JarUploadedUserSourceInfo) UnmarshalJSON added in v0.3.0

func (j *JarUploadedUserSourceInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JarUploadedUserSourceInfo.

type KPackBuildStageProvisioningState added in v0.3.0

type KPackBuildStageProvisioningState string

KPackBuildStageProvisioningState - The provisioning state of this build stage resource.

const (
	KPackBuildStageProvisioningStateFailed     KPackBuildStageProvisioningState = "Failed"
	KPackBuildStageProvisioningStateNotStarted KPackBuildStageProvisioningState = "NotStarted"
	KPackBuildStageProvisioningStateRunning    KPackBuildStageProvisioningState = "Running"
	KPackBuildStageProvisioningStateSucceeded  KPackBuildStageProvisioningState = "Succeeded"
)

func PossibleKPackBuildStageProvisioningStateValues added in v0.3.0

func PossibleKPackBuildStageProvisioningStateValues() []KPackBuildStageProvisioningState

PossibleKPackBuildStageProvisioningStateValues returns the possible values for the KPackBuildStageProvisioningState const type.

type KeyVaultCertificateProperties added in v0.2.0

type KeyVaultCertificateProperties struct {
	// REQUIRED; The certificate name of key vault.
	KeyVaultCertName *string

	// REQUIRED; The type of the certificate source.
	Type *string

	// REQUIRED; The vault uri of user key vault.
	VaultURI *string

	// The certificate version of key vault.
	CertVersion *string

	// Optional. If set to true, it will not import private key from key vault.
	ExcludePrivateKey *bool

	// READ-ONLY; The activate date of certificate.
	ActivateDate *string

	// READ-ONLY; The domain list of certificate.
	DNSNames []*string

	// READ-ONLY; The expiration date of certificate.
	ExpirationDate *string

	// READ-ONLY; The issue date of certificate.
	IssuedDate *string

	// READ-ONLY; The issuer of certificate.
	Issuer *string

	// READ-ONLY; The subject name of certificate.
	SubjectName *string

	// READ-ONLY; The thumbprint of certificate.
	Thumbprint *string
}

KeyVaultCertificateProperties - Properties of certificate imported from key vault.

func (*KeyVaultCertificateProperties) GetCertificateProperties added in v0.3.0

func (k *KeyVaultCertificateProperties) GetCertificateProperties() *CertificateProperties

GetCertificateProperties implements the CertificatePropertiesClassification interface for type KeyVaultCertificateProperties.

func (KeyVaultCertificateProperties) MarshalJSON added in v0.2.0

func (k KeyVaultCertificateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type KeyVaultCertificateProperties.

func (*KeyVaultCertificateProperties) UnmarshalJSON added in v0.2.0

func (k *KeyVaultCertificateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultCertificateProperties.

type LastModifiedByType added in v0.3.0

type LastModifiedByType string

LastModifiedByType - The type of identity that last modified the resource.

const (
	LastModifiedByTypeApplication     LastModifiedByType = "Application"
	LastModifiedByTypeKey             LastModifiedByType = "Key"
	LastModifiedByTypeManagedIdentity LastModifiedByType = "ManagedIdentity"
	LastModifiedByTypeUser            LastModifiedByType = "User"
)

func PossibleLastModifiedByTypeValues added in v0.3.0

func PossibleLastModifiedByTypeValues() []LastModifiedByType

PossibleLastModifiedByTypeValues returns the possible values for the LastModifiedByType const type.

type LoadedCertificate added in v0.2.0

type LoadedCertificate struct {
	// REQUIRED; Resource Id of loaded certificate
	ResourceID *string

	// Indicate whether the certificate will be loaded into default trust store, only work for Java runtime.
	LoadTrustStore *bool
}

LoadedCertificate - Loaded certificate payload

func (LoadedCertificate) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type LoadedCertificate.

func (*LoadedCertificate) UnmarshalJSON added in v1.1.0

func (l *LoadedCertificate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LoadedCertificate.

type LogFileURLResponse

type LogFileURLResponse struct {
	// REQUIRED; URL of the log file
	URL *string
}

LogFileURLResponse - Log file URL payload

func (LogFileURLResponse) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type LogFileURLResponse.

func (*LogFileURLResponse) UnmarshalJSON added in v1.1.0

func (l *LogFileURLResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LogFileURLResponse.

type LogSpecification

type LogSpecification struct {
	// Blob duration of the log
	BlobDuration *string

	// Localized friendly display name of the log
	DisplayName *string

	// Name of the log
	Name *string
}

LogSpecification - Specifications of the Log for Azure Monitoring

func (LogSpecification) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type LogSpecification.

func (*LogSpecification) UnmarshalJSON added in v1.1.0

func (l *LogSpecification) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LogSpecification.

type ManagedIdentityProperties

type ManagedIdentityProperties struct {
	// Principal Id of system-assigned managed identity.
	PrincipalID *string

	// Tenant Id of system-assigned managed identity.
	TenantID *string

	// Type of the managed identity
	Type *ManagedIdentityType
}

ManagedIdentityProperties - Managed identity properties retrieved from ARM request headers.

func (ManagedIdentityProperties) MarshalJSON added in v0.4.0

func (m ManagedIdentityProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ManagedIdentityProperties.

func (*ManagedIdentityProperties) UnmarshalJSON added in v1.1.0

func (m *ManagedIdentityProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIdentityProperties.

type ManagedIdentityType

type ManagedIdentityType string

ManagedIdentityType - Type of the managed identity

const (
	ManagedIdentityTypeNone                       ManagedIdentityType = "None"
	ManagedIdentityTypeSystemAssigned             ManagedIdentityType = "SystemAssigned"
	ManagedIdentityTypeSystemAssignedUserAssigned ManagedIdentityType = "SystemAssigned,UserAssigned"
	ManagedIdentityTypeUserAssigned               ManagedIdentityType = "UserAssigned"
)

func PossibleManagedIdentityTypeValues

func PossibleManagedIdentityTypeValues() []ManagedIdentityType

PossibleManagedIdentityTypeValues returns the possible values for the ManagedIdentityType const type.

type MetricDimension

type MetricDimension struct {
	// Localized friendly display name of the dimension
	DisplayName *string

	// Name of the dimension
	Name *string

	// Whether this dimension should be included for the Shoebox export scenario
	ToBeExportedForShoebox *bool
}

MetricDimension - Specifications of the Dimension of metrics

func (MetricDimension) MarshalJSON added in v1.1.0

func (m MetricDimension) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MetricDimension.

func (*MetricDimension) UnmarshalJSON added in v1.1.0

func (m *MetricDimension) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MetricDimension.

type MetricSpecification

type MetricSpecification struct {
	// Only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count.
	AggregationType *string

	// Name of the metric category that the metric belongs to. A metric can only belong to a single category.
	Category *string

	// Dimensions of the metric
	Dimensions []*MetricDimension

	// Localized friendly description of the metric
	DisplayDescription *string

	// Localized friendly display name of the metric
	DisplayName *string

	// Optional. If set to true, then zero will be returned for time duration where no metric is emitted/published.
	FillGapWithZero *bool

	// Name of the metric
	Name *string

	// Name of the MDM namespace. Optional.
	SourceMdmNamespace *string

	// Supported aggregation types
	SupportedAggregationTypes []*string

	// Supported time grain types
	SupportedTimeGrainTypes []*string

	// Unit that makes sense for the metric
	Unit *string
}

MetricSpecification - Specifications of the Metrics for Azure Monitoring

func (MetricSpecification) MarshalJSON

func (m MetricSpecification) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MetricSpecification.

func (*MetricSpecification) UnmarshalJSON added in v1.1.0

func (m *MetricSpecification) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MetricSpecification.

type MonitoringSettingProperties

type MonitoringSettingProperties struct {
	// Indicates the versions of application insight agent
	AppInsightsAgentVersions *ApplicationInsightsAgentVersions

	// Target application insight instrumentation key, null or whitespace include empty will disable monitoringSettings
	AppInsightsInstrumentationKey *string

	// Indicates the sampling rate of application insight agent, should be in range [0.0, 100.0]
	AppInsightsSamplingRate *float64

	// Error when apply Monitoring Setting changes.
	Error *Error

	// Indicates whether enable the trace functionality, which will be deprecated since api version 2020-11-01-preview. Please
	// leverage appInsightsInstrumentationKey to indicate if monitoringSettings enabled
	// or not
	TraceEnabled *bool

	// READ-ONLY; State of the Monitoring Setting.
	ProvisioningState *MonitoringSettingState
}

MonitoringSettingProperties - Monitoring Setting properties payload

func (MonitoringSettingProperties) MarshalJSON added in v1.1.0

func (m MonitoringSettingProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MonitoringSettingProperties.

func (*MonitoringSettingProperties) UnmarshalJSON added in v1.1.0

func (m *MonitoringSettingProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MonitoringSettingProperties.

type MonitoringSettingResource

type MonitoringSettingResource struct {
	// Properties of the Monitoring Setting resource
	Properties *MonitoringSettingProperties

	// READ-ONLY; Fully qualified resource Id for the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource.
	Type *string
}

MonitoringSettingResource - Monitoring Setting resource

func (MonitoringSettingResource) MarshalJSON

func (m MonitoringSettingResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MonitoringSettingResource.

func (*MonitoringSettingResource) UnmarshalJSON added in v0.2.0

func (m *MonitoringSettingResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MonitoringSettingResource.

type MonitoringSettingState

type MonitoringSettingState string

MonitoringSettingState - State of the Monitoring Setting.

const (
	MonitoringSettingStateFailed       MonitoringSettingState = "Failed"
	MonitoringSettingStateNotAvailable MonitoringSettingState = "NotAvailable"
	MonitoringSettingStateSucceeded    MonitoringSettingState = "Succeeded"
	MonitoringSettingStateUpdating     MonitoringSettingState = "Updating"
)

func PossibleMonitoringSettingStateValues

func PossibleMonitoringSettingStateValues() []MonitoringSettingState

PossibleMonitoringSettingStateValues returns the possible values for the MonitoringSettingState const type.

type MonitoringSettingsClient

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

MonitoringSettingsClient contains the methods for the MonitoringSettings group. Don't use this type directly, use NewMonitoringSettingsClient() instead.

func NewMonitoringSettingsClient

func NewMonitoringSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MonitoringSettingsClient, error)

NewMonitoringSettingsClient creates a new instance of MonitoringSettingsClient with the specified values.

  • subscriptionID - Gets subscription ID which uniquely identify the 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 (*MonitoringSettingsClient) BeginUpdatePatch

func (client *MonitoringSettingsClient) BeginUpdatePatch(ctx context.Context, resourceGroupName string, serviceName string, monitoringSettingResource MonitoringSettingResource, options *MonitoringSettingsClientBeginUpdatePatchOptions) (*runtime.Poller[MonitoringSettingsClientUpdatePatchResponse], error)

BeginUpdatePatch - Update the Monitoring Setting. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • monitoringSettingResource - Parameters for the update operation
  • options - MonitoringSettingsClientBeginUpdatePatchOptions contains the optional parameters for the MonitoringSettingsClient.BeginUpdatePatch method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/MonitoringSettings_UpdatePatch.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewMonitoringSettingsClient().BeginUpdatePatch(ctx, "myResourceGroup", "myservice", armappplatform.MonitoringSettingResource{
		Properties: &armappplatform.MonitoringSettingProperties{
			AppInsightsInstrumentationKey: to.Ptr("00000000-0000-0000-0000-000000000000"),
			AppInsightsSamplingRate:       to.Ptr[float64](10),
			TraceEnabled:                  to.Ptr(true),
		},
	}, 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 pull 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.MonitoringSettingResource = armappplatform.MonitoringSettingResource{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/monitoringSettings"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/monitoringSettings/default"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.MonitoringSettingProperties{
	// 		AppInsightsAgentVersions: &armappplatform.ApplicationInsightsAgentVersions{
	// 			Java: to.Ptr("3.0.0"),
	// 		},
	// 		AppInsightsInstrumentationKey: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		AppInsightsSamplingRate: to.Ptr[float64](10),
	// 		ProvisioningState: to.Ptr(armappplatform.MonitoringSettingStateSucceeded),
	// 		TraceEnabled: to.Ptr(true),
	// 	},
	// }
}
Output:

func (*MonitoringSettingsClient) BeginUpdatePut

func (client *MonitoringSettingsClient) BeginUpdatePut(ctx context.Context, resourceGroupName string, serviceName string, monitoringSettingResource MonitoringSettingResource, options *MonitoringSettingsClientBeginUpdatePutOptions) (*runtime.Poller[MonitoringSettingsClientUpdatePutResponse], error)

BeginUpdatePut - Update the Monitoring Setting. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • monitoringSettingResource - Parameters for the update operation
  • options - MonitoringSettingsClientBeginUpdatePutOptions contains the optional parameters for the MonitoringSettingsClient.BeginUpdatePut method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/MonitoringSettings_UpdatePut.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewMonitoringSettingsClient().BeginUpdatePut(ctx, "myResourceGroup", "myservice", armappplatform.MonitoringSettingResource{
		Properties: &armappplatform.MonitoringSettingProperties{
			AppInsightsInstrumentationKey: to.Ptr("00000000-0000-0000-0000-000000000000"),
			AppInsightsSamplingRate:       to.Ptr[float64](10),
			TraceEnabled:                  to.Ptr(true),
		},
	}, 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 pull 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.MonitoringSettingResource = armappplatform.MonitoringSettingResource{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/monitoringSettings"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/monitoringSettings/default"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.MonitoringSettingProperties{
	// 		AppInsightsAgentVersions: &armappplatform.ApplicationInsightsAgentVersions{
	// 			Java: to.Ptr("3.0.0"),
	// 		},
	// 		AppInsightsInstrumentationKey: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		AppInsightsSamplingRate: to.Ptr[float64](10),
	// 		ProvisioningState: to.Ptr(armappplatform.MonitoringSettingStateSucceeded),
	// 		TraceEnabled: to.Ptr(true),
	// 	},
	// }
}
Output:

func (*MonitoringSettingsClient) Get

Get - Get the Monitoring Setting and its properties. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • options - MonitoringSettingsClientGetOptions contains the optional parameters for the MonitoringSettingsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/MonitoringSettings_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMonitoringSettingsClient().Get(ctx, "myResourceGroup", "myservice", 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.MonitoringSettingResource = armappplatform.MonitoringSettingResource{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/monitoringSettings"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/monitoringSettings/default"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.MonitoringSettingProperties{
	// 		AppInsightsAgentVersions: &armappplatform.ApplicationInsightsAgentVersions{
	// 			Java: to.Ptr("3.0.0"),
	// 		},
	// 		AppInsightsInstrumentationKey: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		AppInsightsSamplingRate: to.Ptr[float64](10),
	// 		ProvisioningState: to.Ptr(armappplatform.MonitoringSettingStateSucceeded),
	// 		TraceEnabled: to.Ptr(true),
	// 	},
	// }
}
Output:

type MonitoringSettingsClientBeginUpdatePatchOptions added in v0.3.0

type MonitoringSettingsClientBeginUpdatePatchOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

MonitoringSettingsClientBeginUpdatePatchOptions contains the optional parameters for the MonitoringSettingsClient.BeginUpdatePatch method.

type MonitoringSettingsClientBeginUpdatePutOptions added in v0.3.0

type MonitoringSettingsClientBeginUpdatePutOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

MonitoringSettingsClientBeginUpdatePutOptions contains the optional parameters for the MonitoringSettingsClient.BeginUpdatePut method.

type MonitoringSettingsClientGetOptions added in v0.3.0

type MonitoringSettingsClientGetOptions struct {
}

MonitoringSettingsClientGetOptions contains the optional parameters for the MonitoringSettingsClient.Get method.

type MonitoringSettingsClientGetResponse added in v0.3.0

type MonitoringSettingsClientGetResponse struct {
	// Monitoring Setting resource
	MonitoringSettingResource
}

MonitoringSettingsClientGetResponse contains the response from method MonitoringSettingsClient.Get.

type MonitoringSettingsClientUpdatePatchResponse added in v0.3.0

type MonitoringSettingsClientUpdatePatchResponse struct {
	// Monitoring Setting resource
	MonitoringSettingResource
}

MonitoringSettingsClientUpdatePatchResponse contains the response from method MonitoringSettingsClient.BeginUpdatePatch.

type MonitoringSettingsClientUpdatePutResponse added in v0.3.0

type MonitoringSettingsClientUpdatePutResponse struct {
	// Monitoring Setting resource
	MonitoringSettingResource
}

MonitoringSettingsClientUpdatePutResponse contains the response from method MonitoringSettingsClient.BeginUpdatePut.

type NameAvailability

type NameAvailability struct {
	// Message why the name is not available
	Message *string

	// Indicates whether the name is available
	NameAvailable *bool

	// Reason why the name is not available
	Reason *string
}

NameAvailability - Name availability result payload

func (NameAvailability) MarshalJSON added in v1.1.0

func (n NameAvailability) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NameAvailability.

func (*NameAvailability) UnmarshalJSON added in v1.1.0

func (n *NameAvailability) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NameAvailability.

type NameAvailabilityParameters

type NameAvailabilityParameters struct {
	// REQUIRED; Name to be checked
	Name *string

	// REQUIRED; Type of the resource to check name availability
	Type *string
}

NameAvailabilityParameters - Name availability parameters payload

func (NameAvailabilityParameters) MarshalJSON added in v1.1.0

func (n NameAvailabilityParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NameAvailabilityParameters.

func (*NameAvailabilityParameters) UnmarshalJSON added in v1.1.0

func (n *NameAvailabilityParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NameAvailabilityParameters.

type NetCoreZipUploadedUserSourceInfo added in v0.3.0

type NetCoreZipUploadedUserSourceInfo struct {
	// REQUIRED; Type of the source uploaded
	Type *string

	// The path to the .NET executable relative to zip root
	NetCoreMainEntryPath *string

	// Relative path of the storage which stores the source
	RelativePath *string

	// Runtime version of the .Net file
	RuntimeVersion *string

	// Version of the source
	Version *string
}

NetCoreZipUploadedUserSourceInfo - Uploaded Jar binary for a deployment

func (*NetCoreZipUploadedUserSourceInfo) GetUploadedUserSourceInfo added in v0.3.0

func (n *NetCoreZipUploadedUserSourceInfo) GetUploadedUserSourceInfo() *UploadedUserSourceInfo

GetUploadedUserSourceInfo implements the UploadedUserSourceInfoClassification interface for type NetCoreZipUploadedUserSourceInfo.

func (*NetCoreZipUploadedUserSourceInfo) GetUserSourceInfo added in v0.3.0

func (n *NetCoreZipUploadedUserSourceInfo) GetUserSourceInfo() *UserSourceInfo

GetUserSourceInfo implements the UserSourceInfoClassification interface for type NetCoreZipUploadedUserSourceInfo.

func (NetCoreZipUploadedUserSourceInfo) MarshalJSON added in v0.3.0

func (n NetCoreZipUploadedUserSourceInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetCoreZipUploadedUserSourceInfo.

func (*NetCoreZipUploadedUserSourceInfo) UnmarshalJSON added in v0.3.0

func (n *NetCoreZipUploadedUserSourceInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetCoreZipUploadedUserSourceInfo.

type NetworkProfile

type NetworkProfile struct {
	// Name of the resource group containing network resources for customer apps in Azure Spring Apps
	AppNetworkResourceGroup *string

	// Fully qualified resource Id of the subnet to host customer apps in Azure Spring Apps
	AppSubnetID *string

	// Azure Spring Apps service reserved CIDR
	ServiceCidr *string

	// Name of the resource group containing network resources of Azure Spring Apps Service Runtime
	ServiceRuntimeNetworkResourceGroup *string

	// Fully qualified resource Id of the subnet to host Azure Spring Apps Service Runtime
	ServiceRuntimeSubnetID *string

	// READ-ONLY; Desired outbound IP resources for Azure Spring Apps resource.
	OutboundIPs *NetworkProfileOutboundIPs

	// READ-ONLY; Required inbound or outbound traffics for Azure Spring Apps resource.
	RequiredTraffics []*RequiredTraffic
}

NetworkProfile - Service network profile payload

func (NetworkProfile) MarshalJSON

func (n NetworkProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkProfile.

func (*NetworkProfile) UnmarshalJSON added in v1.1.0

func (n *NetworkProfile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfile.

type NetworkProfileOutboundIPs

type NetworkProfileOutboundIPs struct {
	// READ-ONLY; A list of public IP addresses.
	PublicIPs []*string
}

NetworkProfileOutboundIPs - Desired outbound IP resources for Azure Spring Apps resource.

func (NetworkProfileOutboundIPs) MarshalJSON

func (n NetworkProfileOutboundIPs) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkProfileOutboundIPs.

func (*NetworkProfileOutboundIPs) UnmarshalJSON added in v1.1.0

func (n *NetworkProfileOutboundIPs) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfileOutboundIPs.

type OperationDetail

type OperationDetail struct {
	// Display of the operation
	Display *OperationDisplay

	// Indicates whether the operation is a data action
	IsDataAction *bool

	// Name of the operation
	Name *string

	// Origin of the operation
	Origin *string

	// Properties of the operation
	Properties *OperationProperties

	// READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
	ActionType *ActionType
}

OperationDetail - Operation detail payload

func (OperationDetail) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type OperationDetail.

func (*OperationDetail) UnmarshalJSON added in v1.1.0

func (o *OperationDetail) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDetail.

type OperationDisplay

type OperationDisplay struct {
	// Localized friendly description for the operation
	Description *string

	// Localized friendly name for the operation
	Operation *string

	// Resource provider of the operation
	Provider *string

	// Resource of the operation
	Resource *string
}

OperationDisplay - Operation display payload

func (OperationDisplay) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON added in v1.1.0

func (o *OperationDisplay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationProperties

type OperationProperties struct {
	// Service specifications of the operation
	ServiceSpecification *ServiceSpecification
}

OperationProperties - Extra Operation properties

func (OperationProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type OperationProperties.

func (*OperationProperties) UnmarshalJSON added in v1.1.0

func (o *OperationProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationProperties.

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, error)

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) NewListPager added in v0.5.0

NewListPager - Lists all of the available REST API operations of the Microsoft.AppPlatform provider.

Generated from API version 2022-04-01

  • options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Operations_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", 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.AvailableOperations = armappplatform.AvailableOperations{
		// 	Value: []*armappplatform.OperationDetail{
		// 		{
		// 			Name: to.Ptr("Microsoft.AppPlatform/Spring/read"),
		// 			Display: &armappplatform.OperationDisplay{
		// 				Description: to.Ptr("Create or Update Managed Applications"),
		// 				Operation: to.Ptr("Create or Update Managed Applications"),
		// 				Provider: to.Ptr("Microsoft Azure Distributed Managed Service for Spring"),
		// 				Resource: to.Ptr("Managed Applications"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr("user,system"),
		// 			Properties: &armappplatform.OperationProperties{
		// 			},
		// 	}},
		// }
	}
}
Output:

type OperationsClientListOptions added in v0.3.0

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse added in v0.3.0

type OperationsClientListResponse struct {
	// Available operations of the service
	AvailableOperations
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type PersistentDisk

type PersistentDisk struct {
	// Mount path of the persistent disk
	MountPath *string

	// Size of the persistent disk in GB
	SizeInGB *int32

	// READ-ONLY; Size of the used persistent disk in GB
	UsedInGB *int32
}

PersistentDisk - Persistent disk payload

func (PersistentDisk) MarshalJSON added in v1.1.0

func (p PersistentDisk) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PersistentDisk.

func (*PersistentDisk) UnmarshalJSON added in v1.1.0

func (p *PersistentDisk) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PersistentDisk.

type ProvisioningState

type ProvisioningState string

ProvisioningState - Provisioning state of the Service

const (
	ProvisioningStateCreating   ProvisioningState = "Creating"
	ProvisioningStateDeleted    ProvisioningState = "Deleted"
	ProvisioningStateDeleting   ProvisioningState = "Deleting"
	ProvisioningStateFailed     ProvisioningState = "Failed"
	ProvisioningStateMoveFailed ProvisioningState = "MoveFailed"
	ProvisioningStateMoved      ProvisioningState = "Moved"
	ProvisioningStateMoving     ProvisioningState = "Moving"
	ProvisioningStateStarting   ProvisioningState = "Starting"
	ProvisioningStateStopping   ProvisioningState = "Stopping"
	ProvisioningStateSucceeded  ProvisioningState = "Succeeded"
	ProvisioningStateUpdating   ProvisioningState = "Updating"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type ProxyResource

type ProxyResource struct {
	// READ-ONLY; Fully qualified resource Id for the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource.
	Type *string
}

ProxyResource - The resource model definition for a ARM proxy resource. It will have everything other than required location and tags.

func (ProxyResource) MarshalJSON added in v1.1.0

func (p ProxyResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProxyResource.

func (*ProxyResource) UnmarshalJSON added in v1.1.0

func (p *ProxyResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.

type RegenerateTestKeyRequestPayload

type RegenerateTestKeyRequestPayload struct {
	// REQUIRED; Type of the test key
	KeyType *TestKeyType
}

RegenerateTestKeyRequestPayload - Regenerate test key request payload

func (RegenerateTestKeyRequestPayload) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type RegenerateTestKeyRequestPayload.

func (*RegenerateTestKeyRequestPayload) UnmarshalJSON added in v1.1.0

func (r *RegenerateTestKeyRequestPayload) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegenerateTestKeyRequestPayload.

type RequiredTraffic

type RequiredTraffic struct {
	// READ-ONLY; The direction of required traffic
	Direction *TrafficDirection

	// READ-ONLY; The FQDN list of required traffic
	Fqdns []*string

	// READ-ONLY; The ip list of required traffic
	IPs []*string

	// READ-ONLY; The port of required traffic
	Port *int32

	// READ-ONLY; The protocol of required traffic
	Protocol *string
}

RequiredTraffic - Required inbound or outbound traffic for Azure Spring Apps resource.

func (RequiredTraffic) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type RequiredTraffic.

func (*RequiredTraffic) UnmarshalJSON added in v1.1.0

func (r *RequiredTraffic) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RequiredTraffic.

type Resource

type Resource struct {
	// READ-ONLY; Fully qualified resource Id for the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource.
	Type *string
}

Resource - The core properties of ARM resources.

func (Resource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON added in v0.2.0

func (r *Resource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type ResourceRequests

type ResourceRequests struct {
	// Required CPU. 1 core can be represented by 1 or 1000m. This should be 500m or 1 for Basic tier, and {500m, 1, 2, 3, 4}
	// for Standard tier.
	CPU *string

	// Required memory. 1 GB can be represented by 1Gi or 1024Mi. This should be {512Mi, 1Gi, 2Gi} for Basic tier, and {512Mi,
	// 1Gi, 2Gi, …, 8Gi} for Standard tier.
	Memory *string
}

ResourceRequests - Deployment resource request payload

func (ResourceRequests) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ResourceRequests.

func (*ResourceRequests) UnmarshalJSON added in v1.1.0

func (r *ResourceRequests) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceRequests.

type ResourceSKU

type ResourceSKU struct {
	// Gets the capacity of SKU.
	Capacity *SKUCapacity

	// Gets a list of locations and availability zones in those locations where the SKU is available.
	LocationInfo []*ResourceSKULocationInfo

	// Gets the set of locations that the SKU is available.
	Locations []*string

	// Gets the name of SKU.
	Name *string

	// Gets the type of resource the SKU applies to.
	ResourceType *string

	// Gets the restrictions because of which SKU cannot be used. This is empty if there are no restrictions.
	Restrictions []*ResourceSKURestrictions

	// Gets the tier of SKU.
	Tier *string
}

ResourceSKU - Describes an available Azure Spring Apps SKU.

func (ResourceSKU) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourceSKU.

func (*ResourceSKU) UnmarshalJSON added in v1.1.0

func (r *ResourceSKU) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKU.

type ResourceSKUCapabilities

type ResourceSKUCapabilities struct {
	// Gets an invariant to describe the feature.
	Name *string

	// Gets an invariant if the feature is measured by quantity.
	Value *string
}

func (ResourceSKUCapabilities) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ResourceSKUCapabilities.

func (*ResourceSKUCapabilities) UnmarshalJSON added in v1.1.0

func (r *ResourceSKUCapabilities) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUCapabilities.

type ResourceSKUCollection

type ResourceSKUCollection struct {
	// URL client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string

	// Collection of resource SKU
	Value []*ResourceSKU
}

ResourceSKUCollection - Object that includes an array of Azure Spring Apps SKU and a possible link for next set

func (ResourceSKUCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourceSKUCollection.

func (*ResourceSKUCollection) UnmarshalJSON added in v1.1.0

func (r *ResourceSKUCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUCollection.

type ResourceSKULocationInfo

type ResourceSKULocationInfo struct {
	// Gets location of the SKU
	Location *string

	// Gets details of capabilities available to a SKU in specific zones.
	ZoneDetails []*ResourceSKUZoneDetails

	// Gets list of availability zones where the SKU is supported.
	Zones []*string
}

ResourceSKULocationInfo - Locations and availability zones where the SKU is available

func (ResourceSKULocationInfo) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourceSKULocationInfo.

func (*ResourceSKULocationInfo) UnmarshalJSON added in v1.1.0

func (r *ResourceSKULocationInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKULocationInfo.

type ResourceSKURestrictionInfo

type ResourceSKURestrictionInfo struct {
	// Gets locations where the SKU is restricted
	Locations []*string

	// Gets list of availability zones where the SKU is restricted.
	Zones []*string
}

ResourceSKURestrictionInfo - Information about the restriction where the SKU cannot be used

func (ResourceSKURestrictionInfo) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourceSKURestrictionInfo.

func (*ResourceSKURestrictionInfo) UnmarshalJSON added in v1.1.0

func (r *ResourceSKURestrictionInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKURestrictionInfo.

type ResourceSKURestrictions

type ResourceSKURestrictions struct {
	// Gets the reason for restriction. Possible values include: 'QuotaId', 'NotAvailableForSubscription'
	ReasonCode *ResourceSKURestrictionsReasonCode

	// Gets the information about the restriction where the SKU cannot be used.
	RestrictionInfo *ResourceSKURestrictionInfo

	// Gets the type of restrictions. Possible values include: 'Location', 'Zone'
	Type *ResourceSKURestrictionsType

	// Gets the value of restrictions. If the restriction type is set to location. This would be different locations where the
	// SKU is restricted.
	Values []*string
}

ResourceSKURestrictions - Restrictions where the SKU cannot be used

func (ResourceSKURestrictions) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourceSKURestrictions.

func (*ResourceSKURestrictions) UnmarshalJSON added in v1.1.0

func (r *ResourceSKURestrictions) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKURestrictions.

type ResourceSKURestrictionsReasonCode

type ResourceSKURestrictionsReasonCode string

ResourceSKURestrictionsReasonCode - Gets the reason for restriction. Possible values include: 'QuotaId', 'NotAvailableForSubscription'

const (
	ResourceSKURestrictionsReasonCodeNotAvailableForSubscription ResourceSKURestrictionsReasonCode = "NotAvailableForSubscription"
	ResourceSKURestrictionsReasonCodeQuotaID                     ResourceSKURestrictionsReasonCode = "QuotaId"
)

func PossibleResourceSKURestrictionsReasonCodeValues

func PossibleResourceSKURestrictionsReasonCodeValues() []ResourceSKURestrictionsReasonCode

PossibleResourceSKURestrictionsReasonCodeValues returns the possible values for the ResourceSKURestrictionsReasonCode const type.

type ResourceSKURestrictionsType

type ResourceSKURestrictionsType string

ResourceSKURestrictionsType - Gets the type of restrictions. Possible values include: 'Location', 'Zone'

const (
	ResourceSKURestrictionsTypeLocation ResourceSKURestrictionsType = "Location"
	ResourceSKURestrictionsTypeZone     ResourceSKURestrictionsType = "Zone"
)

func PossibleResourceSKURestrictionsTypeValues

func PossibleResourceSKURestrictionsTypeValues() []ResourceSKURestrictionsType

PossibleResourceSKURestrictionsTypeValues returns the possible values for the ResourceSKURestrictionsType const type.

type ResourceSKUZoneDetails

type ResourceSKUZoneDetails struct {
	// Gets a list of capabilities that are available for the SKU in the specified list of zones.
	Capabilities []*ResourceSKUCapabilities

	// Gets the set of zones that the SKU is available in with the specified capabilities.
	Name []*string
}

ResourceSKUZoneDetails - Details of capabilities available to a SKU in specific zones

func (ResourceSKUZoneDetails) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourceSKUZoneDetails.

func (*ResourceSKUZoneDetails) UnmarshalJSON added in v1.1.0

func (r *ResourceSKUZoneDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUZoneDetails.

type ResourceUploadDefinition

type ResourceUploadDefinition struct {
	// Source relative path
	RelativePath *string

	// Upload URL
	UploadURL *string
}

ResourceUploadDefinition - Resource upload definition payload

func (ResourceUploadDefinition) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ResourceUploadDefinition.

func (*ResourceUploadDefinition) UnmarshalJSON added in v1.1.0

func (r *ResourceUploadDefinition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceUploadDefinition.

type RuntimeVersionsClient

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

RuntimeVersionsClient contains the methods for the RuntimeVersions group. Don't use this type directly, use NewRuntimeVersionsClient() instead.

func NewRuntimeVersionsClient

func NewRuntimeVersionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RuntimeVersionsClient, error)

NewRuntimeVersionsClient creates a new instance of RuntimeVersionsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*RuntimeVersionsClient) ListRuntimeVersions

ListRuntimeVersions - Lists all of the available runtime versions supported by Microsoft.AppPlatform provider. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • options - RuntimeVersionsClientListRuntimeVersionsOptions contains the optional parameters for the RuntimeVersionsClient.ListRuntimeVersions method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/RuntimeVersions_ListRuntimeVersions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewRuntimeVersionsClient().ListRuntimeVersions(ctx, 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.AvailableRuntimeVersions = armappplatform.AvailableRuntimeVersions{
	// 	Value: []*armappplatform.SupportedRuntimeVersion{
	// 		{
	// 			Platform: to.Ptr(armappplatform.SupportedRuntimePlatformJava),
	// 			Value: to.Ptr(armappplatform.SupportedRuntimeValueJava8),
	// 			Version: to.Ptr("8"),
	// 		},
	// 		{
	// 			Platform: to.Ptr(armappplatform.SupportedRuntimePlatformJava),
	// 			Value: to.Ptr(armappplatform.SupportedRuntimeValueJava11),
	// 			Version: to.Ptr("11"),
	// 		},
	// 		{
	// 			Platform: to.Ptr(armappplatform.SupportedRuntimePlatformJava),
	// 			Value: to.Ptr(armappplatform.SupportedRuntimeValueJava17),
	// 			Version: to.Ptr("17"),
	// 		},
	// 		{
	// 			Platform: to.Ptr(armappplatform.SupportedRuntimePlatformNETCore),
	// 			Value: to.Ptr(armappplatform.SupportedRuntimeValueNetCore31),
	// 			Version: to.Ptr("3.1"),
	// 	}},
	// }
}
Output:

type RuntimeVersionsClientListRuntimeVersionsOptions added in v0.3.0

type RuntimeVersionsClientListRuntimeVersionsOptions struct {
}

RuntimeVersionsClientListRuntimeVersionsOptions contains the optional parameters for the RuntimeVersionsClient.ListRuntimeVersions method.

type RuntimeVersionsClientListRuntimeVersionsResponse added in v0.3.0

type RuntimeVersionsClientListRuntimeVersionsResponse struct {
	AvailableRuntimeVersions
}

RuntimeVersionsClientListRuntimeVersionsResponse contains the response from method RuntimeVersionsClient.ListRuntimeVersions.

type SKU

type SKU struct {
	// Current capacity of the target resource
	Capacity *int32

	// Name of the Sku
	Name *string

	// Tier of the Sku
	Tier *string
}

SKU - Sku of Azure Spring Apps

func (SKU) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SKU.

func (*SKU) UnmarshalJSON added in v1.1.0

func (s *SKU) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKU.

type SKUCapacity

type SKUCapacity struct {
	// REQUIRED; Gets or sets the minimum.
	Minimum *int32

	// Gets or sets the default.
	Default *int32

	// Gets or sets the maximum.
	Maximum *int32

	// Gets or sets the type of the scale.
	ScaleType *SKUScaleType
}

SKUCapacity - The SKU capacity

func (SKUCapacity) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SKUCapacity.

func (*SKUCapacity) UnmarshalJSON added in v1.1.0

func (s *SKUCapacity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKUCapacity.

type SKUScaleType

type SKUScaleType string

SKUScaleType - Gets or sets the type of the scale.

const (
	SKUScaleTypeAutomatic SKUScaleType = "Automatic"
	SKUScaleTypeManual    SKUScaleType = "Manual"
	SKUScaleTypeNone      SKUScaleType = "None"
)

func PossibleSKUScaleTypeValues

func PossibleSKUScaleTypeValues() []SKUScaleType

PossibleSKUScaleTypeValues returns the possible values for the SKUScaleType const type.

type SKUsClient

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

SKUsClient contains the methods for the SKUs group. Don't use this type directly, use NewSKUsClient() instead.

func NewSKUsClient

func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SKUsClient, error)

NewSKUsClient creates a new instance of SKUsClient with the specified values.

  • subscriptionID - Gets subscription ID which uniquely identify the 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 (*SKUsClient) NewListPager added in v0.5.0

func (client *SKUsClient) NewListPager(options *SKUsClientListOptions) *runtime.Pager[SKUsClientListResponse]

NewListPager - Lists all of the available skus of the Microsoft.AppPlatform provider.

Generated from API version 2022-04-01

  • options - SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Skus_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSKUsClient().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.ResourceSKUCollection = armappplatform.ResourceSKUCollection{
		// 	Value: []*armappplatform.ResourceSKU{
		// 		{
		// 			Name: to.Ptr("B0"),
		// 			Capacity: &armappplatform.SKUCapacity{
		// 				Default: to.Ptr[int32](1),
		// 				Maximum: to.Ptr[int32](20),
		// 				Minimum: to.Ptr[int32](1),
		// 				ScaleType: to.Ptr(armappplatform.SKUScaleTypeAutomatic),
		// 			},
		// 			LocationInfo: []*armappplatform.ResourceSKULocationInfo{
		// 				{
		// 					Location: to.Ptr("eastus"),
		// 					ZoneDetails: []*armappplatform.ResourceSKUZoneDetails{
		// 					},
		// 					Zones: []*string{
		// 					},
		// 			}},
		// 			Locations: []*string{
		// 				to.Ptr("eastus")},
		// 				ResourceType: to.Ptr("Spring"),
		// 				Restrictions: []*armappplatform.ResourceSKURestrictions{
		// 				},
		// 				Tier: to.Ptr("Basic"),
		// 		}},
		// 	}
	}
}
Output:

type SKUsClientListOptions added in v0.3.0

type SKUsClientListOptions struct {
}

SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method.

type SKUsClientListResponse added in v0.3.0

type SKUsClientListResponse struct {
	// Object that includes an array of Azure Spring Apps SKU and a possible link for next set
	ResourceSKUCollection
}

SKUsClientListResponse contains the response from method SKUsClient.NewListPager.

type ServiceRegistriesClient added in v0.3.0

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

ServiceRegistriesClient contains the methods for the ServiceRegistries group. Don't use this type directly, use NewServiceRegistriesClient() instead.

func NewServiceRegistriesClient added in v0.3.0

func NewServiceRegistriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceRegistriesClient, error)

NewServiceRegistriesClient creates a new instance of ServiceRegistriesClient with the specified values.

  • subscriptionID - Gets subscription ID which uniquely identify the 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 (*ServiceRegistriesClient) BeginCreateOrUpdate added in v0.3.0

func (client *ServiceRegistriesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServiceRegistriesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create the default Service Registry or update the existing Service Registry. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • serviceRegistryName - The name of Service Registry.
  • options - ServiceRegistriesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceRegistriesClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/ServiceRegistries_CreateOrUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewServiceRegistriesClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", "default", 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 pull 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.ServiceRegistryResource = armappplatform.ServiceRegistryResource{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/serviceRegistries"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/serviceRegistries/default"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.ServiceRegistryProperties{
	// 		Instances: []*armappplatform.ServiceRegistryInstance{
	// 			{
	// 				Name: to.Ptr("instance1"),
	// 				Status: to.Ptr("Running"),
	// 			},
	// 			{
	// 				Name: to.Ptr("instance2"),
	// 				Status: to.Ptr("Running"),
	// 		}},
	// 		ProvisioningState: to.Ptr(armappplatform.ServiceRegistryProvisioningStateSucceeded),
	// 		ResourceRequests: &armappplatform.ServiceRegistryResourceRequests{
	// 			CPU: to.Ptr("1"),
	// 			InstanceCount: to.Ptr[int32](2),
	// 			Memory: to.Ptr("1G"),
	// 		},
	// 	},
	// }
}
Output:

func (*ServiceRegistriesClient) BeginDelete added in v0.3.0

func (client *ServiceRegistriesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientBeginDeleteOptions) (*runtime.Poller[ServiceRegistriesClientDeleteResponse], error)

BeginDelete - Disable the default Service Registry. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • serviceRegistryName - The name of Service Registry.
  • options - ServiceRegistriesClientBeginDeleteOptions contains the optional parameters for the ServiceRegistriesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/ServiceRegistries_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewServiceRegistriesClient().BeginDelete(ctx, "myResourceGroup", "myservice", "default", 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 pull the result: %v", err)
	}
}
Output:

func (*ServiceRegistriesClient) Get added in v0.3.0

func (client *ServiceRegistriesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientGetOptions) (ServiceRegistriesClientGetResponse, error)

Get - Get the Service Registry and its properties. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • serviceRegistryName - The name of Service Registry.
  • options - ServiceRegistriesClientGetOptions contains the optional parameters for the ServiceRegistriesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/ServiceRegistries_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewServiceRegistriesClient().Get(ctx, "myResourceGroup", "myservice", "default", 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.ServiceRegistryResource = armappplatform.ServiceRegistryResource{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring/serviceRegistries"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/serviceRegistries/default"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Properties: &armappplatform.ServiceRegistryProperties{
	// 		Instances: []*armappplatform.ServiceRegistryInstance{
	// 			{
	// 				Name: to.Ptr("instance1"),
	// 				Status: to.Ptr("Running"),
	// 			},
	// 			{
	// 				Name: to.Ptr("instance2"),
	// 				Status: to.Ptr("Running"),
	// 		}},
	// 		ProvisioningState: to.Ptr(armappplatform.ServiceRegistryProvisioningStateSucceeded),
	// 		ResourceRequests: &armappplatform.ServiceRegistryResourceRequests{
	// 			CPU: to.Ptr("1"),
	// 			InstanceCount: to.Ptr[int32](2),
	// 			Memory: to.Ptr("1G"),
	// 		},
	// 	},
	// }
}
Output:

func (*ServiceRegistriesClient) NewListPager added in v0.5.0

func (client *ServiceRegistriesClient) NewListPager(resourceGroupName string, serviceName string, options *ServiceRegistriesClientListOptions) *runtime.Pager[ServiceRegistriesClientListResponse]

NewListPager - Handles requests to list all resources in a Service.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • options - ServiceRegistriesClientListOptions contains the optional parameters for the ServiceRegistriesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/ServiceRegistries_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewServiceRegistriesClient().NewListPager("myResourceGroup", "myservice", 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.ServiceRegistryResourceCollection = armappplatform.ServiceRegistryResourceCollection{
		// 	Value: []*armappplatform.ServiceRegistryResource{
		// 		{
		// 			Name: to.Ptr("default"),
		// 			Type: to.Ptr("Microsoft.AppPlatform/Spring/serviceRegistries"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/serviceRegistries/default"),
		// 			SystemData: &armappplatform.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
		// 				CreatedBy: to.Ptr("sample-user"),
		// 				CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("sample-user"),
		// 				LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
		// 			},
		// 			Properties: &armappplatform.ServiceRegistryProperties{
		// 				Instances: []*armappplatform.ServiceRegistryInstance{
		// 					{
		// 						Name: to.Ptr("instance1"),
		// 						Status: to.Ptr("Running"),
		// 					},
		// 					{
		// 						Name: to.Ptr("instance2"),
		// 						Status: to.Ptr("Running"),
		// 				}},
		// 				ProvisioningState: to.Ptr(armappplatform.ServiceRegistryProvisioningStateSucceeded),
		// 				ResourceRequests: &armappplatform.ServiceRegistryResourceRequests{
		// 					CPU: to.Ptr("1"),
		// 					InstanceCount: to.Ptr[int32](2),
		// 					Memory: to.Ptr("1G"),
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

type ServiceRegistriesClientBeginCreateOrUpdateOptions added in v0.3.0

type ServiceRegistriesClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ServiceRegistriesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceRegistriesClient.BeginCreateOrUpdate method.

type ServiceRegistriesClientBeginDeleteOptions added in v0.3.0

type ServiceRegistriesClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ServiceRegistriesClientBeginDeleteOptions contains the optional parameters for the ServiceRegistriesClient.BeginDelete method.

type ServiceRegistriesClientCreateOrUpdateResponse added in v0.3.0

type ServiceRegistriesClientCreateOrUpdateResponse struct {
	// Service Registry resource
	ServiceRegistryResource
}

ServiceRegistriesClientCreateOrUpdateResponse contains the response from method ServiceRegistriesClient.BeginCreateOrUpdate.

type ServiceRegistriesClientDeleteResponse added in v0.3.0

type ServiceRegistriesClientDeleteResponse struct {
}

ServiceRegistriesClientDeleteResponse contains the response from method ServiceRegistriesClient.BeginDelete.

type ServiceRegistriesClientGetOptions added in v0.3.0

type ServiceRegistriesClientGetOptions struct {
}

ServiceRegistriesClientGetOptions contains the optional parameters for the ServiceRegistriesClient.Get method.

type ServiceRegistriesClientGetResponse added in v0.3.0

type ServiceRegistriesClientGetResponse struct {
	// Service Registry resource
	ServiceRegistryResource
}

ServiceRegistriesClientGetResponse contains the response from method ServiceRegistriesClient.Get.

type ServiceRegistriesClientListOptions added in v0.3.0

type ServiceRegistriesClientListOptions struct {
}

ServiceRegistriesClientListOptions contains the optional parameters for the ServiceRegistriesClient.NewListPager method.

type ServiceRegistriesClientListResponse added in v0.3.0

type ServiceRegistriesClientListResponse struct {
	// Object that includes an array of Service Registry resources and a possible link for next set
	ServiceRegistryResourceCollection
}

ServiceRegistriesClientListResponse contains the response from method ServiceRegistriesClient.NewListPager.

type ServiceRegistryInstance added in v0.3.0

type ServiceRegistryInstance struct {
	// READ-ONLY; Name of the Service Registry instance
	Name *string

	// READ-ONLY; Status of the Service Registry instance
	Status *string
}

ServiceRegistryInstance - Collection of instances belong to the Service Registry

func (ServiceRegistryInstance) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ServiceRegistryInstance.

func (*ServiceRegistryInstance) UnmarshalJSON added in v1.1.0

func (s *ServiceRegistryInstance) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceRegistryInstance.

type ServiceRegistryProperties added in v0.3.0

type ServiceRegistryProperties struct {
	// READ-ONLY; Collection of instances belong to Service Registry.
	Instances []*ServiceRegistryInstance

	// READ-ONLY; State of the Service Registry.
	ProvisioningState *ServiceRegistryProvisioningState

	// READ-ONLY; The requested resource quantity for required CPU and Memory.
	ResourceRequests *ServiceRegistryResourceRequests
}

ServiceRegistryProperties - Service Registry properties payload

func (ServiceRegistryProperties) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type ServiceRegistryProperties.

func (*ServiceRegistryProperties) UnmarshalJSON added in v1.1.0

func (s *ServiceRegistryProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceRegistryProperties.

type ServiceRegistryProvisioningState added in v0.3.0

type ServiceRegistryProvisioningState string

ServiceRegistryProvisioningState - State of the Service Registry.

const (
	ServiceRegistryProvisioningStateCreating  ServiceRegistryProvisioningState = "Creating"
	ServiceRegistryProvisioningStateDeleting  ServiceRegistryProvisioningState = "Deleting"
	ServiceRegistryProvisioningStateFailed    ServiceRegistryProvisioningState = "Failed"
	ServiceRegistryProvisioningStateSucceeded ServiceRegistryProvisioningState = "Succeeded"
	ServiceRegistryProvisioningStateUpdating  ServiceRegistryProvisioningState = "Updating"
)

func PossibleServiceRegistryProvisioningStateValues added in v0.3.0

func PossibleServiceRegistryProvisioningStateValues() []ServiceRegistryProvisioningState

PossibleServiceRegistryProvisioningStateValues returns the possible values for the ServiceRegistryProvisioningState const type.

type ServiceRegistryResource added in v0.3.0

type ServiceRegistryResource struct {
	// Service Registry properties payload
	Properties *ServiceRegistryProperties

	// READ-ONLY; Fully qualified resource Id for the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource.
	Type *string
}

ServiceRegistryResource - Service Registry resource

func (ServiceRegistryResource) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ServiceRegistryResource.

func (*ServiceRegistryResource) UnmarshalJSON added in v1.1.0

func (s *ServiceRegistryResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceRegistryResource.

type ServiceRegistryResourceCollection added in v0.3.0

type ServiceRegistryResourceCollection struct {
	// URL client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string

	// Collection of Service Registry resources
	Value []*ServiceRegistryResource
}

ServiceRegistryResourceCollection - Object that includes an array of Service Registry resources and a possible link for next set

func (ServiceRegistryResourceCollection) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type ServiceRegistryResourceCollection.

func (*ServiceRegistryResourceCollection) UnmarshalJSON added in v1.1.0

func (s *ServiceRegistryResourceCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceRegistryResourceCollection.

type ServiceRegistryResourceRequests added in v0.3.0

type ServiceRegistryResourceRequests struct {
	// READ-ONLY; Cpu allocated to each Service Registry instance
	CPU *string

	// READ-ONLY; Instance count of the Service Registry
	InstanceCount *int32

	// READ-ONLY; Memory allocated to each Service Registry instance
	Memory *string
}

ServiceRegistryResourceRequests - Resource request payload of Service Registry

func (ServiceRegistryResourceRequests) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ServiceRegistryResourceRequests.

func (*ServiceRegistryResourceRequests) UnmarshalJSON added in v1.1.0

func (s *ServiceRegistryResourceRequests) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceRegistryResourceRequests.

type ServiceResource

type ServiceResource struct {
	// The GEO location of the resource.
	Location *string

	// Properties of the Service resource
	Properties *ClusterResourceProperties

	// Sku of the Service resource
	SKU *SKU

	// Tags of the service which is a list of key value pairs that describe the resource.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource Id for the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource.
	Type *string
}

ServiceResource - Service resource

func (ServiceResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServiceResource.

func (*ServiceResource) UnmarshalJSON added in v0.2.0

func (s *ServiceResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceResource.

type ServiceResourceList

type ServiceResourceList struct {
	// URL client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string

	// Collection of Service resources
	Value []*ServiceResource
}

ServiceResourceList - Object that includes an array of Service resources and a possible link for next set

func (ServiceResourceList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServiceResourceList.

func (*ServiceResourceList) UnmarshalJSON added in v1.1.0

func (s *ServiceResourceList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceResourceList.

type ServiceSpecification

type ServiceSpecification struct {
	// Specifications of the Log for Azure Monitoring
	LogSpecifications []*LogSpecification

	// Specifications of the Metrics for Azure Monitoring
	MetricSpecifications []*MetricSpecification
}

ServiceSpecification - Service specification payload

func (ServiceSpecification) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServiceSpecification.

func (*ServiceSpecification) UnmarshalJSON added in v1.1.0

func (s *ServiceSpecification) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceSpecification.

type ServicesClient

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

ServicesClient contains the methods for the Services group. Don't use this type directly, use NewServicesClient() instead.

func NewServicesClient

func NewServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServicesClient, error)

NewServicesClient creates a new instance of ServicesClient with the specified values.

  • subscriptionID - Gets subscription ID which uniquely identify the 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 (*ServicesClient) BeginCreateOrUpdate

func (client *ServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, resource ServiceResource, options *ServicesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServicesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create a new Service or update an exiting Service. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • resource - Parameters for the create or update operation
  • options - ServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServicesClient.BeginCreateOrUpdate method.
Example (ServicesCreateOrUpdate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Services_CreateOrUpdate.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewServicesClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", armappplatform.ServiceResource{
		Location: to.Ptr("eastus"),
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
		},
		Properties: &armappplatform.ClusterResourceProperties{},
		SKU: &armappplatform.SKU{
			Name: to.Ptr("S0"),
			Tier: to.Ptr("Standard"),
		},
	}, 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 pull 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.ServiceResource = armappplatform.ServiceResource{
	// 	Name: to.Ptr("myservice"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Location: to.Ptr("eastus"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Properties: &armappplatform.ClusterResourceProperties{
	// 		NetworkProfile: &armappplatform.NetworkProfile{
	// 			OutboundIPs: &armappplatform.NetworkProfileOutboundIPs{
	// 				PublicIPs: []*string{
	// 					to.Ptr("20.39.3.173"),
	// 					to.Ptr("40.64.67.13")},
	// 				},
	// 				RequiredTraffics: []*armappplatform.RequiredTraffic{
	// 					{
	// 						Direction: to.Ptr(armappplatform.TrafficDirectionOutbound),
	// 						IPs: []*string{
	// 							to.Ptr("20.62.211.25"),
	// 							to.Ptr("52.188.47.226")},
	// 							Port: to.Ptr[int32](443),
	// 							Protocol: to.Ptr("TCP"),
	// 						},
	// 						{
	// 							Direction: to.Ptr(armappplatform.TrafficDirectionOutbound),
	// 							IPs: []*string{
	// 								to.Ptr("20.62.211.25"),
	// 								to.Ptr("52.188.47.226")},
	// 								Port: to.Ptr[int32](1194),
	// 								Protocol: to.Ptr("UDP"),
	// 							},
	// 							{
	// 								Direction: to.Ptr(armappplatform.TrafficDirectionOutbound),
	// 								IPs: []*string{
	// 									to.Ptr("20.62.211.25"),
	// 									to.Ptr("52.188.47.226")},
	// 									Port: to.Ptr[int32](9000),
	// 									Protocol: to.Ptr("TCP"),
	// 							}},
	// 						},
	// 						ProvisioningState: to.Ptr(armappplatform.ProvisioningStateSucceeded),
	// 						ServiceID: to.Ptr("12345678abcd1234abcd12345678abcd"),
	// 					},
	// 					SKU: &armappplatform.SKU{
	// 						Name: to.Ptr("S0"),
	// 						Tier: to.Ptr("Standard"),
	// 					},
	// 				}
}
Output:

Example (ServicesCreateOrUpdateVNetInjection)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Services_CreateOrUpdate_VNetInjection.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewServicesClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myservice", armappplatform.ServiceResource{
		Location: to.Ptr("eastus"),
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
		},
		Properties: &armappplatform.ClusterResourceProperties{
			NetworkProfile: &armappplatform.NetworkProfile{
				AppNetworkResourceGroup:            to.Ptr("my-app-network-rg"),
				AppSubnetID:                        to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork/subnets/apps"),
				ServiceCidr:                        to.Ptr("10.8.0.0/16,10.244.0.0/16,10.245.0.1/16"),
				ServiceRuntimeNetworkResourceGroup: to.Ptr("my-service-runtime-network-rg"),
				ServiceRuntimeSubnetID:             to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork/subnets/serviceRuntime"),
			},
		},
		SKU: &armappplatform.SKU{
			Name: to.Ptr("S0"),
			Tier: to.Ptr("Standard"),
		},
	}, 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 pull 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.ServiceResource = armappplatform.ServiceResource{
	// 	Name: to.Ptr("myservice"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Location: to.Ptr("eastus"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Properties: &armappplatform.ClusterResourceProperties{
	// 		NetworkProfile: &armappplatform.NetworkProfile{
	// 			AppNetworkResourceGroup: to.Ptr("my-app-network-rg"),
	// 			AppSubnetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork/subnets/apps"),
	// 			OutboundIPs: &armappplatform.NetworkProfileOutboundIPs{
	// 				PublicIPs: []*string{
	// 					to.Ptr("40.64.67.13")},
	// 				},
	// 				RequiredTraffics: []*armappplatform.RequiredTraffic{
	// 					{
	// 						Direction: to.Ptr(armappplatform.TrafficDirectionOutbound),
	// 						IPs: []*string{
	// 							to.Ptr("20.62.211.25"),
	// 							to.Ptr("52.188.47.226")},
	// 							Port: to.Ptr[int32](443),
	// 							Protocol: to.Ptr("TCP"),
	// 						},
	// 						{
	// 							Direction: to.Ptr(armappplatform.TrafficDirectionOutbound),
	// 							IPs: []*string{
	// 								to.Ptr("20.62.211.25"),
	// 								to.Ptr("52.188.47.226")},
	// 								Port: to.Ptr[int32](1194),
	// 								Protocol: to.Ptr("UDP"),
	// 							},
	// 							{
	// 								Direction: to.Ptr(armappplatform.TrafficDirectionOutbound),
	// 								IPs: []*string{
	// 									to.Ptr("20.62.211.25"),
	// 									to.Ptr("52.188.47.226")},
	// 									Port: to.Ptr[int32](9000),
	// 									Protocol: to.Ptr("TCP"),
	// 							}},
	// 							ServiceCidr: to.Ptr("10.8.0.0/16,10.244.0.0/16,10.245.0.1/16"),
	// 							ServiceRuntimeNetworkResourceGroup: to.Ptr("my-service-runtime-network-rg"),
	// 							ServiceRuntimeSubnetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork/subnets/serviceRuntime"),
	// 						},
	// 						ProvisioningState: to.Ptr(armappplatform.ProvisioningStateSucceeded),
	// 						ServiceID: to.Ptr("12345678abcd1234abcd12345678abcd"),
	// 					},
	// 					SKU: &armappplatform.SKU{
	// 						Name: to.Ptr("S0"),
	// 						Tier: to.Ptr("Standard"),
	// 					},
	// 				}
}
Output:

func (*ServicesClient) BeginDelete

func (client *ServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginDeleteOptions) (*runtime.Poller[ServicesClientDeleteResponse], error)

BeginDelete - Operation to delete a Service. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • options - ServicesClientBeginDeleteOptions contains the optional parameters for the ServicesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Services_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewServicesClient().BeginDelete(ctx, "myResourceGroup", "myservice", 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 pull the result: %v", err)
	}
}
Output:

func (*ServicesClient) BeginUpdate

func (client *ServicesClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, resource ServiceResource, options *ServicesClientBeginUpdateOptions) (*runtime.Poller[ServicesClientUpdateResponse], error)

BeginUpdate - Operation to update an exiting Service. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • resource - Parameters for the update operation
  • options - ServicesClientBeginUpdateOptions contains the optional parameters for the ServicesClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Services_Update.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewServicesClient().BeginUpdate(ctx, "myResourceGroup", "myservice", armappplatform.ServiceResource{
		Location: to.Ptr("eastus"),
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
		},
		Properties: &armappplatform.ClusterResourceProperties{},
		SKU: &armappplatform.SKU{
			Name: to.Ptr("S0"),
			Tier: to.Ptr("Standard"),
		},
	}, 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 pull 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.ServiceResource = armappplatform.ServiceResource{
	// 	Name: to.Ptr("myservice"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Location: to.Ptr("eastus"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Properties: &armappplatform.ClusterResourceProperties{
	// 		NetworkProfile: &armappplatform.NetworkProfile{
	// 			OutboundIPs: &armappplatform.NetworkProfileOutboundIPs{
	// 				PublicIPs: []*string{
	// 					to.Ptr("20.39.3.173"),
	// 					to.Ptr("40.64.67.13")},
	// 				},
	// 				RequiredTraffics: []*armappplatform.RequiredTraffic{
	// 					{
	// 						Direction: to.Ptr(armappplatform.TrafficDirectionOutbound),
	// 						IPs: []*string{
	// 							to.Ptr("20.62.211.25"),
	// 							to.Ptr("52.188.47.226")},
	// 							Port: to.Ptr[int32](443),
	// 							Protocol: to.Ptr("TCP"),
	// 						},
	// 						{
	// 							Direction: to.Ptr(armappplatform.TrafficDirectionOutbound),
	// 							IPs: []*string{
	// 								to.Ptr("20.62.211.25"),
	// 								to.Ptr("52.188.47.226")},
	// 								Port: to.Ptr[int32](1194),
	// 								Protocol: to.Ptr("UDP"),
	// 							},
	// 							{
	// 								Direction: to.Ptr(armappplatform.TrafficDirectionOutbound),
	// 								IPs: []*string{
	// 									to.Ptr("20.62.211.25"),
	// 									to.Ptr("52.188.47.226")},
	// 									Port: to.Ptr[int32](9000),
	// 									Protocol: to.Ptr("TCP"),
	// 							}},
	// 						},
	// 						ProvisioningState: to.Ptr(armappplatform.ProvisioningStateSucceeded),
	// 						ServiceID: to.Ptr("12345678abcd1234abcd12345678abcd"),
	// 					},
	// 					SKU: &armappplatform.SKU{
	// 						Name: to.Ptr("S0"),
	// 						Tier: to.Ptr("Standard"),
	// 					},
	// 				}
}
Output:

func (*ServicesClient) CheckNameAvailability

CheckNameAvailability - Checks that the resource name is valid and is not already in use. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • location - the region
  • availabilityParameters - Parameters supplied to the operation.
  • options - ServicesClientCheckNameAvailabilityOptions contains the optional parameters for the ServicesClient.CheckNameAvailability method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Services_CheckNameAvailability.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewServicesClient().CheckNameAvailability(ctx, "eastus", armappplatform.NameAvailabilityParameters{
		Name: to.Ptr("myservice"),
		Type: to.Ptr("Microsoft.AppPlatform/Spring"),
	}, 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.NameAvailability = armappplatform.NameAvailability{
	// 	Message: to.Ptr("The name is already used."),
	// 	NameAvailable: to.Ptr(false),
	// 	Reason: to.Ptr("AlreadyExists"),
	// }
}
Output:

func (*ServicesClient) DisableTestEndpoint

func (client *ServicesClient) DisableTestEndpoint(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientDisableTestEndpointOptions) (ServicesClientDisableTestEndpointResponse, error)

DisableTestEndpoint - Disable test endpoint functionality for a Service. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • options - ServicesClientDisableTestEndpointOptions contains the optional parameters for the ServicesClient.DisableTestEndpoint method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Services_DisableTestEndpoint.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewServicesClient().DisableTestEndpoint(ctx, "myResourceGroup", "myservice", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ServicesClient) EnableTestEndpoint

func (client *ServicesClient) EnableTestEndpoint(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientEnableTestEndpointOptions) (ServicesClientEnableTestEndpointResponse, error)

EnableTestEndpoint - Enable test endpoint functionality for a Service. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • options - ServicesClientEnableTestEndpointOptions contains the optional parameters for the ServicesClient.EnableTestEndpoint method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Services_EnableTestEndpoint.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewServicesClient().EnableTestEndpoint(ctx, "myResourceGroup", "myservice", 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.TestKeys = armappplatform.TestKeys{
	// 	Enabled: to.Ptr(true),
	// 	PrimaryKey: to.Ptr("<primaryKey>"),
	// 	PrimaryTestEndpoint: to.Ptr("<primaryTestEndpoint>"),
	// 	SecondaryKey: to.Ptr("<secondaryKey>"),
	// 	SecondaryTestEndpoint: to.Ptr("<secondaryTestEndpoint>"),
	// }
}
Output:

func (*ServicesClient) Get

func (client *ServicesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientGetOptions) (ServicesClientGetResponse, error)

Get - Get a Service and its properties. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • options - ServicesClientGetOptions contains the optional parameters for the ServicesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Services_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewServicesClient().Get(ctx, "myResourceGroup", "myservice", 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.ServiceResource = armappplatform.ServiceResource{
	// 	Name: to.Ptr("myservice"),
	// 	Type: to.Ptr("Microsoft.AppPlatform/Spring"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice"),
	// 	SystemData: &armappplatform.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
	// 		CreatedBy: to.Ptr("sample-user"),
	// 		CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("sample-user"),
	// 		LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
	// 	},
	// 	Location: to.Ptr("eastus"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Properties: &armappplatform.ClusterResourceProperties{
	// 		NetworkProfile: &armappplatform.NetworkProfile{
	// 			OutboundIPs: &armappplatform.NetworkProfileOutboundIPs{
	// 				PublicIPs: []*string{
	// 					to.Ptr("20.39.3.173"),
	// 					to.Ptr("40.64.67.13")},
	// 				},
	// 				RequiredTraffics: []*armappplatform.RequiredTraffic{
	// 					{
	// 						Direction: to.Ptr(armappplatform.TrafficDirectionOutbound),
	// 						IPs: []*string{
	// 							to.Ptr("20.62.211.25"),
	// 							to.Ptr("52.188.47.226")},
	// 							Port: to.Ptr[int32](443),
	// 							Protocol: to.Ptr("TCP"),
	// 						},
	// 						{
	// 							Direction: to.Ptr(armappplatform.TrafficDirectionOutbound),
	// 							IPs: []*string{
	// 								to.Ptr("20.62.211.25"),
	// 								to.Ptr("52.188.47.226")},
	// 								Port: to.Ptr[int32](1194),
	// 								Protocol: to.Ptr("UDP"),
	// 							},
	// 							{
	// 								Direction: to.Ptr(armappplatform.TrafficDirectionOutbound),
	// 								IPs: []*string{
	// 									to.Ptr("20.62.211.25"),
	// 									to.Ptr("52.188.47.226")},
	// 									Port: to.Ptr[int32](9000),
	// 									Protocol: to.Ptr("TCP"),
	// 							}},
	// 						},
	// 						ProvisioningState: to.Ptr(armappplatform.ProvisioningStateSucceeded),
	// 						ServiceID: to.Ptr("12345678abcd1234abcd12345678abcd"),
	// 					},
	// 					SKU: &armappplatform.SKU{
	// 						Name: to.Ptr("S0"),
	// 						Tier: to.Ptr("Standard"),
	// 					},
	// 				}
}
Output:

func (*ServicesClient) ListTestKeys

func (client *ServicesClient) ListTestKeys(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientListTestKeysOptions) (ServicesClientListTestKeysResponse, error)

ListTestKeys - List test keys for a Service. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • options - ServicesClientListTestKeysOptions contains the optional parameters for the ServicesClient.ListTestKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Services_ListTestKeys.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewServicesClient().ListTestKeys(ctx, "myResourceGroup", "myservice", 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.TestKeys = armappplatform.TestKeys{
	// 	Enabled: to.Ptr(true),
	// 	PrimaryKey: to.Ptr("<primaryKey>"),
	// 	PrimaryTestEndpoint: to.Ptr("<primaryTestEndpoint>"),
	// 	SecondaryKey: to.Ptr("<secondaryKey>"),
	// 	SecondaryTestEndpoint: to.Ptr("<secondaryTestEndpoint>"),
	// }
}
Output:

func (*ServicesClient) NewListBySubscriptionPager added in v0.5.0

NewListBySubscriptionPager - Handles requests to list all resources in a subscription.

Generated from API version 2022-04-01

  • options - ServicesClientListBySubscriptionOptions contains the optional parameters for the ServicesClient.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Services_ListBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewServicesClient().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.ServiceResourceList = armappplatform.ServiceResourceList{
		// 	Value: []*armappplatform.ServiceResource{
		// 		{
		// 			Name: to.Ptr("myservice"),
		// 			Type: to.Ptr("Microsoft.AppPlatform/Spring"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice"),
		// 			SystemData: &armappplatform.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
		// 				CreatedBy: to.Ptr("sample-user"),
		// 				CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("sample-user"),
		// 				LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
		// 			},
		// 			Location: to.Ptr("eastus"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Properties: &armappplatform.ClusterResourceProperties{
		// 				NetworkProfile: &armappplatform.NetworkProfile{
		// 					OutboundIPs: &armappplatform.NetworkProfileOutboundIPs{
		// 						PublicIPs: []*string{
		// 							to.Ptr("20.39.3.173"),
		// 							to.Ptr("40.64.67.13")},
		// 						},
		// 						RequiredTraffics: []*armappplatform.RequiredTraffic{
		// 							{
		// 								Direction: to.Ptr(armappplatform.TrafficDirectionOutbound),
		// 								IPs: []*string{
		// 									to.Ptr("20.62.211.25"),
		// 									to.Ptr("52.188.47.226")},
		// 									Port: to.Ptr[int32](443),
		// 									Protocol: to.Ptr("TCP"),
		// 								},
		// 								{
		// 									Direction: to.Ptr(armappplatform.TrafficDirectionOutbound),
		// 									IPs: []*string{
		// 										to.Ptr("20.62.211.25"),
		// 										to.Ptr("52.188.47.226")},
		// 										Port: to.Ptr[int32](1194),
		// 										Protocol: to.Ptr("UDP"),
		// 									},
		// 									{
		// 										Direction: to.Ptr(armappplatform.TrafficDirectionOutbound),
		// 										IPs: []*string{
		// 											to.Ptr("20.62.211.25"),
		// 											to.Ptr("52.188.47.226")},
		// 											Port: to.Ptr[int32](9000),
		// 											Protocol: to.Ptr("TCP"),
		// 									}},
		// 								},
		// 								ProvisioningState: to.Ptr(armappplatform.ProvisioningStateSucceeded),
		// 								ServiceID: to.Ptr("12345678abcd1234abcd12345678abcd"),
		// 							},
		// 							SKU: &armappplatform.SKU{
		// 								Name: to.Ptr("S0"),
		// 								Tier: to.Ptr("Standard"),
		// 							},
		// 					}},
		// 				}
	}
}
Output:

func (*ServicesClient) NewListPager added in v0.5.0

func (client *ServicesClient) NewListPager(resourceGroupName string, options *ServicesClientListOptions) *runtime.Pager[ServicesClientListResponse]

NewListPager - Handles requests to list all resources in a resource group.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • options - ServicesClientListOptions contains the optional parameters for the ServicesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Services_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewServicesClient().NewListPager("myResourceGroup", 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.ServiceResourceList = armappplatform.ServiceResourceList{
		// 	Value: []*armappplatform.ServiceResource{
		// 		{
		// 			Name: to.Ptr("myservice"),
		// 			Type: to.Ptr("Microsoft.AppPlatform/Spring"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice"),
		// 			SystemData: &armappplatform.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:16:03.944Z"); return t}()),
		// 				CreatedBy: to.Ptr("sample-user"),
		// 				CreatedByType: to.Ptr(armappplatform.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-11T03:17:03.944Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("sample-user"),
		// 				LastModifiedByType: to.Ptr(armappplatform.LastModifiedByTypeUser),
		// 			},
		// 			Location: to.Ptr("eastus"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Properties: &armappplatform.ClusterResourceProperties{
		// 				NetworkProfile: &armappplatform.NetworkProfile{
		// 					OutboundIPs: &armappplatform.NetworkProfileOutboundIPs{
		// 						PublicIPs: []*string{
		// 							to.Ptr("20.39.3.173"),
		// 							to.Ptr("40.64.67.13")},
		// 						},
		// 						RequiredTraffics: []*armappplatform.RequiredTraffic{
		// 							{
		// 								Direction: to.Ptr(armappplatform.TrafficDirectionOutbound),
		// 								IPs: []*string{
		// 									to.Ptr("20.62.211.25"),
		// 									to.Ptr("52.188.47.226")},
		// 									Port: to.Ptr[int32](443),
		// 									Protocol: to.Ptr("TCP"),
		// 								},
		// 								{
		// 									Direction: to.Ptr(armappplatform.TrafficDirectionOutbound),
		// 									IPs: []*string{
		// 										to.Ptr("20.62.211.25"),
		// 										to.Ptr("52.188.47.226")},
		// 										Port: to.Ptr[int32](1194),
		// 										Protocol: to.Ptr("UDP"),
		// 									},
		// 									{
		// 										Direction: to.Ptr(armappplatform.TrafficDirectionOutbound),
		// 										IPs: []*string{
		// 											to.Ptr("20.62.211.25"),
		// 											to.Ptr("52.188.47.226")},
		// 											Port: to.Ptr[int32](9000),
		// 											Protocol: to.Ptr("TCP"),
		// 									}},
		// 								},
		// 								ProvisioningState: to.Ptr(armappplatform.ProvisioningStateSucceeded),
		// 								ServiceID: to.Ptr("12345678abcd1234abcd12345678abcd"),
		// 							},
		// 							SKU: &armappplatform.SKU{
		// 								Name: to.Ptr("S0"),
		// 								Tier: to.Ptr("Standard"),
		// 							},
		// 					}},
		// 				}
	}
}
Output:

func (*ServicesClient) RegenerateTestKey

func (client *ServicesClient) RegenerateTestKey(ctx context.Context, resourceGroupName string, serviceName string, regenerateTestKeyRequest RegenerateTestKeyRequestPayload, options *ServicesClientRegenerateTestKeyOptions) (ServicesClientRegenerateTestKeyResponse, error)

RegenerateTestKey - Regenerate a test key for a Service. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
  • serviceName - The name of the Service resource.
  • regenerateTestKeyRequest - Parameters for the operation
  • options - ServicesClientRegenerateTestKeyOptions contains the optional parameters for the ServicesClient.RegenerateTestKey method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-04-01/examples/Services_RegenerateTestKey.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/appplatform/armappplatform"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewServicesClient().RegenerateTestKey(ctx, "myResourceGroup", "myservice", armappplatform.RegenerateTestKeyRequestPayload{
		KeyType: to.Ptr(armappplatform.TestKeyTypePrimary),
	}, 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.TestKeys = armappplatform.TestKeys{
	// 	Enabled: to.Ptr(true),
	// 	PrimaryKey: to.Ptr("<primaryKey>"),
	// 	PrimaryTestEndpoint: to.Ptr("<primaryTestEndpoint>"),
	// 	SecondaryKey: to.Ptr("<secondaryKey>"),
	// 	SecondaryTestEndpoint: to.Ptr("<secondaryTestEndpoint>"),
	// }
}
Output:

type ServicesClientBeginCreateOrUpdateOptions added in v0.3.0

type ServicesClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServicesClient.BeginCreateOrUpdate method.

type ServicesClientBeginDeleteOptions added in v0.3.0

type ServicesClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ServicesClientBeginDeleteOptions contains the optional parameters for the ServicesClient.BeginDelete method.

type ServicesClientBeginUpdateOptions added in v0.3.0

type ServicesClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ServicesClientBeginUpdateOptions contains the optional parameters for the ServicesClient.BeginUpdate method.

type ServicesClientCheckNameAvailabilityOptions added in v0.3.0

type ServicesClientCheckNameAvailabilityOptions struct {
}

ServicesClientCheckNameAvailabilityOptions contains the optional parameters for the ServicesClient.CheckNameAvailability method.

type ServicesClientCheckNameAvailabilityResponse added in v0.3.0

type ServicesClientCheckNameAvailabilityResponse struct {
	// Name availability result payload
	NameAvailability
}

ServicesClientCheckNameAvailabilityResponse contains the response from method ServicesClient.CheckNameAvailability.

type ServicesClientCreateOrUpdateResponse added in v0.3.0

type ServicesClientCreateOrUpdateResponse struct {
	// Service resource
	ServiceResource
}

ServicesClientCreateOrUpdateResponse contains the response from method ServicesClient.BeginCreateOrUpdate.

type ServicesClientDeleteResponse added in v0.3.0

type ServicesClientDeleteResponse struct {
}

ServicesClientDeleteResponse contains the response from method ServicesClient.BeginDelete.

type ServicesClientDisableTestEndpointOptions added in v0.3.0

type ServicesClientDisableTestEndpointOptions struct {
}

ServicesClientDisableTestEndpointOptions contains the optional parameters for the ServicesClient.DisableTestEndpoint method.

type ServicesClientDisableTestEndpointResponse added in v0.3.0

type ServicesClientDisableTestEndpointResponse struct {
}

ServicesClientDisableTestEndpointResponse contains the response from method ServicesClient.DisableTestEndpoint.

type ServicesClientEnableTestEndpointOptions added in v0.3.0

type ServicesClientEnableTestEndpointOptions struct {
}

ServicesClientEnableTestEndpointOptions contains the optional parameters for the ServicesClient.EnableTestEndpoint method.

type ServicesClientEnableTestEndpointResponse added in v0.3.0

type ServicesClientEnableTestEndpointResponse struct {
	// Test keys payload
	TestKeys
}

ServicesClientEnableTestEndpointResponse contains the response from method ServicesClient.EnableTestEndpoint.

type ServicesClientGetOptions added in v0.3.0

type ServicesClientGetOptions struct {
}

ServicesClientGetOptions contains the optional parameters for the ServicesClient.Get method.

type ServicesClientGetResponse added in v0.3.0

type ServicesClientGetResponse struct {
	// Service resource
	ServiceResource
}

ServicesClientGetResponse contains the response from method ServicesClient.Get.

type ServicesClientListBySubscriptionOptions added in v0.3.0

type ServicesClientListBySubscriptionOptions struct {
}

ServicesClientListBySubscriptionOptions contains the optional parameters for the ServicesClient.NewListBySubscriptionPager method.

type ServicesClientListBySubscriptionResponse added in v0.3.0

type ServicesClientListBySubscriptionResponse struct {
	// Object that includes an array of Service resources and a possible link for next set
	ServiceResourceList
}

ServicesClientListBySubscriptionResponse contains the response from method ServicesClient.NewListBySubscriptionPager.

type ServicesClientListOptions added in v0.3.0

type ServicesClientListOptions struct {
}

ServicesClientListOptions contains the optional parameters for the ServicesClient.NewListPager method.

type ServicesClientListResponse added in v0.3.0

type ServicesClientListResponse struct {
	// Object that includes an array of Service resources and a possible link for next set
	ServiceResourceList
}

ServicesClientListResponse contains the response from method ServicesClient.NewListPager.

type ServicesClientListTestKeysOptions added in v0.3.0

type ServicesClientListTestKeysOptions struct {
}

ServicesClientListTestKeysOptions contains the optional parameters for the ServicesClient.ListTestKeys method.

type ServicesClientListTestKeysResponse added in v0.3.0

type ServicesClientListTestKeysResponse struct {
	// Test keys payload
	TestKeys
}

ServicesClientListTestKeysResponse contains the response from method ServicesClient.ListTestKeys.

type ServicesClientRegenerateTestKeyOptions added in v0.3.0

type ServicesClientRegenerateTestKeyOptions struct {
}

ServicesClientRegenerateTestKeyOptions contains the optional parameters for the ServicesClient.RegenerateTestKey method.

type ServicesClientRegenerateTestKeyResponse added in v0.3.0

type ServicesClientRegenerateTestKeyResponse struct {
	// Test keys payload
	TestKeys
}

ServicesClientRegenerateTestKeyResponse contains the response from method ServicesClient.RegenerateTestKey.

type ServicesClientUpdateResponse added in v0.3.0

type ServicesClientUpdateResponse struct {
	// Service resource
	ServiceResource
}

ServicesClientUpdateResponse contains the response from method ServicesClient.BeginUpdate.

type SourceUploadedUserSourceInfo added in v0.3.0

type SourceUploadedUserSourceInfo struct {
	// REQUIRED; Type of the source uploaded
	Type *string

	// Selector for the artifact to be used for the deployment for multi-module projects. This should be the relative path to
	// the target module/project.
	ArtifactSelector *string

	// Relative path of the storage which stores the source
	RelativePath *string

	// Runtime version of the source file
	RuntimeVersion *string

	// Version of the source
	Version *string
}

SourceUploadedUserSourceInfo - Uploaded Java source code binary for a deployment

func (*SourceUploadedUserSourceInfo) GetUploadedUserSourceInfo added in v0.3.0

func (s *SourceUploadedUserSourceInfo) GetUploadedUserSourceInfo() *UploadedUserSourceInfo

GetUploadedUserSourceInfo implements the UploadedUserSourceInfoClassification interface for type SourceUploadedUserSourceInfo.

func (*SourceUploadedUserSourceInfo) GetUserSourceInfo added in v0.3.0

func (s *SourceUploadedUserSourceInfo) GetUserSourceInfo() *UserSourceInfo

GetUserSourceInfo implements the UserSourceInfoClassification interface for type SourceUploadedUserSourceInfo.

func (SourceUploadedUserSourceInfo) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type SourceUploadedUserSourceInfo.

func (*SourceUploadedUserSourceInfo) UnmarshalJSON added in v0.3.0

func (s *SourceUploadedUserSourceInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SourceUploadedUserSourceInfo.

type StackProperties added in v0.3.0

type StackProperties struct {
	// Id of the ClusterStack.
	ID *string

	// Version of the ClusterStack
	Version *string
}

StackProperties - KPack ClusterStack properties payload

func (StackProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type StackProperties.

func (*StackProperties) UnmarshalJSON added in v1.1.0

func (s *StackProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StackProperties.

type SupportedBuildpackResource added in v0.3.0

type SupportedBuildpackResource struct {
	// Supported buildpack resource properties
	Properties *SupportedBuildpackResourceProperties

	// READ-ONLY; Fully qualified resource Id for the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource.
	Type *string
}

SupportedBuildpackResource - Supported buildpack resource payload

func (SupportedBuildpackResource) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SupportedBuildpackResource.

func (*SupportedBuildpackResource) UnmarshalJSON added in v1.1.0

func (s *SupportedBuildpackResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SupportedBuildpackResource.

type SupportedBuildpackResourceProperties added in v0.3.0

type SupportedBuildpackResourceProperties struct {
	// The id of supported buildpack
	BuildpackID *string
}

SupportedBuildpackResourceProperties - Supported buildpack resource properties

func (SupportedBuildpackResourceProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SupportedBuildpackResourceProperties.

func (*SupportedBuildpackResourceProperties) UnmarshalJSON added in v1.1.0

func (s *SupportedBuildpackResourceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SupportedBuildpackResourceProperties.

type SupportedBuildpacksCollection added in v0.3.0

type SupportedBuildpacksCollection struct {
	// URL client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string

	// Collection of supported buildpacks resources
	Value []*SupportedBuildpackResource
}

SupportedBuildpacksCollection - Object that includes an array of supported buildpacks resources and a possible link for next set

func (SupportedBuildpacksCollection) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type SupportedBuildpacksCollection.

func (*SupportedBuildpacksCollection) UnmarshalJSON added in v1.1.0

func (s *SupportedBuildpacksCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SupportedBuildpacksCollection.

type SupportedRuntimePlatform

type SupportedRuntimePlatform string

SupportedRuntimePlatform - The platform of this runtime version (possible values: "Java" or ".NET").

const (
	SupportedRuntimePlatformJava    SupportedRuntimePlatform = "Java"
	SupportedRuntimePlatformNETCore SupportedRuntimePlatform = ".NET Core"
)

func PossibleSupportedRuntimePlatformValues

func PossibleSupportedRuntimePlatformValues() []SupportedRuntimePlatform

PossibleSupportedRuntimePlatformValues returns the possible values for the SupportedRuntimePlatform const type.

type SupportedRuntimeValue

type SupportedRuntimeValue string

SupportedRuntimeValue - The raw value which could be passed to deployment CRUD operations.

const (
	SupportedRuntimeValueJava11    SupportedRuntimeValue = "Java_11"
	SupportedRuntimeValueJava17    SupportedRuntimeValue = "Java_17"
	SupportedRuntimeValueJava8     SupportedRuntimeValue = "Java_8"
	SupportedRuntimeValueNetCore31 SupportedRuntimeValue = "NetCore_31"
)

func PossibleSupportedRuntimeValueValues

func PossibleSupportedRuntimeValueValues() []SupportedRuntimeValue

PossibleSupportedRuntimeValueValues returns the possible values for the SupportedRuntimeValue const type.

type SupportedRuntimeVersion

type SupportedRuntimeVersion struct {
	// The platform of this runtime version (possible values: "Java" or ".NET").
	Platform *SupportedRuntimePlatform

	// The raw value which could be passed to deployment CRUD operations.
	Value *SupportedRuntimeValue

	// The detailed version (major.minor) of the platform.
	Version *string
}

SupportedRuntimeVersion - Supported deployment runtime version descriptor.

func (SupportedRuntimeVersion) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SupportedRuntimeVersion.

func (*SupportedRuntimeVersion) UnmarshalJSON added in v1.1.0

func (s *SupportedRuntimeVersion) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SupportedRuntimeVersion.

type SupportedStackResource added in v0.3.0

type SupportedStackResource struct {
	// Supported stack resource properties
	Properties *SupportedStackResourceProperties

	// READ-ONLY; Fully qualified resource Id for the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource.
	Type *string
}

SupportedStackResource - Supported stack resource payload

func (SupportedStackResource) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SupportedStackResource.

func (*SupportedStackResource) UnmarshalJSON added in v1.1.0

func (s *SupportedStackResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SupportedStackResource.

type SupportedStackResourceProperties added in v0.3.0

type SupportedStackResourceProperties struct {
	// The id of supported stack
	StackID *string

	// The version of supported stack
	Version *string
}

SupportedStackResourceProperties - Supported stack resource properties

func (SupportedStackResourceProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SupportedStackResourceProperties.

func (*SupportedStackResourceProperties) UnmarshalJSON added in v1.1.0

func (s *SupportedStackResourceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SupportedStackResourceProperties.

type SupportedStacksCollection added in v0.3.0

type SupportedStacksCollection struct {
	// URL client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string

	// Collection of supported stacks resources
	Value []*SupportedStackResource
}

SupportedStacksCollection - Object that includes an array of supported stacks resources and a possible link for next set

func (SupportedStacksCollection) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type SupportedStacksCollection.

func (*SupportedStacksCollection) UnmarshalJSON added in v1.1.0

func (s *SupportedStacksCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SupportedStacksCollection.

type SystemData added in v0.2.0

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 modification (UTC).
	LastModifiedAt *time.Time

	// The identity that last modified the resource.
	LastModifiedBy *string

	// The type of identity that last modified the resource.
	LastModifiedByType *LastModifiedByType
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON added in v0.2.0

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type TemporaryDisk

type TemporaryDisk struct {
	// Mount path of the temporary disk
	MountPath *string

	// Size of the temporary disk in GB
	SizeInGB *int32
}

TemporaryDisk - Temporary disk payload

func (TemporaryDisk) MarshalJSON added in v1.1.0

func (t TemporaryDisk) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TemporaryDisk.

func (*TemporaryDisk) UnmarshalJSON added in v1.1.0

func (t *TemporaryDisk) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TemporaryDisk.

type TestKeyType

type TestKeyType string

TestKeyType - Type of the test key

const (
	TestKeyTypePrimary   TestKeyType = "Primary"
	TestKeyTypeSecondary TestKeyType = "Secondary"
)

func PossibleTestKeyTypeValues

func PossibleTestKeyTypeValues() []TestKeyType

PossibleTestKeyTypeValues returns the possible values for the TestKeyType const type.

type TestKeys

type TestKeys struct {
	// Indicates whether the test endpoint feature enabled or not
	Enabled *bool

	// Primary key
	PrimaryKey *string

	// Primary test endpoint
	PrimaryTestEndpoint *string

	// Secondary key
	SecondaryKey *string

	// Secondary test endpoint
	SecondaryTestEndpoint *string
}

TestKeys - Test keys payload

func (TestKeys) MarshalJSON added in v1.1.0

func (t TestKeys) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TestKeys.

func (*TestKeys) UnmarshalJSON added in v1.1.0

func (t *TestKeys) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TestKeys.

type TrackedResource

type TrackedResource struct {
	// The GEO location of the resource.
	Location *string

	// Tags of the service which is a list of key value pairs that describe the resource.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource Id for the resource.
	ID *string

	// READ-ONLY; The name of the resource.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource.
	Type *string
}

TrackedResource - The resource model definition for a ARM tracked top level resource.

func (TrackedResource) MarshalJSON

func (t TrackedResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TrackedResource.

func (*TrackedResource) UnmarshalJSON added in v0.2.0

func (t *TrackedResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.

type TrafficDirection

type TrafficDirection string

TrafficDirection - The direction of required traffic

const (
	TrafficDirectionInbound  TrafficDirection = "Inbound"
	TrafficDirectionOutbound TrafficDirection = "Outbound"
)

func PossibleTrafficDirectionValues

func PossibleTrafficDirectionValues() []TrafficDirection

PossibleTrafficDirectionValues returns the possible values for the TrafficDirection const type.

type TriggeredBuildResult added in v0.3.0

type TriggeredBuildResult struct {
	// The unique build id of this build result
	ID *string
}

TriggeredBuildResult - The build result triggered by a build

func (TriggeredBuildResult) MarshalJSON added in v1.1.0

func (t TriggeredBuildResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TriggeredBuildResult.

func (*TriggeredBuildResult) UnmarshalJSON added in v1.1.0

func (t *TriggeredBuildResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TriggeredBuildResult.

type UploadedUserSourceInfo added in v0.3.0

type UploadedUserSourceInfo struct {
	// REQUIRED; Type of the source uploaded
	Type *string

	// Relative path of the storage which stores the source
	RelativePath *string

	// Version of the source
	Version *string
}

UploadedUserSourceInfo - Source with uploaded location

func (*UploadedUserSourceInfo) GetUploadedUserSourceInfo added in v0.3.0

func (u *UploadedUserSourceInfo) GetUploadedUserSourceInfo() *UploadedUserSourceInfo

GetUploadedUserSourceInfo implements the UploadedUserSourceInfoClassification interface for type UploadedUserSourceInfo.

func (*UploadedUserSourceInfo) GetUserSourceInfo added in v0.3.0

func (u *UploadedUserSourceInfo) GetUserSourceInfo() *UserSourceInfo

GetUserSourceInfo implements the UserSourceInfoClassification interface for type UploadedUserSourceInfo.

func (UploadedUserSourceInfo) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type UploadedUserSourceInfo.

func (*UploadedUserSourceInfo) UnmarshalJSON added in v0.3.0

func (u *UploadedUserSourceInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UploadedUserSourceInfo.

type UploadedUserSourceInfoClassification added in v0.3.0

type UploadedUserSourceInfoClassification interface {
	UserSourceInfoClassification
	// GetUploadedUserSourceInfo returns the UploadedUserSourceInfo content of the underlying type.
	GetUploadedUserSourceInfo() *UploadedUserSourceInfo
}

UploadedUserSourceInfoClassification provides polymorphic access to related types. Call the interface's GetUploadedUserSourceInfo() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *JarUploadedUserSourceInfo, *NetCoreZipUploadedUserSourceInfo, *SourceUploadedUserSourceInfo, *UploadedUserSourceInfo

type UserSourceInfo

type UserSourceInfo struct {
	// REQUIRED; Type of the source uploaded
	Type *string

	// Version of the source
	Version *string
}

UserSourceInfo - Source information for a deployment

func (*UserSourceInfo) GetUserSourceInfo added in v0.3.0

func (u *UserSourceInfo) GetUserSourceInfo() *UserSourceInfo

GetUserSourceInfo implements the UserSourceInfoClassification interface for type UserSourceInfo.

func (UserSourceInfo) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type UserSourceInfo.

func (*UserSourceInfo) UnmarshalJSON added in v1.1.0

func (u *UserSourceInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserSourceInfo.

type UserSourceInfoClassification added in v0.3.0

type UserSourceInfoClassification interface {
	// GetUserSourceInfo returns the UserSourceInfo content of the underlying type.
	GetUserSourceInfo() *UserSourceInfo
}

UserSourceInfoClassification provides polymorphic access to related types. Call the interface's GetUserSourceInfo() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *BuildResultUserSourceInfo, *JarUploadedUserSourceInfo, *NetCoreZipUploadedUserSourceInfo, *SourceUploadedUserSourceInfo, - *UploadedUserSourceInfo, *UserSourceInfo

type ValidationMessages added in v0.3.0

type ValidationMessages struct {
	// Detailed validation messages.
	Messages []*string

	// The name of the configuration service git repository.
	Name *string
}

ValidationMessages - Validate messages of the configuration service git repositories

func (ValidationMessages) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type ValidationMessages.

func (*ValidationMessages) UnmarshalJSON added in v1.1.0

func (v *ValidationMessages) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ValidationMessages.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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