armdevcenter

package module
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 15 Imported by: 0

README

Azure Dev Center Module for Go

PkgGoDev

The armdevcenter module provides operations for working with Azure Dev Center.

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 Dev Center module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devcenter/armdevcenter/v2

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Dev Center. 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 Dev Center 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 := armdevcenter.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 := armdevcenter.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.NewAttachedNetworksClient()

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 Dev Center 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

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

func PossibleActionTypeValues() []ActionType

PossibleActionTypeValues returns the possible values for the ActionType const type.

type AllowedEnvironmentType

type AllowedEnvironmentType struct {
	// Properties of an allowed environment type.
	Properties *AllowedEnvironmentTypeProperties

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

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

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

AllowedEnvironmentType - Represents an allowed environment type.

func (AllowedEnvironmentType) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AllowedEnvironmentType.

func (*AllowedEnvironmentType) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AllowedEnvironmentType.

type AllowedEnvironmentTypeListResult

type AllowedEnvironmentTypeListResult struct {
	// READ-ONLY; URL to get the next set of results if there are any.
	NextLink *string

	// READ-ONLY; Current page of results.
	Value []*AllowedEnvironmentType
}

AllowedEnvironmentTypeListResult - Result of the allowed environment type list operation.

func (AllowedEnvironmentTypeListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AllowedEnvironmentTypeListResult.

func (*AllowedEnvironmentTypeListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AllowedEnvironmentTypeListResult.

type AllowedEnvironmentTypeProperties

type AllowedEnvironmentTypeProperties struct {
	// READ-ONLY; The display name of the allowed environment type.
	DisplayName *string

	// READ-ONLY; The provisioning state of the resource.
	ProvisioningState *ProvisioningState
}

AllowedEnvironmentTypeProperties - Properties of an allowed environment type.

func (AllowedEnvironmentTypeProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AllowedEnvironmentTypeProperties.

func (*AllowedEnvironmentTypeProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AllowedEnvironmentTypeProperties.

type AttachedNetworkConnection

type AttachedNetworkConnection struct {
	// Attached NetworkConnection properties.
	Properties *AttachedNetworkConnectionProperties

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

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

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

AttachedNetworkConnection - Represents an attached NetworkConnection.

func (AttachedNetworkConnection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AttachedNetworkConnection.

func (*AttachedNetworkConnection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AttachedNetworkConnection.

type AttachedNetworkConnectionProperties

type AttachedNetworkConnectionProperties struct {
	// REQUIRED; The resource ID of the NetworkConnection you want to attach.
	NetworkConnectionID *string

	// READ-ONLY; AAD Join type of the network. This is populated based on the referenced Network Connection.
	DomainJoinType *DomainJoinType

	// READ-ONLY; Health check status values
	HealthCheckStatus *HealthCheckStatus

	// READ-ONLY; The geo-location where the NetworkConnection resource specified in 'networkConnectionResourceId' property lives.
	NetworkConnectionLocation *string

	// READ-ONLY; The provisioning state of the resource.
	ProvisioningState *ProvisioningState
}

AttachedNetworkConnectionProperties - Properties of an attached NetworkConnection.

func (AttachedNetworkConnectionProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AttachedNetworkConnectionProperties.

func (*AttachedNetworkConnectionProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AttachedNetworkConnectionProperties.

type AttachedNetworkListResult

type AttachedNetworkListResult struct {
	// READ-ONLY; URL to get the next set of results if there are any.
	NextLink *string

	// READ-ONLY; Current page of results.
	Value []*AttachedNetworkConnection
}

AttachedNetworkListResult - Results of the Attached Networks list operation.

func (AttachedNetworkListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AttachedNetworkListResult.

func (*AttachedNetworkListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AttachedNetworkListResult.

type AttachedNetworksClient

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

AttachedNetworksClient contains the methods for the AttachedNetworks group. Don't use this type directly, use NewAttachedNetworksClient() instead.

func NewAttachedNetworksClient

func NewAttachedNetworksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AttachedNetworksClient, error)

NewAttachedNetworksClient creates a new instance of AttachedNetworksClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*AttachedNetworksClient) BeginCreateOrUpdate

func (client *AttachedNetworksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, devCenterName string, attachedNetworkConnectionName string, body AttachedNetworkConnection, options *AttachedNetworksClientBeginCreateOrUpdateOptions) (*runtime.Poller[AttachedNetworksClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates an attached NetworkConnection. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • attachedNetworkConnectionName - The name of the attached NetworkConnection.
  • body - Represents an attached NetworkConnection.
  • options - AttachedNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the AttachedNetworksClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/AttachedNetworks_Create.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAttachedNetworksClient().BeginCreateOrUpdate(ctx, "rg1", "Contoso", "network-uswest3", armdevcenter.AttachedNetworkConnection{
	Properties: &armdevcenter.AttachedNetworkConnectionProperties{
		NetworkConnectionID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/NetworkConnections/network-uswest3"),
	},
}, 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.AttachedNetworkConnection = armdevcenter.AttachedNetworkConnection{
// 	Name: to.Ptr("network-uswest3"),
// 	Type: to.Ptr("Microsoft.DevCenter/devcenters/attachednetworks"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/attachednetworks/network-uswest3"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		CreatedBy: to.Ptr("User1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		LastModifiedBy: to.Ptr("User1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Properties: &armdevcenter.AttachedNetworkConnectionProperties{
// 		NetworkConnectionID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/NetworkConnections/network-uswest3"),
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 	},
// }
Output:

func (*AttachedNetworksClient) BeginDelete

func (client *AttachedNetworksClient) BeginDelete(ctx context.Context, resourceGroupName string, devCenterName string, attachedNetworkConnectionName string, options *AttachedNetworksClientBeginDeleteOptions) (*runtime.Poller[AttachedNetworksClientDeleteResponse], error)

BeginDelete - Un-attach a NetworkConnection. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • attachedNetworkConnectionName - The name of the attached NetworkConnection.
  • options - AttachedNetworksClientBeginDeleteOptions contains the optional parameters for the AttachedNetworksClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/AttachedNetworks_Delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAttachedNetworksClient().BeginDelete(ctx, "rg1", "Contoso", "network-uswest3", 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 (*AttachedNetworksClient) GetByDevCenter

func (client *AttachedNetworksClient) GetByDevCenter(ctx context.Context, resourceGroupName string, devCenterName string, attachedNetworkConnectionName string, options *AttachedNetworksClientGetByDevCenterOptions) (AttachedNetworksClientGetByDevCenterResponse, error)

GetByDevCenter - Gets an attached NetworkConnection. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • attachedNetworkConnectionName - The name of the attached NetworkConnection.
  • options - AttachedNetworksClientGetByDevCenterOptions contains the optional parameters for the AttachedNetworksClient.GetByDevCenter method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/AttachedNetworks_GetByDevCenter.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAttachedNetworksClient().GetByDevCenter(ctx, "rg1", "Contoso", "network-uswest3", 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.AttachedNetworkConnection = armdevcenter.AttachedNetworkConnection{
// 	Name: to.Ptr("network-uswest3"),
// 	Type: to.Ptr("Microsoft.DevCenter/devcenters/attachednetworks"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/attachednetworks/network-uswest3"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		CreatedBy: to.Ptr("User1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		LastModifiedBy: to.Ptr("User1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Properties: &armdevcenter.AttachedNetworkConnectionProperties{
// 		HealthCheckStatus: to.Ptr(armdevcenter.HealthCheckStatus("Healthy")),
// 		NetworkConnectionID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/NetworkConnections/network-uswest3"),
// 		NetworkConnectionLocation: to.Ptr("centralus"),
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 	},
// }
Output:

func (*AttachedNetworksClient) GetByProject

func (client *AttachedNetworksClient) GetByProject(ctx context.Context, resourceGroupName string, projectName string, attachedNetworkConnectionName string, options *AttachedNetworksClientGetByProjectOptions) (AttachedNetworksClientGetByProjectResponse, error)

GetByProject - Gets an attached NetworkConnection. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • attachedNetworkConnectionName - The name of the attached NetworkConnection.
  • options - AttachedNetworksClientGetByProjectOptions contains the optional parameters for the AttachedNetworksClient.GetByProject method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/AttachedNetworks_GetByProject.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAttachedNetworksClient().GetByProject(ctx, "rg1", "DevProject", "network-uswest3", 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.AttachedNetworkConnection = armdevcenter.AttachedNetworkConnection{
// 	Name: to.Ptr("network-uswest3"),
// 	Type: to.Ptr("Microsoft.DevCenter/projects/attachednetworks"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject/attachednetworks/network-uswest3"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		CreatedBy: to.Ptr("User1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		LastModifiedBy: to.Ptr("User1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Properties: &armdevcenter.AttachedNetworkConnectionProperties{
// 		HealthCheckStatus: to.Ptr(armdevcenter.HealthCheckStatus("Healthy")),
// 		NetworkConnectionID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/NetworkConnections/network-uswest3"),
// 		NetworkConnectionLocation: to.Ptr("centralus"),
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 	},
// }
Output:

func (*AttachedNetworksClient) NewListByDevCenterPager

func (client *AttachedNetworksClient) NewListByDevCenterPager(resourceGroupName string, devCenterName string, options *AttachedNetworksClientListByDevCenterOptions) *runtime.Pager[AttachedNetworksClientListByDevCenterResponse]

NewListByDevCenterPager - Lists the attached NetworkConnections for a DevCenter.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • options - AttachedNetworksClientListByDevCenterOptions contains the optional parameters for the AttachedNetworksClient.NewListByDevCenterPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/AttachedNetworks_ListByDevCenter.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAttachedNetworksClient().NewListByDevCenterPager("rg1", "Contoso", &armdevcenter.AttachedNetworksClientListByDevCenterOptions{Top: 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.AttachedNetworkListResult = armdevcenter.AttachedNetworkListResult{
	// 	Value: []*armdevcenter.AttachedNetworkConnection{
	// 		{
	// 			Name: to.Ptr("netmap1"),
	// 			Type: to.Ptr("Microsoft.DevCenter/devcenters/attachedNetworks"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/attachednetworks/netmap1"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
	// 				CreatedBy: to.Ptr("User1"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeApplication),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("User1"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeApplication),
	// 			},
	// 			Properties: &armdevcenter.AttachedNetworkConnectionProperties{
	// 				HealthCheckStatus: to.Ptr(armdevcenter.HealthCheckStatus("Healthy")),
	// 				NetworkConnectionID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/NetworkConnections/network-uswest3"),
	// 				NetworkConnectionLocation: to.Ptr("centralus"),
	// 				ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("netmap2"),
	// 			Type: to.Ptr("Microsoft.DevCenter/devcenters/attachedNetworks"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/attachednetworks/netmap2"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
	// 				CreatedBy: to.Ptr("User1"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("User1"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 			},
	// 			Properties: &armdevcenter.AttachedNetworkConnectionProperties{
	// 				HealthCheckStatus: to.Ptr(armdevcenter.HealthCheckStatus("Healthy")),
	// 				NetworkConnectionID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/networkconnections/network-uswest3"),
	// 				NetworkConnectionLocation: to.Ptr("centralus"),
	// 				ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
	// 			},
	// 	}},
	// }
}
Output:

func (*AttachedNetworksClient) NewListByProjectPager

func (client *AttachedNetworksClient) NewListByProjectPager(resourceGroupName string, projectName string, options *AttachedNetworksClientListByProjectOptions) *runtime.Pager[AttachedNetworksClientListByProjectResponse]

NewListByProjectPager - Lists the attached NetworkConnections for a Project.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • options - AttachedNetworksClientListByProjectOptions contains the optional parameters for the AttachedNetworksClient.NewListByProjectPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/AttachedNetworks_ListByProject.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAttachedNetworksClient().NewListByProjectPager("rg1", "DevProject", &armdevcenter.AttachedNetworksClientListByProjectOptions{Top: 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.AttachedNetworkListResult = armdevcenter.AttachedNetworkListResult{
	// 	Value: []*armdevcenter.AttachedNetworkConnection{
	// 		{
	// 			Name: to.Ptr("netmap1"),
	// 			Type: to.Ptr("Microsoft.DevCenter/projects/attachedNetworks"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject/attachednetworks/netmap1"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
	// 				CreatedBy: to.Ptr("User1"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeApplication),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("User1"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeApplication),
	// 			},
	// 			Properties: &armdevcenter.AttachedNetworkConnectionProperties{
	// 				HealthCheckStatus: to.Ptr(armdevcenter.HealthCheckStatus("Healthy")),
	// 				NetworkConnectionID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/NetworkConnections/network-uswest3"),
	// 				NetworkConnectionLocation: to.Ptr("centralus"),
	// 				ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("netmap2"),
	// 			Type: to.Ptr("Microsoft.DevCenter/projects/attachedNetworks"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject/attachednetworks/netmap2"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
	// 				CreatedBy: to.Ptr("User1"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("User1"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 			},
	// 			Properties: &armdevcenter.AttachedNetworkConnectionProperties{
	// 				HealthCheckStatus: to.Ptr(armdevcenter.HealthCheckStatus("Healthy")),
	// 				NetworkConnectionID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/NetworkConnections/network-uswest3"),
	// 				NetworkConnectionLocation: to.Ptr("centralus"),
	// 				ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
	// 			},
	// 	}},
	// }
}
Output:

type AttachedNetworksClientBeginCreateOrUpdateOptions

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

AttachedNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the AttachedNetworksClient.BeginCreateOrUpdate method.

type AttachedNetworksClientBeginDeleteOptions

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

AttachedNetworksClientBeginDeleteOptions contains the optional parameters for the AttachedNetworksClient.BeginDelete method.

type AttachedNetworksClientCreateOrUpdateResponse

type AttachedNetworksClientCreateOrUpdateResponse struct {
	// Represents an attached NetworkConnection.
	AttachedNetworkConnection
}

AttachedNetworksClientCreateOrUpdateResponse contains the response from method AttachedNetworksClient.BeginCreateOrUpdate.

type AttachedNetworksClientDeleteResponse

type AttachedNetworksClientDeleteResponse struct {
}

AttachedNetworksClientDeleteResponse contains the response from method AttachedNetworksClient.BeginDelete.

type AttachedNetworksClientGetByDevCenterOptions

type AttachedNetworksClientGetByDevCenterOptions struct {
}

AttachedNetworksClientGetByDevCenterOptions contains the optional parameters for the AttachedNetworksClient.GetByDevCenter method.

type AttachedNetworksClientGetByDevCenterResponse

type AttachedNetworksClientGetByDevCenterResponse struct {
	// Represents an attached NetworkConnection.
	AttachedNetworkConnection
}

AttachedNetworksClientGetByDevCenterResponse contains the response from method AttachedNetworksClient.GetByDevCenter.

type AttachedNetworksClientGetByProjectOptions

type AttachedNetworksClientGetByProjectOptions struct {
}

AttachedNetworksClientGetByProjectOptions contains the optional parameters for the AttachedNetworksClient.GetByProject method.

type AttachedNetworksClientGetByProjectResponse

type AttachedNetworksClientGetByProjectResponse struct {
	// Represents an attached NetworkConnection.
	AttachedNetworkConnection
}

AttachedNetworksClientGetByProjectResponse contains the response from method AttachedNetworksClient.GetByProject.

type AttachedNetworksClientListByDevCenterOptions

type AttachedNetworksClientListByDevCenterOptions struct {
	// The maximum number of resources to return from the operation. Example: '$top=10'.
	Top *int32
}

AttachedNetworksClientListByDevCenterOptions contains the optional parameters for the AttachedNetworksClient.NewListByDevCenterPager method.

type AttachedNetworksClientListByDevCenterResponse

type AttachedNetworksClientListByDevCenterResponse struct {
	// Results of the Attached Networks list operation.
	AttachedNetworkListResult
}

AttachedNetworksClientListByDevCenterResponse contains the response from method AttachedNetworksClient.NewListByDevCenterPager.

type AttachedNetworksClientListByProjectOptions

type AttachedNetworksClientListByProjectOptions struct {
	// The maximum number of resources to return from the operation. Example: '$top=10'.
	Top *int32
}

AttachedNetworksClientListByProjectOptions contains the optional parameters for the AttachedNetworksClient.NewListByProjectPager method.

type AttachedNetworksClientListByProjectResponse

type AttachedNetworksClientListByProjectResponse struct {
	// Results of the Attached Networks list operation.
	AttachedNetworkListResult
}

AttachedNetworksClientListByProjectResponse contains the response from method AttachedNetworksClient.NewListByProjectPager.

type Capability

type Capability struct {
	// READ-ONLY; Name of the capability.
	Name *string

	// READ-ONLY; Value of the capability.
	Value *string
}

Capability - A name/value pair to describe a capability.

func (Capability) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Capability.

func (*Capability) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Capability.

type Catalog

type Catalog struct {
	// Catalog properties.
	Properties *CatalogProperties

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

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

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Catalog - Represents a catalog.

func (Catalog) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Catalog.

func (*Catalog) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Catalog.

type CatalogConflictError

type CatalogConflictError struct {
	// READ-ONLY; Name of the conflicting catalog item.
	Name *string

	// READ-ONLY; The path of the file that has a conflicting name.
	Path *string
}

CatalogConflictError - An individual conflict error.

func (CatalogConflictError) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CatalogConflictError.

func (*CatalogConflictError) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CatalogConflictError.

type CatalogConnectionState

type CatalogConnectionState string

CatalogConnectionState - The connection state of the catalog.

const (
	CatalogConnectionStateConnected    CatalogConnectionState = "Connected"
	CatalogConnectionStateDisconnected CatalogConnectionState = "Disconnected"
)

func PossibleCatalogConnectionStateValues

func PossibleCatalogConnectionStateValues() []CatalogConnectionState

PossibleCatalogConnectionStateValues returns the possible values for the CatalogConnectionState const type.

type CatalogErrorDetails

type CatalogErrorDetails struct {
	// An identifier for the error.
	Code *string

	// A message describing the error.
	Message *string
}

CatalogErrorDetails - Catalog error details

func (CatalogErrorDetails) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CatalogErrorDetails.

func (*CatalogErrorDetails) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CatalogErrorDetails.

type CatalogItemSyncEnableStatus

type CatalogItemSyncEnableStatus string

CatalogItemSyncEnableStatus - Catalog item sync types enable or disable status. Indicates whether project catalogs are allowed to sync catalog items under projects associated to this dev center.

const (
	CatalogItemSyncEnableStatusDisabled CatalogItemSyncEnableStatus = "Disabled"
	CatalogItemSyncEnableStatusEnabled  CatalogItemSyncEnableStatus = "Enabled"
)

func PossibleCatalogItemSyncEnableStatusValues

func PossibleCatalogItemSyncEnableStatusValues() []CatalogItemSyncEnableStatus

PossibleCatalogItemSyncEnableStatusValues returns the possible values for the CatalogItemSyncEnableStatus const type.

type CatalogItemType

type CatalogItemType string

CatalogItemType - Indicates catalog item types.

const (
	CatalogItemTypeEnvironmentDefinition CatalogItemType = "EnvironmentDefinition"
)

func PossibleCatalogItemTypeValues

func PossibleCatalogItemTypeValues() []CatalogItemType

PossibleCatalogItemTypeValues returns the possible values for the CatalogItemType const type.

type CatalogListResult

type CatalogListResult struct {
	// READ-ONLY; URL to get the next set of results if there are any.
	NextLink *string

	// READ-ONLY; Current page of results.
	Value []*Catalog
}

CatalogListResult - Results of the catalog list operation.

func (CatalogListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CatalogListResult.

func (*CatalogListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CatalogListResult.

type CatalogProperties

type CatalogProperties struct {
	// Properties for an Azure DevOps catalog type.
	AdoGit *GitCatalog

	// Properties for a GitHub catalog type.
	GitHub *GitCatalog

	// Indicates the type of sync that is configured for the catalog.
	SyncType *CatalogSyncType

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; The connection state of the catalog.
	ConnectionState *CatalogConnectionState

	// READ-ONLY; When the catalog was last connected.
	LastConnectionTime *time.Time

	// READ-ONLY; Stats of the latest synchronization.
	LastSyncStats *SyncStats

	// READ-ONLY; When the catalog was last synced.
	LastSyncTime *time.Time

	// READ-ONLY; The provisioning state of the resource.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The synchronization state of the catalog.
	SyncState *CatalogSyncState
}

CatalogProperties - Properties of a catalog.

func (CatalogProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CatalogProperties.

func (*CatalogProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CatalogProperties.

type CatalogResourceValidationErrorDetails

type CatalogResourceValidationErrorDetails struct {
	// READ-ONLY; Errors associated with resources synchronized from the catalog.
	Errors []*CatalogErrorDetails
}

CatalogResourceValidationErrorDetails - List of validator error details. Populated when changes are made to the resource or its dependent resources that impact the validity of the Catalog resource.

func (CatalogResourceValidationErrorDetails) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CatalogResourceValidationErrorDetails.

func (*CatalogResourceValidationErrorDetails) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CatalogResourceValidationErrorDetails.

type CatalogResourceValidationStatus

type CatalogResourceValidationStatus string

CatalogResourceValidationStatus - Catalog resource validation status

const (
	CatalogResourceValidationStatusFailed    CatalogResourceValidationStatus = "Failed"
	CatalogResourceValidationStatusPending   CatalogResourceValidationStatus = "Pending"
	CatalogResourceValidationStatusSucceeded CatalogResourceValidationStatus = "Succeeded"
	CatalogResourceValidationStatusUnknown   CatalogResourceValidationStatus = "Unknown"
)

func PossibleCatalogResourceValidationStatusValues

func PossibleCatalogResourceValidationStatusValues() []CatalogResourceValidationStatus

PossibleCatalogResourceValidationStatusValues returns the possible values for the CatalogResourceValidationStatus const type.

type CatalogSyncError

type CatalogSyncError struct {
	// READ-ONLY; Errors associated with the file.
	ErrorDetails []*CatalogErrorDetails

	// READ-ONLY; The path of the file the error is associated with.
	Path *string
}

CatalogSyncError - An individual synchronization error.

func (CatalogSyncError) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CatalogSyncError.

func (*CatalogSyncError) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CatalogSyncError.

type CatalogSyncState

type CatalogSyncState string

CatalogSyncState - The synchronization state of the catalog.

const (
	CatalogSyncStateCanceled   CatalogSyncState = "Canceled"
	CatalogSyncStateFailed     CatalogSyncState = "Failed"
	CatalogSyncStateInProgress CatalogSyncState = "InProgress"
	CatalogSyncStateSucceeded  CatalogSyncState = "Succeeded"
)

func PossibleCatalogSyncStateValues

func PossibleCatalogSyncStateValues() []CatalogSyncState

PossibleCatalogSyncStateValues returns the possible values for the CatalogSyncState const type.

type CatalogSyncType

type CatalogSyncType string

CatalogSyncType - Indicates the type of sync that is configured for the catalog.

const (
	CatalogSyncTypeManual    CatalogSyncType = "Manual"
	CatalogSyncTypeScheduled CatalogSyncType = "Scheduled"
)

func PossibleCatalogSyncTypeValues

func PossibleCatalogSyncTypeValues() []CatalogSyncType

PossibleCatalogSyncTypeValues returns the possible values for the CatalogSyncType const type.

type CatalogUpdate

type CatalogUpdate struct {
	// Catalog properties for update.
	Properties *CatalogUpdateProperties
}

CatalogUpdate - The catalog's properties for partial update. Properties not provided in the update request will not be changed.

func (CatalogUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CatalogUpdate.

func (*CatalogUpdate) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CatalogUpdate.

type CatalogUpdateProperties

type CatalogUpdateProperties struct {
	// Properties for an Azure DevOps catalog type.
	AdoGit *GitCatalog

	// Properties for a GitHub catalog type.
	GitHub *GitCatalog

	// Indicates the type of sync that is configured for the catalog.
	SyncType *CatalogSyncType

	// Resource tags.
	Tags map[string]*string
}

CatalogUpdateProperties - Properties of a catalog. These properties can be updated after the resource has been created.

func (CatalogUpdateProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CatalogUpdateProperties.

func (*CatalogUpdateProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CatalogUpdateProperties.

type CatalogsClient

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

CatalogsClient contains the methods for the Catalogs group. Don't use this type directly, use NewCatalogsClient() instead.

func NewCatalogsClient

func NewCatalogsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CatalogsClient, error)

NewCatalogsClient creates a new instance of CatalogsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*CatalogsClient) BeginConnect

func (client *CatalogsClient) BeginConnect(ctx context.Context, resourceGroupName string, devCenterName string, catalogName string, options *CatalogsClientBeginConnectOptions) (*runtime.Poller[CatalogsClientConnectResponse], error)

BeginConnect - Connects a catalog to enable syncing. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • catalogName - The name of the Catalog.
  • options - CatalogsClientBeginConnectOptions contains the optional parameters for the CatalogsClient.BeginConnect method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Catalogs_Connect.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewCatalogsClient().BeginConnect(ctx, "rg1", "Contoso", "CentralCatalog", 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 (*CatalogsClient) BeginCreateOrUpdate

func (client *CatalogsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, devCenterName string, catalogName string, body Catalog, options *CatalogsClientBeginCreateOrUpdateOptions) (*runtime.Poller[CatalogsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a catalog. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • catalogName - The name of the Catalog.
  • body - Represents a catalog.
  • options - CatalogsClientBeginCreateOrUpdateOptions contains the optional parameters for the CatalogsClient.BeginCreateOrUpdate method.
Example (CatalogsCreateOrUpdateAdo)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Catalogs_CreateAdo.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewCatalogsClient().BeginCreateOrUpdate(ctx, "rg1", "Contoso", "CentralCatalog", armdevcenter.Catalog{
	Properties: &armdevcenter.CatalogProperties{
		AdoGit: &armdevcenter.GitCatalog{
			Path:             to.Ptr("/templates"),
			Branch:           to.Ptr("main"),
			SecretIdentifier: to.Ptr("https://contosokv.vault.azure.net/secrets/CentralRepoPat"),
			URI:              to.Ptr("https://contoso@dev.azure.com/contoso/contosoOrg/_git/centralrepo-fakecontoso"),
		},
		SyncType: to.Ptr(armdevcenter.CatalogSyncTypeScheduled),
	},
}, 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.Catalog = armdevcenter.Catalog{
// 	Name: to.Ptr("CentralCatalog"),
// 	Type: to.Ptr("Microsoft.DevCenter/devcenters/catalogs"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/catalogs/CentralCatalog"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		CreatedBy: to.Ptr("User1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		LastModifiedBy: to.Ptr("User1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Properties: &armdevcenter.CatalogProperties{
// 		AdoGit: &armdevcenter.GitCatalog{
// 			Path: to.Ptr("/templates"),
// 			Branch: to.Ptr("main"),
// 			SecretIdentifier: to.Ptr("https://contosokv.vault.azure.net/secrets/CentralRepoPat"),
// 			URI: to.Ptr("https://contoso@dev.azure.com/contoso/contosoOrg/_git/centralrepo-fakecontoso"),
// 		},
// 		SyncType: to.Ptr(armdevcenter.CatalogSyncTypeScheduled),
// 		ConnectionState: to.Ptr(armdevcenter.CatalogConnectionStateConnected),
// 		LastSyncStats: &armdevcenter.SyncStats{
// 			Added: to.Ptr[int32](0),
// 			Removed: to.Ptr[int32](0),
// 			SynchronizationErrors: to.Ptr[int32](0),
// 			Unchanged: to.Ptr[int32](0),
// 			Updated: to.Ptr[int32](0),
// 			ValidationErrors: to.Ptr[int32](0),
// 		},
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 		SyncState: to.Ptr(armdevcenter.CatalogSyncStateSucceeded),
// 	},
// }
Output:

Example (CatalogsCreateOrUpdateGitHub)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Catalogs_CreateGitHub.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewCatalogsClient().BeginCreateOrUpdate(ctx, "rg1", "Contoso", "CentralCatalog", armdevcenter.Catalog{
	Properties: &armdevcenter.CatalogProperties{
		GitHub: &armdevcenter.GitCatalog{
			Path:             to.Ptr("/templates"),
			Branch:           to.Ptr("main"),
			SecretIdentifier: to.Ptr("https://contosokv.vault.azure.net/secrets/CentralRepoPat"),
			URI:              to.Ptr("https://github.com/Contoso/centralrepo-fake.git"),
		},
		SyncType: to.Ptr(armdevcenter.CatalogSyncTypeManual),
	},
}, 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.Catalog = armdevcenter.Catalog{
// 	Name: to.Ptr("CentralCatalog"),
// 	Type: to.Ptr("Microsoft.DevCenter/devcenters/catalogs"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/catalogs/CentralCatalog"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		CreatedBy: to.Ptr("User1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		LastModifiedBy: to.Ptr("User1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Properties: &armdevcenter.CatalogProperties{
// 		GitHub: &armdevcenter.GitCatalog{
// 			Path: to.Ptr("/templates"),
// 			Branch: to.Ptr("main"),
// 			SecretIdentifier: to.Ptr("https://contosokv.vault.azure.net/secrets/CentralRepoPat"),
// 			URI: to.Ptr("https://github.com/Contoso/centralrepo-fake.git"),
// 		},
// 		SyncType: to.Ptr(armdevcenter.CatalogSyncTypeManual),
// 		ConnectionState: to.Ptr(armdevcenter.CatalogConnectionStateConnected),
// 		LastSyncStats: &armdevcenter.SyncStats{
// 			Added: to.Ptr[int32](0),
// 			Removed: to.Ptr[int32](0),
// 			SynchronizationErrors: to.Ptr[int32](0),
// 			Unchanged: to.Ptr[int32](0),
// 			Updated: to.Ptr[int32](0),
// 			ValidationErrors: to.Ptr[int32](0),
// 		},
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 		SyncState: to.Ptr(armdevcenter.CatalogSyncStateSucceeded),
// 	},
// }
Output:

func (*CatalogsClient) BeginDelete

func (client *CatalogsClient) BeginDelete(ctx context.Context, resourceGroupName string, devCenterName string, catalogName string, options *CatalogsClientBeginDeleteOptions) (*runtime.Poller[CatalogsClientDeleteResponse], error)

BeginDelete - Deletes a catalog resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • catalogName - The name of the Catalog.
  • options - CatalogsClientBeginDeleteOptions contains the optional parameters for the CatalogsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Catalogs_Delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewCatalogsClient().BeginDelete(ctx, "rg1", "Contoso", "CentralCatalog", 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 (*CatalogsClient) BeginSync

func (client *CatalogsClient) BeginSync(ctx context.Context, resourceGroupName string, devCenterName string, catalogName string, options *CatalogsClientBeginSyncOptions) (*runtime.Poller[CatalogsClientSyncResponse], error)

BeginSync - Syncs templates for a template source. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • catalogName - The name of the Catalog.
  • options - CatalogsClientBeginSyncOptions contains the optional parameters for the CatalogsClient.BeginSync method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Catalogs_Sync.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewCatalogsClient().BeginSync(ctx, "rg1", "Contoso", "CentralCatalog", 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 (*CatalogsClient) BeginUpdate

func (client *CatalogsClient) BeginUpdate(ctx context.Context, resourceGroupName string, devCenterName string, catalogName string, body CatalogUpdate, options *CatalogsClientBeginUpdateOptions) (*runtime.Poller[CatalogsClientUpdateResponse], error)

BeginUpdate - Partially updates a catalog. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • catalogName - The name of the Catalog.
  • body - Updatable catalog properties.
  • options - CatalogsClientBeginUpdateOptions contains the optional parameters for the CatalogsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Catalogs_Patch.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewCatalogsClient().BeginUpdate(ctx, "rg1", "Contoso", "CentralCatalog", armdevcenter.CatalogUpdate{
	Properties: &armdevcenter.CatalogUpdateProperties{
		GitHub: &armdevcenter.GitCatalog{
			Path: to.Ptr("/environments"),
		},
		SyncType: to.Ptr(armdevcenter.CatalogSyncTypeScheduled),
	},
}, 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.Catalog = armdevcenter.Catalog{
// 	Name: to.Ptr("CentralCatalog"),
// 	Type: to.Ptr("Microsoft.DevCenter/devcenters/catalogs"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/catalogs/CentralCatalog"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		CreatedBy: to.Ptr("User1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		LastModifiedBy: to.Ptr("User1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Properties: &armdevcenter.CatalogProperties{
// 		GitHub: &armdevcenter.GitCatalog{
// 			Path: to.Ptr("/environments"),
// 			Branch: to.Ptr("main"),
// 			SecretIdentifier: to.Ptr("https://contosokv.vault.azure.net/secrets/CentralRepoPat"),
// 			URI: to.Ptr("https://github.com/Contoso/centralrepo-fake.git"),
// 		},
// 		SyncType: to.Ptr(armdevcenter.CatalogSyncTypeScheduled),
// 		ConnectionState: to.Ptr(armdevcenter.CatalogConnectionStateConnected),
// 		LastConnectionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:28:00.314Z"); return t}()),
// 		LastSyncStats: &armdevcenter.SyncStats{
// 			Added: to.Ptr[int32](1),
// 			Removed: to.Ptr[int32](1),
// 			SynchronizationErrors: to.Ptr[int32](1),
// 			Unchanged: to.Ptr[int32](1),
// 			Updated: to.Ptr[int32](1),
// 			ValidationErrors: to.Ptr[int32](1),
// 		},
// 		LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:28:00.314Z"); return t}()),
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 		SyncState: to.Ptr(armdevcenter.CatalogSyncStateSucceeded),
// 	},
// }
Output:

func (*CatalogsClient) Get

func (client *CatalogsClient) Get(ctx context.Context, resourceGroupName string, devCenterName string, catalogName string, options *CatalogsClientGetOptions) (CatalogsClientGetResponse, error)

Get - Gets a catalog If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • catalogName - The name of the Catalog.
  • options - CatalogsClientGetOptions contains the optional parameters for the CatalogsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Catalogs_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCatalogsClient().Get(ctx, "rg1", "Contoso", "CentralCatalog", 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.Catalog = armdevcenter.Catalog{
// 	Name: to.Ptr("CentralCatalog"),
// 	Type: to.Ptr("Microsoft.DevCenter/devcenters/catalogs"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/catalogs/CentralCatalog"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		CreatedBy: to.Ptr("User1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		LastModifiedBy: to.Ptr("User1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Properties: &armdevcenter.CatalogProperties{
// 		GitHub: &armdevcenter.GitCatalog{
// 			Path: to.Ptr("/templates"),
// 			Branch: to.Ptr("main"),
// 			SecretIdentifier: to.Ptr("https://contosokv.vault.azure.net/secrets/CentralRepoPat"),
// 			URI: to.Ptr("https://github.com/Contoso/centralrepo-fake.git"),
// 		},
// 		SyncType: to.Ptr(armdevcenter.CatalogSyncTypeScheduled),
// 		ConnectionState: to.Ptr(armdevcenter.CatalogConnectionStateConnected),
// 		LastConnectionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:28:00.314Z"); return t}()),
// 		LastSyncStats: &armdevcenter.SyncStats{
// 			Added: to.Ptr[int32](1),
// 			Removed: to.Ptr[int32](1),
// 			SynchronizationErrors: to.Ptr[int32](1),
// 			Unchanged: to.Ptr[int32](1),
// 			Updated: to.Ptr[int32](1),
// 			ValidationErrors: to.Ptr[int32](1),
// 		},
// 		LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:28:00.314Z"); return t}()),
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 		SyncState: to.Ptr(armdevcenter.CatalogSyncStateSucceeded),
// 	},
// }
Output:

func (*CatalogsClient) GetSyncErrorDetails

func (client *CatalogsClient) GetSyncErrorDetails(ctx context.Context, resourceGroupName string, devCenterName string, catalogName string, options *CatalogsClientGetSyncErrorDetailsOptions) (CatalogsClientGetSyncErrorDetailsResponse, error)

GetSyncErrorDetails - Gets catalog synchronization error details If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • catalogName - The name of the Catalog.
  • options - CatalogsClientGetSyncErrorDetailsOptions contains the optional parameters for the CatalogsClient.GetSyncErrorDetails method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Catalogs_GetSyncErrorDetails.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCatalogsClient().GetSyncErrorDetails(ctx, "rg1", "Contoso", "CentralCatalog", 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.SyncErrorDetails = armdevcenter.SyncErrorDetails{
// 	Conflicts: []*armdevcenter.CatalogConflictError{
// 		{
// 			Name: to.Ptr("DuplicateEnvironmentName"),
// 			Path: to.Ptr("/Environments/Duplicate/manifest.yaml"),
// 	}},
// 	Errors: []*armdevcenter.CatalogSyncError{
// 		{
// 			Path: to.Ptr("/Environments/Invalid/manifest.yaml"),
// 			ErrorDetails: []*armdevcenter.CatalogErrorDetails{
// 				{
// 					Code: to.Ptr("ParseError"),
// 					Message: to.Ptr("Schema Error Within Catalog Item: Missing Name"),
// 			}},
// 	}},
// 	OperationError: &armdevcenter.CatalogErrorDetails{
// 		Code: to.Ptr("Conflict"),
// 		Message: to.Ptr("The source control credentials could not be validated successfully."),
// 	},
// }
Output:

func (*CatalogsClient) NewListByDevCenterPager

func (client *CatalogsClient) NewListByDevCenterPager(resourceGroupName string, devCenterName string, options *CatalogsClientListByDevCenterOptions) *runtime.Pager[CatalogsClientListByDevCenterResponse]

NewListByDevCenterPager - Lists catalogs for a devcenter.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • options - CatalogsClientListByDevCenterOptions contains the optional parameters for the CatalogsClient.NewListByDevCenterPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Catalogs_List.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewCatalogsClient().NewListByDevCenterPager("rg1", "Contoso", &armdevcenter.CatalogsClientListByDevCenterOptions{Top: 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.CatalogListResult = armdevcenter.CatalogListResult{
	// 	Value: []*armdevcenter.Catalog{
	// 		{
	// 			Name: to.Ptr("CentralCatalog"),
	// 			Type: to.Ptr("Microsoft.DevCenter/devcenters/catalogs"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/catalogs/CentralCatalog"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
	// 				CreatedBy: to.Ptr("User1"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("User1"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 			},
	// 			Properties: &armdevcenter.CatalogProperties{
	// 				GitHub: &armdevcenter.GitCatalog{
	// 					Path: to.Ptr("/templates"),
	// 					Branch: to.Ptr("main"),
	// 					SecretIdentifier: to.Ptr("https://contosokv.vault.azure.net/secrets/CentralRepoPat"),
	// 					URI: to.Ptr("https://github.com/Contoso/centralrepo-fake.git"),
	// 				},
	// 				ConnectionState: to.Ptr(armdevcenter.CatalogConnectionStateConnected),
	// 				LastConnectionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:28:00.314Z"); return t}()),
	// 				LastSyncStats: &armdevcenter.SyncStats{
	// 					Added: to.Ptr[int32](1),
	// 					Removed: to.Ptr[int32](1),
	// 					SynchronizationErrors: to.Ptr[int32](1),
	// 					Unchanged: to.Ptr[int32](1),
	// 					Updated: to.Ptr[int32](1),
	// 					ValidationErrors: to.Ptr[int32](1),
	// 				},
	// 				LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:28:00.314Z"); return t}()),
	// 				ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
	// 				SyncState: to.Ptr(armdevcenter.CatalogSyncStateSucceeded),
	// 			},
	// 	}},
	// }
}
Output:

type CatalogsClientBeginConnectOptions

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

CatalogsClientBeginConnectOptions contains the optional parameters for the CatalogsClient.BeginConnect method.

type CatalogsClientBeginCreateOrUpdateOptions

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

CatalogsClientBeginCreateOrUpdateOptions contains the optional parameters for the CatalogsClient.BeginCreateOrUpdate method.

type CatalogsClientBeginDeleteOptions

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

CatalogsClientBeginDeleteOptions contains the optional parameters for the CatalogsClient.BeginDelete method.

type CatalogsClientBeginSyncOptions

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

CatalogsClientBeginSyncOptions contains the optional parameters for the CatalogsClient.BeginSync method.

type CatalogsClientBeginUpdateOptions

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

CatalogsClientBeginUpdateOptions contains the optional parameters for the CatalogsClient.BeginUpdate method.

type CatalogsClientConnectResponse

type CatalogsClientConnectResponse struct {
}

CatalogsClientConnectResponse contains the response from method CatalogsClient.BeginConnect.

type CatalogsClientCreateOrUpdateResponse

type CatalogsClientCreateOrUpdateResponse struct {
	// Represents a catalog.
	Catalog
}

CatalogsClientCreateOrUpdateResponse contains the response from method CatalogsClient.BeginCreateOrUpdate.

type CatalogsClientDeleteResponse

type CatalogsClientDeleteResponse struct {
}

CatalogsClientDeleteResponse contains the response from method CatalogsClient.BeginDelete.

type CatalogsClientGetOptions

type CatalogsClientGetOptions struct {
}

CatalogsClientGetOptions contains the optional parameters for the CatalogsClient.Get method.

type CatalogsClientGetResponse

type CatalogsClientGetResponse struct {
	// Represents a catalog.
	Catalog
}

CatalogsClientGetResponse contains the response from method CatalogsClient.Get.

type CatalogsClientGetSyncErrorDetailsOptions

type CatalogsClientGetSyncErrorDetailsOptions struct {
}

CatalogsClientGetSyncErrorDetailsOptions contains the optional parameters for the CatalogsClient.GetSyncErrorDetails method.

type CatalogsClientGetSyncErrorDetailsResponse

type CatalogsClientGetSyncErrorDetailsResponse struct {
	// Synchronization error details.
	SyncErrorDetails
}

CatalogsClientGetSyncErrorDetailsResponse contains the response from method CatalogsClient.GetSyncErrorDetails.

type CatalogsClientListByDevCenterOptions

type CatalogsClientListByDevCenterOptions struct {
	// The maximum number of resources to return from the operation. Example: '$top=10'.
	Top *int32
}

CatalogsClientListByDevCenterOptions contains the optional parameters for the CatalogsClient.NewListByDevCenterPager method.

type CatalogsClientListByDevCenterResponse

type CatalogsClientListByDevCenterResponse struct {
	// Results of the catalog list operation.
	CatalogListResult
}

CatalogsClientListByDevCenterResponse contains the response from method CatalogsClient.NewListByDevCenterPager.

type CatalogsClientSyncResponse

type CatalogsClientSyncResponse struct {
}

CatalogsClientSyncResponse contains the response from method CatalogsClient.BeginSync.

type CatalogsClientUpdateResponse

type CatalogsClientUpdateResponse struct {
	// Represents a catalog.
	Catalog
}

CatalogsClientUpdateResponse contains the response from method CatalogsClient.BeginUpdate.

type CheckNameAvailabilityClient

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

CheckNameAvailabilityClient contains the methods for the CheckNameAvailability group. Don't use this type directly, use NewCheckNameAvailabilityClient() instead.

func NewCheckNameAvailabilityClient

func NewCheckNameAvailabilityClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CheckNameAvailabilityClient, error)

NewCheckNameAvailabilityClient creates a new instance of CheckNameAvailabilityClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*CheckNameAvailabilityClient) Execute

Execute - Check the availability of name for resource If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • nameAvailabilityRequest - The required parameters for checking if resource name is available.
  • options - CheckNameAvailabilityClientExecuteOptions contains the optional parameters for the CheckNameAvailabilityClient.Execute method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/CheckNameAvailability.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCheckNameAvailabilityClient().Execute(ctx, armdevcenter.CheckNameAvailabilityRequest{
	Name: to.Ptr("name1"),
	Type: to.Ptr("Microsoft.DevCenter/devcenters"),
}, 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.CheckNameAvailabilityResponse = armdevcenter.CheckNameAvailabilityResponse{
// 	NameAvailable: to.Ptr(true),
// }
Output:

type CheckNameAvailabilityClientExecuteOptions

type CheckNameAvailabilityClientExecuteOptions struct {
}

CheckNameAvailabilityClientExecuteOptions contains the optional parameters for the CheckNameAvailabilityClient.Execute method.

type CheckNameAvailabilityClientExecuteResponse

type CheckNameAvailabilityClientExecuteResponse struct {
	// The check availability result.
	CheckNameAvailabilityResponse
}

CheckNameAvailabilityClientExecuteResponse contains the response from method CheckNameAvailabilityClient.Execute.

type CheckNameAvailabilityReason

type CheckNameAvailabilityReason string

CheckNameAvailabilityReason - The reason why the given name is not available.

const (
	CheckNameAvailabilityReasonAlreadyExists CheckNameAvailabilityReason = "AlreadyExists"
	CheckNameAvailabilityReasonInvalid       CheckNameAvailabilityReason = "Invalid"
)

func PossibleCheckNameAvailabilityReasonValues

func PossibleCheckNameAvailabilityReasonValues() []CheckNameAvailabilityReason

PossibleCheckNameAvailabilityReasonValues returns the possible values for the CheckNameAvailabilityReason const type.

type CheckNameAvailabilityRequest

type CheckNameAvailabilityRequest struct {
	// The name of the resource for which availability needs to be checked.
	Name *string

	// The resource type.
	Type *string
}

CheckNameAvailabilityRequest - The check availability request body.

func (CheckNameAvailabilityRequest) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityRequest.

func (*CheckNameAvailabilityRequest) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityRequest.

type CheckNameAvailabilityResponse

type CheckNameAvailabilityResponse struct {
	// Detailed reason why the given name is available.
	Message *string

	// Indicates if the resource name is available.
	NameAvailable *bool

	// The reason why the given name is not available.
	Reason *CheckNameAvailabilityReason
}

CheckNameAvailabilityResponse - The check availability result.

func (CheckNameAvailabilityResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityResponse.

func (*CheckNameAvailabilityResponse) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityResponse.

type CheckScopedNameAvailabilityClient

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

CheckScopedNameAvailabilityClient contains the methods for the CheckScopedNameAvailability group. Don't use this type directly, use NewCheckScopedNameAvailabilityClient() instead.

func NewCheckScopedNameAvailabilityClient

func NewCheckScopedNameAvailabilityClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CheckScopedNameAvailabilityClient, error)

NewCheckScopedNameAvailabilityClient creates a new instance of CheckScopedNameAvailabilityClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*CheckScopedNameAvailabilityClient) Execute

Execute - Check the availability of name for resource If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • nameAvailabilityRequest - The required parameters for checking if resource name is available.
  • options - CheckScopedNameAvailabilityClientExecuteOptions contains the optional parameters for the CheckScopedNameAvailabilityClient.Execute method.
Example (DevcenterCatalogNameAvailability)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/CheckScopedNameAvailability_DevCenterCatalog.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCheckScopedNameAvailabilityClient().Execute(ctx, armdevcenter.CheckScopedNameAvailabilityRequest{
	Name:  to.Ptr("name1"),
	Type:  to.Ptr("Microsoft.DevCenter/devcenters/catalogs"),
	Scope: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso"),
}, 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.CheckNameAvailabilityResponse = armdevcenter.CheckNameAvailabilityResponse{
// 	NameAvailable: to.Ptr(true),
// }
Output:

Example (ProjectCatalogNameAvailability)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/CheckScopedNameAvailability_ProjectCatalog.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCheckScopedNameAvailabilityClient().Execute(ctx, armdevcenter.CheckScopedNameAvailabilityRequest{
	Name:  to.Ptr("name1"),
	Type:  to.Ptr("Microsoft.DevCenter/projects/catalogs"),
	Scope: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject"),
}, 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.CheckNameAvailabilityResponse = armdevcenter.CheckNameAvailabilityResponse{
// 	NameAvailable: to.Ptr(true),
// }
Output:

type CheckScopedNameAvailabilityClientExecuteOptions

type CheckScopedNameAvailabilityClientExecuteOptions struct {
}

CheckScopedNameAvailabilityClientExecuteOptions contains the optional parameters for the CheckScopedNameAvailabilityClient.Execute method.

type CheckScopedNameAvailabilityClientExecuteResponse

type CheckScopedNameAvailabilityClientExecuteResponse struct {
	// The check availability result.
	CheckNameAvailabilityResponse
}

CheckScopedNameAvailabilityClientExecuteResponse contains the response from method CheckScopedNameAvailabilityClient.Execute.

type CheckScopedNameAvailabilityRequest

type CheckScopedNameAvailabilityRequest struct {
	// The name of the resource for which availability needs to be checked.
	Name *string

	// The resource id to scope the name check.
	Scope *string

	// The resource type.
	Type *string
}

CheckScopedNameAvailabilityRequest - The scoped name check availability request body.

func (CheckScopedNameAvailabilityRequest) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CheckScopedNameAvailabilityRequest.

func (*CheckScopedNameAvailabilityRequest) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CheckScopedNameAvailabilityRequest.

type ClientFactory

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

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory

func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewAttachedNetworksClient

func (c *ClientFactory) NewAttachedNetworksClient() *AttachedNetworksClient

NewAttachedNetworksClient creates a new instance of AttachedNetworksClient.

func (*ClientFactory) NewCatalogsClient

func (c *ClientFactory) NewCatalogsClient() *CatalogsClient

NewCatalogsClient creates a new instance of CatalogsClient.

func (*ClientFactory) NewCheckNameAvailabilityClient

func (c *ClientFactory) NewCheckNameAvailabilityClient() *CheckNameAvailabilityClient

NewCheckNameAvailabilityClient creates a new instance of CheckNameAvailabilityClient.

func (*ClientFactory) NewCheckScopedNameAvailabilityClient

func (c *ClientFactory) NewCheckScopedNameAvailabilityClient() *CheckScopedNameAvailabilityClient

NewCheckScopedNameAvailabilityClient creates a new instance of CheckScopedNameAvailabilityClient.

func (*ClientFactory) NewDevBoxDefinitionsClient

func (c *ClientFactory) NewDevBoxDefinitionsClient() *DevBoxDefinitionsClient

NewDevBoxDefinitionsClient creates a new instance of DevBoxDefinitionsClient.

func (*ClientFactory) NewDevCentersClient

func (c *ClientFactory) NewDevCentersClient() *DevCentersClient

NewDevCentersClient creates a new instance of DevCentersClient.

func (*ClientFactory) NewEnvironmentDefinitionsClient

func (c *ClientFactory) NewEnvironmentDefinitionsClient() *EnvironmentDefinitionsClient

NewEnvironmentDefinitionsClient creates a new instance of EnvironmentDefinitionsClient.

func (*ClientFactory) NewEnvironmentTypesClient

func (c *ClientFactory) NewEnvironmentTypesClient() *EnvironmentTypesClient

NewEnvironmentTypesClient creates a new instance of EnvironmentTypesClient.

func (*ClientFactory) NewGalleriesClient

func (c *ClientFactory) NewGalleriesClient() *GalleriesClient

NewGalleriesClient creates a new instance of GalleriesClient.

func (*ClientFactory) NewImageVersionsClient

func (c *ClientFactory) NewImageVersionsClient() *ImageVersionsClient

NewImageVersionsClient creates a new instance of ImageVersionsClient.

func (*ClientFactory) NewImagesClient

func (c *ClientFactory) NewImagesClient() *ImagesClient

NewImagesClient creates a new instance of ImagesClient.

func (*ClientFactory) NewNetworkConnectionsClient

func (c *ClientFactory) NewNetworkConnectionsClient() *NetworkConnectionsClient

NewNetworkConnectionsClient creates a new instance of NetworkConnectionsClient.

func (*ClientFactory) NewOperationStatusesClient

func (c *ClientFactory) NewOperationStatusesClient() *OperationStatusesClient

NewOperationStatusesClient creates a new instance of OperationStatusesClient.

func (*ClientFactory) NewOperationsClient

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewPoolsClient

func (c *ClientFactory) NewPoolsClient() *PoolsClient

NewPoolsClient creates a new instance of PoolsClient.

func (*ClientFactory) NewProjectAllowedEnvironmentTypesClient

func (c *ClientFactory) NewProjectAllowedEnvironmentTypesClient() *ProjectAllowedEnvironmentTypesClient

NewProjectAllowedEnvironmentTypesClient creates a new instance of ProjectAllowedEnvironmentTypesClient.

func (*ClientFactory) NewProjectCatalogEnvironmentDefinitionsClient

func (c *ClientFactory) NewProjectCatalogEnvironmentDefinitionsClient() *ProjectCatalogEnvironmentDefinitionsClient

NewProjectCatalogEnvironmentDefinitionsClient creates a new instance of ProjectCatalogEnvironmentDefinitionsClient.

func (*ClientFactory) NewProjectCatalogsClient

func (c *ClientFactory) NewProjectCatalogsClient() *ProjectCatalogsClient

NewProjectCatalogsClient creates a new instance of ProjectCatalogsClient.

func (*ClientFactory) NewProjectEnvironmentTypesClient

func (c *ClientFactory) NewProjectEnvironmentTypesClient() *ProjectEnvironmentTypesClient

NewProjectEnvironmentTypesClient creates a new instance of ProjectEnvironmentTypesClient.

func (*ClientFactory) NewProjectsClient

func (c *ClientFactory) NewProjectsClient() *ProjectsClient

NewProjectsClient creates a new instance of ProjectsClient.

func (*ClientFactory) NewSKUsClient

func (c *ClientFactory) NewSKUsClient() *SKUsClient

NewSKUsClient creates a new instance of SKUsClient.

func (*ClientFactory) NewSchedulesClient

func (c *ClientFactory) NewSchedulesClient() *SchedulesClient

NewSchedulesClient creates a new instance of SchedulesClient.

func (*ClientFactory) NewUsagesClient

func (c *ClientFactory) NewUsagesClient() *UsagesClient

NewUsagesClient creates a new instance of UsagesClient.

type CreatedByType

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

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type CustomerManagedKeyEncryption

type CustomerManagedKeyEncryption struct {
	// All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault.
	KeyEncryptionKeyIdentity *CustomerManagedKeyEncryptionKeyIdentity

	// key encryption key Url, versioned or non-versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78
	// or https://contosovault.vault.azure.net/keys/contosokek.
	KeyEncryptionKeyURL *string
}

CustomerManagedKeyEncryption - All Customer-managed key encryption properties for the resource.

func (CustomerManagedKeyEncryption) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CustomerManagedKeyEncryption.

func (*CustomerManagedKeyEncryption) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CustomerManagedKeyEncryption.

type CustomerManagedKeyEncryptionKeyIdentity

type CustomerManagedKeyEncryptionKeyIdentity struct {
	// delegated identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId.
	// Mutually exclusive with identityType systemAssignedIdentity and userAssignedIdentity - internal use only.
	DelegatedIdentityClientID *string

	// Values can be systemAssignedIdentity or userAssignedIdentity
	IdentityType *IdentityType

	// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/
	// /providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity
	// and delegatedResourceIdentity.
	UserAssignedIdentityResourceID *string
}

CustomerManagedKeyEncryptionKeyIdentity - All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault.

func (CustomerManagedKeyEncryptionKeyIdentity) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CustomerManagedKeyEncryptionKeyIdentity.

func (*CustomerManagedKeyEncryptionKeyIdentity) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CustomerManagedKeyEncryptionKeyIdentity.

type DevBoxDefinition

type DevBoxDefinition struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// Dev Box definition properties
	Properties *DevBoxDefinitionProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

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

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

DevBoxDefinition - Represents a definition for a Developer Machine.

func (DevBoxDefinition) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DevBoxDefinition.

func (*DevBoxDefinition) UnmarshalJSON

func (d *DevBoxDefinition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DevBoxDefinition.

type DevBoxDefinitionListResult

type DevBoxDefinitionListResult struct {
	// READ-ONLY; URL to get the next set of results if there are any.
	NextLink *string

	// READ-ONLY; Current page of results.
	Value []*DevBoxDefinition
}

DevBoxDefinitionListResult - Results of the Dev Box definition list operation.

func (DevBoxDefinitionListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DevBoxDefinitionListResult.

func (*DevBoxDefinitionListResult) UnmarshalJSON

func (d *DevBoxDefinitionListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DevBoxDefinitionListResult.

type DevBoxDefinitionProperties

type DevBoxDefinitionProperties struct {
	// Indicates whether Dev Boxes created with this definition are capable of hibernation. Not all images are capable of supporting
	// hibernation. To find out more see https://aka.ms/devbox/hibernate
	HibernateSupport *HibernateSupport

	// Image reference information.
	ImageReference *ImageReference

	// The storage type used for the Operating System disk of Dev Boxes created using this definition.
	OSStorageType *string

	// The SKU for Dev Boxes created using this definition.
	SKU *SKU

	// READ-ONLY; Image reference information for the currently active image (only populated during updates).
	ActiveImageReference *ImageReference

	// READ-ONLY; Details for image validator error. Populated when the image validation is not successful.
	ImageValidationErrorDetails *ImageValidationErrorDetails

	// READ-ONLY; Validation status of the configured image.
	ImageValidationStatus *ImageValidationStatus

	// READ-ONLY; The provisioning state of the resource.
	ProvisioningState *ProvisioningState

	// READ-ONLY; Validation status for the Dev Box Definition.
	ValidationStatus *CatalogResourceValidationStatus
}

DevBoxDefinitionProperties - Properties of a Dev Box definition.

func (DevBoxDefinitionProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DevBoxDefinitionProperties.

func (*DevBoxDefinitionProperties) UnmarshalJSON

func (d *DevBoxDefinitionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DevBoxDefinitionProperties.

type DevBoxDefinitionUpdate

type DevBoxDefinitionUpdate struct {
	// The geo-location where the resource lives
	Location *string

	// Properties of a Dev Box definition to be updated.
	Properties *DevBoxDefinitionUpdateProperties

	// Resource tags.
	Tags map[string]*string
}

DevBoxDefinitionUpdate - Partial update of a Dev Box definition resource.

func (DevBoxDefinitionUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DevBoxDefinitionUpdate.

func (*DevBoxDefinitionUpdate) UnmarshalJSON

func (d *DevBoxDefinitionUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DevBoxDefinitionUpdate.

type DevBoxDefinitionUpdateProperties

type DevBoxDefinitionUpdateProperties struct {
	// Indicates whether Dev Boxes created with this definition are capable of hibernation. Not all images are capable of supporting
	// hibernation. To find out more see https://aka.ms/devbox/hibernate
	HibernateSupport *HibernateSupport

	// Image reference information.
	ImageReference *ImageReference

	// The storage type used for the Operating System disk of Dev Boxes created using this definition.
	OSStorageType *string

	// The SKU for Dev Boxes created using this definition.
	SKU *SKU
}

DevBoxDefinitionUpdateProperties - Properties of a Dev Box definition. These properties can be updated after the resource has been created.

func (DevBoxDefinitionUpdateProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DevBoxDefinitionUpdateProperties.

func (*DevBoxDefinitionUpdateProperties) UnmarshalJSON

func (d *DevBoxDefinitionUpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DevBoxDefinitionUpdateProperties.

type DevBoxDefinitionsClient

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

DevBoxDefinitionsClient contains the methods for the DevBoxDefinitions group. Don't use this type directly, use NewDevBoxDefinitionsClient() instead.

func NewDevBoxDefinitionsClient

func NewDevBoxDefinitionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DevBoxDefinitionsClient, error)

NewDevBoxDefinitionsClient creates a new instance of DevBoxDefinitionsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*DevBoxDefinitionsClient) BeginCreateOrUpdate

func (client *DevBoxDefinitionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, devCenterName string, devBoxDefinitionName string, body DevBoxDefinition, options *DevBoxDefinitionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DevBoxDefinitionsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a Dev Box definition. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • devBoxDefinitionName - The name of the Dev Box definition.
  • body - Represents a Dev Box definition.
  • options - DevBoxDefinitionsClientBeginCreateOrUpdateOptions contains the optional parameters for the DevBoxDefinitionsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevBoxDefinitions_Create.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDevBoxDefinitionsClient().BeginCreateOrUpdate(ctx, "rg1", "Contoso", "WebDevBox", armdevcenter.DevBoxDefinition{
	Location: to.Ptr("centralus"),
	Properties: &armdevcenter.DevBoxDefinitionProperties{
		HibernateSupport: to.Ptr(armdevcenter.HibernateSupportEnabled),
		ImageReference: &armdevcenter.ImageReference{
			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/Example/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/1.0.0"),
		},
		SKU: &armdevcenter.SKU{
			Name: to.Ptr("Preview"),
		},
	},
}, 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.DevBoxDefinition = armdevcenter.DevBoxDefinition{
// 	Name: to.Ptr("WebDevBox"),
// 	Type: to.Ptr("Microsoft.DevCenter/devcenters/devboxdefinitions"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/devboxdefinitions/devBoxDefinitionName"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Location: to.Ptr("centralus"),
// 	Properties: &armdevcenter.DevBoxDefinitionProperties{
// 		HibernateSupport: to.Ptr(armdevcenter.HibernateSupportEnabled),
// 		ImageReference: &armdevcenter.ImageReference{
// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/Example/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/1.0.0"),
// 		},
// 		SKU: &armdevcenter.SKU{
// 			Name: to.Ptr("Preview"),
// 		},
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 	},
// }
Output:

func (*DevBoxDefinitionsClient) BeginDelete

func (client *DevBoxDefinitionsClient) BeginDelete(ctx context.Context, resourceGroupName string, devCenterName string, devBoxDefinitionName string, options *DevBoxDefinitionsClientBeginDeleteOptions) (*runtime.Poller[DevBoxDefinitionsClientDeleteResponse], error)

BeginDelete - Deletes a Dev Box definition If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • devBoxDefinitionName - The name of the Dev Box definition.
  • options - DevBoxDefinitionsClientBeginDeleteOptions contains the optional parameters for the DevBoxDefinitionsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevBoxDefinitions_Delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDevBoxDefinitionsClient().BeginDelete(ctx, "rg1", "Contoso", "WebDevBox", 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 (*DevBoxDefinitionsClient) BeginUpdate

func (client *DevBoxDefinitionsClient) BeginUpdate(ctx context.Context, resourceGroupName string, devCenterName string, devBoxDefinitionName string, body DevBoxDefinitionUpdate, options *DevBoxDefinitionsClientBeginUpdateOptions) (*runtime.Poller[DevBoxDefinitionsClientUpdateResponse], error)

BeginUpdate - Partially updates a Dev Box definition. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • devBoxDefinitionName - The name of the Dev Box definition.
  • body - Represents a Dev Box definition.
  • options - DevBoxDefinitionsClientBeginUpdateOptions contains the optional parameters for the DevBoxDefinitionsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevBoxDefinitions_Patch.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDevBoxDefinitionsClient().BeginUpdate(ctx, "rg1", "Contoso", "WebDevBox", armdevcenter.DevBoxDefinitionUpdate{
	Properties: &armdevcenter.DevBoxDefinitionUpdateProperties{
		ImageReference: &armdevcenter.ImageReference{
			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/Example/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/2.0.0"),
		},
	},
}, 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.DevBoxDefinition = armdevcenter.DevBoxDefinition{
// 	Name: to.Ptr("WebDevBox"),
// 	Type: to.Ptr("Microsoft.DevCenter/devcenters/devboxdefinitions"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/devboxdefinitions/WebDevBox"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Location: to.Ptr("centralus"),
// 	Properties: &armdevcenter.DevBoxDefinitionProperties{
// 		HibernateSupport: to.Ptr(armdevcenter.HibernateSupportEnabled),
// 		ImageReference: &armdevcenter.ImageReference{
// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/Example/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/2.0.0"),
// 		},
// 		SKU: &armdevcenter.SKU{
// 			Name: to.Ptr("Preview"),
// 		},
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 	},
// }
Output:

func (*DevBoxDefinitionsClient) Get

func (client *DevBoxDefinitionsClient) Get(ctx context.Context, resourceGroupName string, devCenterName string, devBoxDefinitionName string, options *DevBoxDefinitionsClientGetOptions) (DevBoxDefinitionsClientGetResponse, error)

Get - Gets a Dev Box definition If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • devBoxDefinitionName - The name of the Dev Box definition.
  • options - DevBoxDefinitionsClientGetOptions contains the optional parameters for the DevBoxDefinitionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevBoxDefinitions_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDevBoxDefinitionsClient().Get(ctx, "rg1", "Contoso", "WebDevBox", 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.DevBoxDefinition = armdevcenter.DevBoxDefinition{
// 	Name: to.Ptr("WebDevBox"),
// 	Type: to.Ptr("Microsoft.DevCenter/devcenters/devboxdefinitions"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/devboxdefinitions/WebDevBox"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Location: to.Ptr("centralus"),
// 	Properties: &armdevcenter.DevBoxDefinitionProperties{
// 		HibernateSupport: to.Ptr(armdevcenter.HibernateSupportEnabled),
// 		ImageReference: &armdevcenter.ImageReference{
// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/Example/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/1.0.0"),
// 		},
// 		SKU: &armdevcenter.SKU{
// 			Name: to.Ptr("Preview"),
// 		},
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 	},
// }
Output:

func (*DevBoxDefinitionsClient) GetByProject

func (client *DevBoxDefinitionsClient) GetByProject(ctx context.Context, resourceGroupName string, projectName string, devBoxDefinitionName string, options *DevBoxDefinitionsClientGetByProjectOptions) (DevBoxDefinitionsClientGetByProjectResponse, error)

GetByProject - Gets a Dev Box definition configured for a project If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • devBoxDefinitionName - The name of the Dev Box definition.
  • options - DevBoxDefinitionsClientGetByProjectOptions contains the optional parameters for the DevBoxDefinitionsClient.GetByProject method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevBoxDefinitions_GetByProject.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDevBoxDefinitionsClient().GetByProject(ctx, "rg1", "ContosoProject", "WebDevBox", 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.DevBoxDefinition = armdevcenter.DevBoxDefinition{
// 	Name: to.Ptr("WebDevBox"),
// 	Type: to.Ptr("Microsoft.DevCenter/projects/devboxdefinitions"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/ContosoProject/devboxdefinitions/WebDevBox"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Location: to.Ptr("centralus"),
// 	Properties: &armdevcenter.DevBoxDefinitionProperties{
// 		HibernateSupport: to.Ptr(armdevcenter.HibernateSupportEnabled),
// 		ImageReference: &armdevcenter.ImageReference{
// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/Example/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/1.0.0"),
// 		},
// 		SKU: &armdevcenter.SKU{
// 			Name: to.Ptr("Preview"),
// 		},
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 	},
// }
Output:

func (*DevBoxDefinitionsClient) NewListByDevCenterPager

func (client *DevBoxDefinitionsClient) NewListByDevCenterPager(resourceGroupName string, devCenterName string, options *DevBoxDefinitionsClientListByDevCenterOptions) *runtime.Pager[DevBoxDefinitionsClientListByDevCenterResponse]

NewListByDevCenterPager - List Dev Box definitions for a devcenter.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • options - DevBoxDefinitionsClientListByDevCenterOptions contains the optional parameters for the DevBoxDefinitionsClient.NewListByDevCenterPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevBoxDefinitions_ListByDevCenter.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewDevBoxDefinitionsClient().NewListByDevCenterPager("rg1", "Contoso", &armdevcenter.DevBoxDefinitionsClientListByDevCenterOptions{Top: 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.DevBoxDefinitionListResult = armdevcenter.DevBoxDefinitionListResult{
	// 	Value: []*armdevcenter.DevBoxDefinition{
	// 		{
	// 			Name: to.Ptr("WebDevBox"),
	// 			Type: to.Ptr("Microsoft.DevCenter/devcenters/devboxdefinitions"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/devboxdefinitions/WebDevBox"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
	// 				CreatedBy: to.Ptr("user1"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("user1"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 			},
	// 			Location: to.Ptr("centralus"),
	// 			Properties: &armdevcenter.DevBoxDefinitionProperties{
	// 				HibernateSupport: to.Ptr(armdevcenter.HibernateSupportEnabled),
	// 				ImageReference: &armdevcenter.ImageReference{
	// 					ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/Example/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/1.0.0"),
	// 				},
	// 				SKU: &armdevcenter.SKU{
	// 					Name: to.Ptr("Preview"),
	// 				},
	// 				ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
	// 			},
	// 	}},
	// }
}
Output:

func (*DevBoxDefinitionsClient) NewListByProjectPager

NewListByProjectPager - List Dev Box definitions configured for a project.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • options - DevBoxDefinitionsClientListByProjectOptions contains the optional parameters for the DevBoxDefinitionsClient.NewListByProjectPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevBoxDefinitions_ListByProject.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewDevBoxDefinitionsClient().NewListByProjectPager("rg1", "ContosoProject", &armdevcenter.DevBoxDefinitionsClientListByProjectOptions{Top: 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.DevBoxDefinitionListResult = armdevcenter.DevBoxDefinitionListResult{
	// 	Value: []*armdevcenter.DevBoxDefinition{
	// 		{
	// 			Name: to.Ptr("WebDevBox"),
	// 			Type: to.Ptr("Microsoft.DevCenter/projects/devboxdefinitions"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/ContosoProject/devboxdefinitions/WebDevBox"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
	// 				CreatedBy: to.Ptr("user1"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("user1"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 			},
	// 			Location: to.Ptr("centralus"),
	// 			Properties: &armdevcenter.DevBoxDefinitionProperties{
	// 				HibernateSupport: to.Ptr(armdevcenter.HibernateSupportEnabled),
	// 				ImageReference: &armdevcenter.ImageReference{
	// 					ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/Example/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/1.0.0"),
	// 				},
	// 				SKU: &armdevcenter.SKU{
	// 					Name: to.Ptr("Preview"),
	// 				},
	// 				ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
	// 			},
	// 	}},
	// }
}
Output:

type DevBoxDefinitionsClientBeginCreateOrUpdateOptions

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

DevBoxDefinitionsClientBeginCreateOrUpdateOptions contains the optional parameters for the DevBoxDefinitionsClient.BeginCreateOrUpdate method.

type DevBoxDefinitionsClientBeginDeleteOptions

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

DevBoxDefinitionsClientBeginDeleteOptions contains the optional parameters for the DevBoxDefinitionsClient.BeginDelete method.

type DevBoxDefinitionsClientBeginUpdateOptions

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

DevBoxDefinitionsClientBeginUpdateOptions contains the optional parameters for the DevBoxDefinitionsClient.BeginUpdate method.

type DevBoxDefinitionsClientCreateOrUpdateResponse

type DevBoxDefinitionsClientCreateOrUpdateResponse struct {
	// Represents a definition for a Developer Machine.
	DevBoxDefinition
}

DevBoxDefinitionsClientCreateOrUpdateResponse contains the response from method DevBoxDefinitionsClient.BeginCreateOrUpdate.

type DevBoxDefinitionsClientDeleteResponse

type DevBoxDefinitionsClientDeleteResponse struct {
}

DevBoxDefinitionsClientDeleteResponse contains the response from method DevBoxDefinitionsClient.BeginDelete.

type DevBoxDefinitionsClientGetByProjectOptions

type DevBoxDefinitionsClientGetByProjectOptions struct {
}

DevBoxDefinitionsClientGetByProjectOptions contains the optional parameters for the DevBoxDefinitionsClient.GetByProject method.

type DevBoxDefinitionsClientGetByProjectResponse

type DevBoxDefinitionsClientGetByProjectResponse struct {
	// Represents a definition for a Developer Machine.
	DevBoxDefinition
}

DevBoxDefinitionsClientGetByProjectResponse contains the response from method DevBoxDefinitionsClient.GetByProject.

type DevBoxDefinitionsClientGetOptions

type DevBoxDefinitionsClientGetOptions struct {
}

DevBoxDefinitionsClientGetOptions contains the optional parameters for the DevBoxDefinitionsClient.Get method.

type DevBoxDefinitionsClientGetResponse

type DevBoxDefinitionsClientGetResponse struct {
	// Represents a definition for a Developer Machine.
	DevBoxDefinition
}

DevBoxDefinitionsClientGetResponse contains the response from method DevBoxDefinitionsClient.Get.

type DevBoxDefinitionsClientListByDevCenterOptions

type DevBoxDefinitionsClientListByDevCenterOptions struct {
	// The maximum number of resources to return from the operation. Example: '$top=10'.
	Top *int32
}

DevBoxDefinitionsClientListByDevCenterOptions contains the optional parameters for the DevBoxDefinitionsClient.NewListByDevCenterPager method.

type DevBoxDefinitionsClientListByDevCenterResponse

type DevBoxDefinitionsClientListByDevCenterResponse struct {
	// Results of the Dev Box definition list operation.
	DevBoxDefinitionListResult
}

DevBoxDefinitionsClientListByDevCenterResponse contains the response from method DevBoxDefinitionsClient.NewListByDevCenterPager.

type DevBoxDefinitionsClientListByProjectOptions

type DevBoxDefinitionsClientListByProjectOptions struct {
	// The maximum number of resources to return from the operation. Example: '$top=10'.
	Top *int32
}

DevBoxDefinitionsClientListByProjectOptions contains the optional parameters for the DevBoxDefinitionsClient.NewListByProjectPager method.

type DevBoxDefinitionsClientListByProjectResponse

type DevBoxDefinitionsClientListByProjectResponse struct {
	// Results of the Dev Box definition list operation.
	DevBoxDefinitionListResult
}

DevBoxDefinitionsClientListByProjectResponse contains the response from method DevBoxDefinitionsClient.NewListByProjectPager.

type DevBoxDefinitionsClientUpdateResponse

type DevBoxDefinitionsClientUpdateResponse struct {
	// Represents a definition for a Developer Machine.
	DevBoxDefinition
}

DevBoxDefinitionsClientUpdateResponse contains the response from method DevBoxDefinitionsClient.BeginUpdate.

type DevCenter

type DevCenter struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// Managed identity properties
	Identity *ManagedServiceIdentity

	// DevCenter properties
	Properties *Properties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

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

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

DevCenter - Represents a devcenter resource.

func (DevCenter) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DevCenter.

func (*DevCenter) UnmarshalJSON

func (d *DevCenter) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DevCenter.

type DevCentersClient

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

DevCentersClient contains the methods for the DevCenters group. Don't use this type directly, use NewDevCentersClient() instead.

func NewDevCentersClient

func NewDevCentersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DevCentersClient, error)

NewDevCentersClient creates a new instance of DevCentersClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*DevCentersClient) BeginCreateOrUpdate

func (client *DevCentersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, devCenterName string, body DevCenter, options *DevCentersClientBeginCreateOrUpdateOptions) (*runtime.Poller[DevCentersClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a devcenter resource If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • body - Represents a devcenter.
  • options - DevCentersClientBeginCreateOrUpdateOptions contains the optional parameters for the DevCentersClient.BeginCreateOrUpdate method.
Example (DevCentersCreate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevCenters_Create.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDevCentersClient().BeginCreateOrUpdate(ctx, "rg1", "Contoso", armdevcenter.DevCenter{
	Location: to.Ptr("centralus"),
	Tags: map[string]*string{
		"CostCode": to.Ptr("12345"),
	},
	Properties: &armdevcenter.Properties{
		DisplayName: to.Ptr("ContosoDevCenter"),
	},
}, 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.DevCenter = armdevcenter.DevCenter{
// 	Name: to.Ptr("Contoso"),
// 	Type: to.Ptr("Microsoft.DevCenter/devcenters"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-11T22:00:08.896Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-11T22:00:10.896Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user2"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Location: to.Ptr("centralus"),
// 	Tags: map[string]*string{
// 		"CostCode": to.Ptr("12345"),
// 		"hidden-title": to.Ptr("ContosoDevCenter"),
// 	},
// 	Properties: &armdevcenter.Properties{
// 		DisplayName: to.Ptr("ContosoDevCenter"),
// 		ProjectCatalogSettings: &armdevcenter.ProjectCatalogSettingsInfo{
// 			CatalogItemSyncEnableStatus: to.Ptr(armdevcenter.CatalogItemSyncEnableStatusEnabled),
// 		},
// 		DevCenterURI: to.Ptr("https://4c7c8922-78e9-4928-aa6f-75ba59355371-contoso.centralus.devcenter.azure.com"),
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 	},
// }
Output:

Example (DevCentersCreateWithEncryption)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevCenters_CreateWithEncryption.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDevCentersClient().BeginCreateOrUpdate(ctx, "rg1", "Contoso", armdevcenter.DevCenter{
	Location: to.Ptr("centralus"),
	Tags: map[string]*string{
		"CostCode": to.Ptr("12345"),
	},
	Identity: &armdevcenter.ManagedServiceIdentity{
		Type: to.Ptr(armdevcenter.ManagedServiceIdentityTypeUserAssigned),
		UserAssignedIdentities: map[string]*armdevcenter.UserAssignedIdentity{
			"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1": {},
		},
	},
	Properties: &armdevcenter.Properties{
		DisplayName: to.Ptr("ContosoDevCenter"),
		Encryption: &armdevcenter.Encryption{
			CustomerManagedKeyEncryption: &armdevcenter.CustomerManagedKeyEncryption{
				KeyEncryptionKeyIdentity: &armdevcenter.CustomerManagedKeyEncryptionKeyIdentity{
					IdentityType:                   to.Ptr(armdevcenter.IdentityTypeUserAssignedIdentity),
					UserAssignedIdentityResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1"),
				},
				KeyEncryptionKeyURL: to.Ptr("https://contosovault.vault.azure.net/keys/contosokek"),
			},
		},
	},
}, 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.DevCenter = armdevcenter.DevCenter{
// 	Name: to.Ptr("Contoso"),
// 	Type: to.Ptr("Microsoft.DevCenter/devcenters"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-11T22:00:08.896Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-11T22:00:10.896Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user2"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Location: to.Ptr("centralus"),
// 	Tags: map[string]*string{
// 		"CostCode": to.Ptr("12345"),
// 	},
// 	Identity: &armdevcenter.ManagedServiceIdentity{
// 		Type: to.Ptr(armdevcenter.ManagedServiceIdentityTypeUserAssigned),
// 		UserAssignedIdentities: map[string]*armdevcenter.UserAssignedIdentity{
// 			"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1": &armdevcenter.UserAssignedIdentity{
// 				ClientID: to.Ptr("e35621a5-f615-4a20-940e-de8a84b15abc"),
// 				PrincipalID: to.Ptr("2111b8fc-e123-485a-b408-bf1153189494"),
// 			},
// 		},
// 	},
// 	Properties: &armdevcenter.Properties{
// 		DisplayName: to.Ptr("ContosoDevCenter"),
// 		Encryption: &armdevcenter.Encryption{
// 			CustomerManagedKeyEncryption: &armdevcenter.CustomerManagedKeyEncryption{
// 				KeyEncryptionKeyIdentity: &armdevcenter.CustomerManagedKeyEncryptionKeyIdentity{
// 					IdentityType: to.Ptr(armdevcenter.IdentityTypeUserAssignedIdentity),
// 					UserAssignedIdentityResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1"),
// 				},
// 				KeyEncryptionKeyURL: to.Ptr("https://contosovault.vault.azure.net/keys/contosokek"),
// 			},
// 		},
// 		DevCenterURI: to.Ptr("https://4c7c8922-78e9-4928-aa6f-75ba59355371-contoso.centralus.devcenter.azure.com"),
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 	},
// }
Output:

Example (DevCentersCreateWithUserIdentity)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevCenters_CreateWithUserIdentity.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDevCentersClient().BeginCreateOrUpdate(ctx, "rg1", "Contoso", armdevcenter.DevCenter{
	Location: to.Ptr("centralus"),
	Tags: map[string]*string{
		"CostCode": to.Ptr("12345"),
	},
	Identity: &armdevcenter.ManagedServiceIdentity{
		Type: to.Ptr(armdevcenter.ManagedServiceIdentityTypeUserAssigned),
		UserAssignedIdentities: map[string]*armdevcenter.UserAssignedIdentity{
			"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1": {},
		},
	},
	Properties: &armdevcenter.Properties{
		DisplayName: to.Ptr("ContosoDevCenter"),
	},
}, 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.DevCenter = armdevcenter.DevCenter{
// 	Name: to.Ptr("Contoso"),
// 	Type: to.Ptr("Microsoft.DevCenter/devcenters"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-11T22:00:08.896Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-11T22:00:10.896Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user2"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Location: to.Ptr("centralus"),
// 	Tags: map[string]*string{
// 		"CostCode": to.Ptr("12345"),
// 	},
// 	Identity: &armdevcenter.ManagedServiceIdentity{
// 		Type: to.Ptr(armdevcenter.ManagedServiceIdentityTypeUserAssigned),
// 		UserAssignedIdentities: map[string]*armdevcenter.UserAssignedIdentity{
// 			"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1": &armdevcenter.UserAssignedIdentity{
// 				ClientID: to.Ptr("e35621a5-f615-4a20-940e-de8a84b15abc"),
// 				PrincipalID: to.Ptr("2111b8fc-e123-485a-b408-bf1153189494"),
// 			},
// 		},
// 	},
// 	Properties: &armdevcenter.Properties{
// 		DisplayName: to.Ptr("ContosoDevCenter"),
// 		DevCenterURI: to.Ptr("https://4c7c8922-78e9-4928-aa6f-75ba59355371-contoso.centralus.devcenter.azure.com"),
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 	},
// }
Output:

func (*DevCentersClient) BeginDelete

func (client *DevCentersClient) BeginDelete(ctx context.Context, resourceGroupName string, devCenterName string, options *DevCentersClientBeginDeleteOptions) (*runtime.Poller[DevCentersClientDeleteResponse], error)

BeginDelete - Deletes a devcenter If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • options - DevCentersClientBeginDeleteOptions contains the optional parameters for the DevCentersClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevCenters_Delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDevCentersClient().BeginDelete(ctx, "rg1", "Contoso", 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 (*DevCentersClient) BeginUpdate

func (client *DevCentersClient) BeginUpdate(ctx context.Context, resourceGroupName string, devCenterName string, body Update, options *DevCentersClientBeginUpdateOptions) (*runtime.Poller[DevCentersClientUpdateResponse], error)

BeginUpdate - Partially updates a devcenter. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • body - Updatable devcenter properties.
  • options - DevCentersClientBeginUpdateOptions contains the optional parameters for the DevCentersClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevCenters_Patch.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDevCentersClient().BeginUpdate(ctx, "rg1", "Contoso", armdevcenter.Update{
	Tags: map[string]*string{
		"CostCode": to.Ptr("12345"),
	},
}, 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.DevCenter = armdevcenter.DevCenter{
// 	Name: to.Ptr("Contoso"),
// 	Type: to.Ptr("Microsoft.DevCenter/devcenters"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-11T22:00:08.896Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-11T22:00:10.896Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user2"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Location: to.Ptr("centralus"),
// 	Tags: map[string]*string{
// 		"CostCode": to.Ptr("12345"),
// 	},
// 	Properties: &armdevcenter.Properties{
// 		DisplayName: to.Ptr("ContosoDevCenter"),
// 		DevCenterURI: to.Ptr("https://4c7c8922-78e9-4928-aa6f-75ba59355371-contoso.centralus.devcenter.azure.com"),
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 	},
// }
Output:

func (*DevCentersClient) Get

func (client *DevCentersClient) Get(ctx context.Context, resourceGroupName string, devCenterName string, options *DevCentersClientGetOptions) (DevCentersClientGetResponse, error)

Get - Gets a devcenter. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • options - DevCentersClientGetOptions contains the optional parameters for the DevCentersClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevCenters_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDevCentersClient().Get(ctx, "rg1", "Contoso", 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.DevCenter = armdevcenter.DevCenter{
// 	Name: to.Ptr("Contoso"),
// 	Type: to.Ptr("Microsoft.DevCenter/devcenters"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-11T22:00:08.896Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-11T22:00:10.896Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user2"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Location: to.Ptr("centralus"),
// 	Tags: map[string]*string{
// 		"CostCode": to.Ptr("12345"),
// 		"hidden-title": to.Ptr("ContosoDevCenter"),
// 	},
// 	Properties: &armdevcenter.Properties{
// 		DisplayName: to.Ptr("ContosoDevCenter"),
// 		ProjectCatalogSettings: &armdevcenter.ProjectCatalogSettingsInfo{
// 			CatalogItemSyncEnableStatus: to.Ptr(armdevcenter.CatalogItemSyncEnableStatusEnabled),
// 		},
// 		DevCenterURI: to.Ptr("https://4c7c8922-78e9-4928-aa6f-75ba59355371-contoso.centralus.devcenter.azure.com"),
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 	},
// }
Output:

func (*DevCentersClient) NewListByResourceGroupPager

func (client *DevCentersClient) NewListByResourceGroupPager(resourceGroupName string, options *DevCentersClientListByResourceGroupOptions) *runtime.Pager[DevCentersClientListByResourceGroupResponse]

NewListByResourceGroupPager - Lists all devcenters in a resource group.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - DevCentersClientListByResourceGroupOptions contains the optional parameters for the DevCentersClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevCenters_ListByResourceGroup.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewDevCentersClient().NewListByResourceGroupPager("rg1", &armdevcenter.DevCentersClientListByResourceGroupOptions{Top: 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.ListResult = armdevcenter.ListResult{
	// 	Value: []*armdevcenter.DevCenter{
	// 		{
	// 			Name: to.Ptr("Contoso"),
	// 			Type: to.Ptr("Microsoft.DevCenter/devcenters"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/contoso"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-11T22:00:08.896Z"); return t}()),
	// 				CreatedBy: to.Ptr("string"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-11T22:00:08.896Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("string"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 			},
	// 			Location: to.Ptr("centralus"),
	// 			Tags: map[string]*string{
	// 				"CostCode": to.Ptr("12345"),
	// 			},
	// 			Properties: &armdevcenter.Properties{
	// 				DisplayName: to.Ptr("ContosoDevCenter"),
	// 				DevCenterURI: to.Ptr("https://4c7c8922-78e9-4928-aa6f-75ba59355371-contoso.centralus.devcenter.azure.com"),
	// 				ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
	// 			},
	// 	}},
	// }
}
Output:

func (*DevCentersClient) NewListBySubscriptionPager

NewListBySubscriptionPager - Lists all devcenters in a subscription.

Generated from API version 2024-02-01

  • options - DevCentersClientListBySubscriptionOptions contains the optional parameters for the DevCentersClient.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/DevCenters_ListBySubscription.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewDevCentersClient().NewListBySubscriptionPager(&armdevcenter.DevCentersClientListBySubscriptionOptions{Top: 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.ListResult = armdevcenter.ListResult{
	// 	Value: []*armdevcenter.DevCenter{
	// 		{
	// 			Name: to.Ptr("Contoso"),
	// 			Type: to.Ptr("Microsoft.DevCenter/devcenters"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/contoso"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-11T22:00:08.896Z"); return t}()),
	// 				CreatedBy: to.Ptr("string"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-11T22:00:08.896Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("string"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 			},
	// 			Location: to.Ptr("centralus"),
	// 			Tags: map[string]*string{
	// 				"CostCode": to.Ptr("12345"),
	// 			},
	// 			Properties: &armdevcenter.Properties{
	// 				DisplayName: to.Ptr("ContosoDevCenter"),
	// 				DevCenterURI: to.Ptr("https://4c7c8922-78e9-4928-aa6f-75ba59355371-contoso.centralus.devcenter.azure.com"),
	// 				ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
	// 			},
	// 	}},
	// }
}
Output:

type DevCentersClientBeginCreateOrUpdateOptions

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

DevCentersClientBeginCreateOrUpdateOptions contains the optional parameters for the DevCentersClient.BeginCreateOrUpdate method.

type DevCentersClientBeginDeleteOptions

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

DevCentersClientBeginDeleteOptions contains the optional parameters for the DevCentersClient.BeginDelete method.

type DevCentersClientBeginUpdateOptions

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

DevCentersClientBeginUpdateOptions contains the optional parameters for the DevCentersClient.BeginUpdate method.

type DevCentersClientCreateOrUpdateResponse

type DevCentersClientCreateOrUpdateResponse struct {
	// Represents a devcenter resource.
	DevCenter
}

DevCentersClientCreateOrUpdateResponse contains the response from method DevCentersClient.BeginCreateOrUpdate.

type DevCentersClientDeleteResponse

type DevCentersClientDeleteResponse struct {
}

DevCentersClientDeleteResponse contains the response from method DevCentersClient.BeginDelete.

type DevCentersClientGetOptions

type DevCentersClientGetOptions struct {
}

DevCentersClientGetOptions contains the optional parameters for the DevCentersClient.Get method.

type DevCentersClientGetResponse

type DevCentersClientGetResponse struct {
	// Represents a devcenter resource.
	DevCenter
}

DevCentersClientGetResponse contains the response from method DevCentersClient.Get.

type DevCentersClientListByResourceGroupOptions

type DevCentersClientListByResourceGroupOptions struct {
	// The maximum number of resources to return from the operation. Example: '$top=10'.
	Top *int32
}

DevCentersClientListByResourceGroupOptions contains the optional parameters for the DevCentersClient.NewListByResourceGroupPager method.

type DevCentersClientListByResourceGroupResponse

type DevCentersClientListByResourceGroupResponse struct {
	// Result of the list devcenters operation
	ListResult
}

DevCentersClientListByResourceGroupResponse contains the response from method DevCentersClient.NewListByResourceGroupPager.

type DevCentersClientListBySubscriptionOptions

type DevCentersClientListBySubscriptionOptions struct {
	// The maximum number of resources to return from the operation. Example: '$top=10'.
	Top *int32
}

DevCentersClientListBySubscriptionOptions contains the optional parameters for the DevCentersClient.NewListBySubscriptionPager method.

type DevCentersClientListBySubscriptionResponse

type DevCentersClientListBySubscriptionResponse struct {
	// Result of the list devcenters operation
	ListResult
}

DevCentersClientListBySubscriptionResponse contains the response from method DevCentersClient.NewListBySubscriptionPager.

type DevCentersClientUpdateResponse

type DevCentersClientUpdateResponse struct {
	// Represents a devcenter resource.
	DevCenter
}

DevCentersClientUpdateResponse contains the response from method DevCentersClient.BeginUpdate.

type DomainJoinType

type DomainJoinType string

DomainJoinType - Active Directory join type

const (
	DomainJoinTypeAzureADJoin       DomainJoinType = "AzureADJoin"
	DomainJoinTypeHybridAzureADJoin DomainJoinType = "HybridAzureADJoin"
)

func PossibleDomainJoinTypeValues

func PossibleDomainJoinTypeValues() []DomainJoinType

PossibleDomainJoinTypeValues returns the possible values for the DomainJoinType const type.

type Encryption

type Encryption struct {
	// All Customer-managed key encryption properties for the resource.
	CustomerManagedKeyEncryption *CustomerManagedKeyEncryption
}

func (Encryption) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Encryption.

func (*Encryption) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Encryption.

type EndpointDependency

type EndpointDependency struct {
	// READ-ONLY; Human-readable supplemental information about the dependency and when it is applicable.
	Description *string

	// READ-ONLY; The domain name of the dependency. Domain names may be fully qualified or may contain a * wildcard.
	DomainName *string

	// READ-ONLY; The list of connection details for this endpoint.
	EndpointDetails []*EndpointDetail
}

EndpointDependency - A domain name and connection details used to access a dependency.

func (EndpointDependency) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EndpointDependency.

func (*EndpointDependency) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EndpointDependency.

type EndpointDetail

type EndpointDetail struct {
	// READ-ONLY; The port an endpoint is connected to.
	Port *int32
}

EndpointDetail - Details about the connection between the Batch service and the endpoint.

func (EndpointDetail) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EndpointDetail.

func (*EndpointDetail) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EndpointDetail.

type EnvironmentDefinition

type EnvironmentDefinition struct {
	// Environment definition properties.
	Properties *EnvironmentDefinitionProperties

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

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

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

EnvironmentDefinition - Represents an environment definition catalog item.

func (EnvironmentDefinition) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EnvironmentDefinition.

func (*EnvironmentDefinition) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentDefinition.

type EnvironmentDefinitionListResult

type EnvironmentDefinitionListResult struct {
	// READ-ONLY; URL to get the next set of results if there are any.
	NextLink *string

	// READ-ONLY; Current page of results.
	Value []*EnvironmentDefinition
}

EnvironmentDefinitionListResult - Results of the environment definition list operation.

func (EnvironmentDefinitionListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EnvironmentDefinitionListResult.

func (*EnvironmentDefinitionListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentDefinitionListResult.

type EnvironmentDefinitionParameter

type EnvironmentDefinitionParameter struct {
	// READ-ONLY; Description of the parameter
	Description *string

	// READ-ONLY; Unique ID of the parameter
	ID *string

	// READ-ONLY; Display name of the parameter
	Name *string

	// READ-ONLY; Whether or not this parameter is read-only. If true, default should have a value.
	ReadOnly *bool

	// READ-ONLY; Whether or not this parameter is required
	Required *bool

	// READ-ONLY; A string of one of the basic JSON types (number, integer, array, object, boolean, string)
	Type *ParameterType
}

EnvironmentDefinitionParameter - Properties of an Environment Definition parameter

func (EnvironmentDefinitionParameter) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EnvironmentDefinitionParameter.

func (*EnvironmentDefinitionParameter) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentDefinitionParameter.

type EnvironmentDefinitionProperties

type EnvironmentDefinitionProperties struct {
	// READ-ONLY; A short description of the environment definition.
	Description *string

	// READ-ONLY; Input parameters passed to an environment.
	Parameters []*EnvironmentDefinitionParameter

	// READ-ONLY; Path to the Environment Definition entrypoint file.
	TemplatePath *string

	// READ-ONLY; Validation status for the environment definition.
	ValidationStatus *CatalogResourceValidationStatus
}

EnvironmentDefinitionProperties - Properties of an environment definition.

func (EnvironmentDefinitionProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EnvironmentDefinitionProperties.

func (*EnvironmentDefinitionProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentDefinitionProperties.

type EnvironmentDefinitionsClient

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

EnvironmentDefinitionsClient contains the methods for the EnvironmentDefinitions group. Don't use this type directly, use NewEnvironmentDefinitionsClient() instead.

func NewEnvironmentDefinitionsClient

func NewEnvironmentDefinitionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EnvironmentDefinitionsClient, error)

NewEnvironmentDefinitionsClient creates a new instance of EnvironmentDefinitionsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*EnvironmentDefinitionsClient) Get

func (client *EnvironmentDefinitionsClient) Get(ctx context.Context, resourceGroupName string, devCenterName string, catalogName string, environmentDefinitionName string, options *EnvironmentDefinitionsClientGetOptions) (EnvironmentDefinitionsClientGetResponse, error)

Get - Gets an environment definition from the catalog. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • catalogName - The name of the Catalog.
  • environmentDefinitionName - The name of the Environment Definition.
  • options - EnvironmentDefinitionsClientGetOptions contains the optional parameters for the EnvironmentDefinitionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/EnvironmentDefinitions_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEnvironmentDefinitionsClient().Get(ctx, "rg1", "Contoso", "myCatalog", "myEnvironmentDefinition", 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.EnvironmentDefinition = armdevcenter.EnvironmentDefinition{
// 	Name: to.Ptr("myEnvironmentDefinition"),
// 	Type: to.Ptr("Microsoft.DevCenter/devcenters/catalogs/environmentDefinitions"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/catalogs/myCatalog/environmentDefinitions/myEnvironmentDefinition"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Properties: &armdevcenter.EnvironmentDefinitionProperties{
// 		Description: to.Ptr("My sample environment definition."),
// 		Parameters: []*armdevcenter.EnvironmentDefinitionParameter{
// 			{
// 				Name: to.Ptr("Function App Runtime"),
// 				Type: to.Ptr(armdevcenter.ParameterTypeString),
// 				ID: to.Ptr("functionAppRuntime"),
// 				Required: to.Ptr(true),
// 			},
// 			{
// 				Name: to.Ptr("Storage Account Type"),
// 				Type: to.Ptr(armdevcenter.ParameterTypeString),
// 				ID: to.Ptr("storageAccountType"),
// 				Required: to.Ptr(true),
// 			},
// 			{
// 				Name: to.Ptr("HTTPS only"),
// 				Type: to.Ptr(armdevcenter.ParameterTypeBoolean),
// 				ID: to.Ptr("httpsOnly"),
// 				ReadOnly: to.Ptr(true),
// 				Required: to.Ptr(true),
// 		}},
// 		TemplatePath: to.Ptr("azuredeploy.json"),
// 		ValidationStatus: to.Ptr(armdevcenter.CatalogResourceValidationStatusSucceeded),
// 	},
// }
Output:

func (*EnvironmentDefinitionsClient) GetByProjectCatalog

func (client *EnvironmentDefinitionsClient) GetByProjectCatalog(ctx context.Context, resourceGroupName string, projectName string, catalogName string, environmentDefinitionName string, options *EnvironmentDefinitionsClientGetByProjectCatalogOptions) (EnvironmentDefinitionsClientGetByProjectCatalogResponse, error)

GetByProjectCatalog - Gets an environment definition from the catalog. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • catalogName - The name of the Catalog.
  • environmentDefinitionName - The name of the Environment Definition.
  • options - EnvironmentDefinitionsClientGetByProjectCatalogOptions contains the optional parameters for the EnvironmentDefinitionsClient.GetByProjectCatalog method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/EnvironmentDefinitions_GetByProjectCatalog.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEnvironmentDefinitionsClient().GetByProjectCatalog(ctx, "rg1", "DevProject", "myCatalog", "myEnvironmentDefinition", 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.EnvironmentDefinition = armdevcenter.EnvironmentDefinition{
// 	Name: to.Ptr("myEnvironmentDefinition"),
// 	Type: to.Ptr("Microsoft.DevCenter/projects/catalogs/environmentDefinitions"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject/catalogs/myCatalog/environmentDefinitions/myEnvironmentDefinition"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Properties: &armdevcenter.EnvironmentDefinitionProperties{
// 		Description: to.Ptr("My sample environment definition."),
// 		Parameters: []*armdevcenter.EnvironmentDefinitionParameter{
// 			{
// 				Name: to.Ptr("Function App Runtime"),
// 				Type: to.Ptr(armdevcenter.ParameterTypeString),
// 				ID: to.Ptr("functionAppRuntime"),
// 				Required: to.Ptr(true),
// 			},
// 			{
// 				Name: to.Ptr("Storage Account Type"),
// 				Type: to.Ptr(armdevcenter.ParameterTypeString),
// 				ID: to.Ptr("storageAccountType"),
// 				Required: to.Ptr(true),
// 			},
// 			{
// 				Name: to.Ptr("HTTPS only"),
// 				Type: to.Ptr(armdevcenter.ParameterTypeBoolean),
// 				ID: to.Ptr("httpsOnly"),
// 				ReadOnly: to.Ptr(true),
// 				Required: to.Ptr(true),
// 		}},
// 		TemplatePath: to.Ptr("azuredeploy.json"),
// 		ValidationStatus: to.Ptr(armdevcenter.CatalogResourceValidationStatusSucceeded),
// 	},
// }
Output:

func (*EnvironmentDefinitionsClient) GetErrorDetails

func (client *EnvironmentDefinitionsClient) GetErrorDetails(ctx context.Context, resourceGroupName string, devCenterName string, catalogName string, environmentDefinitionName string, options *EnvironmentDefinitionsClientGetErrorDetailsOptions) (EnvironmentDefinitionsClientGetErrorDetailsResponse, error)

GetErrorDetails - Gets Environment Definition error details If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • catalogName - The name of the Catalog.
  • environmentDefinitionName - The name of the Environment Definition.
  • options - EnvironmentDefinitionsClientGetErrorDetailsOptions contains the optional parameters for the EnvironmentDefinitionsClient.GetErrorDetails method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/EnvironmentDefinitions_GetErrorDetails.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEnvironmentDefinitionsClient().GetErrorDetails(ctx, "rg1", "Contoso", "myCatalog", "myEnvironmentDefinition", 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.CatalogResourceValidationErrorDetails = armdevcenter.CatalogResourceValidationErrorDetails{
// 	Errors: []*armdevcenter.CatalogErrorDetails{
// 		{
// 			Code: to.Ptr("ParameterValueInvalid"),
// 			Message: to.Ptr("Expected parameter value for 'InstanceCount' to be integer but found the string 'test'."),
// 	}},
// }
Output:

func (*EnvironmentDefinitionsClient) NewListByCatalogPager

func (client *EnvironmentDefinitionsClient) NewListByCatalogPager(resourceGroupName string, devCenterName string, catalogName string, options *EnvironmentDefinitionsClientListByCatalogOptions) *runtime.Pager[EnvironmentDefinitionsClientListByCatalogResponse]

NewListByCatalogPager - List environment definitions in the catalog.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • catalogName - The name of the Catalog.
  • options - EnvironmentDefinitionsClientListByCatalogOptions contains the optional parameters for the EnvironmentDefinitionsClient.NewListByCatalogPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/EnvironmentDefinitions_ListByCatalog.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewEnvironmentDefinitionsClient().NewListByCatalogPager("rg1", "Contoso", "myCatalog", &armdevcenter.EnvironmentDefinitionsClientListByCatalogOptions{Top: 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.EnvironmentDefinitionListResult = armdevcenter.EnvironmentDefinitionListResult{
	// 	Value: []*armdevcenter.EnvironmentDefinition{
	// 		{
	// 			Name: to.Ptr("myEnvironmentDefinition"),
	// 			Type: to.Ptr("Microsoft.DevCenter/devcenters/catalogs/environmentDefinitions"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/catalogs/myCatalog/environmentDefinitions/myEnvironmentDefinition"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
	// 				CreatedBy: to.Ptr("user1"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("user1"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 			},
	// 			Properties: &armdevcenter.EnvironmentDefinitionProperties{
	// 				Description: to.Ptr("My sample environment definition."),
	// 				Parameters: []*armdevcenter.EnvironmentDefinitionParameter{
	// 					{
	// 						Name: to.Ptr("Function App Runtime"),
	// 						Type: to.Ptr(armdevcenter.ParameterTypeString),
	// 						ID: to.Ptr("functionAppRuntime"),
	// 						Required: to.Ptr(true),
	// 					},
	// 					{
	// 						Name: to.Ptr("Storage Account Type"),
	// 						Type: to.Ptr(armdevcenter.ParameterTypeString),
	// 						ID: to.Ptr("storageAccountType"),
	// 						Required: to.Ptr(true),
	// 					},
	// 					{
	// 						Name: to.Ptr("HTTPS only"),
	// 						Type: to.Ptr(armdevcenter.ParameterTypeBoolean),
	// 						ID: to.Ptr("httpsOnly"),
	// 						ReadOnly: to.Ptr(true),
	// 						Required: to.Ptr(true),
	// 				}},
	// 				TemplatePath: to.Ptr("azuredeploy.json"),
	// 				ValidationStatus: to.Ptr(armdevcenter.CatalogResourceValidationStatusSucceeded),
	// 			},
	// 	}},
	// }
}
Output:

func (*EnvironmentDefinitionsClient) NewListByProjectCatalogPager

NewListByProjectCatalogPager - Lists the environment definitions in this project catalog.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • catalogName - The name of the Catalog.
  • options - EnvironmentDefinitionsClientListByProjectCatalogOptions contains the optional parameters for the EnvironmentDefinitionsClient.NewListByProjectCatalogPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/EnvironmentDefinitions_ListByProjectCatalog.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewEnvironmentDefinitionsClient().NewListByProjectCatalogPager("rg1", "DevProject", "myCatalog", 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.EnvironmentDefinitionListResult = armdevcenter.EnvironmentDefinitionListResult{
	// 	Value: []*armdevcenter.EnvironmentDefinition{
	// 		{
	// 			Name: to.Ptr("myEnvironmentDefinition"),
	// 			Type: to.Ptr("Microsoft.DevCenter/projects/catalogs/environmentDefinitions"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject/catalogs/myCatalog/environmentDefinitions/myEnvironmentDefinition"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
	// 				CreatedBy: to.Ptr("user1"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("user1"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 			},
	// 			Properties: &armdevcenter.EnvironmentDefinitionProperties{
	// 				Description: to.Ptr("My sample environment definition."),
	// 				Parameters: []*armdevcenter.EnvironmentDefinitionParameter{
	// 					{
	// 						Name: to.Ptr("Function App Runtime"),
	// 						Type: to.Ptr(armdevcenter.ParameterTypeString),
	// 						ID: to.Ptr("functionAppRuntime"),
	// 						Required: to.Ptr(true),
	// 					},
	// 					{
	// 						Name: to.Ptr("Storage Account Type"),
	// 						Type: to.Ptr(armdevcenter.ParameterTypeString),
	// 						ID: to.Ptr("storageAccountType"),
	// 						Required: to.Ptr(true),
	// 					},
	// 					{
	// 						Name: to.Ptr("HTTPS only"),
	// 						Type: to.Ptr(armdevcenter.ParameterTypeBoolean),
	// 						ID: to.Ptr("httpsOnly"),
	// 						ReadOnly: to.Ptr(true),
	// 						Required: to.Ptr(true),
	// 				}},
	// 				TemplatePath: to.Ptr("azuredeploy.json"),
	// 				ValidationStatus: to.Ptr(armdevcenter.CatalogResourceValidationStatusSucceeded),
	// 			},
	// 	}},
	// }
}
Output:

type EnvironmentDefinitionsClientGetByProjectCatalogOptions

type EnvironmentDefinitionsClientGetByProjectCatalogOptions struct {
}

EnvironmentDefinitionsClientGetByProjectCatalogOptions contains the optional parameters for the EnvironmentDefinitionsClient.GetByProjectCatalog method.

type EnvironmentDefinitionsClientGetByProjectCatalogResponse

type EnvironmentDefinitionsClientGetByProjectCatalogResponse struct {
	// Represents an environment definition catalog item.
	EnvironmentDefinition
}

EnvironmentDefinitionsClientGetByProjectCatalogResponse contains the response from method EnvironmentDefinitionsClient.GetByProjectCatalog.

type EnvironmentDefinitionsClientGetErrorDetailsOptions

type EnvironmentDefinitionsClientGetErrorDetailsOptions struct {
}

EnvironmentDefinitionsClientGetErrorDetailsOptions contains the optional parameters for the EnvironmentDefinitionsClient.GetErrorDetails method.

type EnvironmentDefinitionsClientGetErrorDetailsResponse

type EnvironmentDefinitionsClientGetErrorDetailsResponse struct {
	// List of validator error details. Populated when changes are made to the resource or its dependent resources that impact
	// the validity of the Catalog resource.
	CatalogResourceValidationErrorDetails
}

EnvironmentDefinitionsClientGetErrorDetailsResponse contains the response from method EnvironmentDefinitionsClient.GetErrorDetails.

type EnvironmentDefinitionsClientGetOptions

type EnvironmentDefinitionsClientGetOptions struct {
}

EnvironmentDefinitionsClientGetOptions contains the optional parameters for the EnvironmentDefinitionsClient.Get method.

type EnvironmentDefinitionsClientGetResponse

type EnvironmentDefinitionsClientGetResponse struct {
	// Represents an environment definition catalog item.
	EnvironmentDefinition
}

EnvironmentDefinitionsClientGetResponse contains the response from method EnvironmentDefinitionsClient.Get.

type EnvironmentDefinitionsClientListByCatalogOptions

type EnvironmentDefinitionsClientListByCatalogOptions struct {
	// The maximum number of resources to return from the operation. Example: '$top=10'.
	Top *int32
}

EnvironmentDefinitionsClientListByCatalogOptions contains the optional parameters for the EnvironmentDefinitionsClient.NewListByCatalogPager method.

type EnvironmentDefinitionsClientListByCatalogResponse

type EnvironmentDefinitionsClientListByCatalogResponse struct {
	// Results of the environment definition list operation.
	EnvironmentDefinitionListResult
}

EnvironmentDefinitionsClientListByCatalogResponse contains the response from method EnvironmentDefinitionsClient.NewListByCatalogPager.

type EnvironmentDefinitionsClientListByProjectCatalogOptions

type EnvironmentDefinitionsClientListByProjectCatalogOptions struct {
}

EnvironmentDefinitionsClientListByProjectCatalogOptions contains the optional parameters for the EnvironmentDefinitionsClient.NewListByProjectCatalogPager method.

type EnvironmentDefinitionsClientListByProjectCatalogResponse

type EnvironmentDefinitionsClientListByProjectCatalogResponse struct {
	// Results of the environment definition list operation.
	EnvironmentDefinitionListResult
}

EnvironmentDefinitionsClientListByProjectCatalogResponse contains the response from method EnvironmentDefinitionsClient.NewListByProjectCatalogPager.

type EnvironmentRole

type EnvironmentRole struct {
	// READ-ONLY; This is a description of the Role Assignment.
	Description *string

	// READ-ONLY; The common name of the Role Assignment. This is a descriptive name such as 'AcrPush'.
	RoleName *string
}

EnvironmentRole - A role that can be assigned to a user.

func (EnvironmentRole) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EnvironmentRole.

func (*EnvironmentRole) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentRole.

type EnvironmentType

type EnvironmentType struct {
	// Properties of an environment type.
	Properties *EnvironmentTypeProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

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

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

EnvironmentType - Represents an environment type.

func (EnvironmentType) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EnvironmentType.

func (*EnvironmentType) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentType.

type EnvironmentTypeEnableStatus

type EnvironmentTypeEnableStatus string

EnvironmentTypeEnableStatus - Indicates whether the environment type is either enabled or disabled.

const (
	EnvironmentTypeEnableStatusDisabled EnvironmentTypeEnableStatus = "Disabled"
	EnvironmentTypeEnableStatusEnabled  EnvironmentTypeEnableStatus = "Enabled"
)

func PossibleEnvironmentTypeEnableStatusValues

func PossibleEnvironmentTypeEnableStatusValues() []EnvironmentTypeEnableStatus

PossibleEnvironmentTypeEnableStatusValues returns the possible values for the EnvironmentTypeEnableStatus const type.

type EnvironmentTypeListResult

type EnvironmentTypeListResult struct {
	// READ-ONLY; URL to get the next set of results if there are any.
	NextLink *string

	// READ-ONLY; Current page of results.
	Value []*EnvironmentType
}

EnvironmentTypeListResult - Result of the environment type list operation.

func (EnvironmentTypeListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EnvironmentTypeListResult.

func (*EnvironmentTypeListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentTypeListResult.

type EnvironmentTypeProperties

type EnvironmentTypeProperties struct {
	// The display name of the environment type.
	DisplayName *string

	// READ-ONLY; The provisioning state of the resource.
	ProvisioningState *ProvisioningState
}

EnvironmentTypeProperties - Properties of an environment type.

func (EnvironmentTypeProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EnvironmentTypeProperties.

func (*EnvironmentTypeProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentTypeProperties.

type EnvironmentTypeUpdate

type EnvironmentTypeUpdate struct {
	// Properties of an environment type to be updated.
	Properties *EnvironmentTypeUpdateProperties

	// Resource tags.
	Tags map[string]*string
}

EnvironmentTypeUpdate - The environment type for partial update. Properties not provided in the update request will not be changed.

func (EnvironmentTypeUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EnvironmentTypeUpdate.

func (*EnvironmentTypeUpdate) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentTypeUpdate.

type EnvironmentTypeUpdateProperties

type EnvironmentTypeUpdateProperties struct {
	// The display name of the environment type.
	DisplayName *string
}

EnvironmentTypeUpdateProperties - Properties of an environment type. These properties can be updated after the resource has been created.

func (EnvironmentTypeUpdateProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EnvironmentTypeUpdateProperties.

func (*EnvironmentTypeUpdateProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentTypeUpdateProperties.

type EnvironmentTypesClient

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

EnvironmentTypesClient contains the methods for the EnvironmentTypes group. Don't use this type directly, use NewEnvironmentTypesClient() instead.

func NewEnvironmentTypesClient

func NewEnvironmentTypesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EnvironmentTypesClient, error)

NewEnvironmentTypesClient creates a new instance of EnvironmentTypesClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*EnvironmentTypesClient) CreateOrUpdate

func (client *EnvironmentTypesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, devCenterName string, environmentTypeName string, body EnvironmentType, options *EnvironmentTypesClientCreateOrUpdateOptions) (EnvironmentTypesClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates an environment type. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • environmentTypeName - The name of the environment type.
  • body - Represents an Environment Type.
  • options - EnvironmentTypesClientCreateOrUpdateOptions contains the optional parameters for the EnvironmentTypesClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/EnvironmentTypes_Put.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEnvironmentTypesClient().CreateOrUpdate(ctx, "rg1", "Contoso", "DevTest", armdevcenter.EnvironmentType{
	Properties: &armdevcenter.EnvironmentTypeProperties{
		DisplayName: to.Ptr("Dev"),
	},
	Tags: map[string]*string{
		"Owner": to.Ptr("superuser"),
	},
}, 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.EnvironmentType = armdevcenter.EnvironmentType{
// 	Name: to.Ptr("DevTest"),
// 	Type: to.Ptr("Microsoft.DevCenter/devcenters/environmenttypes"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/environmentTypes/DevTest"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		CreatedBy: to.Ptr("User1@contoso.com"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		LastModifiedBy: to.Ptr("User1@contoso.com"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Properties: &armdevcenter.EnvironmentTypeProperties{
// 		DisplayName: to.Ptr("Dev"),
// 	},
// 	Tags: map[string]*string{
// 		"Owner": to.Ptr("superuser"),
// 		"hidden-title": to.Ptr("Dev"),
// 	},
// }
Output:

func (*EnvironmentTypesClient) Delete

func (client *EnvironmentTypesClient) Delete(ctx context.Context, resourceGroupName string, devCenterName string, environmentTypeName string, options *EnvironmentTypesClientDeleteOptions) (EnvironmentTypesClientDeleteResponse, error)

Delete - Deletes an environment type. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • environmentTypeName - The name of the environment type.
  • options - EnvironmentTypesClientDeleteOptions contains the optional parameters for the EnvironmentTypesClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/EnvironmentTypes_Delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewEnvironmentTypesClient().Delete(ctx, "rg1", "Contoso", "DevTest", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*EnvironmentTypesClient) Get

func (client *EnvironmentTypesClient) Get(ctx context.Context, resourceGroupName string, devCenterName string, environmentTypeName string, options *EnvironmentTypesClientGetOptions) (EnvironmentTypesClientGetResponse, error)

Get - Gets an environment type. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • environmentTypeName - The name of the environment type.
  • options - EnvironmentTypesClientGetOptions contains the optional parameters for the EnvironmentTypesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/EnvironmentTypes_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEnvironmentTypesClient().Get(ctx, "rg1", "Contoso", "DevTest", 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.EnvironmentType = armdevcenter.EnvironmentType{
// 	Name: to.Ptr("DevTest"),
// 	Type: to.Ptr("Microsoft.DevCenter/devcenters/environmenttypes"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/environmentTypes/DevTest"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		CreatedBy: to.Ptr("User1@contoso.com"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		LastModifiedBy: to.Ptr("User1@contoso.com"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Properties: &armdevcenter.EnvironmentTypeProperties{
// 		DisplayName: to.Ptr("Dev"),
// 	},
// 	Tags: map[string]*string{
// 		"CostCenter": to.Ptr("RnD"),
// 		"hidden-title": to.Ptr("Dev"),
// 	},
// }
Output:

func (*EnvironmentTypesClient) NewListByDevCenterPager

func (client *EnvironmentTypesClient) NewListByDevCenterPager(resourceGroupName string, devCenterName string, options *EnvironmentTypesClientListByDevCenterOptions) *runtime.Pager[EnvironmentTypesClientListByDevCenterResponse]

NewListByDevCenterPager - Lists environment types for the devcenter.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • options - EnvironmentTypesClientListByDevCenterOptions contains the optional parameters for the EnvironmentTypesClient.NewListByDevCenterPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/EnvironmentTypes_List.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewEnvironmentTypesClient().NewListByDevCenterPager("rg1", "Contoso", &armdevcenter.EnvironmentTypesClientListByDevCenterOptions{Top: 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.EnvironmentTypeListResult = armdevcenter.EnvironmentTypeListResult{
	// 	Value: []*armdevcenter.EnvironmentType{
	// 		{
	// 			Name: to.Ptr("DevTest"),
	// 			Type: to.Ptr("Microsoft.DevCenter/devcenters/environmenttypes"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/environmentTypes/DevTest"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
	// 				CreatedBy: to.Ptr("User1@contoso.com"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("User1@contoso.com"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 			},
	// 			Tags: map[string]*string{
	// 				"CostCenter": to.Ptr("RnD"),
	// 			},
	// 	}},
	// }
}
Output:

func (*EnvironmentTypesClient) Update

func (client *EnvironmentTypesClient) Update(ctx context.Context, resourceGroupName string, devCenterName string, environmentTypeName string, body EnvironmentTypeUpdate, options *EnvironmentTypesClientUpdateOptions) (EnvironmentTypesClientUpdateResponse, error)

Update - Partially updates an environment type. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • environmentTypeName - The name of the environment type.
  • body - Updatable environment type properties.
  • options - EnvironmentTypesClientUpdateOptions contains the optional parameters for the EnvironmentTypesClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/EnvironmentTypes_Patch.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEnvironmentTypesClient().Update(ctx, "rg1", "Contoso", "DevTest", armdevcenter.EnvironmentTypeUpdate{
	Properties: &armdevcenter.EnvironmentTypeUpdateProperties{
		DisplayName: to.Ptr("Dev"),
	},
	Tags: map[string]*string{
		"Owner": to.Ptr("superuser"),
	},
}, 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.EnvironmentType = armdevcenter.EnvironmentType{
// 	Name: to.Ptr("DevTest"),
// 	Type: to.Ptr("Microsoft.DevCenter/devcenters/environmenttypes"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/environmentTypes/DevTest"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		CreatedBy: to.Ptr("User1@contoso.com"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		LastModifiedBy: to.Ptr("User1@contoso.com"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Properties: &armdevcenter.EnvironmentTypeProperties{
// 		DisplayName: to.Ptr("Dev"),
// 	},
// 	Tags: map[string]*string{
// 		"Owner": to.Ptr("superuser"),
// 		"hidden-title": to.Ptr("Dev"),
// 	},
// }
Output:

type EnvironmentTypesClientCreateOrUpdateOptions

type EnvironmentTypesClientCreateOrUpdateOptions struct {
}

EnvironmentTypesClientCreateOrUpdateOptions contains the optional parameters for the EnvironmentTypesClient.CreateOrUpdate method.

type EnvironmentTypesClientCreateOrUpdateResponse

type EnvironmentTypesClientCreateOrUpdateResponse struct {
	// Represents an environment type.
	EnvironmentType
}

EnvironmentTypesClientCreateOrUpdateResponse contains the response from method EnvironmentTypesClient.CreateOrUpdate.

type EnvironmentTypesClientDeleteOptions

type EnvironmentTypesClientDeleteOptions struct {
}

EnvironmentTypesClientDeleteOptions contains the optional parameters for the EnvironmentTypesClient.Delete method.

type EnvironmentTypesClientDeleteResponse

type EnvironmentTypesClientDeleteResponse struct {
}

EnvironmentTypesClientDeleteResponse contains the response from method EnvironmentTypesClient.Delete.

type EnvironmentTypesClientGetOptions

type EnvironmentTypesClientGetOptions struct {
}

EnvironmentTypesClientGetOptions contains the optional parameters for the EnvironmentTypesClient.Get method.

type EnvironmentTypesClientGetResponse

type EnvironmentTypesClientGetResponse struct {
	// Represents an environment type.
	EnvironmentType
}

EnvironmentTypesClientGetResponse contains the response from method EnvironmentTypesClient.Get.

type EnvironmentTypesClientListByDevCenterOptions

type EnvironmentTypesClientListByDevCenterOptions struct {
	// The maximum number of resources to return from the operation. Example: '$top=10'.
	Top *int32
}

EnvironmentTypesClientListByDevCenterOptions contains the optional parameters for the EnvironmentTypesClient.NewListByDevCenterPager method.

type EnvironmentTypesClientListByDevCenterResponse

type EnvironmentTypesClientListByDevCenterResponse struct {
	// Result of the environment type list operation.
	EnvironmentTypeListResult
}

EnvironmentTypesClientListByDevCenterResponse contains the response from method EnvironmentTypesClient.NewListByDevCenterPager.

type EnvironmentTypesClientUpdateOptions

type EnvironmentTypesClientUpdateOptions struct {
}

EnvironmentTypesClientUpdateOptions contains the optional parameters for the EnvironmentTypesClient.Update method.

type EnvironmentTypesClientUpdateResponse

type EnvironmentTypesClientUpdateResponse struct {
	// Represents an environment type.
	EnvironmentType
}

EnvironmentTypesClientUpdateResponse contains the response from method EnvironmentTypesClient.Update.

type ErrorAdditionalInfo

type ErrorAdditionalInfo struct {
	// READ-ONLY; The additional info.
	Info any

	// READ-ONLY; The additional info type.
	Type *string
}

ErrorAdditionalInfo - The resource management error additional info.

func (ErrorAdditionalInfo) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.

func (*ErrorAdditionalInfo) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.

type ErrorDetail

type ErrorDetail struct {
	// READ-ONLY; The error additional info.
	AdditionalInfo []*ErrorAdditionalInfo

	// READ-ONLY; The error code.
	Code *string

	// READ-ONLY; The error details.
	Details []*ErrorDetail

	// READ-ONLY; The error message.
	Message *string

	// READ-ONLY; The error target.
	Target *string
}

ErrorDetail - The error detail.

func (ErrorDetail) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorDetail.

func (*ErrorDetail) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.

type GalleriesClient

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

GalleriesClient contains the methods for the Galleries group. Don't use this type directly, use NewGalleriesClient() instead.

func NewGalleriesClient

func NewGalleriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GalleriesClient, error)

NewGalleriesClient creates a new instance of GalleriesClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*GalleriesClient) BeginCreateOrUpdate

func (client *GalleriesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, devCenterName string, galleryName string, body Gallery, options *GalleriesClientBeginCreateOrUpdateOptions) (*runtime.Poller[GalleriesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a gallery. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • galleryName - The name of the gallery.
  • body - Represents a gallery.
  • options - GalleriesClientBeginCreateOrUpdateOptions contains the optional parameters for the GalleriesClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Galleries_Create.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewGalleriesClient().BeginCreateOrUpdate(ctx, "rg1", "Contoso", "StandardGallery", armdevcenter.Gallery{
	Properties: &armdevcenter.GalleryProperties{
		GalleryResourceID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.Compute/galleries/StandardGallery"),
	},
}, 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.Gallery = armdevcenter.Gallery{
// 	Name: to.Ptr("StandardGallery"),
// 	Type: to.Ptr("Microsoft.DevCenter/devcenters/galleries"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/StandardGallery"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		CreatedBy: to.Ptr("User1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		LastModifiedBy: to.Ptr("User1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Properties: &armdevcenter.GalleryProperties{
// 		GalleryResourceID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.Compute/galleries/StandardGallery"),
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 	},
// }
Output:

func (*GalleriesClient) BeginDelete

func (client *GalleriesClient) BeginDelete(ctx context.Context, resourceGroupName string, devCenterName string, galleryName string, options *GalleriesClientBeginDeleteOptions) (*runtime.Poller[GalleriesClientDeleteResponse], error)

BeginDelete - Deletes a gallery resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • galleryName - The name of the gallery.
  • options - GalleriesClientBeginDeleteOptions contains the optional parameters for the GalleriesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Galleries_Delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewGalleriesClient().BeginDelete(ctx, "rg1", "Contoso", "StandardGallery", 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 (*GalleriesClient) Get

func (client *GalleriesClient) Get(ctx context.Context, resourceGroupName string, devCenterName string, galleryName string, options *GalleriesClientGetOptions) (GalleriesClientGetResponse, error)

Get - Gets a gallery If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • galleryName - The name of the gallery.
  • options - GalleriesClientGetOptions contains the optional parameters for the GalleriesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Galleries_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewGalleriesClient().Get(ctx, "rg1", "Contoso", "StandardGallery", 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.Gallery = armdevcenter.Gallery{
// 	Name: to.Ptr("StandardGallery"),
// 	Type: to.Ptr("Microsoft.DevCenter/devcenters/galleries"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/StandardGallery"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		CreatedBy: to.Ptr("User1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		LastModifiedBy: to.Ptr("User1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Properties: &armdevcenter.GalleryProperties{
// 		GalleryResourceID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.Compute/galleries/StandardGallery"),
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 	},
// }
Output:

func (*GalleriesClient) NewListByDevCenterPager

func (client *GalleriesClient) NewListByDevCenterPager(resourceGroupName string, devCenterName string, options *GalleriesClientListByDevCenterOptions) *runtime.Pager[GalleriesClientListByDevCenterResponse]

NewListByDevCenterPager - Lists galleries for a devcenter.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • options - GalleriesClientListByDevCenterOptions contains the optional parameters for the GalleriesClient.NewListByDevCenterPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Galleries_List.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewGalleriesClient().NewListByDevCenterPager("rg1", "Contoso", &armdevcenter.GalleriesClientListByDevCenterOptions{Top: 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.GalleryListResult = armdevcenter.GalleryListResult{
	// 	Value: []*armdevcenter.Gallery{
	// 		{
	// 			Name: to.Ptr("StandardGallery"),
	// 			Type: to.Ptr("Microsoft.DevCenter/devcenters/galleries"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/default"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
	// 				CreatedBy: to.Ptr("User1"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("User1"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 			},
	// 			Properties: &armdevcenter.GalleryProperties{
	// 				GalleryResourceID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.Compute/galleries/CentralGallery"),
	// 				ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("StandardGallery"),
	// 			Type: to.Ptr("Microsoft.DevCenter/devcenters/galleries"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/ImageGallery"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
	// 				CreatedBy: to.Ptr("User1"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("User1"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 			},
	// 			Properties: &armdevcenter.GalleryProperties{
	// 				GalleryResourceID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.Compute/galleries/SharedGallery"),
	// 				ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
	// 			},
	// 	}},
	// }
}
Output:

type GalleriesClientBeginCreateOrUpdateOptions

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

GalleriesClientBeginCreateOrUpdateOptions contains the optional parameters for the GalleriesClient.BeginCreateOrUpdate method.

type GalleriesClientBeginDeleteOptions

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

GalleriesClientBeginDeleteOptions contains the optional parameters for the GalleriesClient.BeginDelete method.

type GalleriesClientCreateOrUpdateResponse

type GalleriesClientCreateOrUpdateResponse struct {
	// Represents a gallery.
	Gallery
}

GalleriesClientCreateOrUpdateResponse contains the response from method GalleriesClient.BeginCreateOrUpdate.

type GalleriesClientDeleteResponse

type GalleriesClientDeleteResponse struct {
}

GalleriesClientDeleteResponse contains the response from method GalleriesClient.BeginDelete.

type GalleriesClientGetOptions

type GalleriesClientGetOptions struct {
}

GalleriesClientGetOptions contains the optional parameters for the GalleriesClient.Get method.

type GalleriesClientGetResponse

type GalleriesClientGetResponse struct {
	// Represents a gallery.
	Gallery
}

GalleriesClientGetResponse contains the response from method GalleriesClient.Get.

type GalleriesClientListByDevCenterOptions

type GalleriesClientListByDevCenterOptions struct {
	// The maximum number of resources to return from the operation. Example: '$top=10'.
	Top *int32
}

GalleriesClientListByDevCenterOptions contains the optional parameters for the GalleriesClient.NewListByDevCenterPager method.

type GalleriesClientListByDevCenterResponse

type GalleriesClientListByDevCenterResponse struct {
	// Results of the gallery list operation.
	GalleryListResult
}

GalleriesClientListByDevCenterResponse contains the response from method GalleriesClient.NewListByDevCenterPager.

type Gallery struct {
	// Gallery properties.
	Properties *GalleryProperties

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

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

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Gallery - Represents a gallery.

func (Gallery) MarshalJSON

func (g Gallery) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Gallery.

func (*Gallery) UnmarshalJSON

func (g *Gallery) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Gallery.

type GalleryListResult

type GalleryListResult struct {
	// READ-ONLY; URL to get the next set of results if there are any.
	NextLink *string

	// READ-ONLY; Current page of results.
	Value []*Gallery
}

GalleryListResult - Results of the gallery list operation.

func (GalleryListResult) MarshalJSON

func (g GalleryListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GalleryListResult.

func (*GalleryListResult) UnmarshalJSON

func (g *GalleryListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GalleryListResult.

type GalleryProperties

type GalleryProperties struct {
	// REQUIRED; The resource ID of the backing Azure Compute Gallery.
	GalleryResourceID *string

	// READ-ONLY; The provisioning state of the resource.
	ProvisioningState *ProvisioningState
}

GalleryProperties - Properties of a gallery.

func (GalleryProperties) MarshalJSON

func (g GalleryProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GalleryProperties.

func (*GalleryProperties) UnmarshalJSON

func (g *GalleryProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GalleryProperties.

type GitCatalog

type GitCatalog struct {
	// Git branch.
	Branch *string

	// The folder where the catalog items can be found inside the repository.
	Path *string

	// A reference to the Key Vault secret containing a security token to authenticate to a Git repository.
	SecretIdentifier *string

	// Git URI.
	URI *string
}

GitCatalog - Properties for a Git repository catalog.

func (GitCatalog) MarshalJSON

func (g GitCatalog) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GitCatalog.

func (*GitCatalog) UnmarshalJSON

func (g *GitCatalog) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GitCatalog.

type HealthCheck

type HealthCheck struct {
	// READ-ONLY; Additional details about the health check or the recommended action.
	AdditionalDetails *string

	// READ-ONLY; The display name of this health check item.
	DisplayName *string

	// READ-ONLY; End time of the health check item.
	EndDateTime *time.Time

	// READ-ONLY; The type of error that occurred during this health check.
	ErrorType *string

	// READ-ONLY; The recommended action to fix the corresponding error.
	RecommendedAction *string

	// READ-ONLY; Start time of health check item.
	StartDateTime *time.Time

	// READ-ONLY; The status of the health check item.
	Status *HealthCheckStatus
}

HealthCheck - An individual health check item

func (HealthCheck) MarshalJSON

func (h HealthCheck) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HealthCheck.

func (*HealthCheck) UnmarshalJSON

func (h *HealthCheck) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HealthCheck.

type HealthCheckStatus

type HealthCheckStatus string

HealthCheckStatus - Health check status values

const (
	HealthCheckStatusFailed  HealthCheckStatus = "Failed"
	HealthCheckStatusPassed  HealthCheckStatus = "Passed"
	HealthCheckStatusPending HealthCheckStatus = "Pending"
	HealthCheckStatusRunning HealthCheckStatus = "Running"
	HealthCheckStatusUnknown HealthCheckStatus = "Unknown"
	HealthCheckStatusWarning HealthCheckStatus = "Warning"
)

func PossibleHealthCheckStatusValues

func PossibleHealthCheckStatusValues() []HealthCheckStatus

PossibleHealthCheckStatusValues returns the possible values for the HealthCheckStatus const type.

type HealthCheckStatusDetails

type HealthCheckStatusDetails struct {
	// Health check status details properties.
	Properties *HealthCheckStatusDetailsProperties

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

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

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

HealthCheckStatusDetails - Health Check details.

func (HealthCheckStatusDetails) MarshalJSON

func (h HealthCheckStatusDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HealthCheckStatusDetails.

func (*HealthCheckStatusDetails) UnmarshalJSON

func (h *HealthCheckStatusDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HealthCheckStatusDetails.

type HealthCheckStatusDetailsListResult

type HealthCheckStatusDetailsListResult struct {
	// READ-ONLY; URL to get the next set of results if there are any.
	NextLink *string

	// READ-ONLY; Current page of results.
	Value []*HealthCheckStatusDetails
}

HealthCheckStatusDetailsListResult - Result of the network health check list operation.

func (HealthCheckStatusDetailsListResult) MarshalJSON

func (h HealthCheckStatusDetailsListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HealthCheckStatusDetailsListResult.

func (*HealthCheckStatusDetailsListResult) UnmarshalJSON

func (h *HealthCheckStatusDetailsListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HealthCheckStatusDetailsListResult.

type HealthCheckStatusDetailsProperties

type HealthCheckStatusDetailsProperties struct {
	// READ-ONLY; End time of last execution of the health checks.
	EndDateTime *time.Time

	// READ-ONLY; Details for each health check item.
	HealthChecks []*HealthCheck

	// READ-ONLY; Start time of last execution of the health checks.
	StartDateTime *time.Time
}

HealthCheckStatusDetailsProperties - Health Check properties.

func (HealthCheckStatusDetailsProperties) MarshalJSON

func (h HealthCheckStatusDetailsProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HealthCheckStatusDetailsProperties.

func (*HealthCheckStatusDetailsProperties) UnmarshalJSON

func (h *HealthCheckStatusDetailsProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HealthCheckStatusDetailsProperties.

type HealthStatus

type HealthStatus string

HealthStatus - Health status indicating whether a pool is available to create Dev Boxes.

const (
	HealthStatusHealthy   HealthStatus = "Healthy"
	HealthStatusPending   HealthStatus = "Pending"
	HealthStatusUnhealthy HealthStatus = "Unhealthy"
	HealthStatusUnknown   HealthStatus = "Unknown"
	HealthStatusWarning   HealthStatus = "Warning"
)

func PossibleHealthStatusValues

func PossibleHealthStatusValues() []HealthStatus

PossibleHealthStatusValues returns the possible values for the HealthStatus const type.

type HealthStatusDetail

type HealthStatusDetail struct {
	// READ-ONLY; An identifier for the issue.
	Code *string

	// READ-ONLY; A message describing the issue, intended to be suitable for display in a user interface
	Message *string
}

HealthStatusDetail - Pool health status detail.

func (HealthStatusDetail) MarshalJSON

func (h HealthStatusDetail) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HealthStatusDetail.

func (*HealthStatusDetail) UnmarshalJSON

func (h *HealthStatusDetail) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HealthStatusDetail.

type HibernateSupport

type HibernateSupport string

HibernateSupport - Indicates whether hibernate is enabled/disabled.

const (
	HibernateSupportDisabled HibernateSupport = "Disabled"
	HibernateSupportEnabled  HibernateSupport = "Enabled"
)

func PossibleHibernateSupportValues

func PossibleHibernateSupportValues() []HibernateSupport

PossibleHibernateSupportValues returns the possible values for the HibernateSupport const type.

type IdentityType

type IdentityType string

IdentityType - Values can be systemAssignedIdentity or userAssignedIdentity

const (
	IdentityTypeDelegatedResourceIdentity IdentityType = "delegatedResourceIdentity"
	IdentityTypeSystemAssignedIdentity    IdentityType = "systemAssignedIdentity"
	IdentityTypeUserAssignedIdentity      IdentityType = "userAssignedIdentity"
)

func PossibleIdentityTypeValues

func PossibleIdentityTypeValues() []IdentityType

PossibleIdentityTypeValues returns the possible values for the IdentityType const type.

type Image

type Image struct {
	// Image properties.
	Properties *ImageProperties

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

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

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Image - Represents an image.

func (Image) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Image.

func (*Image) UnmarshalJSON

func (i *Image) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Image.

type ImageListResult

type ImageListResult struct {
	// READ-ONLY; URL to get the next set of results if there are any.
	NextLink *string

	// READ-ONLY; Current page of results.
	Value []*Image
}

ImageListResult - Results of the image list operation.

func (ImageListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ImageListResult.

func (*ImageListResult) UnmarshalJSON

func (i *ImageListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ImageListResult.

type ImageProperties

type ImageProperties struct {
	// READ-ONLY; The description of the image.
	Description *string

	// READ-ONLY; Indicates whether this image has hibernate enabled. Not all images are capable of supporting hibernation. To
	// find out more see https://aka.ms/devbox/hibernate
	HibernateSupport *HibernateSupport

	// READ-ONLY; The name of the image offer.
	Offer *string

	// READ-ONLY; The provisioning state of the resource.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The publisher of the image.
	Publisher *string

	// READ-ONLY; The recommended machine configuration to use with the image.
	RecommendedMachineConfiguration *RecommendedMachineConfiguration

	// READ-ONLY; The SKU name for the image.
	SKU *string
}

ImageProperties - Properties of an image.

func (ImageProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ImageProperties.

func (*ImageProperties) UnmarshalJSON

func (i *ImageProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ImageProperties.

type ImageReference

type ImageReference struct {
	// Image ID, or Image version ID. When Image ID is provided, its latest version will be used.
	ID *string

	// READ-ONLY; The actual version of the image after use. When id references a gallery image latest version, this will indicate
	// the actual version in use.
	ExactVersion *string
}

ImageReference - Image reference information

func (ImageReference) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ImageReference.

func (*ImageReference) UnmarshalJSON

func (i *ImageReference) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ImageReference.

type ImageValidationErrorDetails

type ImageValidationErrorDetails struct {
	// An identifier for the error.
	Code *string

	// A message describing the error.
	Message *string
}

ImageValidationErrorDetails - Image validation error details

func (ImageValidationErrorDetails) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ImageValidationErrorDetails.

func (*ImageValidationErrorDetails) UnmarshalJSON

func (i *ImageValidationErrorDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ImageValidationErrorDetails.

type ImageValidationStatus

type ImageValidationStatus string

ImageValidationStatus - Image validation status

const (
	ImageValidationStatusFailed    ImageValidationStatus = "Failed"
	ImageValidationStatusPending   ImageValidationStatus = "Pending"
	ImageValidationStatusSucceeded ImageValidationStatus = "Succeeded"
	ImageValidationStatusTimedOut  ImageValidationStatus = "TimedOut"
	ImageValidationStatusUnknown   ImageValidationStatus = "Unknown"
)

func PossibleImageValidationStatusValues

func PossibleImageValidationStatusValues() []ImageValidationStatus

PossibleImageValidationStatusValues returns the possible values for the ImageValidationStatus const type.

type ImageVersion

type ImageVersion struct {
	// Image version properties.
	Properties *ImageVersionProperties

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

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

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

ImageVersion - Represents an image version.

func (ImageVersion) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ImageVersion.

func (*ImageVersion) UnmarshalJSON

func (i *ImageVersion) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ImageVersion.

type ImageVersionListResult

type ImageVersionListResult struct {
	// READ-ONLY; URL to get the next set of results if there are any.
	NextLink *string

	// READ-ONLY; Current page of results.
	Value []*ImageVersion
}

ImageVersionListResult - Results of the image version list operation.

func (ImageVersionListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ImageVersionListResult.

func (*ImageVersionListResult) UnmarshalJSON

func (i *ImageVersionListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ImageVersionListResult.

type ImageVersionProperties

type ImageVersionProperties struct {
	// READ-ONLY; If the version should be excluded from being treated as the latest version.
	ExcludeFromLatest *bool

	// READ-ONLY; The semantic version string.
	Name *string

	// READ-ONLY; The size of the OS disk image, in GB.
	OSDiskImageSizeInGb *int32

	// READ-ONLY; The provisioning state of the resource.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The datetime that the backing image version was published.
	PublishedDate *time.Time
}

ImageVersionProperties - Properties of an image version.

func (ImageVersionProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ImageVersionProperties.

func (*ImageVersionProperties) UnmarshalJSON

func (i *ImageVersionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ImageVersionProperties.

type ImageVersionsClient

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

ImageVersionsClient contains the methods for the ImageVersions group. Don't use this type directly, use NewImageVersionsClient() instead.

func NewImageVersionsClient

func NewImageVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ImageVersionsClient, error)

NewImageVersionsClient creates a new instance of ImageVersionsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ImageVersionsClient) Get

func (client *ImageVersionsClient) Get(ctx context.Context, resourceGroupName string, devCenterName string, galleryName string, imageName string, versionName string, options *ImageVersionsClientGetOptions) (ImageVersionsClientGetResponse, error)

Get - Gets an image version. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • galleryName - The name of the gallery.
  • imageName - The name of the image.
  • versionName - The version of the image.
  • options - ImageVersionsClientGetOptions contains the optional parameters for the ImageVersionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ImageVersions_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewImageVersionsClient().Get(ctx, "rg1", "Contoso", "DefaultDevGallery", "Win11", "1.0.0", 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.ImageVersion = armdevcenter.ImageVersion{
// 	Name: to.Ptr("1.0.0"),
// 	Type: to.Ptr("Microsoft.DevCenter/devcenters/galleries/images/versions"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/DefaultDevGallery/images/Win11/versions/1.0.0"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Properties: &armdevcenter.ImageVersionProperties{
// 		ExcludeFromLatest: to.Ptr(false),
// 		OSDiskImageSizeInGb: to.Ptr[int32](64),
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 		PublishedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-01T12:45:16.845Z"); return t}()),
// 	},
// }
Output:

func (*ImageVersionsClient) NewListByImagePager

func (client *ImageVersionsClient) NewListByImagePager(resourceGroupName string, devCenterName string, galleryName string, imageName string, options *ImageVersionsClientListByImageOptions) *runtime.Pager[ImageVersionsClientListByImageResponse]

NewListByImagePager - Lists versions for an image.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • galleryName - The name of the gallery.
  • imageName - The name of the image.
  • options - ImageVersionsClientListByImageOptions contains the optional parameters for the ImageVersionsClient.NewListByImagePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ImageVersions_List.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewImageVersionsClient().NewListByImagePager("rg1", "Contoso", "DefaultDevGallery", "Win11", 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.ImageVersionListResult = armdevcenter.ImageVersionListResult{
	// 	Value: []*armdevcenter.ImageVersion{
	// 		{
	// 			Name: to.Ptr("1.0.0"),
	// 			Type: to.Ptr("Microsoft.DevCenter/devcenters/galleries/images/versions"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/DefaultDevGallery/images/Win11/versions/1.0.0"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
	// 				CreatedBy: to.Ptr("user1"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("user1"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 			},
	// 			Properties: &armdevcenter.ImageVersionProperties{
	// 				ExcludeFromLatest: to.Ptr(false),
	// 				OSDiskImageSizeInGb: to.Ptr[int32](64),
	// 				ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
	// 				PublishedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-01T12:45:16.845Z"); return t}()),
	// 			},
	// 	}},
	// }
}
Output:

type ImageVersionsClientGetOptions

type ImageVersionsClientGetOptions struct {
}

ImageVersionsClientGetOptions contains the optional parameters for the ImageVersionsClient.Get method.

type ImageVersionsClientGetResponse

type ImageVersionsClientGetResponse struct {
	// Represents an image version.
	ImageVersion
}

ImageVersionsClientGetResponse contains the response from method ImageVersionsClient.Get.

type ImageVersionsClientListByImageOptions

type ImageVersionsClientListByImageOptions struct {
}

ImageVersionsClientListByImageOptions contains the optional parameters for the ImageVersionsClient.NewListByImagePager method.

type ImageVersionsClientListByImageResponse

type ImageVersionsClientListByImageResponse struct {
	// Results of the image version list operation.
	ImageVersionListResult
}

ImageVersionsClientListByImageResponse contains the response from method ImageVersionsClient.NewListByImagePager.

type ImagesClient

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

ImagesClient contains the methods for the Images group. Don't use this type directly, use NewImagesClient() instead.

func NewImagesClient

func NewImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ImagesClient, error)

NewImagesClient creates a new instance of ImagesClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ImagesClient) Get

func (client *ImagesClient) Get(ctx context.Context, resourceGroupName string, devCenterName string, galleryName string, imageName string, options *ImagesClientGetOptions) (ImagesClientGetResponse, error)

Get - Gets a gallery image. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • galleryName - The name of the gallery.
  • imageName - The name of the image.
  • options - ImagesClientGetOptions contains the optional parameters for the ImagesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Images_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewImagesClient().Get(ctx, "rg1", "Contoso", "DefaultDevGallery", "ContosoBaseImage", 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.Image = armdevcenter.Image{
// 	Name: to.Ptr("ContosoBaseImage"),
// 	Type: to.Ptr("Microsoft.DevCenter/devcenters/galleries/images"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/DefaultDevGallery/images/ContosoBaseImage"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Properties: &armdevcenter.ImageProperties{
// 		Description: to.Ptr("Standard Windows Dev/Test image."),
// 		Offer: to.Ptr("Finance"),
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 		Publisher: to.Ptr("Contoso"),
// 		RecommendedMachineConfiguration: &armdevcenter.RecommendedMachineConfiguration{
// 			Memory: &armdevcenter.ResourceRange{
// 				Max: to.Ptr[int32](512),
// 				Min: to.Ptr[int32](256),
// 			},
// 			VCPUs: &armdevcenter.ResourceRange{
// 				Max: to.Ptr[int32](8),
// 				Min: to.Ptr[int32](4),
// 			},
// 		},
// 		SKU: to.Ptr("Backend"),
// 	},
// }
Output:

func (*ImagesClient) NewListByDevCenterPager

func (client *ImagesClient) NewListByDevCenterPager(resourceGroupName string, devCenterName string, options *ImagesClientListByDevCenterOptions) *runtime.Pager[ImagesClientListByDevCenterResponse]

NewListByDevCenterPager - Lists images for a devcenter.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • options - ImagesClientListByDevCenterOptions contains the optional parameters for the ImagesClient.NewListByDevCenterPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Images_ListByDevCenter.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewImagesClient().NewListByDevCenterPager("rg1", "Contoso", &armdevcenter.ImagesClientListByDevCenterOptions{Top: 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.ImageListResult = armdevcenter.ImageListResult{
	// 	Value: []*armdevcenter.Image{
	// 		{
	// 			Name: to.Ptr("ContosoBaseImage"),
	// 			Type: to.Ptr("Microsoft.DevCenter/devcenters/galleries/images"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/DevGallery/images/ContosoBaseImage"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
	// 				CreatedBy: to.Ptr("user1"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("user1"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 			},
	// 			Properties: &armdevcenter.ImageProperties{
	// 				Description: to.Ptr("Windows 10 Enterprise + OS Optimizations 1909"),
	// 				Offer: to.Ptr("windows-ent-cpc"),
	// 				ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
	// 				Publisher: to.Ptr("MicrosoftWindowsDesktop"),
	// 				RecommendedMachineConfiguration: &armdevcenter.RecommendedMachineConfiguration{
	// 					Memory: &armdevcenter.ResourceRange{
	// 						Max: to.Ptr[int32](256),
	// 						Min: to.Ptr[int32](128),
	// 					},
	// 					VCPUs: &armdevcenter.ResourceRange{
	// 						Max: to.Ptr[int32](4),
	// 						Min: to.Ptr[int32](2),
	// 					},
	// 				},
	// 				SKU: to.Ptr("19h2-ent-cpc-os-g2"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("ContosoBaseImage2"),
	// 			Type: to.Ptr("Microsoft.DevCenter/devcenters/galleries/images"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/DevGallery/images/ContosoBaseImage2"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
	// 				CreatedBy: to.Ptr("user1"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("user1"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 			},
	// 			Properties: &armdevcenter.ImageProperties{
	// 				Description: to.Ptr("Standard Windows Dev/Test image."),
	// 				Offer: to.Ptr("Finance"),
	// 				Publisher: to.Ptr("Contoso"),
	// 				RecommendedMachineConfiguration: &armdevcenter.RecommendedMachineConfiguration{
	// 					Memory: &armdevcenter.ResourceRange{
	// 						Max: to.Ptr[int32](512),
	// 						Min: to.Ptr[int32](256),
	// 					},
	// 					VCPUs: &armdevcenter.ResourceRange{
	// 						Max: to.Ptr[int32](8),
	// 						Min: to.Ptr[int32](4),
	// 					},
	// 				},
	// 				SKU: to.Ptr("Backend"),
	// 			},
	// 	}},
	// }
}
Output:

func (*ImagesClient) NewListByGalleryPager

func (client *ImagesClient) NewListByGalleryPager(resourceGroupName string, devCenterName string, galleryName string, options *ImagesClientListByGalleryOptions) *runtime.Pager[ImagesClientListByGalleryResponse]

NewListByGalleryPager - Lists images for a gallery.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • devCenterName - The name of the devcenter.
  • galleryName - The name of the gallery.
  • options - ImagesClientListByGalleryOptions contains the optional parameters for the ImagesClient.NewListByGalleryPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Images_ListByGallery.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewImagesClient().NewListByGalleryPager("rg1", "Contoso", "DevGallery", &armdevcenter.ImagesClientListByGalleryOptions{Top: 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.ImageListResult = armdevcenter.ImageListResult{
	// 	Value: []*armdevcenter.Image{
	// 		{
	// 			Name: to.Ptr("ContosoBaseImage"),
	// 			Type: to.Ptr("Microsoft.DevCenter/devcenters/galleries/images"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/DevGallery/images/ContosoBaseImage"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
	// 				CreatedBy: to.Ptr("user1"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("user1"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 			},
	// 			Properties: &armdevcenter.ImageProperties{
	// 				Description: to.Ptr("Windows 10 Enterprise + OS Optimizations 1909"),
	// 				Offer: to.Ptr("windows-ent-cpc"),
	// 				ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
	// 				Publisher: to.Ptr("MicrosoftWindowsDesktop"),
	// 				RecommendedMachineConfiguration: &armdevcenter.RecommendedMachineConfiguration{
	// 					Memory: &armdevcenter.ResourceRange{
	// 						Max: to.Ptr[int32](256),
	// 						Min: to.Ptr[int32](128),
	// 					},
	// 					VCPUs: &armdevcenter.ResourceRange{
	// 						Max: to.Ptr[int32](4),
	// 						Min: to.Ptr[int32](2),
	// 					},
	// 				},
	// 				SKU: to.Ptr("19h2-ent-cpc-os-g2"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("ContosoBaseImage2"),
	// 			Type: to.Ptr("Microsoft.DevCenter/devcenters/galleries/images"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/DevGallery/images/ContosoBaseImage2"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
	// 				CreatedBy: to.Ptr("user1"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("user1"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 			},
	// 			Properties: &armdevcenter.ImageProperties{
	// 				Description: to.Ptr("Standard Windows Dev/Test image."),
	// 				Offer: to.Ptr("Finance"),
	// 				Publisher: to.Ptr("Contoso"),
	// 				RecommendedMachineConfiguration: &armdevcenter.RecommendedMachineConfiguration{
	// 					Memory: &armdevcenter.ResourceRange{
	// 						Max: to.Ptr[int32](512),
	// 						Min: to.Ptr[int32](256),
	// 					},
	// 					VCPUs: &armdevcenter.ResourceRange{
	// 						Max: to.Ptr[int32](8),
	// 						Min: to.Ptr[int32](4),
	// 					},
	// 				},
	// 				SKU: to.Ptr("Backend"),
	// 			},
	// 	}},
	// }
}
Output:

type ImagesClientGetOptions

type ImagesClientGetOptions struct {
}

ImagesClientGetOptions contains the optional parameters for the ImagesClient.Get method.

type ImagesClientGetResponse

type ImagesClientGetResponse struct {
	// Represents an image.
	Image
}

ImagesClientGetResponse contains the response from method ImagesClient.Get.

type ImagesClientListByDevCenterOptions

type ImagesClientListByDevCenterOptions struct {
	// The maximum number of resources to return from the operation. Example: '$top=10'.
	Top *int32
}

ImagesClientListByDevCenterOptions contains the optional parameters for the ImagesClient.NewListByDevCenterPager method.

type ImagesClientListByDevCenterResponse

type ImagesClientListByDevCenterResponse struct {
	// Results of the image list operation.
	ImageListResult
}

ImagesClientListByDevCenterResponse contains the response from method ImagesClient.NewListByDevCenterPager.

type ImagesClientListByGalleryOptions

type ImagesClientListByGalleryOptions struct {
	// The maximum number of resources to return from the operation. Example: '$top=10'.
	Top *int32
}

ImagesClientListByGalleryOptions contains the optional parameters for the ImagesClient.NewListByGalleryPager method.

type ImagesClientListByGalleryResponse

type ImagesClientListByGalleryResponse struct {
	// Results of the image list operation.
	ImageListResult
}

ImagesClientListByGalleryResponse contains the response from method ImagesClient.NewListByGalleryPager.

type LicenseType

type LicenseType string

LicenseType - License Types

const (
	LicenseTypeWindowsClient LicenseType = "Windows_Client"
)

func PossibleLicenseTypeValues

func PossibleLicenseTypeValues() []LicenseType

PossibleLicenseTypeValues returns the possible values for the LicenseType const type.

type ListResult

type ListResult struct {
	// READ-ONLY; URL to get the next set of results if there are any.
	NextLink *string

	// READ-ONLY; Current page of results.
	Value []*DevCenter
}

ListResult - Result of the list devcenters operation

func (ListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ListResult.

func (*ListResult) UnmarshalJSON

func (l *ListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ListResult.

type ListUsagesResult

type ListUsagesResult struct {
	// READ-ONLY; The link to get the next page of Usage result.
	NextLink *string

	// READ-ONLY; The array page of Usages.
	Value []*Usage
}

ListUsagesResult - List of Core Usages.

func (ListUsagesResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ListUsagesResult.

func (*ListUsagesResult) UnmarshalJSON

func (l *ListUsagesResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ListUsagesResult.

type LocalAdminStatus

type LocalAdminStatus string

LocalAdminStatus - Local Administrator enable or disable status. Indicates whether owners of Dev Boxes are added as local administrators on the Dev Box.

const (
	LocalAdminStatusDisabled LocalAdminStatus = "Disabled"
	LocalAdminStatusEnabled  LocalAdminStatus = "Enabled"
)

func PossibleLocalAdminStatusValues

func PossibleLocalAdminStatusValues() []LocalAdminStatus

PossibleLocalAdminStatusValues returns the possible values for the LocalAdminStatus const type.

type ManagedServiceIdentity

type ManagedServiceIdentity struct {
	// REQUIRED; Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
	Type *ManagedServiceIdentityType

	// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM
	// resource ids in the form:
	// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
	// The dictionary values can be empty objects ({}) in
	// requests.
	UserAssignedIdentities map[string]*UserAssignedIdentity

	// READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned
	// identity.
	PrincipalID *string

	// READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.
	TenantID *string
}

ManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities)

func (ManagedServiceIdentity) MarshalJSON

func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity.

func (*ManagedServiceIdentity) UnmarshalJSON

func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity.

type ManagedServiceIdentityType

type ManagedServiceIdentityType string

ManagedServiceIdentityType - Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).

const (
	ManagedServiceIdentityTypeNone                       ManagedServiceIdentityType = "None"
	ManagedServiceIdentityTypeSystemAssigned             ManagedServiceIdentityType = "SystemAssigned"
	ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned, UserAssigned"
	ManagedServiceIdentityTypeUserAssigned               ManagedServiceIdentityType = "UserAssigned"
)

func PossibleManagedServiceIdentityTypeValues

func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType

PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type.

type NetworkConnection

type NetworkConnection struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// Properties of a Network Connection
	Properties *NetworkProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

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

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

NetworkConnection - Network related settings

func (NetworkConnection) MarshalJSON

func (n NetworkConnection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkConnection.

func (*NetworkConnection) UnmarshalJSON

func (n *NetworkConnection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkConnection.

type NetworkConnectionListResult

type NetworkConnectionListResult struct {
	// READ-ONLY; URL to get the next set of results if there are any.
	NextLink *string

	// READ-ONLY; Current page of results.
	Value []*NetworkConnection
}

NetworkConnectionListResult - Result of the network connection list operation.

func (NetworkConnectionListResult) MarshalJSON

func (n NetworkConnectionListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkConnectionListResult.

func (*NetworkConnectionListResult) UnmarshalJSON

func (n *NetworkConnectionListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkConnectionListResult.

type NetworkConnectionUpdate

type NetworkConnectionUpdate struct {
	// The geo-location where the resource lives
	Location *string

	// Properties of a network connection resource to be updated.
	Properties *NetworkConnectionUpdateProperties

	// Resource tags.
	Tags map[string]*string
}

NetworkConnectionUpdate - The network connection properties for partial update. Properties not provided in the update request will not be changed.

func (NetworkConnectionUpdate) MarshalJSON

func (n NetworkConnectionUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkConnectionUpdate.

func (*NetworkConnectionUpdate) UnmarshalJSON

func (n *NetworkConnectionUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkConnectionUpdate.

type NetworkConnectionUpdateProperties

type NetworkConnectionUpdateProperties struct {
	// Active Directory domain name
	DomainName *string

	// The password for the account used to join domain
	DomainPassword *string

	// The username of an Active Directory account (user or service account) that has permissions to create computer objects in
	// Active Directory. Required format: admin@contoso.com.
	DomainUsername *string

	// Active Directory domain Organization Unit (OU)
	OrganizationUnit *string

	// The subnet to attach Virtual Machines to
	SubnetID *string
}

NetworkConnectionUpdateProperties - Properties of network connection. These properties can be updated after the resource has been created.

func (NetworkConnectionUpdateProperties) MarshalJSON

func (n NetworkConnectionUpdateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkConnectionUpdateProperties.

func (*NetworkConnectionUpdateProperties) UnmarshalJSON

func (n *NetworkConnectionUpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkConnectionUpdateProperties.

type NetworkConnectionsClient

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

NetworkConnectionsClient contains the methods for the NetworkConnections group. Don't use this type directly, use NewNetworkConnectionsClient() instead.

func NewNetworkConnectionsClient

func NewNetworkConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NetworkConnectionsClient, error)

NewNetworkConnectionsClient creates a new instance of NetworkConnectionsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*NetworkConnectionsClient) BeginCreateOrUpdate

BeginCreateOrUpdate - Creates or updates a Network Connections resource If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • networkConnectionName - Name of the Network Connection that can be applied to a Pool.
  • body - Represents network connection
  • options - NetworkConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the NetworkConnectionsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/NetworkConnections_Put.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewNetworkConnectionsClient().BeginCreateOrUpdate(ctx, "rg1", "uswest3network", armdevcenter.NetworkConnection{
	Location: to.Ptr("centralus"),
	Properties: &armdevcenter.NetworkProperties{
		DomainName:                  to.Ptr("mydomaincontroller.local"),
		DomainPassword:              to.Ptr("Password value for user"),
		DomainUsername:              to.Ptr("testuser@mydomaincontroller.local"),
		SubnetID:                    to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default"),
		DomainJoinType:              to.Ptr(armdevcenter.DomainJoinTypeHybridAzureADJoin),
		NetworkingResourceGroupName: to.Ptr("NetworkInterfaces"),
	},
}, 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.NetworkConnection = armdevcenter.NetworkConnection{
// 	Name: to.Ptr("uswest3network"),
// 	Type: to.Ptr("Microsoft.DevCenter/networkconnections"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/networkconnections/uswest3network"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Location: to.Ptr("centralus"),
// 	Properties: &armdevcenter.NetworkProperties{
// 		DomainName: to.Ptr("mydomaincontroller.local"),
// 		DomainUsername: to.Ptr("testuser@mydomaincontroller.local"),
// 		SubnetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default"),
// 		DomainJoinType: to.Ptr(armdevcenter.DomainJoinTypeHybridAzureADJoin),
// 		NetworkingResourceGroupName: to.Ptr("NetworkInterfaces"),
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 	},
// }
Output:

func (*NetworkConnectionsClient) BeginDelete

func (client *NetworkConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkConnectionName string, options *NetworkConnectionsClientBeginDeleteOptions) (*runtime.Poller[NetworkConnectionsClientDeleteResponse], error)

BeginDelete - Deletes a Network Connections resource If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • networkConnectionName - Name of the Network Connection that can be applied to a Pool.
  • options - NetworkConnectionsClientBeginDeleteOptions contains the optional parameters for the NetworkConnectionsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/NetworkConnections_Delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewNetworkConnectionsClient().BeginDelete(ctx, "rg1", "eastusnetwork", 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 (*NetworkConnectionsClient) BeginRunHealthChecks

BeginRunHealthChecks - Triggers a new health check run. The execution and health check result can be tracked via the network Connection health check details If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • networkConnectionName - Name of the Network Connection that can be applied to a Pool.
  • options - NetworkConnectionsClientBeginRunHealthChecksOptions contains the optional parameters for the NetworkConnectionsClient.BeginRunHealthChecks method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/NetworkConnections_RunHealthChecks.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewNetworkConnectionsClient().BeginRunHealthChecks(ctx, "rg1", "uswest3network", 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 (*NetworkConnectionsClient) BeginUpdate

BeginUpdate - Partially updates a Network Connection If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • networkConnectionName - Name of the Network Connection that can be applied to a Pool.
  • body - Represents network connection
  • options - NetworkConnectionsClientBeginUpdateOptions contains the optional parameters for the NetworkConnectionsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/NetworkConnections_Patch.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewNetworkConnectionsClient().BeginUpdate(ctx, "rg1", "uswest3network", armdevcenter.NetworkConnectionUpdate{
	Properties: &armdevcenter.NetworkConnectionUpdateProperties{
		DomainPassword: to.Ptr("New Password value for user"),
	},
}, 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.NetworkConnection = armdevcenter.NetworkConnection{
// 	Name: to.Ptr("uswest3network"),
// 	Type: to.Ptr("Microsoft.DevCenter/networkconnections"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/networkconnections/uswest3network"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Location: to.Ptr("centralus"),
// 	Properties: &armdevcenter.NetworkProperties{
// 		DomainName: to.Ptr("mydomaincontroller.local"),
// 		DomainUsername: to.Ptr("testuser@mydomaincontroller.local"),
// 		SubnetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default"),
// 		DomainJoinType: to.Ptr(armdevcenter.DomainJoinTypeHybridAzureADJoin),
// 		NetworkingResourceGroupName: to.Ptr("NetworkInterfaces"),
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 	},
// }
Output:

func (*NetworkConnectionsClient) Get

func (client *NetworkConnectionsClient) Get(ctx context.Context, resourceGroupName string, networkConnectionName string, options *NetworkConnectionsClientGetOptions) (NetworkConnectionsClientGetResponse, error)

Get - Gets a network connection resource If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • networkConnectionName - Name of the Network Connection that can be applied to a Pool.
  • options - NetworkConnectionsClientGetOptions contains the optional parameters for the NetworkConnectionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/NetworkConnections_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewNetworkConnectionsClient().Get(ctx, "rg1", "uswest3network", 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.NetworkConnection = armdevcenter.NetworkConnection{
// 	Name: to.Ptr("uswest3network"),
// 	Type: to.Ptr("Microsoft.DevCenter/networkconnections"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/networkconnections/uswest3network"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Location: to.Ptr("centralus"),
// 	Properties: &armdevcenter.NetworkProperties{
// 		DomainName: to.Ptr("mydomaincontroller.local"),
// 		DomainUsername: to.Ptr("testuser@mydomaincontroller.local"),
// 		SubnetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default"),
// 		DomainJoinType: to.Ptr(armdevcenter.DomainJoinTypeHybridAzureADJoin),
// 		HealthCheckStatus: to.Ptr(armdevcenter.HealthCheckStatusPassed),
// 		NetworkingResourceGroupName: to.Ptr("NetworkInterfaces"),
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 	},
// }
Output:

func (*NetworkConnectionsClient) GetHealthDetails

func (client *NetworkConnectionsClient) GetHealthDetails(ctx context.Context, resourceGroupName string, networkConnectionName string, options *NetworkConnectionsClientGetHealthDetailsOptions) (NetworkConnectionsClientGetHealthDetailsResponse, error)

GetHealthDetails - Gets health check status details. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • networkConnectionName - Name of the Network Connection that can be applied to a Pool.
  • options - NetworkConnectionsClientGetHealthDetailsOptions contains the optional parameters for the NetworkConnectionsClient.GetHealthDetails method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/NetworkConnections_GetHealthDetails.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewNetworkConnectionsClient().GetHealthDetails(ctx, "rg1", "eastusnetwork", 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.HealthCheckStatusDetails = armdevcenter.HealthCheckStatusDetails{
// 	Name: to.Ptr("latest"),
// 	Type: to.Ptr("Microsoft.DevCenter/networkconnections/healthchecks"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/networkconnections/eastusnetwork/healthchecks/latest"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
// 		CreatedBy: to.Ptr("System"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeApplication),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
// 		LastModifiedBy: to.Ptr("System"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeApplication),
// 	},
// 	Properties: &armdevcenter.HealthCheckStatusDetailsProperties{
// 		EndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-03T12:43:15.000Z"); return t}()),
// 		HealthChecks: []*armdevcenter.HealthCheck{
// 			{
// 				DisplayName: to.Ptr("Azure AD device sync"),
// 				EndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-03T12:43:14.000Z"); return t}()),
// 				StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-03T12:43:15.000Z"); return t}()),
// 				Status: to.Ptr(armdevcenter.HealthCheckStatusPassed),
// 		}},
// 		StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-03T12:43:14.000Z"); return t}()),
// 	},
// }
Output:

func (*NetworkConnectionsClient) NewListByResourceGroupPager

NewListByResourceGroupPager - Lists network connections in a resource group

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - NetworkConnectionsClientListByResourceGroupOptions contains the optional parameters for the NetworkConnectionsClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/NetworkConnections_ListByResourceGroup.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewNetworkConnectionsClient().NewListByResourceGroupPager("rg1", &armdevcenter.NetworkConnectionsClientListByResourceGroupOptions{Top: 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.NetworkConnectionListResult = armdevcenter.NetworkConnectionListResult{
	// 	Value: []*armdevcenter.NetworkConnection{
	// 		{
	// 			Name: to.Ptr("uswest3network"),
	// 			Type: to.Ptr("Microsoft.DevCenter/networkconnections"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/networkconnections/uswest3network"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
	// 				CreatedBy: to.Ptr("user1"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("user1"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 			},
	// 			Location: to.Ptr("centralus"),
	// 			Properties: &armdevcenter.NetworkProperties{
	// 				DomainName: to.Ptr("mydomaincontroller.local"),
	// 				DomainUsername: to.Ptr("testuser@mydomaincontroller.local"),
	// 				SubnetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default"),
	// 				DomainJoinType: to.Ptr(armdevcenter.DomainJoinTypeHybridAzureADJoin),
	// 				NetworkingResourceGroupName: to.Ptr("NetworkInterfaces"),
	// 				ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
	// 			},
	// 	}},
	// }
}
Output:

func (*NetworkConnectionsClient) NewListBySubscriptionPager

NewListBySubscriptionPager - Lists network connections in a subscription

Generated from API version 2024-02-01

  • options - NetworkConnectionsClientListBySubscriptionOptions contains the optional parameters for the NetworkConnectionsClient.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/NetworkConnections_ListBySubscription.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewNetworkConnectionsClient().NewListBySubscriptionPager(&armdevcenter.NetworkConnectionsClientListBySubscriptionOptions{Top: 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.NetworkConnectionListResult = armdevcenter.NetworkConnectionListResult{
	// 	Value: []*armdevcenter.NetworkConnection{
	// 		{
	// 			Name: to.Ptr("uswest3network"),
	// 			Type: to.Ptr("Microsoft.DevCenter/networkconnection"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/networkconnections/uswest3network"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
	// 				CreatedBy: to.Ptr("user1"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("user1"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 			},
	// 			Location: to.Ptr("centralus"),
	// 			Properties: &armdevcenter.NetworkProperties{
	// 				DomainName: to.Ptr("mydomaincontroller.local"),
	// 				DomainUsername: to.Ptr("testuser@mydomaincontroller.local"),
	// 				SubnetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default"),
	// 				DomainJoinType: to.Ptr(armdevcenter.DomainJoinTypeHybridAzureADJoin),
	// 				NetworkingResourceGroupName: to.Ptr("NetworkInterfaces"),
	// 				ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
	// 			},
	// 	}},
	// }
}
Output:

func (*NetworkConnectionsClient) NewListHealthDetailsPager

func (client *NetworkConnectionsClient) NewListHealthDetailsPager(resourceGroupName string, networkConnectionName string, options *NetworkConnectionsClientListHealthDetailsOptions) *runtime.Pager[NetworkConnectionsClientListHealthDetailsResponse]

NewListHealthDetailsPager - Lists health check status details

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • networkConnectionName - Name of the Network Connection that can be applied to a Pool.
  • options - NetworkConnectionsClientListHealthDetailsOptions contains the optional parameters for the NetworkConnectionsClient.NewListHealthDetailsPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/NetworkConnections_ListHealthDetails.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewNetworkConnectionsClient().NewListHealthDetailsPager("rg1", "uswest3network", &armdevcenter.NetworkConnectionsClientListHealthDetailsOptions{Top: 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.HealthCheckStatusDetailsListResult = armdevcenter.HealthCheckStatusDetailsListResult{
	// 	Value: []*armdevcenter.HealthCheckStatusDetails{
	// 		{
	// 			Name: to.Ptr("latest"),
	// 			Type: to.Ptr("Microsoft.DevCenter/networkconnections/healthchecks"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/networkconnections/uswest3network/healthchecks/latest"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
	// 				CreatedBy: to.Ptr("System"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeApplication),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("System"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeApplication),
	// 			},
	// 			Properties: &armdevcenter.HealthCheckStatusDetailsProperties{
	// 				EndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-03T12:43:15.000Z"); return t}()),
	// 				HealthChecks: []*armdevcenter.HealthCheck{
	// 					{
	// 						DisplayName: to.Ptr("Azure AD device sync"),
	// 						EndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-03T12:43:14.000Z"); return t}()),
	// 						StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-03T12:43:15.000Z"); return t}()),
	// 						Status: to.Ptr(armdevcenter.HealthCheckStatusPassed),
	// 				}},
	// 				StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-03T12:43:14.000Z"); return t}()),
	// 			},
	// 	}},
	// }
}
Output:

func (*NetworkConnectionsClient) NewListOutboundNetworkDependenciesEndpointsPager

NewListOutboundNetworkDependenciesEndpointsPager - Lists the endpoints that agents may call as part of Dev Box service administration. These FQDNs should be allowed for outbound access in order for the Dev Box service to function.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • networkConnectionName - Name of the Network Connection that can be applied to a Pool.
  • options - NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the NetworkConnectionsClient.NewListOutboundNetworkDependenciesEndpointsPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/NetworkConnections_ListOutboundNetworkDependenciesEndpoints.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewNetworkConnectionsClient().NewListOutboundNetworkDependenciesEndpointsPager("rg1", "uswest3network", &armdevcenter.NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsOptions{Top: 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.OutboundEnvironmentEndpointCollection = armdevcenter.OutboundEnvironmentEndpointCollection{
	// 	Value: []*armdevcenter.OutboundEnvironmentEndpoint{
	// 		{
	// 			Category: to.Ptr("Dev Box Service"),
	// 			Endpoints: []*armdevcenter.EndpointDependency{
	// 				{
	// 					DomainName: to.Ptr("devbox.azure.com"),
	// 					EndpointDetails: []*armdevcenter.EndpointDetail{
	// 						{
	// 							Port: to.Ptr[int32](443),
	// 					}},
	// 			}},
	// 		},
	// 		{
	// 			Category: to.Ptr("Intune"),
	// 			Endpoints: []*armdevcenter.EndpointDependency{
	// 				{
	// 					DomainName: to.Ptr("login.microsoftonline.com"),
	// 					EndpointDetails: []*armdevcenter.EndpointDetail{
	// 						{
	// 							Port: to.Ptr[int32](443),
	// 					}},
	// 			}},
	// 		},
	// 		{
	// 			Category: to.Ptr("Cloud PC"),
	// 			Endpoints: []*armdevcenter.EndpointDependency{
	// 				{
	// 					DomainName: to.Ptr("rdweb.wvd.microsoft.com"),
	// 					EndpointDetails: []*armdevcenter.EndpointDetail{
	// 						{
	// 							Port: to.Ptr[int32](443),
	// 					}},
	// 			}},
	// 	}},
	// }
}
Output:

type NetworkConnectionsClientBeginCreateOrUpdateOptions

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

NetworkConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the NetworkConnectionsClient.BeginCreateOrUpdate method.

type NetworkConnectionsClientBeginDeleteOptions

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

NetworkConnectionsClientBeginDeleteOptions contains the optional parameters for the NetworkConnectionsClient.BeginDelete method.

type NetworkConnectionsClientBeginRunHealthChecksOptions

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

NetworkConnectionsClientBeginRunHealthChecksOptions contains the optional parameters for the NetworkConnectionsClient.BeginRunHealthChecks method.

type NetworkConnectionsClientBeginUpdateOptions

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

NetworkConnectionsClientBeginUpdateOptions contains the optional parameters for the NetworkConnectionsClient.BeginUpdate method.

type NetworkConnectionsClientCreateOrUpdateResponse

type NetworkConnectionsClientCreateOrUpdateResponse struct {
	// Network related settings
	NetworkConnection
}

NetworkConnectionsClientCreateOrUpdateResponse contains the response from method NetworkConnectionsClient.BeginCreateOrUpdate.

type NetworkConnectionsClientDeleteResponse

type NetworkConnectionsClientDeleteResponse struct {
}

NetworkConnectionsClientDeleteResponse contains the response from method NetworkConnectionsClient.BeginDelete.

type NetworkConnectionsClientGetHealthDetailsOptions

type NetworkConnectionsClientGetHealthDetailsOptions struct {
}

NetworkConnectionsClientGetHealthDetailsOptions contains the optional parameters for the NetworkConnectionsClient.GetHealthDetails method.

type NetworkConnectionsClientGetHealthDetailsResponse

type NetworkConnectionsClientGetHealthDetailsResponse struct {
	// Health Check details.
	HealthCheckStatusDetails
}

NetworkConnectionsClientGetHealthDetailsResponse contains the response from method NetworkConnectionsClient.GetHealthDetails.

type NetworkConnectionsClientGetOptions

type NetworkConnectionsClientGetOptions struct {
}

NetworkConnectionsClientGetOptions contains the optional parameters for the NetworkConnectionsClient.Get method.

type NetworkConnectionsClientGetResponse

type NetworkConnectionsClientGetResponse struct {
	// Network related settings
	NetworkConnection
}

NetworkConnectionsClientGetResponse contains the response from method NetworkConnectionsClient.Get.

type NetworkConnectionsClientListByResourceGroupOptions

type NetworkConnectionsClientListByResourceGroupOptions struct {
	// The maximum number of resources to return from the operation. Example: '$top=10'.
	Top *int32
}

NetworkConnectionsClientListByResourceGroupOptions contains the optional parameters for the NetworkConnectionsClient.NewListByResourceGroupPager method.

type NetworkConnectionsClientListByResourceGroupResponse

type NetworkConnectionsClientListByResourceGroupResponse struct {
	// Result of the network connection list operation.
	NetworkConnectionListResult
}

NetworkConnectionsClientListByResourceGroupResponse contains the response from method NetworkConnectionsClient.NewListByResourceGroupPager.

type NetworkConnectionsClientListBySubscriptionOptions

type NetworkConnectionsClientListBySubscriptionOptions struct {
	// The maximum number of resources to return from the operation. Example: '$top=10'.
	Top *int32
}

NetworkConnectionsClientListBySubscriptionOptions contains the optional parameters for the NetworkConnectionsClient.NewListBySubscriptionPager method.

type NetworkConnectionsClientListBySubscriptionResponse

type NetworkConnectionsClientListBySubscriptionResponse struct {
	// Result of the network connection list operation.
	NetworkConnectionListResult
}

NetworkConnectionsClientListBySubscriptionResponse contains the response from method NetworkConnectionsClient.NewListBySubscriptionPager.

type NetworkConnectionsClientListHealthDetailsOptions

type NetworkConnectionsClientListHealthDetailsOptions struct {
	// The maximum number of resources to return from the operation. Example: '$top=10'.
	Top *int32
}

NetworkConnectionsClientListHealthDetailsOptions contains the optional parameters for the NetworkConnectionsClient.NewListHealthDetailsPager method.

type NetworkConnectionsClientListHealthDetailsResponse

type NetworkConnectionsClientListHealthDetailsResponse struct {
	// Result of the network health check list operation.
	HealthCheckStatusDetailsListResult
}

NetworkConnectionsClientListHealthDetailsResponse contains the response from method NetworkConnectionsClient.NewListHealthDetailsPager.

type NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsOptions

type NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsOptions struct {
	// The maximum number of resources to return from the operation. Example: '$top=10'.
	Top *int32
}

NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the NetworkConnectionsClient.NewListOutboundNetworkDependenciesEndpointsPager method.

type NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsResponse

type NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsResponse struct {
	// Values returned by the List operation.
	OutboundEnvironmentEndpointCollection
}

NetworkConnectionsClientListOutboundNetworkDependenciesEndpointsResponse contains the response from method NetworkConnectionsClient.NewListOutboundNetworkDependenciesEndpointsPager.

type NetworkConnectionsClientRunHealthChecksResponse

type NetworkConnectionsClientRunHealthChecksResponse struct {
}

NetworkConnectionsClientRunHealthChecksResponse contains the response from method NetworkConnectionsClient.BeginRunHealthChecks.

type NetworkConnectionsClientUpdateResponse

type NetworkConnectionsClientUpdateResponse struct {
	// Network related settings
	NetworkConnection
}

NetworkConnectionsClientUpdateResponse contains the response from method NetworkConnectionsClient.BeginUpdate.

type NetworkProperties

type NetworkProperties struct {
	// REQUIRED; AAD Join type.
	DomainJoinType *DomainJoinType

	// Active Directory domain name
	DomainName *string

	// The password for the account used to join domain
	DomainPassword *string

	// The username of an Active Directory account (user or service account) that has permissions to create computer objects in
	// Active Directory. Required format: admin@contoso.com.
	DomainUsername *string

	// The name for resource group where NICs will be placed.
	NetworkingResourceGroupName *string

	// Active Directory domain Organization Unit (OU)
	OrganizationUnit *string

	// The subnet to attach Virtual Machines to
	SubnetID *string

	// READ-ONLY; Overall health status of the network connection. Health checks are run on creation, update, and periodically
	// to validate the network connection.
	HealthCheckStatus *HealthCheckStatus

	// READ-ONLY; The provisioning state of the resource.
	ProvisioningState *ProvisioningState
}

NetworkProperties - Network properties

func (NetworkProperties) MarshalJSON

func (n NetworkProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkProperties.

func (*NetworkProperties) UnmarshalJSON

func (n *NetworkProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProperties.

type Operation

type Operation struct {
	// Localized display information for this particular operation.
	Display *OperationDisplay

	// READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
	ActionType *ActionType

	// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane
	// operations.
	IsDataAction *bool

	// READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write",
	// "Microsoft.Compute/virtualMachines/capture/action"
	Name *string

	// READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
	// value is "user,system"
	Origin *Origin
}

Operation - Details of a REST API operation, returned from the Resource Provider Operations API

func (Operation) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON

func (o *Operation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views.
	Description *string

	// READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual
	// Machine", "Restart Virtual Machine".
	Operation *string

	// READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft
	// Compute".
	Provider *string

	// READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job
	// Schedule Collections".
	Resource *string
}

OperationDisplay - Localized display information for this particular operation.

func (OperationDisplay) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON

func (o *OperationDisplay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationListResult

type OperationListResult struct {
	// READ-ONLY; URL to get the next set of operation list results (if there are any).
	NextLink *string

	// READ-ONLY; List of operations supported by the resource provider
	Value []*Operation
}

OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.

func (OperationListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON

func (o *OperationListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

type OperationStatus

type OperationStatus struct {
	// REQUIRED; Operation status.
	Status *string

	// The end time of the operation.
	EndTime *time.Time

	// If present, details of the operation error.
	Error *ErrorDetail

	// Fully qualified ID for the async operation.
	ID *string

	// Name of the async operation.
	Name *string

	// The operations list.
	Operations []*OperationStatusResult

	// Percent of the operation that is complete.
	PercentComplete *float32

	// The start time of the operation.
	StartTime *time.Time

	// READ-ONLY; Custom operation properties, populated only for a successful operation.
	Properties any

	// READ-ONLY; Fully qualified ID of the resource against which the original async operation was started.
	ResourceID *string
}

OperationStatus - The current status of an async operation

func (OperationStatus) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationStatus.

func (*OperationStatus) UnmarshalJSON

func (o *OperationStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatus.

type OperationStatusResult

type OperationStatusResult struct {
	// REQUIRED; Operation status.
	Status *string

	// The end time of the operation.
	EndTime *time.Time

	// If present, details of the operation error.
	Error *ErrorDetail

	// Fully qualified ID for the async operation.
	ID *string

	// Name of the async operation.
	Name *string

	// The operations list.
	Operations []*OperationStatusResult

	// Percent of the operation that is complete.
	PercentComplete *float32

	// The start time of the operation.
	StartTime *time.Time

	// READ-ONLY; Fully qualified ID of the resource against which the original async operation was started.
	ResourceID *string
}

OperationStatusResult - The current status of an async operation.

func (OperationStatusResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationStatusResult.

func (*OperationStatusResult) UnmarshalJSON

func (o *OperationStatusResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatusResult.

type OperationStatusesClient

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

OperationStatusesClient contains the methods for the OperationStatuses group. Don't use this type directly, use NewOperationStatusesClient() instead.

func NewOperationStatusesClient

func NewOperationStatusesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationStatusesClient, error)

NewOperationStatusesClient creates a new instance of OperationStatusesClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*OperationStatusesClient) Get

Get - Gets the current status of an async operation. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • location - The Azure region
  • operationID - The ID of an ongoing async operation
  • options - OperationStatusesClientGetOptions contains the optional parameters for the OperationStatusesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/OperationStatus_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewOperationStatusesClient().Get(ctx, "westus3", "3fa1a29d-e807-488d-81d1-f1c5456a08cd", 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.OperationStatus = armdevcenter.OperationStatus{
// 	EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T15:16:55.100Z"); return t}()),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/providers/Microsoft.DevCenter/locations/CENTRALUS/operationStatuses/722e7bc4-60fa-4e6b-864f-d5bf12b9adc4"),
// 	PercentComplete: to.Ptr[float32](100),
// 	ResourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso"),
// 	StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-01T15:16:29.500Z"); return t}()),
// 	Status: to.Ptr("Succeeded"),
// }
Output:

type OperationStatusesClientGetOptions

type OperationStatusesClientGetOptions struct {
}

OperationStatusesClientGetOptions contains the optional parameters for the OperationStatusesClient.Get method.

type OperationStatusesClientGetResponse

type OperationStatusesClientGetResponse struct {
	// The current status of an async operation
	OperationStatus

	// Location contains the information returned from the Location header response.
	Location *string
}

OperationStatusesClientGetResponse contains the response from method OperationStatusesClient.Get.

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

NewListPager - Lists all of the available resource provider operations.

Generated from API version 2024-02-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/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Operations_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.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.OperationListResult = armdevcenter.OperationListResult{
	// 	Value: []*armdevcenter.Operation{
	// 		{
	// 			Name: to.Ptr("Microsoft.DevCenter/devcenters/write"),
	// 			Display: &armdevcenter.OperationDisplay{
	// 				Operation: to.Ptr("write"),
	// 				Provider: to.Ptr("Microsoft DevTest Center"),
	// 				Resource: to.Ptr("Microsoft DevTest Center devcenter resource"),
	// 			},
	// 	}},
	// }
}
Output:

type OperationsClientListOptions

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse

type OperationsClientListResponse struct {
	// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type Origin

type Origin string

Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"

const (
	OriginSystem     Origin = "system"
	OriginUser       Origin = "user"
	OriginUserSystem Origin = "user,system"
)

func PossibleOriginValues

func PossibleOriginValues() []Origin

PossibleOriginValues returns the possible values for the Origin const type.

type OutboundEnvironmentEndpoint

type OutboundEnvironmentEndpoint struct {
	// READ-ONLY; The type of service that the agent connects to.
	Category *string

	// READ-ONLY; The endpoints for this service for which the agent requires outbound access.
	Endpoints []*EndpointDependency
}

OutboundEnvironmentEndpoint - A collection of related endpoints from the same service for which the agent requires outbound access.

func (OutboundEnvironmentEndpoint) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OutboundEnvironmentEndpoint.

func (*OutboundEnvironmentEndpoint) UnmarshalJSON

func (o *OutboundEnvironmentEndpoint) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OutboundEnvironmentEndpoint.

type OutboundEnvironmentEndpointCollection

type OutboundEnvironmentEndpointCollection struct {
	// The continuation token.
	NextLink *string

	// READ-ONLY; The collection of outbound network dependency endpoints returned by the listing operation.
	Value []*OutboundEnvironmentEndpoint
}

OutboundEnvironmentEndpointCollection - Values returned by the List operation.

func (OutboundEnvironmentEndpointCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OutboundEnvironmentEndpointCollection.

func (*OutboundEnvironmentEndpointCollection) UnmarshalJSON

func (o *OutboundEnvironmentEndpointCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OutboundEnvironmentEndpointCollection.

type ParameterType

type ParameterType string

ParameterType - The type of data a parameter accepts.

const (
	// ParameterTypeArray - The parameter accepts an array of values.
	ParameterTypeArray ParameterType = "array"
	// ParameterTypeBoolean - The parameter accepts a boolean value.
	ParameterTypeBoolean ParameterType = "boolean"
	// ParameterTypeInteger - The parameter accepts an integer value.
	ParameterTypeInteger ParameterType = "integer"
	// ParameterTypeNumber - The parameter accepts a number value.
	ParameterTypeNumber ParameterType = "number"
	// ParameterTypeObject - The parameter accepts an object value.
	ParameterTypeObject ParameterType = "object"
	// ParameterTypeString - The parameter accepts a string value.
	ParameterTypeString ParameterType = "string"
)

func PossibleParameterTypeValues

func PossibleParameterTypeValues() []ParameterType

PossibleParameterTypeValues returns the possible values for the ParameterType const type.

type Pool

type Pool struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// Pool properties
	Properties *PoolProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

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

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Pool - A pool of Virtual Machines.

func (Pool) MarshalJSON

func (p Pool) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Pool.

func (*Pool) UnmarshalJSON

func (p *Pool) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Pool.

type PoolListResult

type PoolListResult struct {
	// READ-ONLY; URL to get the next set of results if there are any.
	NextLink *string

	// READ-ONLY; Current page of results.
	Value []*Pool
}

PoolListResult - Results of the machine pool list operation.

func (PoolListResult) MarshalJSON

func (p PoolListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PoolListResult.

func (*PoolListResult) UnmarshalJSON

func (p *PoolListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PoolListResult.

type PoolProperties

type PoolProperties struct {
	// Name of a Dev Box definition in parent Project of this Pool
	DevBoxDefinitionName *string

	// The display name of the pool.
	DisplayName *string

	// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created.
	LicenseType *LicenseType

	// Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box.
	LocalAdministrator *LocalAdminStatus

	// The regions of the managed virtual network (required when managedNetworkType is Managed).
	ManagedVirtualNetworkRegions []*string

	// Name of a Network Connection in parent Project of this Pool
	NetworkConnectionName *string

	// Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on
	// be enabled on the tenant.
	SingleSignOnStatus *SingleSignOnStatus

	// Stop on disconnect configuration settings for Dev Boxes created in this pool.
	StopOnDisconnect *StopOnDisconnectConfiguration

	// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network.
	VirtualNetworkType *VirtualNetworkType

	// READ-ONLY; Indicates the number of provisioned Dev Boxes in this pool.
	DevBoxCount *int32

	// READ-ONLY; Overall health status of the Pool. Indicates whether or not the Pool is available to create Dev Boxes.
	HealthStatus *HealthStatus

	// READ-ONLY; Details on the Pool health status to help diagnose issues. This is only populated when the pool status indicates
	// the pool is in a non-healthy state
	HealthStatusDetails []*HealthStatusDetail

	// READ-ONLY; The provisioning state of the resource.
	ProvisioningState *ProvisioningState
}

PoolProperties - Properties of a Pool

func (PoolProperties) MarshalJSON

func (p PoolProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PoolProperties.

func (*PoolProperties) UnmarshalJSON

func (p *PoolProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PoolProperties.

type PoolUpdate

type PoolUpdate struct {
	// The geo-location where the resource lives
	Location *string

	// Properties of a pool to be updated.
	Properties *PoolUpdateProperties

	// Resource tags.
	Tags map[string]*string
}

PoolUpdate - The pool properties for partial update. Properties not provided in the update request will not be changed.

func (PoolUpdate) MarshalJSON

func (p PoolUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PoolUpdate.

func (*PoolUpdate) UnmarshalJSON

func (p *PoolUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PoolUpdate.

type PoolUpdateProperties

type PoolUpdateProperties struct {
	// Name of a Dev Box definition in parent Project of this Pool
	DevBoxDefinitionName *string

	// The display name of the pool.
	DisplayName *string

	// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created.
	LicenseType *LicenseType

	// Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box.
	LocalAdministrator *LocalAdminStatus

	// The regions of the managed virtual network (required when managedNetworkType is Managed).
	ManagedVirtualNetworkRegions []*string

	// Name of a Network Connection in parent Project of this Pool
	NetworkConnectionName *string

	// Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on
	// be enabled on the tenant.
	SingleSignOnStatus *SingleSignOnStatus

	// Stop on disconnect configuration settings for Dev Boxes created in this pool.
	StopOnDisconnect *StopOnDisconnectConfiguration

	// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network.
	VirtualNetworkType *VirtualNetworkType
}

PoolUpdateProperties - Properties of a Pool. These properties can be updated after the resource has been created.

func (PoolUpdateProperties) MarshalJSON

func (p PoolUpdateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PoolUpdateProperties.

func (*PoolUpdateProperties) UnmarshalJSON

func (p *PoolUpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PoolUpdateProperties.

type PoolsClient

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

PoolsClient contains the methods for the Pools group. Don't use this type directly, use NewPoolsClient() instead.

func NewPoolsClient

func NewPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PoolsClient, error)

NewPoolsClient creates a new instance of PoolsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PoolsClient) BeginCreateOrUpdate

func (client *PoolsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, projectName string, poolName string, body Pool, options *PoolsClientBeginCreateOrUpdateOptions) (*runtime.Poller[PoolsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a machine pool If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • poolName - Name of the pool.
  • body - Represents a machine pool
  • options - PoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the PoolsClient.BeginCreateOrUpdate method.
Example (PoolsCreateOrUpdate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Pools_Put.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "DevProject", "DevPool", armdevcenter.Pool{
	Location: to.Ptr("centralus"),
	Properties: &armdevcenter.PoolProperties{
		DevBoxDefinitionName:  to.Ptr("WebDevBox"),
		DisplayName:           to.Ptr("Developer Pool"),
		LicenseType:           to.Ptr(armdevcenter.LicenseTypeWindowsClient),
		LocalAdministrator:    to.Ptr(armdevcenter.LocalAdminStatusEnabled),
		NetworkConnectionName: to.Ptr("Network1-westus2"),
		SingleSignOnStatus:    to.Ptr(armdevcenter.SingleSignOnStatusDisabled),
		StopOnDisconnect: &armdevcenter.StopOnDisconnectConfiguration{
			GracePeriodMinutes: to.Ptr[int32](60),
			Status:             to.Ptr(armdevcenter.StopOnDisconnectEnableStatusEnabled),
		},
		VirtualNetworkType: to.Ptr(armdevcenter.VirtualNetworkTypeUnmanaged),
	},
}, 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.Pool = armdevcenter.Pool{
// 	Name: to.Ptr("DevPool"),
// 	Type: to.Ptr("Microsoft.DevCenter/pools"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject/pools/DevPool"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Location: to.Ptr("centralus"),
// 	Properties: &armdevcenter.PoolProperties{
// 		DevBoxDefinitionName: to.Ptr("WebDevBox"),
// 		DisplayName: to.Ptr("Developer Pool"),
// 		LicenseType: to.Ptr(armdevcenter.LicenseTypeWindowsClient),
// 		LocalAdministrator: to.Ptr(armdevcenter.LocalAdminStatusEnabled),
// 		ManagedVirtualNetworkRegions: []*string{
// 		},
// 		NetworkConnectionName: to.Ptr("Network1-westus2"),
// 		SingleSignOnStatus: to.Ptr(armdevcenter.SingleSignOnStatusDisabled),
// 		StopOnDisconnect: &armdevcenter.StopOnDisconnectConfiguration{
// 			GracePeriodMinutes: to.Ptr[int32](60),
// 			Status: to.Ptr(armdevcenter.StopOnDisconnectEnableStatusEnabled),
// 		},
// 		VirtualNetworkType: to.Ptr(armdevcenter.VirtualNetworkTypeUnmanaged),
// 		DevBoxCount: to.Ptr[int32](1),
// 		HealthStatus: to.Ptr(armdevcenter.HealthStatusHealthy),
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 	},
// }
Output:

Example (PoolsCreateOrUpdateWithManagedNetwork)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Pools_PutWithManagedNetwork.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "DevProject", "DevPool", armdevcenter.Pool{
	Location: to.Ptr("centralus"),
	Properties: &armdevcenter.PoolProperties{
		DevBoxDefinitionName: to.Ptr("WebDevBox"),
		DisplayName:          to.Ptr("Developer Pool"),
		LicenseType:          to.Ptr(armdevcenter.LicenseTypeWindowsClient),
		LocalAdministrator:   to.Ptr(armdevcenter.LocalAdminStatusEnabled),
		ManagedVirtualNetworkRegions: []*string{
			to.Ptr("centralus")},
		NetworkConnectionName: to.Ptr("managedNetwork"),
		SingleSignOnStatus:    to.Ptr(armdevcenter.SingleSignOnStatusDisabled),
		StopOnDisconnect: &armdevcenter.StopOnDisconnectConfiguration{
			GracePeriodMinutes: to.Ptr[int32](60),
			Status:             to.Ptr(armdevcenter.StopOnDisconnectEnableStatusEnabled),
		},
		VirtualNetworkType: to.Ptr(armdevcenter.VirtualNetworkTypeManaged),
	},
}, 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.Pool = armdevcenter.Pool{
// 	Name: to.Ptr("DevPool"),
// 	Type: to.Ptr("Microsoft.DevCenter/pools"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject/pools/DevPool"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Location: to.Ptr("centralus"),
// 	Properties: &armdevcenter.PoolProperties{
// 		DevBoxDefinitionName: to.Ptr("WebDevBox"),
// 		DisplayName: to.Ptr("Developer Pool"),
// 		LicenseType: to.Ptr(armdevcenter.LicenseTypeWindowsClient),
// 		LocalAdministrator: to.Ptr(armdevcenter.LocalAdminStatusEnabled),
// 		ManagedVirtualNetworkRegions: []*string{
// 			to.Ptr("centralus")},
// 			NetworkConnectionName: to.Ptr("managedNetwork"),
// 			SingleSignOnStatus: to.Ptr(armdevcenter.SingleSignOnStatusDisabled),
// 			StopOnDisconnect: &armdevcenter.StopOnDisconnectConfiguration{
// 				GracePeriodMinutes: to.Ptr[int32](60),
// 				Status: to.Ptr(armdevcenter.StopOnDisconnectEnableStatusEnabled),
// 			},
// 			VirtualNetworkType: to.Ptr(armdevcenter.VirtualNetworkTypeManaged),
// 			DevBoxCount: to.Ptr[int32](1),
// 			HealthStatus: to.Ptr(armdevcenter.HealthStatusHealthy),
// 			ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 		},
// 	}
Output:

func (*PoolsClient) BeginDelete

func (client *PoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, projectName string, poolName string, options *PoolsClientBeginDeleteOptions) (*runtime.Poller[PoolsClientDeleteResponse], error)

BeginDelete - Deletes a machine pool If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • poolName - Name of the pool.
  • options - PoolsClientBeginDeleteOptions contains the optional parameters for the PoolsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Pools_Delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewPoolsClient().BeginDelete(ctx, "rg1", "DevProject", "poolName", 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 (*PoolsClient) BeginRunHealthChecks

func (client *PoolsClient) BeginRunHealthChecks(ctx context.Context, resourceGroupName string, projectName string, poolName string, options *PoolsClientBeginRunHealthChecksOptions) (*runtime.Poller[PoolsClientRunHealthChecksResponse], error)

BeginRunHealthChecks - Triggers a refresh of the pool status. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • poolName - Name of the pool.
  • options - PoolsClientBeginRunHealthChecksOptions contains the optional parameters for the PoolsClient.BeginRunHealthChecks method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Pools_RunHealthChecks.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewPoolsClient().BeginRunHealthChecks(ctx, "rg1", "DevProject", "DevPool", 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 (*PoolsClient) BeginUpdate

func (client *PoolsClient) BeginUpdate(ctx context.Context, resourceGroupName string, projectName string, poolName string, body PoolUpdate, options *PoolsClientBeginUpdateOptions) (*runtime.Poller[PoolsClientUpdateResponse], error)

BeginUpdate - Partially updates a machine pool If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • poolName - Name of the pool.
  • body - Represents a machine pool
  • options - PoolsClientBeginUpdateOptions contains the optional parameters for the PoolsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Pools_Patch.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewPoolsClient().BeginUpdate(ctx, "rg1", "DevProject", "DevPool", armdevcenter.PoolUpdate{
	Properties: &armdevcenter.PoolUpdateProperties{
		DevBoxDefinitionName: to.Ptr("WebDevBox2"),
	},
}, 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.Pool = armdevcenter.Pool{
// 	Name: to.Ptr("DevPool"),
// 	Type: to.Ptr("Microsoft.DevCenter/pools"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject/pools/DevPool"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Location: to.Ptr("centralus"),
// 	Properties: &armdevcenter.PoolProperties{
// 		DevBoxDefinitionName: to.Ptr("WebDevBox2"),
// 		DisplayName: to.Ptr("Developer Pool"),
// 		LicenseType: to.Ptr(armdevcenter.LicenseTypeWindowsClient),
// 		LocalAdministrator: to.Ptr(armdevcenter.LocalAdminStatusEnabled),
// 		ManagedVirtualNetworkRegions: []*string{
// 			to.Ptr("centralus")},
// 			NetworkConnectionName: to.Ptr("Network1-westus2"),
// 			SingleSignOnStatus: to.Ptr(armdevcenter.SingleSignOnStatusDisabled),
// 			StopOnDisconnect: &armdevcenter.StopOnDisconnectConfiguration{
// 				GracePeriodMinutes: to.Ptr[int32](60),
// 				Status: to.Ptr(armdevcenter.StopOnDisconnectEnableStatusEnabled),
// 			},
// 			VirtualNetworkType: to.Ptr(armdevcenter.VirtualNetworkTypeManaged),
// 			DevBoxCount: to.Ptr[int32](1),
// 			HealthStatus: to.Ptr(armdevcenter.HealthStatusHealthy),
// 			ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 		},
// 	}
Output:

func (*PoolsClient) Get

func (client *PoolsClient) Get(ctx context.Context, resourceGroupName string, projectName string, poolName string, options *PoolsClientGetOptions) (PoolsClientGetResponse, error)

Get - Gets a machine pool If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • poolName - Name of the pool.
  • options - PoolsClientGetOptions contains the optional parameters for the PoolsClient.Get method.
Example (PoolsGet)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Pools_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPoolsClient().Get(ctx, "rg1", "DevProject", "DevPool", 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.Pool = armdevcenter.Pool{
// 	Name: to.Ptr("DevPool"),
// 	Type: to.Ptr("Microsoft.DevCenter/pools"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject/pools/DevPool"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Location: to.Ptr("centralus"),
// 	Properties: &armdevcenter.PoolProperties{
// 		DevBoxDefinitionName: to.Ptr("WebDevBox"),
// 		DisplayName: to.Ptr("Developer Pool"),
// 		LicenseType: to.Ptr(armdevcenter.LicenseTypeWindowsClient),
// 		LocalAdministrator: to.Ptr(armdevcenter.LocalAdminStatusEnabled),
// 		ManagedVirtualNetworkRegions: []*string{
// 			to.Ptr("centralus")},
// 			NetworkConnectionName: to.Ptr("Network1-westus2"),
// 			SingleSignOnStatus: to.Ptr(armdevcenter.SingleSignOnStatusDisabled),
// 			StopOnDisconnect: &armdevcenter.StopOnDisconnectConfiguration{
// 				GracePeriodMinutes: to.Ptr[int32](60),
// 				Status: to.Ptr(armdevcenter.StopOnDisconnectEnableStatusEnabled),
// 			},
// 			VirtualNetworkType: to.Ptr(armdevcenter.VirtualNetworkTypeManaged),
// 			DevBoxCount: to.Ptr[int32](1),
// 			HealthStatus: to.Ptr(armdevcenter.HealthStatusHealthy),
// 			ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 		},
// 	}
Output:

Example (PoolsGetUnhealthyStatus)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Pools_GetUnhealthyStatus.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPoolsClient().Get(ctx, "rg1", "DevProject", "DevPool", 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.Pool = armdevcenter.Pool{
// 	Name: to.Ptr("DevPool"),
// 	Type: to.Ptr("Microsoft.DevCenter/pools"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject/pools/DevPool"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Location: to.Ptr("centralus"),
// 	Properties: &armdevcenter.PoolProperties{
// 		DevBoxDefinitionName: to.Ptr("WebDevBox"),
// 		DisplayName: to.Ptr("Developer Pool"),
// 		LicenseType: to.Ptr(armdevcenter.LicenseTypeWindowsClient),
// 		LocalAdministrator: to.Ptr(armdevcenter.LocalAdminStatusEnabled),
// 		ManagedVirtualNetworkRegions: []*string{
// 			to.Ptr("centralus")},
// 			NetworkConnectionName: to.Ptr("Network1-westus2"),
// 			SingleSignOnStatus: to.Ptr(armdevcenter.SingleSignOnStatusDisabled),
// 			StopOnDisconnect: &armdevcenter.StopOnDisconnectConfiguration{
// 				GracePeriodMinutes: to.Ptr[int32](60),
// 				Status: to.Ptr(armdevcenter.StopOnDisconnectEnableStatusEnabled),
// 			},
// 			VirtualNetworkType: to.Ptr(armdevcenter.VirtualNetworkTypeManaged),
// 			DevBoxCount: to.Ptr[int32](1),
// 			HealthStatus: to.Ptr(armdevcenter.HealthStatusUnhealthy),
// 			HealthStatusDetails: []*armdevcenter.HealthStatusDetail{
// 				{
// 					Code: to.Ptr("NetworkConnectionUnhealthy"),
// 					Message: to.Ptr("The Pool's Network Connection is in an unhealthy state. Check the Network Connection's health status for more details."),
// 				},
// 				{
// 					Code: to.Ptr("ImageValidationFailed"),
// 					Message: to.Ptr("Image validation has failed. Check the Dev Box Definition's image validation status for more details."),
// 				},
// 				{
// 					Code: to.Ptr("IntuneValidationFailed"),
// 					Message: to.Ptr("Intune license validation has failed. The tenant does not have a valid Intune license."),
// 			}},
// 			ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 		},
// 	}
Output:

func (*PoolsClient) NewListByProjectPager

func (client *PoolsClient) NewListByProjectPager(resourceGroupName string, projectName string, options *PoolsClientListByProjectOptions) *runtime.Pager[PoolsClientListByProjectResponse]

NewListByProjectPager - Lists pools for a project

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • options - PoolsClientListByProjectOptions contains the optional parameters for the PoolsClient.NewListByProjectPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Pools_List.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewPoolsClient().NewListByProjectPager("rg1", "DevProject", &armdevcenter.PoolsClientListByProjectOptions{Top: 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.PoolListResult = armdevcenter.PoolListResult{
	// 	Value: []*armdevcenter.Pool{
	// 		{
	// 			Name: to.Ptr("DevPool"),
	// 			Type: to.Ptr("Microsoft.DevCenter/pools"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject/pools/DevPool"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
	// 				CreatedBy: to.Ptr("user1"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("user1"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 			},
	// 			Location: to.Ptr("centralus"),
	// 			Properties: &armdevcenter.PoolProperties{
	// 				DevBoxDefinitionName: to.Ptr("WebDevBox"),
	// 				DisplayName: to.Ptr("Developer Pool"),
	// 				LicenseType: to.Ptr(armdevcenter.LicenseTypeWindowsClient),
	// 				LocalAdministrator: to.Ptr(armdevcenter.LocalAdminStatusEnabled),
	// 				ManagedVirtualNetworkRegions: []*string{
	// 					to.Ptr("centralus")},
	// 					NetworkConnectionName: to.Ptr("Network1-westus2"),
	// 					SingleSignOnStatus: to.Ptr(armdevcenter.SingleSignOnStatusDisabled),
	// 					StopOnDisconnect: &armdevcenter.StopOnDisconnectConfiguration{
	// 						GracePeriodMinutes: to.Ptr[int32](60),
	// 						Status: to.Ptr(armdevcenter.StopOnDisconnectEnableStatusEnabled),
	// 					},
	// 					VirtualNetworkType: to.Ptr(armdevcenter.VirtualNetworkTypeManaged),
	// 					DevBoxCount: to.Ptr[int32](1),
	// 					HealthStatus: to.Ptr(armdevcenter.HealthStatusHealthy),
	// 					ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
	// 				},
	// 		}},
	// 	}
}
Output:

type PoolsClientBeginCreateOrUpdateOptions

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

PoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the PoolsClient.BeginCreateOrUpdate method.

type PoolsClientBeginDeleteOptions

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

PoolsClientBeginDeleteOptions contains the optional parameters for the PoolsClient.BeginDelete method.

type PoolsClientBeginRunHealthChecksOptions

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

PoolsClientBeginRunHealthChecksOptions contains the optional parameters for the PoolsClient.BeginRunHealthChecks method.

type PoolsClientBeginUpdateOptions

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

PoolsClientBeginUpdateOptions contains the optional parameters for the PoolsClient.BeginUpdate method.

type PoolsClientCreateOrUpdateResponse

type PoolsClientCreateOrUpdateResponse struct {
	// A pool of Virtual Machines.
	Pool
}

PoolsClientCreateOrUpdateResponse contains the response from method PoolsClient.BeginCreateOrUpdate.

type PoolsClientDeleteResponse

type PoolsClientDeleteResponse struct {
}

PoolsClientDeleteResponse contains the response from method PoolsClient.BeginDelete.

type PoolsClientGetOptions

type PoolsClientGetOptions struct {
}

PoolsClientGetOptions contains the optional parameters for the PoolsClient.Get method.

type PoolsClientGetResponse

type PoolsClientGetResponse struct {
	// A pool of Virtual Machines.
	Pool
}

PoolsClientGetResponse contains the response from method PoolsClient.Get.

type PoolsClientListByProjectOptions

type PoolsClientListByProjectOptions struct {
	// The maximum number of resources to return from the operation. Example: '$top=10'.
	Top *int32
}

PoolsClientListByProjectOptions contains the optional parameters for the PoolsClient.NewListByProjectPager method.

type PoolsClientListByProjectResponse

type PoolsClientListByProjectResponse struct {
	// Results of the machine pool list operation.
	PoolListResult
}

PoolsClientListByProjectResponse contains the response from method PoolsClient.NewListByProjectPager.

type PoolsClientRunHealthChecksResponse

type PoolsClientRunHealthChecksResponse struct {
}

PoolsClientRunHealthChecksResponse contains the response from method PoolsClient.BeginRunHealthChecks.

type PoolsClientUpdateResponse

type PoolsClientUpdateResponse struct {
	// A pool of Virtual Machines.
	Pool
}

PoolsClientUpdateResponse contains the response from method PoolsClient.BeginUpdate.

type Project

type Project struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// Managed identity properties
	Identity *ManagedServiceIdentity

	// Properties of a project.
	Properties *ProjectProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

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

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Project - Represents a project resource.

func (Project) MarshalJSON

func (p Project) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Project.

func (*Project) UnmarshalJSON

func (p *Project) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Project.

type ProjectAllowedEnvironmentTypesClient

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

ProjectAllowedEnvironmentTypesClient contains the methods for the ProjectAllowedEnvironmentTypes group. Don't use this type directly, use NewProjectAllowedEnvironmentTypesClient() instead.

func NewProjectAllowedEnvironmentTypesClient

func NewProjectAllowedEnvironmentTypesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProjectAllowedEnvironmentTypesClient, error)

NewProjectAllowedEnvironmentTypesClient creates a new instance of ProjectAllowedEnvironmentTypesClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ProjectAllowedEnvironmentTypesClient) Get

Get - Gets an allowed environment type. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • environmentTypeName - The name of the environment type.
  • options - ProjectAllowedEnvironmentTypesClientGetOptions contains the optional parameters for the ProjectAllowedEnvironmentTypesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectAllowedEnvironmentTypes_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProjectAllowedEnvironmentTypesClient().Get(ctx, "rg1", "Contoso", "DevTest", 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.AllowedEnvironmentType = armdevcenter.AllowedEnvironmentType{
// 	Name: to.Ptr("DevTest"),
// 	Type: to.Ptr("Microsoft.DevCenter/projects/allowedenvironmenttypes"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/Contoso/allowedEnvironmentTypes/DevTest"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		CreatedBy: to.Ptr("User1@contoso.com"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		LastModifiedBy: to.Ptr("User1@contoso.com"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// }
Output:

func (*ProjectAllowedEnvironmentTypesClient) NewListPager

NewListPager - Lists allowed environment types for a project.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • options - ProjectAllowedEnvironmentTypesClientListOptions contains the optional parameters for the ProjectAllowedEnvironmentTypesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectAllowedEnvironmentTypes_List.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewProjectAllowedEnvironmentTypesClient().NewListPager("rg1", "Contoso", &armdevcenter.ProjectAllowedEnvironmentTypesClientListOptions{Top: 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.AllowedEnvironmentTypeListResult = armdevcenter.AllowedEnvironmentTypeListResult{
	// 	Value: []*armdevcenter.AllowedEnvironmentType{
	// 		{
	// 			Name: to.Ptr("DevTest"),
	// 			Type: to.Ptr("Microsoft.DevCenter/projects/allowedenvironmenttypes"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/Contoso/allowedEnvironmentTypes/DevTest"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
	// 				CreatedBy: to.Ptr("User1@contoso.com"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("User1@contoso.com"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 			},
	// 	}},
	// }
}
Output:

type ProjectAllowedEnvironmentTypesClientGetOptions

type ProjectAllowedEnvironmentTypesClientGetOptions struct {
}

ProjectAllowedEnvironmentTypesClientGetOptions contains the optional parameters for the ProjectAllowedEnvironmentTypesClient.Get method.

type ProjectAllowedEnvironmentTypesClientGetResponse

type ProjectAllowedEnvironmentTypesClientGetResponse struct {
	// Represents an allowed environment type.
	AllowedEnvironmentType
}

ProjectAllowedEnvironmentTypesClientGetResponse contains the response from method ProjectAllowedEnvironmentTypesClient.Get.

type ProjectAllowedEnvironmentTypesClientListOptions

type ProjectAllowedEnvironmentTypesClientListOptions struct {
	// The maximum number of resources to return from the operation. Example: '$top=10'.
	Top *int32
}

ProjectAllowedEnvironmentTypesClientListOptions contains the optional parameters for the ProjectAllowedEnvironmentTypesClient.NewListPager method.

type ProjectAllowedEnvironmentTypesClientListResponse

type ProjectAllowedEnvironmentTypesClientListResponse struct {
	// Result of the allowed environment type list operation.
	AllowedEnvironmentTypeListResult
}

ProjectAllowedEnvironmentTypesClientListResponse contains the response from method ProjectAllowedEnvironmentTypesClient.NewListPager.

type ProjectCatalogEnvironmentDefinitionsClient

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

ProjectCatalogEnvironmentDefinitionsClient contains the methods for the ProjectCatalogEnvironmentDefinitions group. Don't use this type directly, use NewProjectCatalogEnvironmentDefinitionsClient() instead.

func NewProjectCatalogEnvironmentDefinitionsClient

func NewProjectCatalogEnvironmentDefinitionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProjectCatalogEnvironmentDefinitionsClient, error)

NewProjectCatalogEnvironmentDefinitionsClient creates a new instance of ProjectCatalogEnvironmentDefinitionsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ProjectCatalogEnvironmentDefinitionsClient) GetErrorDetails

GetErrorDetails - Gets Environment Definition error details If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • catalogName - The name of the Catalog.
  • environmentDefinitionName - The name of the Environment Definition.
  • options - ProjectCatalogEnvironmentDefinitionsClientGetErrorDetailsOptions contains the optional parameters for the ProjectCatalogEnvironmentDefinitionsClient.GetErrorDetails method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectCatalogEnvironmentDefinitions_GetErrorDetails.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProjectCatalogEnvironmentDefinitionsClient().GetErrorDetails(ctx, "rg1", "DevProject", "myCatalog", "myEnvironmentDefinition", 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.CatalogResourceValidationErrorDetails = armdevcenter.CatalogResourceValidationErrorDetails{
// 	Errors: []*armdevcenter.CatalogErrorDetails{
// 		{
// 			Code: to.Ptr("ParameterValueInvalid"),
// 			Message: to.Ptr("Expected parameter value for 'InstanceCount' to be integer but found the string 'test'."),
// 	}},
// }
Output:

type ProjectCatalogEnvironmentDefinitionsClientGetErrorDetailsOptions

type ProjectCatalogEnvironmentDefinitionsClientGetErrorDetailsOptions struct {
}

ProjectCatalogEnvironmentDefinitionsClientGetErrorDetailsOptions contains the optional parameters for the ProjectCatalogEnvironmentDefinitionsClient.GetErrorDetails method.

type ProjectCatalogEnvironmentDefinitionsClientGetErrorDetailsResponse

type ProjectCatalogEnvironmentDefinitionsClientGetErrorDetailsResponse struct {
	// List of validator error details. Populated when changes are made to the resource or its dependent resources that impact
	// the validity of the Catalog resource.
	CatalogResourceValidationErrorDetails
}

ProjectCatalogEnvironmentDefinitionsClientGetErrorDetailsResponse contains the response from method ProjectCatalogEnvironmentDefinitionsClient.GetErrorDetails.

type ProjectCatalogSettings

type ProjectCatalogSettings struct {
	// Indicates catalog item types that can be synced.
	CatalogItemSyncTypes []*CatalogItemType
}

ProjectCatalogSettings - Settings to be used when associating a project with a catalog.

func (ProjectCatalogSettings) MarshalJSON

func (p ProjectCatalogSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProjectCatalogSettings.

func (*ProjectCatalogSettings) UnmarshalJSON

func (p *ProjectCatalogSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProjectCatalogSettings.

type ProjectCatalogSettingsInfo

type ProjectCatalogSettingsInfo struct {
	// Whether project catalogs associated with projects in this dev center can be configured to sync catalog items.
	CatalogItemSyncEnableStatus *CatalogItemSyncEnableStatus
}

ProjectCatalogSettingsInfo - Project catalog settings for project catalogs under a project associated to this dev center.

func (ProjectCatalogSettingsInfo) MarshalJSON

func (p ProjectCatalogSettingsInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProjectCatalogSettingsInfo.

func (*ProjectCatalogSettingsInfo) UnmarshalJSON

func (p *ProjectCatalogSettingsInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProjectCatalogSettingsInfo.

type ProjectCatalogsClient

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

ProjectCatalogsClient contains the methods for the ProjectCatalogs group. Don't use this type directly, use NewProjectCatalogsClient() instead.

func NewProjectCatalogsClient

func NewProjectCatalogsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProjectCatalogsClient, error)

NewProjectCatalogsClient creates a new instance of ProjectCatalogsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ProjectCatalogsClient) BeginConnect

func (client *ProjectCatalogsClient) BeginConnect(ctx context.Context, resourceGroupName string, projectName string, catalogName string, options *ProjectCatalogsClientBeginConnectOptions) (*runtime.Poller[ProjectCatalogsClientConnectResponse], error)

BeginConnect - Connects a project catalog to enable syncing. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • catalogName - The name of the Catalog.
  • options - ProjectCatalogsClientBeginConnectOptions contains the optional parameters for the ProjectCatalogsClient.BeginConnect method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectCatalogs_Connect.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewProjectCatalogsClient().BeginConnect(ctx, "rg1", "DevProject", "CentralCatalog", 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 (*ProjectCatalogsClient) BeginCreateOrUpdate

func (client *ProjectCatalogsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, projectName string, catalogName string, body Catalog, options *ProjectCatalogsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ProjectCatalogsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a project catalog. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • catalogName - The name of the Catalog.
  • body - Represents a catalog.
  • options - ProjectCatalogsClientBeginCreateOrUpdateOptions contains the optional parameters for the ProjectCatalogsClient.BeginCreateOrUpdate method.
Example (ProjectCatalogsCreateOrUpdateAdo)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectCatalogs_CreateAdo.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewProjectCatalogsClient().BeginCreateOrUpdate(ctx, "rg1", "DevProject", "CentralCatalog", armdevcenter.Catalog{
	Properties: &armdevcenter.CatalogProperties{
		AdoGit: &armdevcenter.GitCatalog{
			Path:             to.Ptr("/templates"),
			Branch:           to.Ptr("main"),
			SecretIdentifier: to.Ptr("https://contosokv.vault.azure.net/secrets/CentralRepoPat"),
			URI:              to.Ptr("https://contoso@dev.azure.com/contoso/contosoOrg/_git/centralrepo-fakecontoso"),
		},
	},
}, 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.Catalog = armdevcenter.Catalog{
// 	Name: to.Ptr("CentralCatalog"),
// 	Type: to.Ptr("Microsoft.DevCenter/projects/catalogs"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject/catalogs/CentralCatalog"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		CreatedBy: to.Ptr("User1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		LastModifiedBy: to.Ptr("User1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Properties: &armdevcenter.CatalogProperties{
// 		AdoGit: &armdevcenter.GitCatalog{
// 			Path: to.Ptr("/templates"),
// 			Branch: to.Ptr("main"),
// 			SecretIdentifier: to.Ptr("https://contosokv.vault.azure.net/secrets/CentralRepoPat"),
// 			URI: to.Ptr("https://contoso@dev.azure.com/contoso/contosoOrg/_git/centralrepo-fakecontoso"),
// 		},
// 		ConnectionState: to.Ptr(armdevcenter.CatalogConnectionStateConnected),
// 		LastSyncStats: &armdevcenter.SyncStats{
// 			Added: to.Ptr[int32](0),
// 			Removed: to.Ptr[int32](0),
// 			SyncedCatalogItemTypes: []*armdevcenter.CatalogItemType{
// 				to.Ptr(armdevcenter.CatalogItemTypeEnvironmentDefinition)},
// 				SynchronizationErrors: to.Ptr[int32](0),
// 				Unchanged: to.Ptr[int32](0),
// 				Updated: to.Ptr[int32](0),
// 				ValidationErrors: to.Ptr[int32](0),
// 			},
// 			ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 			SyncState: to.Ptr(armdevcenter.CatalogSyncStateSucceeded),
// 		},
// 	}
Output:

Example (ProjectCatalogsCreateOrUpdateGitHub)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectCatalogs_CreateGitHub.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewProjectCatalogsClient().BeginCreateOrUpdate(ctx, "rg1", "DevProject", "CentralCatalog", armdevcenter.Catalog{
	Properties: &armdevcenter.CatalogProperties{
		GitHub: &armdevcenter.GitCatalog{
			Path:             to.Ptr("/templates"),
			Branch:           to.Ptr("main"),
			SecretIdentifier: to.Ptr("https://contosokv.vault.azure.net/secrets/CentralRepoPat"),
			URI:              to.Ptr("https://github.com/Contoso/centralrepo-fake.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.Catalog = armdevcenter.Catalog{
// 	Name: to.Ptr("CentralCatalog"),
// 	Type: to.Ptr("Microsoft.DevCenter/projects/catalogs"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject/catalogs/CentralCatalog"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		CreatedBy: to.Ptr("User1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		LastModifiedBy: to.Ptr("User1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Properties: &armdevcenter.CatalogProperties{
// 		GitHub: &armdevcenter.GitCatalog{
// 			Path: to.Ptr("/templates"),
// 			Branch: to.Ptr("main"),
// 			SecretIdentifier: to.Ptr("https://contosokv.vault.azure.net/secrets/CentralRepoPat"),
// 			URI: to.Ptr("https://github.com/Contoso/centralrepo-fake.git"),
// 		},
// 		ConnectionState: to.Ptr(armdevcenter.CatalogConnectionStateConnected),
// 		LastSyncStats: &armdevcenter.SyncStats{
// 			Added: to.Ptr[int32](0),
// 			Removed: to.Ptr[int32](0),
// 			SyncedCatalogItemTypes: []*armdevcenter.CatalogItemType{
// 				to.Ptr(armdevcenter.CatalogItemTypeEnvironmentDefinition)},
// 				SynchronizationErrors: to.Ptr[int32](0),
// 				Unchanged: to.Ptr[int32](0),
// 				Updated: to.Ptr[int32](0),
// 				ValidationErrors: to.Ptr[int32](0),
// 			},
// 			ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 			SyncState: to.Ptr(armdevcenter.CatalogSyncStateSucceeded),
// 		},
// 	}
Output:

func (*ProjectCatalogsClient) BeginDelete

func (client *ProjectCatalogsClient) BeginDelete(ctx context.Context, resourceGroupName string, projectName string, catalogName string, options *ProjectCatalogsClientBeginDeleteOptions) (*runtime.Poller[ProjectCatalogsClientDeleteResponse], error)

BeginDelete - Deletes a project catalog resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • catalogName - The name of the Catalog.
  • options - ProjectCatalogsClientBeginDeleteOptions contains the optional parameters for the ProjectCatalogsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectCatalogs_Delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewProjectCatalogsClient().BeginDelete(ctx, "rg1", "DevProject", "CentralCatalog", 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 (*ProjectCatalogsClient) BeginPatch

func (client *ProjectCatalogsClient) BeginPatch(ctx context.Context, resourceGroupName string, projectName string, catalogName string, body CatalogUpdate, options *ProjectCatalogsClientBeginPatchOptions) (*runtime.Poller[ProjectCatalogsClientPatchResponse], error)

BeginPatch - Partially updates a project catalog. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • catalogName - The name of the Catalog.
  • body - Updatable project catalog properties.
  • options - ProjectCatalogsClientBeginPatchOptions contains the optional parameters for the ProjectCatalogsClient.BeginPatch method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectCatalogs_Patch.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewProjectCatalogsClient().BeginPatch(ctx, "rg1", "DevProject", "CentralCatalog", armdevcenter.CatalogUpdate{
	Properties: &armdevcenter.CatalogUpdateProperties{
		GitHub: &armdevcenter.GitCatalog{
			Path: to.Ptr("/environments"),
		},
	},
}, 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.Catalog = armdevcenter.Catalog{
// 	Name: to.Ptr("CentralCatalog"),
// 	Type: to.Ptr("Microsoft.DevCenter/projects/catalogs"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject/catalogs/CentralCatalog"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		CreatedBy: to.Ptr("User1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		LastModifiedBy: to.Ptr("User1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Properties: &armdevcenter.CatalogProperties{
// 		GitHub: &armdevcenter.GitCatalog{
// 			Path: to.Ptr("/environments"),
// 			Branch: to.Ptr("main"),
// 			SecretIdentifier: to.Ptr("https://contosokv.vault.azure.net/secrets/CentralRepoPat"),
// 			URI: to.Ptr("https://github.com/Contoso/centralrepo-fake.git"),
// 		},
// 		ConnectionState: to.Ptr(armdevcenter.CatalogConnectionStateConnected),
// 		LastConnectionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:28:00.314Z"); return t}()),
// 		LastSyncStats: &armdevcenter.SyncStats{
// 			Added: to.Ptr[int32](1),
// 			Removed: to.Ptr[int32](1),
// 			SynchronizationErrors: to.Ptr[int32](1),
// 			Unchanged: to.Ptr[int32](1),
// 			Updated: to.Ptr[int32](1),
// 			ValidationErrors: to.Ptr[int32](1),
// 		},
// 		LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:28:00.314Z"); return t}()),
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 		SyncState: to.Ptr(armdevcenter.CatalogSyncStateSucceeded),
// 	},
// }
Output:

func (*ProjectCatalogsClient) BeginSync

func (client *ProjectCatalogsClient) BeginSync(ctx context.Context, resourceGroupName string, projectName string, catalogName string, options *ProjectCatalogsClientBeginSyncOptions) (*runtime.Poller[ProjectCatalogsClientSyncResponse], error)

BeginSync - Syncs templates for a template source. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • catalogName - The name of the Catalog.
  • options - ProjectCatalogsClientBeginSyncOptions contains the optional parameters for the ProjectCatalogsClient.BeginSync method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectCatalogs_Sync.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewProjectCatalogsClient().BeginSync(ctx, "rg1", "DevProject", "CentralCatalog", 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 (*ProjectCatalogsClient) Get

func (client *ProjectCatalogsClient) Get(ctx context.Context, resourceGroupName string, projectName string, catalogName string, options *ProjectCatalogsClientGetOptions) (ProjectCatalogsClientGetResponse, error)

Get - Gets an associated project catalog. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • catalogName - The name of the Catalog.
  • options - ProjectCatalogsClientGetOptions contains the optional parameters for the ProjectCatalogsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectCatalogs_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProjectCatalogsClient().Get(ctx, "rg1", "DevProject", "CentralCatalog", 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.Catalog = armdevcenter.Catalog{
// 	Name: to.Ptr("CentralCatalog"),
// 	Type: to.Ptr("Microsoft.DevCenter/projects/catalogs"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject/catalogs/CentralCatalog"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		CreatedBy: to.Ptr("User1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		LastModifiedBy: to.Ptr("User1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Properties: &armdevcenter.CatalogProperties{
// 		GitHub: &armdevcenter.GitCatalog{
// 			Path: to.Ptr("/templates"),
// 			Branch: to.Ptr("main"),
// 			SecretIdentifier: to.Ptr("https://contosokv.vault.azure.net/secrets/CentralRepoPat"),
// 			URI: to.Ptr("https://github.com/Contoso/centralrepo-fake.git"),
// 		},
// 		ConnectionState: to.Ptr(armdevcenter.CatalogConnectionStateConnected),
// 		LastConnectionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:28:00.314Z"); return t}()),
// 		LastSyncStats: &armdevcenter.SyncStats{
// 			Added: to.Ptr[int32](1),
// 			Removed: to.Ptr[int32](1),
// 			SyncedCatalogItemTypes: []*armdevcenter.CatalogItemType{
// 				to.Ptr(armdevcenter.CatalogItemTypeEnvironmentDefinition)},
// 				SynchronizationErrors: to.Ptr[int32](1),
// 				Unchanged: to.Ptr[int32](1),
// 				Updated: to.Ptr[int32](1),
// 				ValidationErrors: to.Ptr[int32](1),
// 			},
// 			LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:28:00.314Z"); return t}()),
// 			ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 			SyncState: to.Ptr(armdevcenter.CatalogSyncStateSucceeded),
// 		},
// 	}
Output:

func (*ProjectCatalogsClient) GetSyncErrorDetails

func (client *ProjectCatalogsClient) GetSyncErrorDetails(ctx context.Context, resourceGroupName string, projectName string, catalogName string, options *ProjectCatalogsClientGetSyncErrorDetailsOptions) (ProjectCatalogsClientGetSyncErrorDetailsResponse, error)

GetSyncErrorDetails - Gets project catalog synchronization error details If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • catalogName - The name of the Catalog.
  • options - ProjectCatalogsClientGetSyncErrorDetailsOptions contains the optional parameters for the ProjectCatalogsClient.GetSyncErrorDetails method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectCatalogs_GetSyncErrorDetails.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProjectCatalogsClient().GetSyncErrorDetails(ctx, "rg1", "DevProject", "CentralCatalog", 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.SyncErrorDetails = armdevcenter.SyncErrorDetails{
// 	Conflicts: []*armdevcenter.CatalogConflictError{
// 		{
// 			Name: to.Ptr("DuplicateEnvironmentName"),
// 			Path: to.Ptr("/Environments/Duplicate/manifest.yaml"),
// 	}},
// 	Errors: []*armdevcenter.CatalogSyncError{
// 		{
// 			Path: to.Ptr("/Environments/Invalid/manifest.yaml"),
// 			ErrorDetails: []*armdevcenter.CatalogErrorDetails{
// 				{
// 					Code: to.Ptr("ParseError"),
// 					Message: to.Ptr("Schema Error Within Catalog Item: Missing Name"),
// 			}},
// 	}},
// 	OperationError: &armdevcenter.CatalogErrorDetails{
// 		Code: to.Ptr("Conflict"),
// 		Message: to.Ptr("The source control credentials could not be validated successfully."),
// 	},
// }
Output:

func (*ProjectCatalogsClient) NewListPager

func (client *ProjectCatalogsClient) NewListPager(resourceGroupName string, projectName string, options *ProjectCatalogsClientListOptions) *runtime.Pager[ProjectCatalogsClientListResponse]

NewListPager - Lists the catalogs associated with a project.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • options - ProjectCatalogsClientListOptions contains the optional parameters for the ProjectCatalogsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectCatalogs_List.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewProjectCatalogsClient().NewListPager("rg1", "DevProject", &armdevcenter.ProjectCatalogsClientListOptions{Top: 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.CatalogListResult = armdevcenter.CatalogListResult{
	// 	Value: []*armdevcenter.Catalog{
	// 		{
	// 			Name: to.Ptr("CentralCatalog"),
	// 			Type: to.Ptr("Microsoft.DevCenter/projects/catalogs"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject/Contoso/catalogs"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
	// 				CreatedBy: to.Ptr("User1"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("User1"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 			},
	// 			Properties: &armdevcenter.CatalogProperties{
	// 				GitHub: &armdevcenter.GitCatalog{
	// 					Path: to.Ptr("/templates"),
	// 					Branch: to.Ptr("main"),
	// 					SecretIdentifier: to.Ptr("https://contosokv.vault.azure.net/secrets/CentralRepoPat"),
	// 					URI: to.Ptr("https://github.com/Contoso/centralrepo-fake.git"),
	// 				},
	// 				ConnectionState: to.Ptr(armdevcenter.CatalogConnectionStateConnected),
	// 				LastConnectionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:28:00.314Z"); return t}()),
	// 				LastSyncStats: &armdevcenter.SyncStats{
	// 					Added: to.Ptr[int32](1),
	// 					Removed: to.Ptr[int32](1),
	// 					SynchronizationErrors: to.Ptr[int32](1),
	// 					Unchanged: to.Ptr[int32](1),
	// 					Updated: to.Ptr[int32](1),
	// 					ValidationErrors: to.Ptr[int32](1),
	// 				},
	// 				LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:28:00.314Z"); return t}()),
	// 				ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
	// 				SyncState: to.Ptr(armdevcenter.CatalogSyncStateSucceeded),
	// 			},
	// 	}},
	// }
}
Output:

type ProjectCatalogsClientBeginConnectOptions

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

ProjectCatalogsClientBeginConnectOptions contains the optional parameters for the ProjectCatalogsClient.BeginConnect method.

type ProjectCatalogsClientBeginCreateOrUpdateOptions

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

ProjectCatalogsClientBeginCreateOrUpdateOptions contains the optional parameters for the ProjectCatalogsClient.BeginCreateOrUpdate method.

type ProjectCatalogsClientBeginDeleteOptions

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

ProjectCatalogsClientBeginDeleteOptions contains the optional parameters for the ProjectCatalogsClient.BeginDelete method.

type ProjectCatalogsClientBeginPatchOptions

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

ProjectCatalogsClientBeginPatchOptions contains the optional parameters for the ProjectCatalogsClient.BeginPatch method.

type ProjectCatalogsClientBeginSyncOptions

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

ProjectCatalogsClientBeginSyncOptions contains the optional parameters for the ProjectCatalogsClient.BeginSync method.

type ProjectCatalogsClientConnectResponse

type ProjectCatalogsClientConnectResponse struct {
}

ProjectCatalogsClientConnectResponse contains the response from method ProjectCatalogsClient.BeginConnect.

type ProjectCatalogsClientCreateOrUpdateResponse

type ProjectCatalogsClientCreateOrUpdateResponse struct {
	// Represents a catalog.
	Catalog
}

ProjectCatalogsClientCreateOrUpdateResponse contains the response from method ProjectCatalogsClient.BeginCreateOrUpdate.

type ProjectCatalogsClientDeleteResponse

type ProjectCatalogsClientDeleteResponse struct {
}

ProjectCatalogsClientDeleteResponse contains the response from method ProjectCatalogsClient.BeginDelete.

type ProjectCatalogsClientGetOptions

type ProjectCatalogsClientGetOptions struct {
}

ProjectCatalogsClientGetOptions contains the optional parameters for the ProjectCatalogsClient.Get method.

type ProjectCatalogsClientGetResponse

type ProjectCatalogsClientGetResponse struct {
	// Represents a catalog.
	Catalog
}

ProjectCatalogsClientGetResponse contains the response from method ProjectCatalogsClient.Get.

type ProjectCatalogsClientGetSyncErrorDetailsOptions

type ProjectCatalogsClientGetSyncErrorDetailsOptions struct {
}

ProjectCatalogsClientGetSyncErrorDetailsOptions contains the optional parameters for the ProjectCatalogsClient.GetSyncErrorDetails method.

type ProjectCatalogsClientGetSyncErrorDetailsResponse

type ProjectCatalogsClientGetSyncErrorDetailsResponse struct {
	// Synchronization error details.
	SyncErrorDetails
}

ProjectCatalogsClientGetSyncErrorDetailsResponse contains the response from method ProjectCatalogsClient.GetSyncErrorDetails.

type ProjectCatalogsClientListOptions

type ProjectCatalogsClientListOptions struct {
	// The maximum number of resources to return from the operation. Example: '$top=10'.
	Top *int32
}

ProjectCatalogsClientListOptions contains the optional parameters for the ProjectCatalogsClient.NewListPager method.

type ProjectCatalogsClientListResponse

type ProjectCatalogsClientListResponse struct {
	// Results of the catalog list operation.
	CatalogListResult
}

ProjectCatalogsClientListResponse contains the response from method ProjectCatalogsClient.NewListPager.

type ProjectCatalogsClientPatchResponse

type ProjectCatalogsClientPatchResponse struct {
	// Represents a catalog.
	Catalog
}

ProjectCatalogsClientPatchResponse contains the response from method ProjectCatalogsClient.BeginPatch.

type ProjectCatalogsClientSyncResponse

type ProjectCatalogsClientSyncResponse struct {
}

ProjectCatalogsClientSyncResponse contains the response from method ProjectCatalogsClient.BeginSync.

type ProjectEnvironmentType

type ProjectEnvironmentType struct {
	// Managed identity properties
	Identity *ManagedServiceIdentity

	// The geo-location for the environment type
	Location *string

	// Properties of an environment type.
	Properties *ProjectEnvironmentTypeProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

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

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

ProjectEnvironmentType - Represents an environment type.

func (ProjectEnvironmentType) MarshalJSON

func (p ProjectEnvironmentType) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProjectEnvironmentType.

func (*ProjectEnvironmentType) UnmarshalJSON

func (p *ProjectEnvironmentType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProjectEnvironmentType.

type ProjectEnvironmentTypeListResult

type ProjectEnvironmentTypeListResult struct {
	// READ-ONLY; URL to get the next set of results if there are any.
	NextLink *string

	// READ-ONLY; Current page of results.
	Value []*ProjectEnvironmentType
}

ProjectEnvironmentTypeListResult - Result of the project environment type list operation.

func (ProjectEnvironmentTypeListResult) MarshalJSON

func (p ProjectEnvironmentTypeListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProjectEnvironmentTypeListResult.

func (*ProjectEnvironmentTypeListResult) UnmarshalJSON

func (p *ProjectEnvironmentTypeListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProjectEnvironmentTypeListResult.

type ProjectEnvironmentTypeProperties

type ProjectEnvironmentTypeProperties struct {
	// The role definition assigned to the environment creator on backing resources.
	CreatorRoleAssignment *ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment

	// Id of a subscription that the environment type will be mapped to. The environment's resources will be deployed into this
	// subscription.
	DeploymentTargetID *string

	// The display name of the project environment type.
	DisplayName *string

	// Defines whether this Environment Type can be used in this Project.
	Status *EnvironmentTypeEnableStatus

	// Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role
	// definition IDs.
	UserRoleAssignments map[string]*UserRoleAssignmentValue

	// READ-ONLY; The number of environments of this type.
	EnvironmentCount *int32

	// READ-ONLY; The provisioning state of the resource.
	ProvisioningState *ProvisioningState
}

ProjectEnvironmentTypeProperties - Properties of a project environment type.

func (ProjectEnvironmentTypeProperties) MarshalJSON

func (p ProjectEnvironmentTypeProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProjectEnvironmentTypeProperties.

func (*ProjectEnvironmentTypeProperties) UnmarshalJSON

func (p *ProjectEnvironmentTypeProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProjectEnvironmentTypeProperties.

type ProjectEnvironmentTypeUpdate

type ProjectEnvironmentTypeUpdate struct {
	// Managed identity properties
	Identity *ManagedServiceIdentity

	// Properties to configure an environment type.
	Properties *ProjectEnvironmentTypeUpdateProperties

	// Resource tags.
	Tags map[string]*string
}

ProjectEnvironmentTypeUpdate - The project environment type for partial update. Properties not provided in the update request will not be changed.

func (ProjectEnvironmentTypeUpdate) MarshalJSON

func (p ProjectEnvironmentTypeUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProjectEnvironmentTypeUpdate.

func (*ProjectEnvironmentTypeUpdate) UnmarshalJSON

func (p *ProjectEnvironmentTypeUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProjectEnvironmentTypeUpdate.

type ProjectEnvironmentTypeUpdateProperties

type ProjectEnvironmentTypeUpdateProperties struct {
	// The role definition assigned to the environment creator on backing resources.
	CreatorRoleAssignment *ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment

	// Id of a subscription that the environment type will be mapped to. The environment's resources will be deployed into this
	// subscription.
	DeploymentTargetID *string

	// The display name of the project environment type.
	DisplayName *string

	// Defines whether this Environment Type can be used in this Project.
	Status *EnvironmentTypeEnableStatus

	// Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role
	// definition IDs.
	UserRoleAssignments map[string]*UserRoleAssignmentValue
}

ProjectEnvironmentTypeUpdateProperties - Properties of a project environment type. These properties can be updated after the resource has been created.

func (ProjectEnvironmentTypeUpdateProperties) MarshalJSON

func (p ProjectEnvironmentTypeUpdateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProjectEnvironmentTypeUpdateProperties.

func (*ProjectEnvironmentTypeUpdateProperties) UnmarshalJSON

func (p *ProjectEnvironmentTypeUpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProjectEnvironmentTypeUpdateProperties.

type ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment

type ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment struct {
	// A map of roles to assign to the environment creator.
	Roles map[string]*EnvironmentRole
}

ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment - The role definition assigned to the environment creator on backing resources.

func (ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.

func (*ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.

type ProjectEnvironmentTypesClient

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

ProjectEnvironmentTypesClient contains the methods for the ProjectEnvironmentTypes group. Don't use this type directly, use NewProjectEnvironmentTypesClient() instead.

func NewProjectEnvironmentTypesClient

func NewProjectEnvironmentTypesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProjectEnvironmentTypesClient, error)

NewProjectEnvironmentTypesClient creates a new instance of ProjectEnvironmentTypesClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ProjectEnvironmentTypesClient) CreateOrUpdate

CreateOrUpdate - Creates or updates a project environment type. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • environmentTypeName - The name of the environment type.
  • body - Represents a Project Environment Type.
  • options - ProjectEnvironmentTypesClientCreateOrUpdateOptions contains the optional parameters for the ProjectEnvironmentTypesClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectEnvironmentTypes_Put.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProjectEnvironmentTypesClient().CreateOrUpdate(ctx, "rg1", "ContosoProj", "DevTest", armdevcenter.ProjectEnvironmentType{
	Identity: &armdevcenter.ManagedServiceIdentity{
		Type: to.Ptr(armdevcenter.ManagedServiceIdentityTypeUserAssigned),
		UserAssignedIdentities: map[string]*armdevcenter.UserAssignedIdentity{
			"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1": {},
		},
	},
	Properties: &armdevcenter.ProjectEnvironmentTypeProperties{
		CreatorRoleAssignment: &armdevcenter.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment{
			Roles: map[string]*armdevcenter.EnvironmentRole{
				"4cbf0b6c-e750-441c-98a7-10da8387e4d6": {},
			},
		},
		DeploymentTargetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000"),
		Status:             to.Ptr(armdevcenter.EnvironmentTypeEnableStatusEnabled),
		UserRoleAssignments: map[string]*armdevcenter.UserRoleAssignmentValue{
			"e45e3m7c-176e-416a-b466-0c5ec8298f8a": {
				Roles: map[string]*armdevcenter.EnvironmentRole{
					"4cbf0b6c-e750-441c-98a7-10da8387e4d6": {},
				},
			},
		},
	},
	Tags: map[string]*string{
		"CostCenter": to.Ptr("RnD"),
	},
}, 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.ProjectEnvironmentType = armdevcenter.ProjectEnvironmentType{
// 	Name: to.Ptr("DevTest"),
// 	Type: to.Ptr("Microsoft.DevCenter/projects/environmentTypes"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/ContosoProj/environmentTypes/DevTest"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		CreatedBy: to.Ptr("User1@contoso.com"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		LastModifiedBy: to.Ptr("User1@contoso.com"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Identity: &armdevcenter.ManagedServiceIdentity{
// 		Type: to.Ptr(armdevcenter.ManagedServiceIdentityTypeUserAssigned),
// 		UserAssignedIdentities: map[string]*armdevcenter.UserAssignedIdentity{
// 			"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1": &armdevcenter.UserAssignedIdentity{
// 				ClientID: to.Ptr("e35621a5-f615-4a20-940e-de8a84b15abc"),
// 				PrincipalID: to.Ptr("2111b8fc-e123-485a-b408-bf1153189494"),
// 			},
// 		},
// 	},
// 	Location: to.Ptr("centralus"),
// 	Properties: &armdevcenter.ProjectEnvironmentTypeProperties{
// 		CreatorRoleAssignment: &armdevcenter.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment{
// 			Roles: map[string]*armdevcenter.EnvironmentRole{
// 				"4cbf0b6c-e750-441c-98a7-10da8387e4d6": &armdevcenter.EnvironmentRole{
// 					Description: to.Ptr("Allows Developer access to project virtual machine resources."),
// 					RoleName: to.Ptr("Developer"),
// 				},
// 			},
// 		},
// 		DeploymentTargetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000"),
// 		DisplayName: to.Ptr("DevTest"),
// 		Status: to.Ptr(armdevcenter.EnvironmentTypeEnableStatusEnabled),
// 		UserRoleAssignments: map[string]*armdevcenter.UserRoleAssignmentValue{
// 			"e45e3m7c-176e-416a-b466-0c5ec8298f8a": &armdevcenter.UserRoleAssignmentValue{
// 				Roles: map[string]*armdevcenter.EnvironmentRole{
// 					"4cbf0b6c-e750-441c-98a7-10da8387e4d6": &armdevcenter.EnvironmentRole{
// 						Description: to.Ptr("Allows Developer access to project virtual machine resources."),
// 						RoleName: to.Ptr("Developer"),
// 					},
// 				},
// 			},
// 		},
// 		EnvironmentCount: to.Ptr[int32](0),
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 	},
// 	Tags: map[string]*string{
// 		"CostCenter": to.Ptr("RnD"),
// 		"hidden-title": to.Ptr("Dev"),
// 	},
// }
Output:

func (*ProjectEnvironmentTypesClient) Delete

func (client *ProjectEnvironmentTypesClient) Delete(ctx context.Context, resourceGroupName string, projectName string, environmentTypeName string, options *ProjectEnvironmentTypesClientDeleteOptions) (ProjectEnvironmentTypesClientDeleteResponse, error)

Delete - Deletes a project environment type. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • environmentTypeName - The name of the environment type.
  • options - ProjectEnvironmentTypesClientDeleteOptions contains the optional parameters for the ProjectEnvironmentTypesClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectEnvironmentTypes_Delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewProjectEnvironmentTypesClient().Delete(ctx, "rg1", "ContosoProj", "DevTest", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*ProjectEnvironmentTypesClient) Get

func (client *ProjectEnvironmentTypesClient) Get(ctx context.Context, resourceGroupName string, projectName string, environmentTypeName string, options *ProjectEnvironmentTypesClientGetOptions) (ProjectEnvironmentTypesClientGetResponse, error)

Get - Gets a project environment type. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • environmentTypeName - The name of the environment type.
  • options - ProjectEnvironmentTypesClientGetOptions contains the optional parameters for the ProjectEnvironmentTypesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectEnvironmentTypes_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProjectEnvironmentTypesClient().Get(ctx, "rg1", "ContosoProj", "DevTest", 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.ProjectEnvironmentType = armdevcenter.ProjectEnvironmentType{
// 	Name: to.Ptr("DevTest"),
// 	Type: to.Ptr("Microsoft.DevCenter/projects/environmentTypes"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/ContosoProj/environmentTypes/DevTest"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		CreatedBy: to.Ptr("User1@contoso.com"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		LastModifiedBy: to.Ptr("User1@contoso.com"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Identity: &armdevcenter.ManagedServiceIdentity{
// 		Type: to.Ptr(armdevcenter.ManagedServiceIdentityTypeUserAssigned),
// 		UserAssignedIdentities: map[string]*armdevcenter.UserAssignedIdentity{
// 			"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1": &armdevcenter.UserAssignedIdentity{
// 				ClientID: to.Ptr("e35621a5-f615-4a20-940e-de8a84b15abc"),
// 				PrincipalID: to.Ptr("2111b8fc-e123-485a-b408-bf1153189494"),
// 			},
// 		},
// 	},
// 	Location: to.Ptr("centralus"),
// 	Properties: &armdevcenter.ProjectEnvironmentTypeProperties{
// 		CreatorRoleAssignment: &armdevcenter.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment{
// 			Roles: map[string]*armdevcenter.EnvironmentRole{
// 				"4cbf0b6c-e750-441c-98a7-10da8387e4d6": &armdevcenter.EnvironmentRole{
// 					Description: to.Ptr("Allows Developer access to project virtual machine resources."),
// 					RoleName: to.Ptr("Developer"),
// 				},
// 			},
// 		},
// 		DeploymentTargetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000"),
// 		Status: to.Ptr(armdevcenter.EnvironmentTypeEnableStatusEnabled),
// 		UserRoleAssignments: map[string]*armdevcenter.UserRoleAssignmentValue{
// 			"e45e3m7c-176e-416a-b466-0c5ec8298f8a": &armdevcenter.UserRoleAssignmentValue{
// 				Roles: map[string]*armdevcenter.EnvironmentRole{
// 					"4cbf0b6c-e750-441c-98a7-10da8387e4d6": &armdevcenter.EnvironmentRole{
// 						Description: to.Ptr("Allows Developer access to project virtual machine resources."),
// 						RoleName: to.Ptr("Developer"),
// 					},
// 				},
// 			},
// 		},
// 		EnvironmentCount: to.Ptr[int32](1),
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 	},
// 	Tags: map[string]*string{
// 		"CostCenter": to.Ptr("RnD"),
// 	},
// }
Output:

func (*ProjectEnvironmentTypesClient) NewListPager

NewListPager - Lists environment types for a project.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • options - ProjectEnvironmentTypesClientListOptions contains the optional parameters for the ProjectEnvironmentTypesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectEnvironmentTypes_List.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewProjectEnvironmentTypesClient().NewListPager("rg1", "ContosoProj", &armdevcenter.ProjectEnvironmentTypesClientListOptions{Top: 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.ProjectEnvironmentTypeListResult = armdevcenter.ProjectEnvironmentTypeListResult{
	// 	Value: []*armdevcenter.ProjectEnvironmentType{
	// 		{
	// 			Name: to.Ptr("DevTest"),
	// 			Type: to.Ptr("Microsoft.DevCenter/projects/environmentTypes"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/ContosoProj/environmentTypes/DevTest"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
	// 				CreatedBy: to.Ptr("User1@contoso.com"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("User1@contoso.com"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 			},
	// 			Identity: &armdevcenter.ManagedServiceIdentity{
	// 				Type: to.Ptr(armdevcenter.ManagedServiceIdentityTypeUserAssigned),
	// 				UserAssignedIdentities: map[string]*armdevcenter.UserAssignedIdentity{
	// 					"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1": &armdevcenter.UserAssignedIdentity{
	// 						ClientID: to.Ptr("e35621a5-f615-4a20-940e-de8a84b15abc"),
	// 						PrincipalID: to.Ptr("2111b8fc-e123-485a-b408-bf1153189494"),
	// 					},
	// 				},
	// 			},
	// 			Location: to.Ptr("centralus"),
	// 			Properties: &armdevcenter.ProjectEnvironmentTypeProperties{
	// 				CreatorRoleAssignment: &armdevcenter.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment{
	// 					Roles: map[string]*armdevcenter.EnvironmentRole{
	// 						"4cbf0b6c-e750-441c-98a7-10da8387e4d6": &armdevcenter.EnvironmentRole{
	// 							Description: to.Ptr("Allows Developer access to project virtual machine resources."),
	// 							RoleName: to.Ptr("Developer"),
	// 						},
	// 					},
	// 				},
	// 				DeploymentTargetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000"),
	// 				Status: to.Ptr(armdevcenter.EnvironmentTypeEnableStatusEnabled),
	// 				UserRoleAssignments: map[string]*armdevcenter.UserRoleAssignmentValue{
	// 					"e45e3m7c-176e-416a-b466-0c5ec8298f8a": &armdevcenter.UserRoleAssignmentValue{
	// 						Roles: map[string]*armdevcenter.EnvironmentRole{
	// 							"4cbf0b6c-e750-441c-98a7-10da8387e4d6": &armdevcenter.EnvironmentRole{
	// 								Description: to.Ptr("Allows Developer access to project virtual machine resources."),
	// 								RoleName: to.Ptr("Developer"),
	// 							},
	// 						},
	// 					},
	// 				},
	// 				ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
	// 			},
	// 			Tags: map[string]*string{
	// 				"CostCenter": to.Ptr("RnD"),
	// 			},
	// 	}},
	// }
}
Output:

func (*ProjectEnvironmentTypesClient) Update

Update - Partially updates a project environment type. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • environmentTypeName - The name of the environment type.
  • body - Updatable project environment type properties.
  • options - ProjectEnvironmentTypesClientUpdateOptions contains the optional parameters for the ProjectEnvironmentTypesClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/ProjectEnvironmentTypes_Patch.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProjectEnvironmentTypesClient().Update(ctx, "rg1", "ContosoProj", "DevTest", armdevcenter.ProjectEnvironmentTypeUpdate{
	Identity: &armdevcenter.ManagedServiceIdentity{
		Type: to.Ptr(armdevcenter.ManagedServiceIdentityTypeUserAssigned),
		UserAssignedIdentities: map[string]*armdevcenter.UserAssignedIdentity{
			"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1": {},
		},
	},
	Properties: &armdevcenter.ProjectEnvironmentTypeUpdateProperties{
		DeploymentTargetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000"),
		Status:             to.Ptr(armdevcenter.EnvironmentTypeEnableStatusEnabled),
		UserRoleAssignments: map[string]*armdevcenter.UserRoleAssignmentValue{
			"e45e3m7c-176e-416a-b466-0c5ec8298f8a": {
				Roles: map[string]*armdevcenter.EnvironmentRole{
					"4cbf0b6c-e750-441c-98a7-10da8387e4d6": {},
				},
			},
		},
	},
	Tags: map[string]*string{
		"CostCenter": to.Ptr("RnD"),
	},
}, 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.ProjectEnvironmentType = armdevcenter.ProjectEnvironmentType{
// 	Name: to.Ptr("DevTest"),
// 	Type: to.Ptr("Microsoft.DevCenter/projects/environmentTypes"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/ContosoProj/environmentTypes/DevTest"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		CreatedBy: to.Ptr("User1@contoso.com"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:24:24.818Z"); return t}()),
// 		LastModifiedBy: to.Ptr("User1@contoso.com"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Identity: &armdevcenter.ManagedServiceIdentity{
// 		Type: to.Ptr(armdevcenter.ManagedServiceIdentityTypeUserAssigned),
// 		UserAssignedIdentities: map[string]*armdevcenter.UserAssignedIdentity{
// 			"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1": &armdevcenter.UserAssignedIdentity{
// 				ClientID: to.Ptr("e35621a5-f615-4a20-940e-de8a84b15abc"),
// 				PrincipalID: to.Ptr("2111b8fc-e123-485a-b408-bf1153189494"),
// 			},
// 		},
// 	},
// 	Location: to.Ptr("centralus"),
// 	Properties: &armdevcenter.ProjectEnvironmentTypeProperties{
// 		CreatorRoleAssignment: &armdevcenter.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment{
// 			Roles: map[string]*armdevcenter.EnvironmentRole{
// 				"4cbf0b6c-e750-441c-98a7-10da8387e4d6": &armdevcenter.EnvironmentRole{
// 					Description: to.Ptr("Allows Developer access to project virtual machine resources."),
// 					RoleName: to.Ptr("Developer"),
// 				},
// 			},
// 		},
// 		DeploymentTargetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000"),
// 		Status: to.Ptr(armdevcenter.EnvironmentTypeEnableStatusEnabled),
// 		UserRoleAssignments: map[string]*armdevcenter.UserRoleAssignmentValue{
// 			"e45e3m7c-176e-416a-b466-0c5ec8298f8a": &armdevcenter.UserRoleAssignmentValue{
// 				Roles: map[string]*armdevcenter.EnvironmentRole{
// 					"4cbf0b6c-e750-441c-98a7-10da8387e4d6": &armdevcenter.EnvironmentRole{
// 						Description: to.Ptr("Allows Developer access to project virtual machine resources."),
// 						RoleName: to.Ptr("Developer"),
// 					},
// 				},
// 			},
// 		},
// 		EnvironmentCount: to.Ptr[int32](1),
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 	},
// 	Tags: map[string]*string{
// 		"CostCenter": to.Ptr("RnD"),
// 	},
// }
Output:

type ProjectEnvironmentTypesClientCreateOrUpdateOptions

type ProjectEnvironmentTypesClientCreateOrUpdateOptions struct {
}

ProjectEnvironmentTypesClientCreateOrUpdateOptions contains the optional parameters for the ProjectEnvironmentTypesClient.CreateOrUpdate method.

type ProjectEnvironmentTypesClientCreateOrUpdateResponse

type ProjectEnvironmentTypesClientCreateOrUpdateResponse struct {
	// Represents an environment type.
	ProjectEnvironmentType
}

ProjectEnvironmentTypesClientCreateOrUpdateResponse contains the response from method ProjectEnvironmentTypesClient.CreateOrUpdate.

type ProjectEnvironmentTypesClientDeleteOptions

type ProjectEnvironmentTypesClientDeleteOptions struct {
}

ProjectEnvironmentTypesClientDeleteOptions contains the optional parameters for the ProjectEnvironmentTypesClient.Delete method.

type ProjectEnvironmentTypesClientDeleteResponse

type ProjectEnvironmentTypesClientDeleteResponse struct {
}

ProjectEnvironmentTypesClientDeleteResponse contains the response from method ProjectEnvironmentTypesClient.Delete.

type ProjectEnvironmentTypesClientGetOptions

type ProjectEnvironmentTypesClientGetOptions struct {
}

ProjectEnvironmentTypesClientGetOptions contains the optional parameters for the ProjectEnvironmentTypesClient.Get method.

type ProjectEnvironmentTypesClientGetResponse

type ProjectEnvironmentTypesClientGetResponse struct {
	// Represents an environment type.
	ProjectEnvironmentType
}

ProjectEnvironmentTypesClientGetResponse contains the response from method ProjectEnvironmentTypesClient.Get.

type ProjectEnvironmentTypesClientListOptions

type ProjectEnvironmentTypesClientListOptions struct {
	// The maximum number of resources to return from the operation. Example: '$top=10'.
	Top *int32
}

ProjectEnvironmentTypesClientListOptions contains the optional parameters for the ProjectEnvironmentTypesClient.NewListPager method.

type ProjectEnvironmentTypesClientListResponse

type ProjectEnvironmentTypesClientListResponse struct {
	// Result of the project environment type list operation.
	ProjectEnvironmentTypeListResult
}

ProjectEnvironmentTypesClientListResponse contains the response from method ProjectEnvironmentTypesClient.NewListPager.

type ProjectEnvironmentTypesClientUpdateOptions

type ProjectEnvironmentTypesClientUpdateOptions struct {
}

ProjectEnvironmentTypesClientUpdateOptions contains the optional parameters for the ProjectEnvironmentTypesClient.Update method.

type ProjectEnvironmentTypesClientUpdateResponse

type ProjectEnvironmentTypesClientUpdateResponse struct {
	// Represents an environment type.
	ProjectEnvironmentType
}

ProjectEnvironmentTypesClientUpdateResponse contains the response from method ProjectEnvironmentTypesClient.Update.

type ProjectListResult

type ProjectListResult struct {
	// READ-ONLY; URL to get the next set of results if there are any.
	NextLink *string

	// READ-ONLY; Current page of results.
	Value []*Project
}

ProjectListResult - Results of the project list operation.

func (ProjectListResult) MarshalJSON

func (p ProjectListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProjectListResult.

func (*ProjectListResult) UnmarshalJSON

func (p *ProjectListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProjectListResult.

type ProjectProperties

type ProjectProperties struct {
	// Settings to be used when associating a project with a catalog.
	CatalogSettings *ProjectCatalogSettings

	// Description of the project.
	Description *string

	// Resource Id of an associated DevCenter
	DevCenterID *string

	// The display name of the project.
	DisplayName *string

	// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This will
	// have no effect on existing Dev Boxes when reduced.
	MaxDevBoxesPerUser *int32

	// READ-ONLY; The URI of the Dev Center resource this project is associated with.
	DevCenterURI *string

	// READ-ONLY; The provisioning state of the resource.
	ProvisioningState *ProvisioningState
}

ProjectProperties - Properties of a project.

func (ProjectProperties) MarshalJSON

func (p ProjectProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProjectProperties.

func (*ProjectProperties) UnmarshalJSON

func (p *ProjectProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProjectProperties.

type ProjectUpdate

type ProjectUpdate struct {
	// Managed identity properties
	Identity *ManagedServiceIdentity

	// The geo-location where the resource lives
	Location *string

	// Properties of a project to be updated.
	Properties *ProjectUpdateProperties

	// Resource tags.
	Tags map[string]*string
}

ProjectUpdate - The project properties for partial update. Properties not provided in the update request will not be changed.

func (ProjectUpdate) MarshalJSON

func (p ProjectUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProjectUpdate.

func (*ProjectUpdate) UnmarshalJSON

func (p *ProjectUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProjectUpdate.

type ProjectUpdateProperties

type ProjectUpdateProperties struct {
	// Settings to be used when associating a project with a catalog.
	CatalogSettings *ProjectCatalogSettings

	// Description of the project.
	Description *string

	// Resource Id of an associated DevCenter
	DevCenterID *string

	// The display name of the project.
	DisplayName *string

	// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This will
	// have no effect on existing Dev Boxes when reduced.
	MaxDevBoxesPerUser *int32
}

ProjectUpdateProperties - Properties of a project. These properties can be updated after the resource has been created.

func (ProjectUpdateProperties) MarshalJSON

func (p ProjectUpdateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProjectUpdateProperties.

func (*ProjectUpdateProperties) UnmarshalJSON

func (p *ProjectUpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProjectUpdateProperties.

type ProjectsClient

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

ProjectsClient contains the methods for the Projects group. Don't use this type directly, use NewProjectsClient() instead.

func NewProjectsClient

func NewProjectsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProjectsClient, error)

NewProjectsClient creates a new instance of ProjectsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ProjectsClient) BeginCreateOrUpdate

func (client *ProjectsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, projectName string, body Project, options *ProjectsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ProjectsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a project. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • body - Represents a project.
  • options - ProjectsClientBeginCreateOrUpdateOptions contains the optional parameters for the ProjectsClient.BeginCreateOrUpdate method.
Example (ProjectsCreateOrUpdate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Projects_Put.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewProjectsClient().BeginCreateOrUpdate(ctx, "rg1", "DevProject", armdevcenter.Project{
	Location: to.Ptr("centralus"),
	Tags: map[string]*string{
		"CostCenter": to.Ptr("R&D"),
	},
	Properties: &armdevcenter.ProjectProperties{
		Description: to.Ptr("This is my first project."),
		DevCenterID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso"),
		DisplayName: to.Ptr("Dev"),
	},
}, 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.Project = armdevcenter.Project{
// 	Name: to.Ptr("DevProject"),
// 	Type: to.Ptr("Microsoft.DevCenter/projects"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Location: to.Ptr("centralus"),
// 	Tags: map[string]*string{
// 		"CostCenter": to.Ptr("R&D"),
// 		"hidden-title": to.Ptr("Dev"),
// 	},
// 	Properties: &armdevcenter.ProjectProperties{
// 		Description: to.Ptr("This is my first project."),
// 		DevCenterID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso"),
// 		DevCenterURI: to.Ptr("https://4c7c8922-78e9-4928-aa6f-75ba59355371-contoso.centralus.devcenter.azure.com"),
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 	},
// }
Output:

Example (ProjectsCreateOrUpdateWithLimitsPerDev)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Projects_PutWithMaxDevBoxPerUser.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewProjectsClient().BeginCreateOrUpdate(ctx, "rg1", "DevProject", armdevcenter.Project{
	Location: to.Ptr("centralus"),
	Tags: map[string]*string{
		"CostCenter": to.Ptr("R&D"),
	},
	Properties: &armdevcenter.ProjectProperties{
		Description:        to.Ptr("This is my first project."),
		DevCenterID:        to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso"),
		MaxDevBoxesPerUser: to.Ptr[int32](3),
	},
}, 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.Project = armdevcenter.Project{
// 	Name: to.Ptr("DevProject"),
// 	Type: to.Ptr("Microsoft.DevCenter/projects"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Location: to.Ptr("centralus"),
// 	Tags: map[string]*string{
// 		"CostCenter": to.Ptr("R&D"),
// 	},
// 	Properties: &armdevcenter.ProjectProperties{
// 		Description: to.Ptr("This is my first project."),
// 		DevCenterID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso"),
// 		MaxDevBoxesPerUser: to.Ptr[int32](3),
// 		DevCenterURI: to.Ptr("https://4c7c8922-78e9-4928-aa6f-75ba59355371-contoso.centralus.devcenter.azure.com"),
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 	},
// }
Output:

func (*ProjectsClient) BeginDelete

func (client *ProjectsClient) BeginDelete(ctx context.Context, resourceGroupName string, projectName string, options *ProjectsClientBeginDeleteOptions) (*runtime.Poller[ProjectsClientDeleteResponse], error)

BeginDelete - Deletes a project resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • options - ProjectsClientBeginDeleteOptions contains the optional parameters for the ProjectsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Projects_Delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewProjectsClient().BeginDelete(ctx, "rg1", "DevProject", 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 (*ProjectsClient) BeginUpdate

func (client *ProjectsClient) BeginUpdate(ctx context.Context, resourceGroupName string, projectName string, body ProjectUpdate, options *ProjectsClientBeginUpdateOptions) (*runtime.Poller[ProjectsClientUpdateResponse], error)

BeginUpdate - Partially updates a project. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • body - Updatable project properties.
  • options - ProjectsClientBeginUpdateOptions contains the optional parameters for the ProjectsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Projects_Patch.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewProjectsClient().BeginUpdate(ctx, "rg1", "DevProject", armdevcenter.ProjectUpdate{
	Tags: map[string]*string{
		"CostCenter": to.Ptr("R&D"),
	},
	Properties: &armdevcenter.ProjectUpdateProperties{
		Description: to.Ptr("This is my first project."),
		CatalogSettings: &armdevcenter.ProjectCatalogSettings{
			CatalogItemSyncTypes: []*armdevcenter.CatalogItemType{
				to.Ptr(armdevcenter.CatalogItemTypeEnvironmentDefinition)},
		},
		DisplayName: to.Ptr("Dev"),
	},
}, 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.Project = armdevcenter.Project{
// 	Name: to.Ptr("myproject"),
// 	Type: to.Ptr("Microsoft.DevCenter/projects"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Location: to.Ptr("centralus"),
// 	Tags: map[string]*string{
// 		"CostCenter": to.Ptr("R&D"),
// 		"displayName": to.Ptr("Dev"),
// 	},
// 	Properties: &armdevcenter.ProjectProperties{
// 		Description: to.Ptr("This is my first project. Very exciting."),
// 		CatalogSettings: &armdevcenter.ProjectCatalogSettings{
// 			CatalogItemSyncTypes: []*armdevcenter.CatalogItemType{
// 				to.Ptr(armdevcenter.CatalogItemTypeEnvironmentDefinition)},
// 			},
// 			DevCenterID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso"),
// 			DisplayName: to.Ptr("Dev"),
// 			DevCenterURI: to.Ptr("https://4c7c8922-78e9-4928-aa6f-75ba59355371-contoso.centralus.devcenter.azure.com"),
// 			ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 		},
// 	}
Output:

func (*ProjectsClient) Get

func (client *ProjectsClient) Get(ctx context.Context, resourceGroupName string, projectName string, options *ProjectsClientGetOptions) (ProjectsClientGetResponse, error)

Get - Gets a specific project. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • options - ProjectsClientGetOptions contains the optional parameters for the ProjectsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Projects_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProjectsClient().Get(ctx, "rg1", "DevProject", 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.Project = armdevcenter.Project{
// 	Name: to.Ptr("DevProject"),
// 	Type: to.Ptr("Microsoft.DevCenter/projects"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Location: to.Ptr("centralus"),
// 	Tags: map[string]*string{
// 		"CostCenter": to.Ptr("R&D"),
// 		"hidden-title": to.Ptr("Dev"),
// 	},
// 	Properties: &armdevcenter.ProjectProperties{
// 		Description: to.Ptr("This is my first project."),
// 		CatalogSettings: &armdevcenter.ProjectCatalogSettings{
// 			CatalogItemSyncTypes: []*armdevcenter.CatalogItemType{
// 				to.Ptr(armdevcenter.CatalogItemTypeEnvironmentDefinition)},
// 			},
// 			DevCenterID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso"),
// 			DisplayName: to.Ptr("Dev"),
// 			DevCenterURI: to.Ptr("https://4c7c8922-78e9-4928-aa6f-75ba59355371-contoso.centralus.devcenter.azure.com"),
// 		},
// 	}
Output:

func (*ProjectsClient) NewListByResourceGroupPager

func (client *ProjectsClient) NewListByResourceGroupPager(resourceGroupName string, options *ProjectsClientListByResourceGroupOptions) *runtime.Pager[ProjectsClientListByResourceGroupResponse]

NewListByResourceGroupPager - Lists all projects in the resource group.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - ProjectsClientListByResourceGroupOptions contains the optional parameters for the ProjectsClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Projects_ListByResourceGroup.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewProjectsClient().NewListByResourceGroupPager("rg1", &armdevcenter.ProjectsClientListByResourceGroupOptions{Top: 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.ProjectListResult = armdevcenter.ProjectListResult{
	// 	Value: []*armdevcenter.Project{
	// 		{
	// 			Name: to.Ptr("myproject"),
	// 			Type: to.Ptr("Microsoft.DevCenter/projects"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/myproject"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
	// 				CreatedBy: to.Ptr("user1"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("user1"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 			},
	// 			Location: to.Ptr("centralus"),
	// 			Tags: map[string]*string{
	// 				"CostCenter": to.Ptr("R&D"),
	// 			},
	// 			Properties: &armdevcenter.ProjectProperties{
	// 				Description: to.Ptr("This is my first project."),
	// 				DevCenterID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso"),
	// 				DevCenterURI: to.Ptr("https://4c7c8922-78e9-4928-aa6f-75ba59355371-contoso.centralus.devcenter.azure.com"),
	// 				ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
	// 			},
	// 	}},
	// }
}
Output:

func (*ProjectsClient) NewListBySubscriptionPager

NewListBySubscriptionPager - Lists all projects in the subscription.

Generated from API version 2024-02-01

  • options - ProjectsClientListBySubscriptionOptions contains the optional parameters for the ProjectsClient.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Projects_ListBySubscription.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewProjectsClient().NewListBySubscriptionPager(&armdevcenter.ProjectsClientListBySubscriptionOptions{Top: 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.ProjectListResult = armdevcenter.ProjectListResult{
	// 	Value: []*armdevcenter.Project{
	// 		{
	// 			Name: to.Ptr("myproject"),
	// 			Type: to.Ptr("Microsoft.DevCenter/projects"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/myproject"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
	// 				CreatedBy: to.Ptr("user1"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("user1"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 			},
	// 			Location: to.Ptr("centralus"),
	// 			Tags: map[string]*string{
	// 				"CostCenter": to.Ptr("R&D"),
	// 			},
	// 			Properties: &armdevcenter.ProjectProperties{
	// 				Description: to.Ptr("This is my first project."),
	// 				DevCenterID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso"),
	// 				DevCenterURI: to.Ptr("https://4c7c8922-78e9-4928-aa6f-75ba59355371-contoso.centralus.devcenter.azure.com"),
	// 				ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
	// 			},
	// 	}},
	// }
}
Output:

type ProjectsClientBeginCreateOrUpdateOptions

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

ProjectsClientBeginCreateOrUpdateOptions contains the optional parameters for the ProjectsClient.BeginCreateOrUpdate method.

type ProjectsClientBeginDeleteOptions

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

ProjectsClientBeginDeleteOptions contains the optional parameters for the ProjectsClient.BeginDelete method.

type ProjectsClientBeginUpdateOptions

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

ProjectsClientBeginUpdateOptions contains the optional parameters for the ProjectsClient.BeginUpdate method.

type ProjectsClientCreateOrUpdateResponse

type ProjectsClientCreateOrUpdateResponse struct {
	// Represents a project resource.
	Project
}

ProjectsClientCreateOrUpdateResponse contains the response from method ProjectsClient.BeginCreateOrUpdate.

type ProjectsClientDeleteResponse

type ProjectsClientDeleteResponse struct {
}

ProjectsClientDeleteResponse contains the response from method ProjectsClient.BeginDelete.

type ProjectsClientGetOptions

type ProjectsClientGetOptions struct {
}

ProjectsClientGetOptions contains the optional parameters for the ProjectsClient.Get method.

type ProjectsClientGetResponse

type ProjectsClientGetResponse struct {
	// Represents a project resource.
	Project
}

ProjectsClientGetResponse contains the response from method ProjectsClient.Get.

type ProjectsClientListByResourceGroupOptions

type ProjectsClientListByResourceGroupOptions struct {
	// The maximum number of resources to return from the operation. Example: '$top=10'.
	Top *int32
}

ProjectsClientListByResourceGroupOptions contains the optional parameters for the ProjectsClient.NewListByResourceGroupPager method.

type ProjectsClientListByResourceGroupResponse

type ProjectsClientListByResourceGroupResponse struct {
	// Results of the project list operation.
	ProjectListResult
}

ProjectsClientListByResourceGroupResponse contains the response from method ProjectsClient.NewListByResourceGroupPager.

type ProjectsClientListBySubscriptionOptions

type ProjectsClientListBySubscriptionOptions struct {
	// The maximum number of resources to return from the operation. Example: '$top=10'.
	Top *int32
}

ProjectsClientListBySubscriptionOptions contains the optional parameters for the ProjectsClient.NewListBySubscriptionPager method.

type ProjectsClientListBySubscriptionResponse

type ProjectsClientListBySubscriptionResponse struct {
	// Results of the project list operation.
	ProjectListResult
}

ProjectsClientListBySubscriptionResponse contains the response from method ProjectsClient.NewListBySubscriptionPager.

type ProjectsClientUpdateResponse

type ProjectsClientUpdateResponse struct {
	// Represents a project resource.
	Project
}

ProjectsClientUpdateResponse contains the response from method ProjectsClient.BeginUpdate.

type Properties

type Properties struct {
	// The display name of the devcenter.
	DisplayName *string

	// Encryption settings to be used for server-side encryption for proprietary content (such as catalogs, logs, customizations).
	Encryption *Encryption

	// Dev Center settings to be used when associating a project with a catalog.
	ProjectCatalogSettings *ProjectCatalogSettingsInfo

	// READ-ONLY; The URI of the Dev Center.
	DevCenterURI *string

	// READ-ONLY; The provisioning state of the resource.
	ProvisioningState *ProvisioningState
}

Properties of the devcenter.

func (Properties) MarshalJSON

func (p Properties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Properties.

func (*Properties) UnmarshalJSON

func (p *Properties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Properties.

type ProvisioningState

type ProvisioningState string

ProvisioningState - Provisioning state of the resource.

const (
	ProvisioningStateAccepted                  ProvisioningState = "Accepted"
	ProvisioningStateCanceled                  ProvisioningState = "Canceled"
	ProvisioningStateCreated                   ProvisioningState = "Created"
	ProvisioningStateCreating                  ProvisioningState = "Creating"
	ProvisioningStateDeleted                   ProvisioningState = "Deleted"
	ProvisioningStateDeleting                  ProvisioningState = "Deleting"
	ProvisioningStateFailed                    ProvisioningState = "Failed"
	ProvisioningStateMovingResources           ProvisioningState = "MovingResources"
	ProvisioningStateNotSpecified              ProvisioningState = "NotSpecified"
	ProvisioningStateRolloutInProgress         ProvisioningState = "RolloutInProgress"
	ProvisioningStateRunning                   ProvisioningState = "Running"
	ProvisioningStateStorageProvisioningFailed ProvisioningState = "StorageProvisioningFailed"
	ProvisioningStateSucceeded                 ProvisioningState = "Succeeded"
	ProvisioningStateTransientFailure          ProvisioningState = "TransientFailure"
	ProvisioningStateUpdated                   ProvisioningState = "Updated"
	ProvisioningStateUpdating                  ProvisioningState = "Updating"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type RecommendedMachineConfiguration

type RecommendedMachineConfiguration struct {
	// READ-ONLY; Recommended memory range.
	Memory *ResourceRange

	// READ-ONLY; Recommended vCPU range.
	VCPUs *ResourceRange
}

RecommendedMachineConfiguration - Properties for a recommended machine configuration.

func (RecommendedMachineConfiguration) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type RecommendedMachineConfiguration.

func (*RecommendedMachineConfiguration) UnmarshalJSON

func (r *RecommendedMachineConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RecommendedMachineConfiguration.

type ResourceRange

type ResourceRange struct {
	// READ-ONLY; Maximum value.
	Max *int32

	// READ-ONLY; Minimum value.
	Min *int32
}

ResourceRange - Properties for a range of values.

func (ResourceRange) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourceRange.

func (*ResourceRange) UnmarshalJSON

func (r *ResourceRange) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceRange.

type SKU

type SKU struct {
	// REQUIRED; The name of the SKU. Ex - P3. It is typically a letter+number code
	Name *string

	// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the
	// resource this may be omitted.
	Capacity *int32

	// If the service has different generations of hardware, for the same SKU, then that can be captured here.
	Family *string

	// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code.
	Size *string

	// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required
	// on a PUT.
	Tier *SKUTier
}

SKU - The resource model definition representing SKU

func (SKU) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SKU.

func (*SKU) UnmarshalJSON

func (s *SKU) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKU.

type SKUInfo

type SKUInfo struct {
	// REQUIRED; The name of the SKU. Ex - P3. It is typically a letter+number code
	Name *string

	// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the
	// resource this may be omitted.
	Capacity *int32

	// If the service has different generations of hardware, for the same SKU, then that can be captured here.
	Family *string

	// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code.
	Size *string

	// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required
	// on a PUT.
	Tier *SKUTier

	// READ-ONLY; Collection of name/value pairs to describe the SKU capabilities.
	Capabilities []*Capability

	// READ-ONLY; SKU supported locations.
	Locations []*string

	// READ-ONLY; The name of the resource type
	ResourceType *string
}

SKUInfo - The resource model definition representing SKU for DevCenter resources

func (SKUInfo) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SKUInfo.

func (*SKUInfo) UnmarshalJSON

func (s *SKUInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKUInfo.

type SKUListResult

type SKUListResult struct {
	// READ-ONLY; URL to get the next set of results if there are any.
	NextLink *string

	// READ-ONLY; Current page of results.
	Value []*SKUInfo
}

SKUListResult - Results of the Microsoft.DevCenter SKU list operation.

func (SKUListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SKUListResult.

func (*SKUListResult) UnmarshalJSON

func (s *SKUListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKUListResult.

type SKUTier

type SKUTier string

SKUTier - This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.

const (
	SKUTierBasic    SKUTier = "Basic"
	SKUTierFree     SKUTier = "Free"
	SKUTierPremium  SKUTier = "Premium"
	SKUTierStandard SKUTier = "Standard"
)

func PossibleSKUTierValues

func PossibleSKUTierValues() []SKUTier

PossibleSKUTierValues returns the possible values for the SKUTier 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 - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*SKUsClient) NewListBySubscriptionPager

NewListBySubscriptionPager - Lists the Microsoft.DevCenter SKUs available in a subscription

Generated from API version 2024-02-01

  • options - SKUsClientListBySubscriptionOptions contains the optional parameters for the SKUsClient.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Skus_ListBySubscription.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewSKUsClient().NewListBySubscriptionPager(&armdevcenter.SKUsClientListBySubscriptionOptions{Top: 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.SKUListResult = armdevcenter.SKUListResult{
	// 	Value: []*armdevcenter.SKUInfo{
	// 		{
	// 			Name: to.Ptr("Large"),
	// 			Tier: to.Ptr(armdevcenter.SKUTierPremium),
	// 			Locations: []*string{
	// 				to.Ptr("CentralUS")},
	// 				ResourceType: to.Ptr("projects/pools"),
	// 			},
	// 			{
	// 				Name: to.Ptr("Medium"),
	// 				Tier: to.Ptr(armdevcenter.SKUTierStandard),
	// 				Locations: []*string{
	// 					to.Ptr("CentralUS")},
	// 					ResourceType: to.Ptr("projects/pools"),
	// 			}},
	// 		}
}
Output:

type SKUsClientListBySubscriptionOptions

type SKUsClientListBySubscriptionOptions struct {
	// The maximum number of resources to return from the operation. Example: '$top=10'.
	Top *int32
}

SKUsClientListBySubscriptionOptions contains the optional parameters for the SKUsClient.NewListBySubscriptionPager method.

type SKUsClientListBySubscriptionResponse

type SKUsClientListBySubscriptionResponse struct {
	// Results of the Microsoft.DevCenter SKU list operation.
	SKUListResult
}

SKUsClientListBySubscriptionResponse contains the response from method SKUsClient.NewListBySubscriptionPager.

type Schedule

type Schedule struct {
	// Properties of a Schedule resource
	Properties *ScheduleProperties

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

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

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Schedule - Represents a Schedule to execute a task.

func (Schedule) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Schedule.

func (*Schedule) UnmarshalJSON

func (s *Schedule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Schedule.

type ScheduleEnableStatus

type ScheduleEnableStatus string

ScheduleEnableStatus - Schedule enable or disable status. Indicates whether the schedule applied to is either enabled or disabled.

const (
	ScheduleEnableStatusDisabled ScheduleEnableStatus = "Disabled"
	ScheduleEnableStatusEnabled  ScheduleEnableStatus = "Enabled"
)

func PossibleScheduleEnableStatusValues

func PossibleScheduleEnableStatusValues() []ScheduleEnableStatus

PossibleScheduleEnableStatusValues returns the possible values for the ScheduleEnableStatus const type.

type ScheduleListResult

type ScheduleListResult struct {
	// READ-ONLY; URL to get the next set of results if there are any.
	NextLink *string

	// READ-ONLY; Current page of results.
	Value []*Schedule
}

ScheduleListResult - Result of the schedule list operation.

func (ScheduleListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ScheduleListResult.

func (*ScheduleListResult) UnmarshalJSON

func (s *ScheduleListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ScheduleListResult.

type ScheduleProperties

type ScheduleProperties struct {
	// The frequency of this scheduled task.
	Frequency *ScheduledFrequency

	// The geo-location where the resource lives
	Location *string

	// Indicates whether or not this scheduled task is enabled.
	State *ScheduleEnableStatus

	// Resource tags.
	Tags map[string]*string

	// The target time to trigger the action. The format is HH:MM.
	Time *string

	// The IANA timezone id at which the schedule should execute.
	TimeZone *string

	// Supported type this scheduled task represents.
	Type *ScheduledType

	// READ-ONLY; The provisioning state of the resource.
	ProvisioningState *ProvisioningState
}

ScheduleProperties - The Schedule properties defining when and what to execute.

func (ScheduleProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ScheduleProperties.

func (*ScheduleProperties) UnmarshalJSON

func (s *ScheduleProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ScheduleProperties.

type ScheduleUpdate

type ScheduleUpdate struct {
	// Properties of a schedule resource to be updated.
	Properties *ScheduleUpdateProperties
}

ScheduleUpdate - The schedule properties for partial update. Properties not provided in the update request will not be changed.

func (ScheduleUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ScheduleUpdate.

func (*ScheduleUpdate) UnmarshalJSON

func (s *ScheduleUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ScheduleUpdate.

type ScheduleUpdateProperties

type ScheduleUpdateProperties struct {
	// The frequency of this scheduled task.
	Frequency *ScheduledFrequency

	// The geo-location where the resource lives
	Location *string

	// Indicates whether or not this scheduled task is enabled.
	State *ScheduleEnableStatus

	// Resource tags.
	Tags map[string]*string

	// The target time to trigger the action. The format is HH:MM.
	Time *string

	// The IANA timezone id at which the schedule should execute.
	TimeZone *string

	// Supported type this scheduled task represents.
	Type *ScheduledType
}

ScheduleUpdateProperties - Updatable properties of a Schedule.

func (ScheduleUpdateProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ScheduleUpdateProperties.

func (*ScheduleUpdateProperties) UnmarshalJSON

func (s *ScheduleUpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ScheduleUpdateProperties.

type ScheduledFrequency

type ScheduledFrequency string

ScheduledFrequency - The frequency of task execution.

const (
	ScheduledFrequencyDaily ScheduledFrequency = "Daily"
)

func PossibleScheduledFrequencyValues

func PossibleScheduledFrequencyValues() []ScheduledFrequency

PossibleScheduledFrequencyValues returns the possible values for the ScheduledFrequency const type.

type ScheduledType

type ScheduledType string

ScheduledType - The supported types for a scheduled task.

const (
	ScheduledTypeStopDevBox ScheduledType = "StopDevBox"
)

func PossibleScheduledTypeValues

func PossibleScheduledTypeValues() []ScheduledType

PossibleScheduledTypeValues returns the possible values for the ScheduledType const type.

type SchedulesClient

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

SchedulesClient contains the methods for the Schedules group. Don't use this type directly, use NewSchedulesClient() instead.

func NewSchedulesClient

func NewSchedulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SchedulesClient, error)

NewSchedulesClient creates a new instance of SchedulesClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*SchedulesClient) BeginCreateOrUpdate

func (client *SchedulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, projectName string, poolName string, scheduleName string, body Schedule, options *SchedulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[SchedulesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a Schedule. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • poolName - Name of the pool.
  • scheduleName - The name of the schedule that uniquely identifies it.
  • body - Represents a scheduled task
  • options - SchedulesClientBeginCreateOrUpdateOptions contains the optional parameters for the SchedulesClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Schedules_CreateDailyShutdownPoolSchedule.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewSchedulesClient().BeginCreateOrUpdate(ctx, "rg1", "DevProject", "DevPool", "autoShutdown", armdevcenter.Schedule{
	Properties: &armdevcenter.ScheduleProperties{
		Type:      to.Ptr(armdevcenter.ScheduledTypeStopDevBox),
		Frequency: to.Ptr(armdevcenter.ScheduledFrequencyDaily),
		State:     to.Ptr(armdevcenter.ScheduleEnableStatusEnabled),
		Time:      to.Ptr("17:30"),
		TimeZone:  to.Ptr("America/Los_Angeles"),
	},
}, &armdevcenter.SchedulesClientBeginCreateOrUpdateOptions{Top: 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.Schedule = armdevcenter.Schedule{
// 	Name: to.Ptr("autoShutdown"),
// 	Type: to.Ptr("Microsoft.DevCenter/pools/schedules"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/TestProject/pools/DevPool/schedules/autoShutdown"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Properties: &armdevcenter.ScheduleProperties{
// 		Type: to.Ptr(armdevcenter.ScheduledTypeStopDevBox),
// 		Frequency: to.Ptr(armdevcenter.ScheduledFrequencyDaily),
// 		State: to.Ptr(armdevcenter.ScheduleEnableStatusEnabled),
// 		Time: to.Ptr("17:30"),
// 		TimeZone: to.Ptr("America/Los_Angeles"),
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 	},
// }
Output:

func (*SchedulesClient) BeginDelete

func (client *SchedulesClient) BeginDelete(ctx context.Context, resourceGroupName string, projectName string, poolName string, scheduleName string, options *SchedulesClientBeginDeleteOptions) (*runtime.Poller[SchedulesClientDeleteResponse], error)

BeginDelete - Deletes a Scheduled. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • poolName - Name of the pool.
  • scheduleName - The name of the schedule that uniquely identifies it.
  • options - SchedulesClientBeginDeleteOptions contains the optional parameters for the SchedulesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Schedules_Delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewSchedulesClient().BeginDelete(ctx, "rg1", "TestProject", "DevPool", "autoShutdown", &armdevcenter.SchedulesClientBeginDeleteOptions{Top: 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 (*SchedulesClient) BeginUpdate

func (client *SchedulesClient) BeginUpdate(ctx context.Context, resourceGroupName string, projectName string, poolName string, scheduleName string, body ScheduleUpdate, options *SchedulesClientBeginUpdateOptions) (*runtime.Poller[SchedulesClientUpdateResponse], error)

BeginUpdate - Partially updates a Scheduled. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • poolName - Name of the pool.
  • scheduleName - The name of the schedule that uniquely identifies it.
  • body - Represents a scheduled task.
  • options - SchedulesClientBeginUpdateOptions contains the optional parameters for the SchedulesClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Schedules_Patch.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewSchedulesClient().BeginUpdate(ctx, "rg1", "TestProject", "DevPool", "autoShutdown", armdevcenter.ScheduleUpdate{
	Properties: &armdevcenter.ScheduleUpdateProperties{
		Time: to.Ptr("18:00"),
	},
}, &armdevcenter.SchedulesClientBeginUpdateOptions{Top: 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.Schedule = armdevcenter.Schedule{
// 	Name: to.Ptr("autoShutdown"),
// 	Type: to.Ptr("Microsoft.DevCenter/pools/schedules"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/TestProject/pools/DevPool/schedules/autoShutdown"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Properties: &armdevcenter.ScheduleProperties{
// 		Type: to.Ptr(armdevcenter.ScheduledTypeStopDevBox),
// 		Frequency: to.Ptr(armdevcenter.ScheduledFrequencyDaily),
// 		State: to.Ptr(armdevcenter.ScheduleEnableStatusEnabled),
// 		Time: to.Ptr("17:30"),
// 		TimeZone: to.Ptr("America/Los_Angeles"),
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 	},
// }
Output:

func (*SchedulesClient) Get

func (client *SchedulesClient) Get(ctx context.Context, resourceGroupName string, projectName string, poolName string, scheduleName string, options *SchedulesClientGetOptions) (SchedulesClientGetResponse, error)

Get - Gets a schedule resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • poolName - Name of the pool.
  • scheduleName - The name of the schedule that uniquely identifies it.
  • options - SchedulesClientGetOptions contains the optional parameters for the SchedulesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Schedules_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewSchedulesClient().Get(ctx, "rg1", "TestProject", "DevPool", "autoShutdown", &armdevcenter.SchedulesClientGetOptions{Top: 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.Schedule = armdevcenter.Schedule{
// 	Name: to.Ptr("autoShutdown"),
// 	Type: to.Ptr("Microsoft.DevCenter/pools/schedules"),
// 	ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/TestProject/pools/DevPool/schedules/autoShutdown"),
// 	SystemData: &armdevcenter.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user1"),
// 		LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
// 	},
// 	Properties: &armdevcenter.ScheduleProperties{
// 		Type: to.Ptr(armdevcenter.ScheduledTypeStopDevBox),
// 		Frequency: to.Ptr(armdevcenter.ScheduledFrequencyDaily),
// 		State: to.Ptr(armdevcenter.ScheduleEnableStatusEnabled),
// 		Time: to.Ptr("17:30"),
// 		TimeZone: to.Ptr("America/Los_Angeles"),
// 		ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
// 	},
// }
Output:

func (*SchedulesClient) NewListByPoolPager

func (client *SchedulesClient) NewListByPoolPager(resourceGroupName string, projectName string, poolName string, options *SchedulesClientListByPoolOptions) *runtime.Pager[SchedulesClientListByPoolResponse]

NewListByPoolPager - Lists schedules for a pool

Generated from API version 2024-02-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • projectName - The name of the project.
  • poolName - Name of the pool.
  • options - SchedulesClientListByPoolOptions contains the optional parameters for the SchedulesClient.NewListByPoolPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Schedules_ListByPool.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewSchedulesClient().NewListByPoolPager("rg1", "TestProject", "DevPool", &armdevcenter.SchedulesClientListByPoolOptions{Top: 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.ScheduleListResult = armdevcenter.ScheduleListResult{
	// 	Value: []*armdevcenter.Schedule{
	// 		{
	// 			Name: to.Ptr("autoShutdown"),
	// 			Type: to.Ptr("Microsoft.DevCenter/pools/schedules"),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/TestProject/pools/DevPool/schedules/autoShutdown"),
	// 			SystemData: &armdevcenter.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:00:36.993Z"); return t}()),
	// 				CreatedBy: to.Ptr("user1"),
	// 				CreatedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-18T18:30:36.993Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("user1"),
	// 				LastModifiedByType: to.Ptr(armdevcenter.CreatedByTypeUser),
	// 			},
	// 			Properties: &armdevcenter.ScheduleProperties{
	// 				Type: to.Ptr(armdevcenter.ScheduledTypeStopDevBox),
	// 				Frequency: to.Ptr(armdevcenter.ScheduledFrequencyDaily),
	// 				State: to.Ptr(armdevcenter.ScheduleEnableStatusEnabled),
	// 				Time: to.Ptr("17:30"),
	// 				TimeZone: to.Ptr("America/Los_Angeles"),
	// 				ProvisioningState: to.Ptr(armdevcenter.ProvisioningStateSucceeded),
	// 			},
	// 	}},
	// }
}
Output:

type SchedulesClientBeginCreateOrUpdateOptions

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

	// The maximum number of resources to return from the operation. Example: '$top=10'.
	Top *int32
}

SchedulesClientBeginCreateOrUpdateOptions contains the optional parameters for the SchedulesClient.BeginCreateOrUpdate method.

type SchedulesClientBeginDeleteOptions

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

	// The maximum number of resources to return from the operation. Example: '$top=10'.
	Top *int32
}

SchedulesClientBeginDeleteOptions contains the optional parameters for the SchedulesClient.BeginDelete method.

type SchedulesClientBeginUpdateOptions

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

	// The maximum number of resources to return from the operation. Example: '$top=10'.
	Top *int32
}

SchedulesClientBeginUpdateOptions contains the optional parameters for the SchedulesClient.BeginUpdate method.

type SchedulesClientCreateOrUpdateResponse

type SchedulesClientCreateOrUpdateResponse struct {
	// Represents a Schedule to execute a task.
	Schedule
}

SchedulesClientCreateOrUpdateResponse contains the response from method SchedulesClient.BeginCreateOrUpdate.

type SchedulesClientDeleteResponse

type SchedulesClientDeleteResponse struct {
}

SchedulesClientDeleteResponse contains the response from method SchedulesClient.BeginDelete.

type SchedulesClientGetOptions

type SchedulesClientGetOptions struct {
	// The maximum number of resources to return from the operation. Example: '$top=10'.
	Top *int32
}

SchedulesClientGetOptions contains the optional parameters for the SchedulesClient.Get method.

type SchedulesClientGetResponse

type SchedulesClientGetResponse struct {
	// Represents a Schedule to execute a task.
	Schedule
}

SchedulesClientGetResponse contains the response from method SchedulesClient.Get.

type SchedulesClientListByPoolOptions

type SchedulesClientListByPoolOptions struct {
	// The maximum number of resources to return from the operation. Example: '$top=10'.
	Top *int32
}

SchedulesClientListByPoolOptions contains the optional parameters for the SchedulesClient.NewListByPoolPager method.

type SchedulesClientListByPoolResponse

type SchedulesClientListByPoolResponse struct {
	// Result of the schedule list operation.
	ScheduleListResult
}

SchedulesClientListByPoolResponse contains the response from method SchedulesClient.NewListByPoolPager.

type SchedulesClientUpdateResponse

type SchedulesClientUpdateResponse struct {
	// Represents a Schedule to execute a task.
	Schedule
}

SchedulesClientUpdateResponse contains the response from method SchedulesClient.BeginUpdate.

type SingleSignOnStatus

type SingleSignOnStatus string

SingleSignOnStatus - SingleSignOn (SSO) enable or disable status. Indicates whether Dev Boxes in the Pool will have SSO enabled or disabled.

const (
	SingleSignOnStatusDisabled SingleSignOnStatus = "Disabled"
	SingleSignOnStatusEnabled  SingleSignOnStatus = "Enabled"
)

func PossibleSingleSignOnStatusValues

func PossibleSingleSignOnStatusValues() []SingleSignOnStatus

PossibleSingleSignOnStatusValues returns the possible values for the SingleSignOnStatus const type.

type StopOnDisconnectConfiguration

type StopOnDisconnectConfiguration struct {
	// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected.
	GracePeriodMinutes *int32

	// Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled.
	Status *StopOnDisconnectEnableStatus
}

StopOnDisconnectConfiguration - Stop on disconnect configuration settings for Dev Boxes created in this pool.

func (StopOnDisconnectConfiguration) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type StopOnDisconnectConfiguration.

func (*StopOnDisconnectConfiguration) UnmarshalJSON

func (s *StopOnDisconnectConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StopOnDisconnectConfiguration.

type StopOnDisconnectEnableStatus

type StopOnDisconnectEnableStatus string

StopOnDisconnectEnableStatus - Stop on disconnect enable or disable status. Indicates whether stop on disconnect to is either enabled or disabled.

const (
	StopOnDisconnectEnableStatusDisabled StopOnDisconnectEnableStatus = "Disabled"
	StopOnDisconnectEnableStatusEnabled  StopOnDisconnectEnableStatus = "Enabled"
)

func PossibleStopOnDisconnectEnableStatusValues

func PossibleStopOnDisconnectEnableStatusValues() []StopOnDisconnectEnableStatus

PossibleStopOnDisconnectEnableStatusValues returns the possible values for the StopOnDisconnectEnableStatus const type.

type SyncErrorDetails

type SyncErrorDetails struct {
	// READ-ONLY; Catalog items that have conflicting names.
	Conflicts []*CatalogConflictError

	// READ-ONLY; Errors that occured during synchronization.
	Errors []*CatalogSyncError

	// READ-ONLY; Error information for the overall synchronization operation.
	OperationError *CatalogErrorDetails
}

SyncErrorDetails - Synchronization error details.

func (SyncErrorDetails) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SyncErrorDetails.

func (*SyncErrorDetails) UnmarshalJSON

func (s *SyncErrorDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SyncErrorDetails.

type SyncStats

type SyncStats struct {
	// Indicates catalog item types that were synced.
	SyncedCatalogItemTypes []*CatalogItemType

	// READ-ONLY; Count of catalog items added during synchronization.
	Added *int32

	// READ-ONLY; Count of catalog items removed during synchronization.
	Removed *int32

	// READ-ONLY; Count of synchronization errors that occured during synchronization.
	SynchronizationErrors *int32

	// READ-ONLY; Count of catalog items that were unchanged during synchronization.
	Unchanged *int32

	// READ-ONLY; Count of catalog items updated during synchronization.
	Updated *int32

	// READ-ONLY; Count of catalog items that had validation errors during synchronization.
	ValidationErrors *int32
}

SyncStats - Stats of the synchronization.

func (SyncStats) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SyncStats.

func (*SyncStats) UnmarshalJSON

func (s *SyncStats) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SyncStats.

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time

	// The identity that created the resource.
	CreatedBy *string

	// The type of identity that created the resource.
	CreatedByType *CreatedByType

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time

	// The identity that last modified the resource.
	LastModifiedBy *string

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type Update

type Update struct {
	// Managed identity properties
	Identity *ManagedServiceIdentity

	// The geo-location where the resource lives
	Location *string

	// Properties of a Dev Center to be updated.
	Properties *UpdateProperties

	// Resource tags.
	Tags map[string]*string
}

Update - The devcenter resource for partial updates. Properties not provided in the update request will not be changed.

func (Update) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Update.

func (*Update) UnmarshalJSON

func (u *Update) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Update.

type UpdateProperties

type UpdateProperties struct {
	// The display name of the devcenter.
	DisplayName *string

	// Encryption settings to be used for server-side encryption for proprietary content (such as catalogs, logs, customizations).
	Encryption *Encryption

	// Dev Center settings to be used when associating a project with a catalog.
	ProjectCatalogSettings *ProjectCatalogSettingsInfo
}

UpdateProperties - Properties of the devcenter. These properties can be updated after the resource has been created.

func (UpdateProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type UpdateProperties.

func (*UpdateProperties) UnmarshalJSON

func (u *UpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UpdateProperties.

type Usage

type Usage struct {
	// The current usage.
	CurrentValue *int64

	// The fully qualified arm resource id.
	ID *string

	// The limit integer.
	Limit *int64

	// The name.
	Name *UsageName

	// The unit details.
	Unit *UsageUnit
}

Usage - The core usage details.

func (Usage) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Usage.

func (*Usage) UnmarshalJSON

func (u *Usage) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Usage.

type UsageName

type UsageName struct {
	// The localized name of the resource.
	LocalizedValue *string

	// The name of the resource.
	Value *string
}

UsageName - The Usage Names.

func (UsageName) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type UsageName.

func (*UsageName) UnmarshalJSON

func (u *UsageName) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UsageName.

type UsageUnit

type UsageUnit string

UsageUnit - The unit details.

const (
	UsageUnitCount UsageUnit = "Count"
)

func PossibleUsageUnitValues

func PossibleUsageUnitValues() []UsageUnit

PossibleUsageUnitValues returns the possible values for the UsageUnit const type.

type UsagesClient

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

UsagesClient contains the methods for the Usages group. Don't use this type directly, use NewUsagesClient() instead.

func NewUsagesClient

func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UsagesClient, error)

NewUsagesClient creates a new instance of UsagesClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*UsagesClient) NewListByLocationPager

func (client *UsagesClient) NewListByLocationPager(location string, options *UsagesClientListByLocationOptions) *runtime.Pager[UsagesClientListByLocationResponse]

NewListByLocationPager - Lists the current usages and limits in this location for the provided subscription.

Generated from API version 2024-02-01

  • location - The Azure region
  • options - UsagesClientListByLocationOptions contains the optional parameters for the UsagesClient.NewListByLocationPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2024-02-01/examples/Usages_ListByLocation.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdevcenter.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewUsagesClient().NewListByLocationPager("westus", 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.ListUsagesResult = armdevcenter.ListUsagesResult{
	// 	Value: []*armdevcenter.Usage{
	// 		{
	// 			Name: &armdevcenter.UsageName{
	// 				Value: to.Ptr("devcenters"),
	// 			},
	// 			CurrentValue: to.Ptr[int64](2),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/Microsoft.DevCenter/locations/westus/quotas/devcenters"),
	// 			Limit: to.Ptr[int64](8),
	// 			Unit: to.Ptr(armdevcenter.UsageUnitCount),
	// 		},
	// 		{
	// 			Name: &armdevcenter.UsageName{
	// 				Value: to.Ptr("projects"),
	// 			},
	// 			CurrentValue: to.Ptr[int64](5),
	// 			ID: to.Ptr("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/Microsoft.DevCenter/locations/westus/quotas/projects"),
	// 			Limit: to.Ptr[int64](30),
	// 			Unit: to.Ptr(armdevcenter.UsageUnitCount),
	// 	}},
	// }
}
Output:

type UsagesClientListByLocationOptions

type UsagesClientListByLocationOptions struct {
}

UsagesClientListByLocationOptions contains the optional parameters for the UsagesClient.NewListByLocationPager method.

type UsagesClientListByLocationResponse

type UsagesClientListByLocationResponse struct {
	// List of Core Usages.
	ListUsagesResult
}

UsagesClientListByLocationResponse contains the response from method UsagesClient.NewListByLocationPager.

type UserAssignedIdentity

type UserAssignedIdentity struct {
	// READ-ONLY; The client ID of the assigned identity.
	ClientID *string

	// READ-ONLY; The principal ID of the assigned identity.
	PrincipalID *string
}

UserAssignedIdentity - User assigned identity properties

func (UserAssignedIdentity) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity.

func (*UserAssignedIdentity) UnmarshalJSON

func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity.

type UserRoleAssignmentValue

type UserRoleAssignmentValue struct {
	// A map of roles to assign to the parent user.
	Roles map[string]*EnvironmentRole
}

UserRoleAssignmentValue - Mapping of user object ID to role assignments.

func (UserRoleAssignmentValue) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type UserRoleAssignmentValue.

func (*UserRoleAssignmentValue) UnmarshalJSON

func (u *UserRoleAssignmentValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserRoleAssignmentValue.

type VirtualNetworkType

type VirtualNetworkType string

VirtualNetworkType - Indicates a pool uses a Virtual Network managed by Microsoft (Managed), or a customer provided Network (Unmanaged).

const (
	VirtualNetworkTypeManaged   VirtualNetworkType = "Managed"
	VirtualNetworkTypeUnmanaged VirtualNetworkType = "Unmanaged"
)

func PossibleVirtualNetworkTypeValues

func PossibleVirtualNetworkTypeValues() []VirtualNetworkType

PossibleVirtualNetworkTypeValues returns the possible values for the VirtualNetworkType const type.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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