armapimanagement

package module
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: MIT Imports: 15 Imported by: 2

README

Azure API Management Module for Go

PkgGoDev

The armapimanagement module provides operations for working with Azure API Management.

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 API Management module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure API Management. 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 API Management 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 := armapimanagement.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 := armapimanagement.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.NewServiceClient()

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.

More sample code

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the API Management 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 APIClient

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

APIClient contains the methods for the API group. Don't use this type directly, use NewAPIClient() instead.

func NewAPIClient

func NewAPIClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIClient, error)

NewAPIClient creates a new instance of APIClient 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 (*APIClient) BeginCreateOrUpdate

func (client *APIClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, parameters APICreateOrUpdateParameter, options *APIClientBeginCreateOrUpdateOptions) (*runtime.Poller[APIClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates new or updates existing specified API of the API Management service instance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • parameters - Create or update parameters.
  • options - APIClientBeginCreateOrUpdateOptions contains the optional parameters for the APIClient.BeginCreateOrUpdate method.
Example (ApiManagementCreateApi)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApi.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAPIClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", "tempgroup", armapimanagement.APICreateOrUpdateParameter{
	Properties: &armapimanagement.APICreateOrUpdateProperties{
		Description: to.Ptr("apidescription5200"),
		AuthenticationSettings: &armapimanagement.AuthenticationSettingsContract{
			OAuth2: &armapimanagement.OAuth2AuthenticationSettingsContract{
				AuthorizationServerID: to.Ptr("authorizationServerId2283"),
				Scope:                 to.Ptr("oauth2scope2580"),
			},
		},
		SubscriptionKeyParameterNames: &armapimanagement.SubscriptionKeyParameterNamesContract{
			Header: to.Ptr("header4520"),
			Query:  to.Ptr("query3037"),
		},
		Path:        to.Ptr("newapiPath"),
		DisplayName: to.Ptr("apiname1463"),
		Protocols: []*armapimanagement.Protocol{
			to.Ptr(armapimanagement.ProtocolHTTPS),
			to.Ptr(armapimanagement.ProtocolHTTP)},
		ServiceURL: to.Ptr("http://newechoapi.cloudapp.net/api"),
	},
}, &armapimanagement.APIClientBeginCreateOrUpdateOptions{IfMatch: 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.APIContract = armapimanagement.APIContract{
// 	Name: to.Ptr("apiid9419"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apiid9419"),
// 	Properties: &armapimanagement.APIContractProperties{
// 		Description: to.Ptr("apidescription5200"),
// 		APIRevision: to.Ptr("1"),
// 		AuthenticationSettings: &armapimanagement.AuthenticationSettingsContract{
// 			OAuth2: &armapimanagement.OAuth2AuthenticationSettingsContract{
// 				AuthorizationServerID: to.Ptr("authorizationServerId2283"),
// 				Scope: to.Ptr("oauth2scope2580"),
// 			},
// 			OAuth2AuthenticationSettings: []*armapimanagement.OAuth2AuthenticationSettingsContract{
// 				{
// 					AuthorizationServerID: to.Ptr("authorizationServerId2283"),
// 					Scope: to.Ptr("oauth2scope2580"),
// 			}},
// 		},
// 		IsCurrent: to.Ptr(true),
// 		IsOnline: to.Ptr(true),
// 		SubscriptionKeyParameterNames: &armapimanagement.SubscriptionKeyParameterNamesContract{
// 			Header: to.Ptr("header4520"),
// 			Query: to.Ptr("query3037"),
// 		},
// 		Path: to.Ptr("newapiPath"),
// 		DisplayName: to.Ptr("apiname1463"),
// 		Protocols: []*armapimanagement.Protocol{
// 			to.Ptr(armapimanagement.ProtocolHTTP),
// 			to.Ptr(armapimanagement.ProtocolHTTPS)},
// 			ServiceURL: to.Ptr("http://newechoapi.cloudapp.net/api"),
// 		},
// 	}
Output:

Example (ApiManagementCreateApiClone)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiClone.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAPIClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", "echo-api2", armapimanagement.APICreateOrUpdateParameter{
	Properties: &armapimanagement.APICreateOrUpdateProperties{
		Description:          to.Ptr("Copy of Existing Echo Api including Operations."),
		IsCurrent:            to.Ptr(true),
		SubscriptionRequired: to.Ptr(true),
		Path:                 to.Ptr("echo2"),
		DisplayName:          to.Ptr("Echo API2"),
		Protocols: []*armapimanagement.Protocol{
			to.Ptr(armapimanagement.ProtocolHTTP),
			to.Ptr(armapimanagement.ProtocolHTTPS)},
		ServiceURL:  to.Ptr("http://echoapi.cloudapp.net/api"),
		SourceAPIID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/58a4aeac497000007d040001"),
	},
}, &armapimanagement.APIClientBeginCreateOrUpdateOptions{IfMatch: 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.APIContract = armapimanagement.APIContract{
// 	Name: to.Ptr("echoapi2"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echoapi2"),
// 	Properties: &armapimanagement.APIContractProperties{
// 		Description: to.Ptr("Copy of Existing Echo Api including Operations."),
// 		APIRevision: to.Ptr("1"),
// 		IsCurrent: to.Ptr(true),
// 		SubscriptionKeyParameterNames: &armapimanagement.SubscriptionKeyParameterNamesContract{
// 			Header: to.Ptr("Ocp-Apim-Subscription-Key"),
// 			Query: to.Ptr("subscription-key"),
// 		},
// 		SubscriptionRequired: to.Ptr(true),
// 		Path: to.Ptr("echo2"),
// 		DisplayName: to.Ptr("Echo API2"),
// 		Protocols: []*armapimanagement.Protocol{
// 			to.Ptr(armapimanagement.ProtocolHTTP),
// 			to.Ptr(armapimanagement.ProtocolHTTPS)},
// 			ServiceURL: to.Ptr("http://echoapi.cloudapp.net/api"),
// 		},
// 	}
Output:

Example (ApiManagementCreateApiNewVersionUsingExistingApi)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiNewVersionUsingExistingApi.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAPIClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", "echoapiv3", armapimanagement.APICreateOrUpdateParameter{
	Properties: &armapimanagement.APICreateOrUpdateProperties{
		Description:          to.Ptr("Create Echo API into a new Version using Existing Version Set and Copy all Operations."),
		APIVersion:           to.Ptr("v4"),
		APIVersionSetID:      to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/aa9c59e6-c0cd-4258-9356-9ca7d2f0b458"),
		IsCurrent:            to.Ptr(true),
		SubscriptionRequired: to.Ptr(true),
		Path:                 to.Ptr("echo2"),
		DisplayName:          to.Ptr("Echo API2"),
		Protocols: []*armapimanagement.Protocol{
			to.Ptr(armapimanagement.ProtocolHTTP),
			to.Ptr(armapimanagement.ProtocolHTTPS)},
		ServiceURL:  to.Ptr("http://echoapi.cloudapp.net/api"),
		SourceAPIID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echoPath"),
	},
}, &armapimanagement.APIClientBeginCreateOrUpdateOptions{IfMatch: 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.APIContract = armapimanagement.APIContract{
// 	Name: to.Ptr("echoapiv3"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echoapiv3"),
// 	Properties: &armapimanagement.APIContractProperties{
// 		Description: to.Ptr("Create Echo API into a new Version using Existing Version Set and Copy all Operations."),
// 		APIRevision: to.Ptr("1"),
// 		APIVersion: to.Ptr("v4"),
// 		APIVersionSetID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/aa9c59e6-c0cd-4258-9356-9ca7d2f0b458"),
// 		IsCurrent: to.Ptr(true),
// 		SubscriptionKeyParameterNames: &armapimanagement.SubscriptionKeyParameterNamesContract{
// 			Header: to.Ptr("Ocp-Apim-Subscription-Key"),
// 			Query: to.Ptr("subscription-key"),
// 		},
// 		SubscriptionRequired: to.Ptr(true),
// 		Path: to.Ptr("echo2"),
// 		APIVersionSet: &armapimanagement.APIVersionSetContractDetails{
// 			Name: to.Ptr("Echo API2"),
// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/aa9c59e6-c0cd-4258-9356-9ca7d2f0b458"),
// 			VersioningScheme: to.Ptr(armapimanagement.APIVersionSetContractDetailsVersioningSchemeSegment),
// 		},
// 		DisplayName: to.Ptr("Echo API2"),
// 		Protocols: []*armapimanagement.Protocol{
// 			to.Ptr(armapimanagement.ProtocolHTTP),
// 			to.Ptr(armapimanagement.ProtocolHTTPS)},
// 			ServiceURL: to.Ptr("http://echoapi.cloudapp.net/api"),
// 		},
// 	}
Output:

Example (ApiManagementCreateApiRevisionFromExistingApi)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiRevisionFromExistingApi.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAPIClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", "echo-api;rev=3", armapimanagement.APICreateOrUpdateParameter{
	Properties: &armapimanagement.APICreateOrUpdateProperties{
		APIRevisionDescription: to.Ptr("Creating a Revision of an existing API"),
		Path:                   to.Ptr("echo"),
		ServiceURL:             to.Ptr("http://echoapi.cloudapp.net/apiv3"),
		SourceAPIID:            to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api"),
	},
}, &armapimanagement.APIClientBeginCreateOrUpdateOptions{IfMatch: 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.APIContract = armapimanagement.APIContract{
// 	Name: to.Ptr("echo-api;rev=3"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api;rev=3"),
// 	Properties: &armapimanagement.APIContractProperties{
// 		APIRevision: to.Ptr("3"),
// 		APIRevisionDescription: to.Ptr("Creating a Revision of an existing API"),
// 		SubscriptionKeyParameterNames: &armapimanagement.SubscriptionKeyParameterNamesContract{
// 			Header: to.Ptr("Ocp-Apim-Subscription-Key"),
// 			Query: to.Ptr("subscription-key"),
// 		},
// 		SubscriptionRequired: to.Ptr(true),
// 		Path: to.Ptr("echo"),
// 		DisplayName: to.Ptr("Echo API"),
// 		Protocols: []*armapimanagement.Protocol{
// 			to.Ptr(armapimanagement.ProtocolHTTPS)},
// 			ServiceURL: to.Ptr("http://echoapi.cloudapp.net/apiv3"),
// 		},
// 	}
Output:

Example (ApiManagementCreateApiUsingImportOverrideServiceUrl)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingImportOverrideServiceUrl.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAPIClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", "apidocs", armapimanagement.APICreateOrUpdateParameter{
	Properties: &armapimanagement.APICreateOrUpdateProperties{
		Path:       to.Ptr("petstoreapi123"),
		ServiceURL: to.Ptr("http://petstore.swagger.wordnik.com/api"),
		Format:     to.Ptr(armapimanagement.ContentFormat("swagger-link")),
		Value:      to.Ptr("http://apimpimportviaurl.azurewebsites.net/api/apidocs/"),
	},
}, &armapimanagement.APIClientBeginCreateOrUpdateOptions{IfMatch: 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.APIContract = armapimanagement.APIContract{
// 	Name: to.Ptr("apidocs"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apidocs"),
// 	Properties: &armapimanagement.APIContractProperties{
// 		Description: to.Ptr("This is a sample server Petstore server.  You can find out more about Swagger \n    at <a href=\"http://swagger.wordnik.com\">http://swagger.wordnik.com</a> or on irc.freenode.net, #swagger.  For this sample,\n    you can use the api key \"special-key\" to test the authorization filters"),
// 		APIRevision: to.Ptr("1"),
// 		IsCurrent: to.Ptr(true),
// 		SubscriptionKeyParameterNames: &armapimanagement.SubscriptionKeyParameterNamesContract{
// 			Header: to.Ptr("Ocp-Apim-Subscription-Key"),
// 			Query: to.Ptr("subscription-key"),
// 		},
// 		Path: to.Ptr("petstoreapi123"),
// 		DisplayName: to.Ptr("Swagger Sample App"),
// 		Protocols: []*armapimanagement.Protocol{
// 			to.Ptr(armapimanagement.ProtocolHTTPS)},
// 			ServiceURL: to.Ptr("http://petstore.swagger.wordnik.com/api"),
// 		},
// 	}
Output:

Example (ApiManagementCreateApiUsingOai3Import)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingOai3Import.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAPIClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", "petstore", armapimanagement.APICreateOrUpdateParameter{
	Properties: &armapimanagement.APICreateOrUpdateProperties{
		Path:   to.Ptr("petstore"),
		Format: to.Ptr(armapimanagement.ContentFormatOpenapiLink),
		Value:  to.Ptr("https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml"),
	},
}, &armapimanagement.APIClientBeginCreateOrUpdateOptions{IfMatch: 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.APIContract = armapimanagement.APIContract{
// 	Name: to.Ptr("petstoreapi"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/petstoreapi"),
// 	Properties: &armapimanagement.APIContractProperties{
// 		APIRevision: to.Ptr("1"),
// 		IsCurrent: to.Ptr(true),
// 		SubscriptionKeyParameterNames: &armapimanagement.SubscriptionKeyParameterNamesContract{
// 			Header: to.Ptr("Ocp-Apim-Subscription-Key"),
// 			Query: to.Ptr("subscription-key"),
// 		},
// 		Path: to.Ptr("petstore"),
// 		DisplayName: to.Ptr("Swagger Petstore"),
// 		Protocols: []*armapimanagement.Protocol{
// 			to.Ptr(armapimanagement.ProtocolHTTPS)},
// 			ServiceURL: to.Ptr("http://petstore.swagger.io/v1"),
// 		},
// 	}
Output:

Example (ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAPIClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", "petstore", armapimanagement.APICreateOrUpdateParameter{
	Properties: &armapimanagement.APICreateOrUpdateProperties{
		Path:                                    to.Ptr("petstore"),
		Format:                                  to.Ptr(armapimanagement.ContentFormatOpenapiLink),
		TranslateRequiredQueryParametersConduct: to.Ptr(armapimanagement.TranslateRequiredQueryParametersConductTemplate),
		Value:                                   to.Ptr("https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml"),
	},
}, &armapimanagement.APIClientBeginCreateOrUpdateOptions{IfMatch: 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.APIContract = armapimanagement.APIContract{
// 	Name: to.Ptr("petstoreapi"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/petstoreapi"),
// 	Properties: &armapimanagement.APIContractProperties{
// 		APIRevision: to.Ptr("1"),
// 		IsCurrent: to.Ptr(true),
// 		SubscriptionKeyParameterNames: &armapimanagement.SubscriptionKeyParameterNamesContract{
// 			Header: to.Ptr("Ocp-Apim-Subscription-Key"),
// 			Query: to.Ptr("subscription-key"),
// 		},
// 		Path: to.Ptr("petstore"),
// 		DisplayName: to.Ptr("Swagger Petstore"),
// 		Protocols: []*armapimanagement.Protocol{
// 			to.Ptr(armapimanagement.ProtocolHTTPS)},
// 			ServiceURL: to.Ptr("http://petstore.swagger.io/v1"),
// 		},
// 	}
Output:

Example (ApiManagementCreateApiUsingSwaggerImport)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingSwaggerImport.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAPIClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", "petstore", armapimanagement.APICreateOrUpdateParameter{
	Properties: &armapimanagement.APICreateOrUpdateProperties{
		Path:   to.Ptr("petstore"),
		Format: to.Ptr(armapimanagement.ContentFormatSwaggerLinkJSON),
		Value:  to.Ptr("http://petstore.swagger.io/v2/swagger.json"),
	},
}, &armapimanagement.APIClientBeginCreateOrUpdateOptions{IfMatch: 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.APIContract = armapimanagement.APIContract{
// 	Name: to.Ptr("petstoreapi"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/petstoreapi"),
// 	Properties: &armapimanagement.APIContractProperties{
// 		Description: to.Ptr("This is a sample server Petstore server.  You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).  For this sample, you can use the api key `special-key` to test the authorization filters."),
// 		APIRevision: to.Ptr("1"),
// 		IsCurrent: to.Ptr(true),
// 		SubscriptionKeyParameterNames: &armapimanagement.SubscriptionKeyParameterNamesContract{
// 			Header: to.Ptr("Ocp-Apim-Subscription-Key"),
// 			Query: to.Ptr("subscription-key"),
// 		},
// 		Path: to.Ptr("petstore"),
// 		DisplayName: to.Ptr("Swagger Petstore"),
// 		Protocols: []*armapimanagement.Protocol{
// 			to.Ptr(armapimanagement.ProtocolHTTP)},
// 			ServiceURL: to.Ptr("http://petstore.swagger.io/v2"),
// 		},
// 	}
Output:

Example (ApiManagementCreateApiUsingWadlImport)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingWadlImport.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAPIClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", "petstore", armapimanagement.APICreateOrUpdateParameter{
	Properties: &armapimanagement.APICreateOrUpdateProperties{
		Path:   to.Ptr("collector"),
		Format: to.Ptr(armapimanagement.ContentFormatWadlLinkJSON),
		Value:  to.Ptr("https://developer.cisco.com/media/wae-release-6-2-api-reference/wae-collector-rest-api/application.wadl"),
	},
}, &armapimanagement.APIClientBeginCreateOrUpdateOptions{IfMatch: 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.APIContract = armapimanagement.APIContract{
// 	Name: to.Ptr("collectorwadl"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/collectorwadl"),
// 	Properties: &armapimanagement.APIContractProperties{
// 		Description: to.Ptr(""),
// 		APIRevision: to.Ptr("1"),
// 		IsCurrent: to.Ptr(true),
// 		SubscriptionKeyParameterNames: &armapimanagement.SubscriptionKeyParameterNamesContract{
// 			Header: to.Ptr("Ocp-Apim-Subscription-Key"),
// 			Query: to.Ptr("subscription-key"),
// 		},
// 		Path: to.Ptr("collector"),
// 		DisplayName: to.Ptr("http://localhost:8080/collector-northbound"),
// 		Protocols: []*armapimanagement.Protocol{
// 			to.Ptr(armapimanagement.ProtocolHTTPS)},
// 			ServiceURL: to.Ptr("http://localhost:8080/collector-northbound"),
// 		},
// 	}
Output:

Example (ApiManagementCreateApiWithMultipleAuthServers)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiWithMultipleAuthServers.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAPIClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", "tempgroup", armapimanagement.APICreateOrUpdateParameter{
	Properties: &armapimanagement.APICreateOrUpdateProperties{
		Description: to.Ptr("apidescription5200"),
		AuthenticationSettings: &armapimanagement.AuthenticationSettingsContract{
			OAuth2AuthenticationSettings: []*armapimanagement.OAuth2AuthenticationSettingsContract{
				{
					AuthorizationServerID: to.Ptr("authorizationServerId2283"),
					Scope:                 to.Ptr("oauth2scope2580"),
				},
				{
					AuthorizationServerID: to.Ptr("authorizationServerId2284"),
					Scope:                 to.Ptr("oauth2scope2581"),
				}},
		},
		SubscriptionKeyParameterNames: &armapimanagement.SubscriptionKeyParameterNamesContract{
			Header: to.Ptr("header4520"),
			Query:  to.Ptr("query3037"),
		},
		Path:        to.Ptr("newapiPath"),
		DisplayName: to.Ptr("apiname1463"),
		Protocols: []*armapimanagement.Protocol{
			to.Ptr(armapimanagement.ProtocolHTTPS),
			to.Ptr(armapimanagement.ProtocolHTTP)},
		ServiceURL: to.Ptr("http://newechoapi.cloudapp.net/api"),
	},
}, &armapimanagement.APIClientBeginCreateOrUpdateOptions{IfMatch: 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.APIContract = armapimanagement.APIContract{
// 	Name: to.Ptr("apiid9419"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apiid9419"),
// 	Properties: &armapimanagement.APIContractProperties{
// 		Description: to.Ptr("apidescription5200"),
// 		APIRevision: to.Ptr("1"),
// 		AuthenticationSettings: &armapimanagement.AuthenticationSettingsContract{
// 			OAuth2: &armapimanagement.OAuth2AuthenticationSettingsContract{
// 				AuthorizationServerID: to.Ptr("authorizationServerId2283"),
// 				Scope: to.Ptr("oauth2scope2580"),
// 			},
// 			OAuth2AuthenticationSettings: []*armapimanagement.OAuth2AuthenticationSettingsContract{
// 				{
// 					AuthorizationServerID: to.Ptr("authorizationServerId2283"),
// 					Scope: to.Ptr("oauth2scope2580"),
// 				},
// 				{
// 					AuthorizationServerID: to.Ptr("authorizationServerId2284"),
// 					Scope: to.Ptr("oauth2scope2581"),
// 			}},
// 		},
// 		IsCurrent: to.Ptr(true),
// 		IsOnline: to.Ptr(true),
// 		SubscriptionKeyParameterNames: &armapimanagement.SubscriptionKeyParameterNamesContract{
// 			Header: to.Ptr("header4520"),
// 			Query: to.Ptr("query3037"),
// 		},
// 		Path: to.Ptr("newapiPath"),
// 		DisplayName: to.Ptr("apiname1463"),
// 		Protocols: []*armapimanagement.Protocol{
// 			to.Ptr(armapimanagement.ProtocolHTTP),
// 			to.Ptr(armapimanagement.ProtocolHTTPS)},
// 			ServiceURL: to.Ptr("http://newechoapi.cloudapp.net/api"),
// 		},
// 	}
Output:

Example (ApiManagementCreateApiWithMultipleOpenIdConnectProviders)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiWithMultipleOpenIdConnectProviders.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAPIClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", "tempgroup", armapimanagement.APICreateOrUpdateParameter{
	Properties: &armapimanagement.APICreateOrUpdateProperties{
		Description: to.Ptr("apidescription5200"),
		AuthenticationSettings: &armapimanagement.AuthenticationSettingsContract{
			OpenidAuthenticationSettings: []*armapimanagement.OpenIDAuthenticationSettingsContract{
				{
					BearerTokenSendingMethods: []*armapimanagement.BearerTokenSendingMethods{
						to.Ptr(armapimanagement.BearerTokenSendingMethodsAuthorizationHeader)},
					OpenidProviderID: to.Ptr("openidProviderId2283"),
				},
				{
					BearerTokenSendingMethods: []*armapimanagement.BearerTokenSendingMethods{
						to.Ptr(armapimanagement.BearerTokenSendingMethodsAuthorizationHeader)},
					OpenidProviderID: to.Ptr("openidProviderId2284"),
				}},
		},
		SubscriptionKeyParameterNames: &armapimanagement.SubscriptionKeyParameterNamesContract{
			Header: to.Ptr("header4520"),
			Query:  to.Ptr("query3037"),
		},
		Path:        to.Ptr("newapiPath"),
		DisplayName: to.Ptr("apiname1463"),
		Protocols: []*armapimanagement.Protocol{
			to.Ptr(armapimanagement.ProtocolHTTPS),
			to.Ptr(armapimanagement.ProtocolHTTP)},
		ServiceURL: to.Ptr("http://newechoapi.cloudapp.net/api"),
	},
}, &armapimanagement.APIClientBeginCreateOrUpdateOptions{IfMatch: 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.APIContract = armapimanagement.APIContract{
// 	Name: to.Ptr("apiid9419"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apiid9419"),
// 	Properties: &armapimanagement.APIContractProperties{
// 		Description: to.Ptr("apidescription5200"),
// 		APIRevision: to.Ptr("1"),
// 		AuthenticationSettings: &armapimanagement.AuthenticationSettingsContract{
// 			Openid: &armapimanagement.OpenIDAuthenticationSettingsContract{
// 				BearerTokenSendingMethods: []*armapimanagement.BearerTokenSendingMethods{
// 					to.Ptr(armapimanagement.BearerTokenSendingMethodsAuthorizationHeader)},
// 					OpenidProviderID: to.Ptr("openidProviderId2283"),
// 				},
// 				OpenidAuthenticationSettings: []*armapimanagement.OpenIDAuthenticationSettingsContract{
// 					{
// 						BearerTokenSendingMethods: []*armapimanagement.BearerTokenSendingMethods{
// 							to.Ptr(armapimanagement.BearerTokenSendingMethodsAuthorizationHeader)},
// 							OpenidProviderID: to.Ptr("openidProviderId2283"),
// 						},
// 						{
// 							BearerTokenSendingMethods: []*armapimanagement.BearerTokenSendingMethods{
// 								to.Ptr(armapimanagement.BearerTokenSendingMethodsAuthorizationHeader)},
// 								OpenidProviderID: to.Ptr("openidProviderId2284"),
// 						}},
// 					},
// 					IsCurrent: to.Ptr(true),
// 					IsOnline: to.Ptr(true),
// 					SubscriptionKeyParameterNames: &armapimanagement.SubscriptionKeyParameterNamesContract{
// 						Header: to.Ptr("header4520"),
// 						Query: to.Ptr("query3037"),
// 					},
// 					Path: to.Ptr("newapiPath"),
// 					DisplayName: to.Ptr("apiname1463"),
// 					Protocols: []*armapimanagement.Protocol{
// 						to.Ptr(armapimanagement.ProtocolHTTP),
// 						to.Ptr(armapimanagement.ProtocolHTTPS)},
// 						ServiceURL: to.Ptr("http://newechoapi.cloudapp.net/api"),
// 					},
// 				}
Output:

Example (ApiManagementCreateApiWithOpenIdConnect)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiWithOpenIdConnect.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAPIClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", "tempgroup", armapimanagement.APICreateOrUpdateParameter{
	Properties: &armapimanagement.APICreateOrUpdateProperties{
		Description: to.Ptr("This is a sample server Petstore server.  You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).  For this sample, you can use the api key `special-key` to test the authorization filters."),
		AuthenticationSettings: &armapimanagement.AuthenticationSettingsContract{
			Openid: &armapimanagement.OpenIDAuthenticationSettingsContract{
				BearerTokenSendingMethods: []*armapimanagement.BearerTokenSendingMethods{
					to.Ptr(armapimanagement.BearerTokenSendingMethodsAuthorizationHeader)},
				OpenidProviderID: to.Ptr("testopenid"),
			},
		},
		SubscriptionKeyParameterNames: &armapimanagement.SubscriptionKeyParameterNamesContract{
			Header: to.Ptr("Ocp-Apim-Subscription-Key"),
			Query:  to.Ptr("subscription-key"),
		},
		Path:        to.Ptr("petstore"),
		DisplayName: to.Ptr("Swagger Petstore"),
		Protocols: []*armapimanagement.Protocol{
			to.Ptr(armapimanagement.ProtocolHTTPS)},
		ServiceURL: to.Ptr("http://petstore.swagger.io/v2"),
	},
}, &armapimanagement.APIClientBeginCreateOrUpdateOptions{IfMatch: 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.APIContract = armapimanagement.APIContract{
// 	Name: to.Ptr("58da4c4ccdae970a08121230"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/58da4c4ccdae970a08121230"),
// 	Properties: &armapimanagement.APIContractProperties{
// 		Description: to.Ptr("This is a sample server Petstore server.  You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).  For this sample, you can use the api key `special-key` to test the authorization filters."),
// 		APIRevision: to.Ptr("1"),
// 		AuthenticationSettings: &armapimanagement.AuthenticationSettingsContract{
// 			Openid: &armapimanagement.OpenIDAuthenticationSettingsContract{
// 				BearerTokenSendingMethods: []*armapimanagement.BearerTokenSendingMethods{
// 					to.Ptr(armapimanagement.BearerTokenSendingMethodsAuthorizationHeader)},
// 					OpenidProviderID: to.Ptr("testopenid"),
// 				},
// 			},
// 			IsCurrent: to.Ptr(true),
// 			SubscriptionKeyParameterNames: &armapimanagement.SubscriptionKeyParameterNamesContract{
// 				Header: to.Ptr("Ocp-Apim-Subscription-Key"),
// 				Query: to.Ptr("subscription-key"),
// 			},
// 			Path: to.Ptr("petstore"),
// 			DisplayName: to.Ptr("Swagger Petstore"),
// 			Protocols: []*armapimanagement.Protocol{
// 				to.Ptr(armapimanagement.ProtocolHTTPS)},
// 				ServiceURL: to.Ptr("http://petstore.swagger.io/v2"),
// 			},
// 		}
Output:

Example (ApiManagementCreateGraphQlApi)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGraphQLApi.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAPIClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", "tempgroup", armapimanagement.APICreateOrUpdateParameter{
	Properties: &armapimanagement.APICreateOrUpdateProperties{
		APIType:     to.Ptr(armapimanagement.APITypeGraphql),
		Description: to.Ptr("apidescription5200"),
		Path:        to.Ptr("graphql-api"),
		DisplayName: to.Ptr("apiname1463"),
		Protocols: []*armapimanagement.Protocol{
			to.Ptr(armapimanagement.ProtocolHTTP),
			to.Ptr(armapimanagement.ProtocolHTTPS)},
		ServiceURL: to.Ptr("https://api.spacex.land/graphql"),
	},
}, &armapimanagement.APIClientBeginCreateOrUpdateOptions{IfMatch: 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.APIContract = armapimanagement.APIContract{
// 	Name: to.Ptr("apiid9419"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apiid9419"),
// 	Properties: &armapimanagement.APIContractProperties{
// 		APIType: to.Ptr(armapimanagement.APITypeGraphql),
// 		Description: to.Ptr("apidescription5200"),
// 		APIRevision: to.Ptr("1"),
// 		IsCurrent: to.Ptr(true),
// 		IsOnline: to.Ptr(true),
// 		Path: to.Ptr("graphql-api"),
// 		DisplayName: to.Ptr("apiname1463"),
// 		Protocols: []*armapimanagement.Protocol{
// 			to.Ptr(armapimanagement.ProtocolHTTP),
// 			to.Ptr(armapimanagement.ProtocolHTTPS)},
// 			ServiceURL: to.Ptr("https://api.spacex.land/graphql"),
// 		},
// 	}
Output:

Example (ApiManagementCreateSoapPassThroughApiUsingWsdlImport)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAPIClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", "soapApi", armapimanagement.APICreateOrUpdateParameter{
	Properties: &armapimanagement.APICreateOrUpdateProperties{
		Path:        to.Ptr("currency"),
		Format:      to.Ptr(armapimanagement.ContentFormatWsdlLink),
		SoapAPIType: to.Ptr(armapimanagement.SoapAPITypeSoapPassThrough),
		Value:       to.Ptr("http://www.webservicex.net/CurrencyConvertor.asmx?WSDL"),
		WsdlSelector: &armapimanagement.APICreateOrUpdatePropertiesWsdlSelector{
			WsdlEndpointName: to.Ptr("CurrencyConvertorSoap"),
			WsdlServiceName:  to.Ptr("CurrencyConvertor"),
		},
	},
}, &armapimanagement.APIClientBeginCreateOrUpdateOptions{IfMatch: 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.APIContract = armapimanagement.APIContract{
// 	Name: to.Ptr("soapApi"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/soapApi"),
// 	Properties: &armapimanagement.APIContractProperties{
// 		APIType: to.Ptr(armapimanagement.APITypeSoap),
// 		APIRevision: to.Ptr("1"),
// 		IsCurrent: to.Ptr(true),
// 		SubscriptionKeyParameterNames: &armapimanagement.SubscriptionKeyParameterNamesContract{
// 			Header: to.Ptr("Ocp-Apim-Subscription-Key"),
// 			Query: to.Ptr("subscription-key"),
// 		},
// 		Path: to.Ptr("currency"),
// 		DisplayName: to.Ptr("CurrencyConvertor"),
// 		Protocols: []*armapimanagement.Protocol{
// 			to.Ptr(armapimanagement.ProtocolHTTPS)},
// 			ServiceURL: to.Ptr("http://www.webservicex.net"),
// 		},
// 	}
Output:

Example (ApiManagementCreateSoapToRestApiUsingWsdlImport)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateSoapToRestApiUsingWsdlImport.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAPIClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", "soapApi", armapimanagement.APICreateOrUpdateParameter{
	Properties: &armapimanagement.APICreateOrUpdateProperties{
		Path:   to.Ptr("currency"),
		Format: to.Ptr(armapimanagement.ContentFormatWsdlLink),
		Value:  to.Ptr("http://www.webservicex.net/CurrencyConvertor.asmx?WSDL"),
		WsdlSelector: &armapimanagement.APICreateOrUpdatePropertiesWsdlSelector{
			WsdlEndpointName: to.Ptr("CurrencyConvertorSoap"),
			WsdlServiceName:  to.Ptr("CurrencyConvertor"),
		},
	},
}, &armapimanagement.APIClientBeginCreateOrUpdateOptions{IfMatch: 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.APIContract = armapimanagement.APIContract{
// 	Name: to.Ptr("soapApi"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/soapApi"),
// 	Properties: &armapimanagement.APIContractProperties{
// 		APIRevision: to.Ptr("1"),
// 		IsCurrent: to.Ptr(true),
// 		SubscriptionKeyParameterNames: &armapimanagement.SubscriptionKeyParameterNamesContract{
// 			Header: to.Ptr("Ocp-Apim-Subscription-Key"),
// 			Query: to.Ptr("subscription-key"),
// 		},
// 		Path: to.Ptr("currency"),
// 		DisplayName: to.Ptr("CurrencyConvertor"),
// 		Protocols: []*armapimanagement.Protocol{
// 			to.Ptr(armapimanagement.ProtocolHTTPS)},
// 			ServiceURL: to.Ptr("http://www.webservicex.net"),
// 		},
// 	}
Output:

Example (ApiManagementCreateWebSocketApi)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateWebsocketApi.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAPIClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", "tempgroup", armapimanagement.APICreateOrUpdateParameter{
	Properties: &armapimanagement.APICreateOrUpdateProperties{
		APIType:     to.Ptr(armapimanagement.APITypeWebsocket),
		Description: to.Ptr("apidescription5200"),
		Path:        to.Ptr("newapiPath"),
		DisplayName: to.Ptr("apiname1463"),
		Protocols: []*armapimanagement.Protocol{
			to.Ptr(armapimanagement.ProtocolWss),
			to.Ptr(armapimanagement.ProtocolWs)},
		ServiceURL: to.Ptr("wss://echo.websocket.org"),
	},
}, &armapimanagement.APIClientBeginCreateOrUpdateOptions{IfMatch: 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.APIContract = armapimanagement.APIContract{
// 	Name: to.Ptr("apiid9419"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apiid9419"),
// 	Properties: &armapimanagement.APIContractProperties{
// 		APIType: to.Ptr(armapimanagement.APITypeWebsocket),
// 		Description: to.Ptr("apidescription5200"),
// 		APIRevision: to.Ptr("1"),
// 		IsCurrent: to.Ptr(true),
// 		IsOnline: to.Ptr(true),
// 		Path: to.Ptr("newapiPath"),
// 		DisplayName: to.Ptr("apiname1463"),
// 		Protocols: []*armapimanagement.Protocol{
// 			to.Ptr(armapimanagement.ProtocolWs),
// 			to.Ptr(armapimanagement.ProtocolWss)},
// 			ServiceURL: to.Ptr("wss://echo.websocket.org"),
// 		},
// 	}
Output:

func (*APIClient) Delete

func (client *APIClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, ifMatch string, options *APIClientDeleteOptions) (APIClientDeleteResponse, error)

Delete - Deletes the specified API of the API Management service instance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - APIClientDeleteOptions contains the optional parameters for the APIClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApi.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewAPIClient().Delete(ctx, "rg1", "apimService1", "echo-api", "*", &armapimanagement.APIClientDeleteOptions{DeleteRevisions: nil})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*APIClient) Get

func (client *APIClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, options *APIClientGetOptions) (APIClientGetResponse, error)

Get - Gets the details of the API specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • options - APIClientGetOptions contains the optional parameters for the APIClient.Get method.
Example (ApiManagementGetApiContract)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiContract.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIClient().Get(ctx, "rg1", "apimService1", "57d1f7558aa04f15146d9d8a", 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.APIContract = armapimanagement.APIContract{
// 	Name: to.Ptr("57d1f7558aa04f15146d9d8a"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a"),
// 	Properties: &armapimanagement.APIContractProperties{
// 		APIType: to.Ptr(armapimanagement.APITypeSoap),
// 		APIRevision: to.Ptr("1"),
// 		AuthenticationSettings: &armapimanagement.AuthenticationSettingsContract{
// 			OAuth2: &armapimanagement.OAuth2AuthenticationSettingsContract{
// 				AuthorizationServerID: to.Ptr("authorizationServerId2283"),
// 				Scope: to.Ptr("oauth2scope2580"),
// 			},
// 			OAuth2AuthenticationSettings: []*armapimanagement.OAuth2AuthenticationSettingsContract{
// 				{
// 					AuthorizationServerID: to.Ptr("authorizationServerId2283"),
// 					Scope: to.Ptr("oauth2scope2580"),
// 				},
// 				{
// 					AuthorizationServerID: to.Ptr("authorizationServerId2284"),
// 					Scope: to.Ptr("oauth2scope2581"),
// 			}},
// 		},
// 		IsCurrent: to.Ptr(true),
// 		IsOnline: to.Ptr(true),
// 		SubscriptionKeyParameterNames: &armapimanagement.SubscriptionKeyParameterNamesContract{
// 			Header: to.Ptr("Ocp-Apim-Subscription-Key"),
// 			Query: to.Ptr("subscription-key"),
// 		},
// 		Path: to.Ptr("schulte"),
// 		DisplayName: to.Ptr("Service"),
// 		Protocols: []*armapimanagement.Protocol{
// 			to.Ptr(armapimanagement.ProtocolHTTPS)},
// 			ServiceURL: to.Ptr("https://api.plexonline.com/DataSource/Service.asmx"),
// 		},
// 	}
Output:

Example (ApiManagementGetApiRevisionContract)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiRevision.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIClient().Get(ctx, "rg1", "apimService1", "echo-api;rev=3", 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.APIContract = armapimanagement.APIContract{
// 	Name: to.Ptr("echo-api;rev=3"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api;rev=3"),
// 	Properties: &armapimanagement.APIContractProperties{
// 		APIRevision: to.Ptr("3"),
// 		APIRevisionDescription: to.Ptr("fixed bug in contract"),
// 		AuthenticationSettings: &armapimanagement.AuthenticationSettingsContract{
// 			OAuth2: &armapimanagement.OAuth2AuthenticationSettingsContract{
// 				AuthorizationServerID: to.Ptr("authorizationServerId2283"),
// 				Scope: to.Ptr("oauth2scope2580"),
// 			},
// 			OAuth2AuthenticationSettings: []*armapimanagement.OAuth2AuthenticationSettingsContract{
// 				{
// 					AuthorizationServerID: to.Ptr("authorizationServerId2283"),
// 					Scope: to.Ptr("oauth2scope2580"),
// 				},
// 				{
// 					AuthorizationServerID: to.Ptr("authorizationServerId2284"),
// 					Scope: to.Ptr("oauth2scope2581"),
// 			}},
// 		},
// 		SubscriptionKeyParameterNames: &armapimanagement.SubscriptionKeyParameterNamesContract{
// 			Header: to.Ptr("Ocp-Apim-Subscription-Key"),
// 			Query: to.Ptr("subscription-key"),
// 		},
// 		Path: to.Ptr("schulte"),
// 		DisplayName: to.Ptr("Service"),
// 		Protocols: []*armapimanagement.Protocol{
// 			to.Ptr(armapimanagement.ProtocolHTTPS)},
// 			ServiceURL: to.Ptr("https://api.plexonline.com/DataSource/Service.asmx"),
// 		},
// 	}
Output:

func (*APIClient) GetEntityTag

func (client *APIClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiID string, options *APIClientGetEntityTagOptions) (APIClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the API specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • options - APIClientGetEntityTagOptions contains the optional parameters for the APIClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApi.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewAPIClient().GetEntityTag(ctx, "rg1", "apimService1", "57d1f7558aa04f15146d9d8a", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*APIClient) NewListByServicePager

func (client *APIClient) NewListByServicePager(resourceGroupName string, serviceName string, options *APIClientListByServiceOptions) *runtime.Pager[APIClientListByServiceResponse]

NewListByServicePager - Lists all APIs of the API Management service instance.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - APIClientListByServiceOptions contains the optional parameters for the APIClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApis.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAPIClient().NewListByServicePager("rg1", "apimService1", &armapimanagement.APIClientListByServiceOptions{Filter: nil,
	Top:                 nil,
	Skip:                nil,
	Tags:                nil,
	ExpandAPIVersionSet: 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.APICollection = armapimanagement.APICollection{
	// 	Count: to.Ptr[int64](4),
	// 	Value: []*armapimanagement.APIContract{
	// 		{
	// 			Name: to.Ptr("a1"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/apis"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1"),
	// 			Properties: &armapimanagement.APIContractProperties{
	// 				APIRevision: to.Ptr("1"),
	// 				APIVersionSetID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/c48f96c9-1385-4e2d-b410-5ab591ce0fc4"),
	// 				IsCurrent: to.Ptr(true),
	// 				Path: to.Ptr("api1"),
	// 				DisplayName: to.Ptr("api1"),
	// 				Protocols: []*armapimanagement.Protocol{
	// 					to.Ptr(armapimanagement.ProtocolHTTPS)},
	// 					ServiceURL: to.Ptr("http://echoapi.cloudapp.net/api"),
	// 				},
	// 			},
	// 			{
	// 				Name: to.Ptr("5a73933b8f27f7cc82a2d533"),
	// 				Type: to.Ptr("Microsoft.ApiManagement/service/apis"),
	// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5a73933b8f27f7cc82a2d533"),
	// 				Properties: &armapimanagement.APIContractProperties{
	// 					APIRevision: to.Ptr("1"),
	// 					APIVersion: to.Ptr("v1"),
	// 					APIVersionSetID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/c48f96c9-1385-4e2d-b410-5ab591ce0fc4"),
	// 					IsCurrent: to.Ptr(true),
	// 					Path: to.Ptr("api1"),
	// 					DisplayName: to.Ptr("api1"),
	// 					Protocols: []*armapimanagement.Protocol{
	// 						to.Ptr(armapimanagement.ProtocolHTTPS)},
	// 						ServiceURL: to.Ptr("http://echoapi.cloudapp.net/api"),
	// 					},
	// 				},
	// 				{
	// 					Name: to.Ptr("echo-api"),
	// 					Type: to.Ptr("Microsoft.ApiManagement/service/apis"),
	// 					ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api"),
	// 					Properties: &armapimanagement.APIContractProperties{
	// 						APIRevision: to.Ptr("1"),
	// 						IsCurrent: to.Ptr(true),
	// 						Path: to.Ptr("echo"),
	// 						DisplayName: to.Ptr("Echo API"),
	// 						Protocols: []*armapimanagement.Protocol{
	// 							to.Ptr(armapimanagement.ProtocolHTTPS)},
	// 							ServiceURL: to.Ptr("http://echoapi.cloudapp.net/api"),
	// 						},
	// 					},
	// 					{
	// 						Name: to.Ptr("5a7390baa5816a110435aee0"),
	// 						Type: to.Ptr("Microsoft.ApiManagement/service/apis"),
	// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5a7390baa5816a110435aee0"),
	// 						Properties: &armapimanagement.APIContractProperties{
	// 							Description: to.Ptr("A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification"),
	// 							APIRevision: to.Ptr("1"),
	// 							IsCurrent: to.Ptr(true),
	// 							Path: to.Ptr("vvv"),
	// 							DisplayName: to.Ptr("Swagger Petstore Extensive"),
	// 							Protocols: []*armapimanagement.Protocol{
	// 								to.Ptr(armapimanagement.ProtocolHTTPS)},
	// 								ServiceURL: to.Ptr("http://petstore.swagger.wordnik.com/api"),
	// 							},
	// 					}},
	// 				}
}
Output:

func (*APIClient) NewListByTagsPager

func (client *APIClient) NewListByTagsPager(resourceGroupName string, serviceName string, options *APIClientListByTagsOptions) *runtime.Pager[APIClientListByTagsResponse]

NewListByTagsPager - Lists a collection of apis associated with tags.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - APIClientListByTagsOptions contains the optional parameters for the APIClient.NewListByTagsPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApisByTags.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAPIClient().NewListByTagsPager("rg1", "apimService1", &armapimanagement.APIClientListByTagsOptions{Filter: nil,
	Top:                  nil,
	Skip:                 nil,
	IncludeNotTaggedApis: 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.TagResourceCollection = armapimanagement.TagResourceCollection{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.TagResourceContract{
	// 		{
	// 			API: &armapimanagement.APITagResourceContractProperties{
	// 				APIRevision: to.Ptr("1"),
	// 				IsCurrent: to.Ptr(true),
	// 				Name: to.Ptr("Echo API"),
	// 				Path: to.Ptr("echo"),
	// 				ID: to.Ptr("/apis/echo-api"),
	// 				ServiceURL: to.Ptr("http://echoapi.cloudapp.net/api"),
	// 			},
	// 			Tag: &armapimanagement.TagResourceContractProperties{
	// 				Name: to.Ptr("awesomeTag"),
	// 				ID: to.Ptr("/tags/apitag123"),
	// 			},
	// 	}},
	// }
}
Output:

func (*APIClient) Update

func (client *APIClient) Update(ctx context.Context, resourceGroupName string, serviceName string, apiID string, ifMatch string, parameters APIUpdateContract, options *APIClientUpdateOptions) (APIClientUpdateResponse, error)

Update - Updates the specified API of the API Management service instance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - API Update Contract parameters.
  • options - APIClientUpdateOptions contains the optional parameters for the APIClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApi.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIClient().Update(ctx, "rg1", "apimService1", "echo-api", "*", armapimanagement.APIUpdateContract{
	Properties: &armapimanagement.APIContractUpdateProperties{
		Path:        to.Ptr("newecho"),
		DisplayName: to.Ptr("Echo API New"),
		ServiceURL:  to.Ptr("http://echoapi.cloudapp.net/api2"),
	},
}, 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.APIContract = armapimanagement.APIContract{
// 	Name: to.Ptr("echo-api"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api"),
// 	Properties: &armapimanagement.APIContractProperties{
// 		APIRevision: to.Ptr("1"),
// 		IsCurrent: to.Ptr(true),
// 		IsOnline: to.Ptr(true),
// 		SubscriptionKeyParameterNames: &armapimanagement.SubscriptionKeyParameterNamesContract{
// 			Header: to.Ptr("Ocp-Apim-Subscription-Key"),
// 			Query: to.Ptr("subscription-key"),
// 		},
// 		Path: to.Ptr("newecho"),
// 		DisplayName: to.Ptr("Echo API New"),
// 		Protocols: []*armapimanagement.Protocol{
// 			to.Ptr(armapimanagement.ProtocolHTTPS)},
// 			ServiceURL: to.Ptr("http://echoapi.cloudapp.net/api2"),
// 		},
// 	}
Output:

type APIClientBeginCreateOrUpdateOptions

type APIClientBeginCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

APIClientBeginCreateOrUpdateOptions contains the optional parameters for the APIClient.BeginCreateOrUpdate method.

type APIClientCreateOrUpdateResponse

type APIClientCreateOrUpdateResponse struct {
	// API details.
	APIContract
}

APIClientCreateOrUpdateResponse contains the response from method APIClient.BeginCreateOrUpdate.

type APIClientDeleteOptions

type APIClientDeleteOptions struct {
	// Delete all revisions of the Api.
	DeleteRevisions *bool
}

APIClientDeleteOptions contains the optional parameters for the APIClient.Delete method.

type APIClientDeleteResponse

type APIClientDeleteResponse struct {
}

APIClientDeleteResponse contains the response from method APIClient.Delete.

type APIClientGetEntityTagOptions

type APIClientGetEntityTagOptions struct {
}

APIClientGetEntityTagOptions contains the optional parameters for the APIClient.GetEntityTag method.

type APIClientGetEntityTagResponse

type APIClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

APIClientGetEntityTagResponse contains the response from method APIClient.GetEntityTag.

type APIClientGetOptions

type APIClientGetOptions struct {
}

APIClientGetOptions contains the optional parameters for the APIClient.Get method.

type APIClientGetResponse

type APIClientGetResponse struct {
	// API details.
	APIContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIClientGetResponse contains the response from method APIClient.Get.

type APIClientListByServiceOptions

type APIClientListByServiceOptions struct {
	// Include full ApiVersionSet resource in response
	ExpandAPIVersionSet *bool

	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | isCurrent | filter | eq, ne | |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Include tags in the response.
	Tags *string

	// Number of records to return.
	Top *int32
}

APIClientListByServiceOptions contains the optional parameters for the APIClient.NewListByServicePager method.

type APIClientListByServiceResponse

type APIClientListByServiceResponse struct {
	// Paged API list representation.
	APICollection
}

APIClientListByServiceResponse contains the response from method APIClient.NewListByServicePager.

type APIClientListByTagsOptions

type APIClientListByTagsOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | isCurrent | filter | eq | |
	Filter *string

	// Include not tagged APIs.
	IncludeNotTaggedApis *bool

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

APIClientListByTagsOptions contains the optional parameters for the APIClient.NewListByTagsPager method.

type APIClientListByTagsResponse

type APIClientListByTagsResponse struct {
	// Paged Tag list representation.
	TagResourceCollection
}

APIClientListByTagsResponse contains the response from method APIClient.NewListByTagsPager.

type APIClientUpdateOptions

type APIClientUpdateOptions struct {
}

APIClientUpdateOptions contains the optional parameters for the APIClient.Update method.

type APIClientUpdateResponse

type APIClientUpdateResponse struct {
	// API details.
	APIContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIClientUpdateResponse contains the response from method APIClient.Update.

type APICollection

type APICollection struct {
	// Total record count number across all pages.
	Count *int64

	// READ-ONLY; Next page link if any.
	NextLink *string

	// READ-ONLY; Page values.
	Value []*APIContract
}

APICollection - Paged API list representation.

func (APICollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APICollection.

func (*APICollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APICollection.

type APIContactInformation

type APIContactInformation struct {
	// The email address of the contact person/organization. MUST be in the format of an email address
	Email *string

	// The identifying name of the contact person/organization
	Name *string

	// The URL pointing to the contact information. MUST be in the format of a URL
	URL *string
}

APIContactInformation - API contact information

func (APIContactInformation) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIContactInformation.

func (*APIContactInformation) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIContactInformation.

type APIContract

type APIContract struct {
	// API entity contract properties.
	Properties *APIContractProperties

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

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

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

APIContract - API details.

func (APIContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIContract.

func (*APIContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIContract.

type APIContractProperties

type APIContractProperties struct {
	// REQUIRED; Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance.
	// It is appended to the API endpoint base URL specified during the service instance
	// creation to form a public URL for this API.
	Path *string

	// Describes the revision of the API. If no value is provided, default revision 1 is created
	APIRevision *string

	// Description of the API Revision.
	APIRevisionDescription *string

	// Type of API.
	APIType *APIType

	// Indicates the version identifier of the API if the API is versioned
	APIVersion *string

	// Description of the API Version.
	APIVersionDescription *string

	// Version set details
	APIVersionSet *APIVersionSetContractDetails

	// A resource identifier for the related ApiVersionSet.
	APIVersionSetID *string

	// Collection of authentication settings included into this API.
	AuthenticationSettings *AuthenticationSettingsContract

	// Contact information for the API.
	Contact *APIContactInformation

	// Description of the API. May include HTML formatting tags.
	Description *string

	// API name. Must be 1 to 300 characters long.
	DisplayName *string

	// Indicates if API revision is current api revision.
	IsCurrent *bool

	// License information for the API.
	License *APILicenseInformation

	// Describes on which protocols the operations in this API can be invoked.
	Protocols []*Protocol

	// Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long.
	ServiceURL *string

	// API identifier of the source API.
	SourceAPIID *string

	// Protocols over which API is made available.
	SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract

	// Specifies whether an API or Product subscription is required for accessing the API.
	SubscriptionRequired *bool

	// A URL to the Terms of Service for the API. MUST be in the format of a URL.
	TermsOfServiceURL *string

	// READ-ONLY; Indicates if API revision is accessible via the gateway.
	IsOnline *bool
}

APIContractProperties - API Entity Properties

func (APIContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIContractProperties.

func (*APIContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIContractProperties.

type APIContractUpdateProperties

type APIContractUpdateProperties struct {
	// Describes the revision of the API. If no value is provided, default revision 1 is created
	APIRevision *string

	// Description of the API Revision.
	APIRevisionDescription *string

	// Type of API.
	APIType *APIType

	// Indicates the version identifier of the API if the API is versioned
	APIVersion *string

	// Description of the API Version.
	APIVersionDescription *string

	// A resource identifier for the related ApiVersionSet.
	APIVersionSetID *string

	// Collection of authentication settings included into this API.
	AuthenticationSettings *AuthenticationSettingsContract

	// Contact information for the API.
	Contact *APIContactInformation

	// Description of the API. May include HTML formatting tags.
	Description *string

	// API name.
	DisplayName *string

	// Indicates if API revision is current api revision.
	IsCurrent *bool

	// License information for the API.
	License *APILicenseInformation

	// Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It
	// is appended to the API endpoint base URL specified during the service instance
	// creation to form a public URL for this API.
	Path *string

	// Describes on which protocols the operations in this API can be invoked.
	Protocols []*Protocol

	// Absolute URL of the backend service implementing this API.
	ServiceURL *string

	// Protocols over which API is made available.
	SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract

	// Specifies whether an API or Product subscription is required for accessing the API.
	SubscriptionRequired *bool

	// A URL to the Terms of Service for the API. MUST be in the format of a URL.
	TermsOfServiceURL *string

	// READ-ONLY; Indicates if API revision is accessible via the gateway.
	IsOnline *bool
}

APIContractUpdateProperties - API update contract properties.

func (APIContractUpdateProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIContractUpdateProperties.

func (*APIContractUpdateProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIContractUpdateProperties.

type APICreateOrUpdateParameter

type APICreateOrUpdateParameter struct {
	// API entity create of update properties.
	Properties *APICreateOrUpdateProperties
}

APICreateOrUpdateParameter - API Create or Update Parameters.

func (APICreateOrUpdateParameter) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APICreateOrUpdateParameter.

func (*APICreateOrUpdateParameter) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APICreateOrUpdateParameter.

type APICreateOrUpdateProperties

type APICreateOrUpdateProperties struct {
	// REQUIRED; Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance.
	// It is appended to the API endpoint base URL specified during the service instance
	// creation to form a public URL for this API.
	Path *string

	// Describes the revision of the API. If no value is provided, default revision 1 is created
	APIRevision *string

	// Description of the API Revision.
	APIRevisionDescription *string

	// Type of API.
	APIType *APIType

	// Indicates the version identifier of the API if the API is versioned
	APIVersion *string

	// Description of the API Version.
	APIVersionDescription *string

	// Version set details
	APIVersionSet *APIVersionSetContractDetails

	// A resource identifier for the related ApiVersionSet.
	APIVersionSetID *string

	// Collection of authentication settings included into this API.
	AuthenticationSettings *AuthenticationSettingsContract

	// Contact information for the API.
	Contact *APIContactInformation

	// Description of the API. May include HTML formatting tags.
	Description *string

	// API name. Must be 1 to 300 characters long.
	DisplayName *string

	// Format of the Content in which the API is getting imported.
	Format *ContentFormat

	// Indicates if API revision is current api revision.
	IsCurrent *bool

	// License information for the API.
	License *APILicenseInformation

	// Describes on which protocols the operations in this API can be invoked.
	Protocols []*Protocol

	// Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long.
	ServiceURL *string

	// Type of API to create.
	// * http creates a REST API
	// * soap creates a SOAP pass-through API
	// * websocket creates websocket API
	// * graphql creates GraphQL API.
	SoapAPIType *SoapAPIType

	// API identifier of the source API.
	SourceAPIID *string

	// Protocols over which API is made available.
	SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract

	// Specifies whether an API or Product subscription is required for accessing the API.
	SubscriptionRequired *bool

	// A URL to the Terms of Service for the API. MUST be in the format of a URL.
	TermsOfServiceURL *string

	// Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template',
	// 'query'
	TranslateRequiredQueryParametersConduct *TranslateRequiredQueryParametersConduct

	// Content value when Importing an API.
	Value *string

	// Criteria to limit import of WSDL to a subset of the document.
	WsdlSelector *APICreateOrUpdatePropertiesWsdlSelector

	// READ-ONLY; Indicates if API revision is accessible via the gateway.
	IsOnline *bool
}

APICreateOrUpdateProperties - API Create or Update Properties.

func (APICreateOrUpdateProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APICreateOrUpdateProperties.

func (*APICreateOrUpdateProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APICreateOrUpdateProperties.

type APICreateOrUpdatePropertiesWsdlSelector

type APICreateOrUpdatePropertiesWsdlSelector struct {
	// Name of endpoint(port) to import from WSDL
	WsdlEndpointName *string

	// Name of service to import from WSDL
	WsdlServiceName *string
}

APICreateOrUpdatePropertiesWsdlSelector - Criteria to limit import of WSDL to a subset of the document.

func (APICreateOrUpdatePropertiesWsdlSelector) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APICreateOrUpdatePropertiesWsdlSelector.

func (*APICreateOrUpdatePropertiesWsdlSelector) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APICreateOrUpdatePropertiesWsdlSelector.

type APIDiagnosticClient

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

APIDiagnosticClient contains the methods for the APIDiagnostic group. Don't use this type directly, use NewAPIDiagnosticClient() instead.

func NewAPIDiagnosticClient

func NewAPIDiagnosticClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIDiagnosticClient, error)

NewAPIDiagnosticClient creates a new instance of APIDiagnosticClient 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 (*APIDiagnosticClient) CreateOrUpdate

func (client *APIDiagnosticClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, diagnosticID string, parameters DiagnosticContract, options *APIDiagnosticClientCreateOrUpdateOptions) (APIDiagnosticClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates a new Diagnostic for an API or updates an existing one. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance.
  • parameters - Create parameters.
  • options - APIDiagnosticClientCreateOrUpdateOptions contains the optional parameters for the APIDiagnosticClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiDiagnostic.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIDiagnosticClient().CreateOrUpdate(ctx, "rg1", "apimService1", "57d1f7558aa04f15146d9d8a", "applicationinsights", armapimanagement.DiagnosticContract{
	Properties: &armapimanagement.DiagnosticContractProperties{
		AlwaysLog: to.Ptr(armapimanagement.AlwaysLogAllErrors),
		Backend: &armapimanagement.PipelineDiagnosticSettings{
			Response: &armapimanagement.HTTPMessageDiagnostic{
				Body: &armapimanagement.BodyDiagnosticSettings{
					Bytes: to.Ptr[int32](512),
				},
				Headers: []*string{
					to.Ptr("Content-type")},
			},
			Request: &armapimanagement.HTTPMessageDiagnostic{
				Body: &armapimanagement.BodyDiagnosticSettings{
					Bytes: to.Ptr[int32](512),
				},
				Headers: []*string{
					to.Ptr("Content-type")},
			},
		},
		Frontend: &armapimanagement.PipelineDiagnosticSettings{
			Response: &armapimanagement.HTTPMessageDiagnostic{
				Body: &armapimanagement.BodyDiagnosticSettings{
					Bytes: to.Ptr[int32](512),
				},
				Headers: []*string{
					to.Ptr("Content-type")},
			},
			Request: &armapimanagement.HTTPMessageDiagnostic{
				Body: &armapimanagement.BodyDiagnosticSettings{
					Bytes: to.Ptr[int32](512),
				},
				Headers: []*string{
					to.Ptr("Content-type")},
			},
		},
		LoggerID: to.Ptr("/loggers/applicationinsights"),
		Sampling: &armapimanagement.SamplingSettings{
			Percentage:   to.Ptr[float64](50),
			SamplingType: to.Ptr(armapimanagement.SamplingTypeFixed),
		},
	},
}, &armapimanagement.APIDiagnosticClientCreateOrUpdateOptions{IfMatch: 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.DiagnosticContract = armapimanagement.DiagnosticContract{
// 	Name: to.Ptr("applicationinsights"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/diagnostics"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/diagnostics/applicationinsights"),
// 	Properties: &armapimanagement.DiagnosticContractProperties{
// 		AlwaysLog: to.Ptr(armapimanagement.AlwaysLogAllErrors),
// 		Backend: &armapimanagement.PipelineDiagnosticSettings{
// 			Response: &armapimanagement.HTTPMessageDiagnostic{
// 				Body: &armapimanagement.BodyDiagnosticSettings{
// 					Bytes: to.Ptr[int32](512),
// 				},
// 				Headers: []*string{
// 					to.Ptr("Content-type")},
// 				},
// 				Request: &armapimanagement.HTTPMessageDiagnostic{
// 					Body: &armapimanagement.BodyDiagnosticSettings{
// 						Bytes: to.Ptr[int32](512),
// 					},
// 					Headers: []*string{
// 						to.Ptr("Content-type")},
// 					},
// 				},
// 				Frontend: &armapimanagement.PipelineDiagnosticSettings{
// 					Response: &armapimanagement.HTTPMessageDiagnostic{
// 						Body: &armapimanagement.BodyDiagnosticSettings{
// 							Bytes: to.Ptr[int32](512),
// 						},
// 						Headers: []*string{
// 							to.Ptr("Content-type")},
// 						},
// 						Request: &armapimanagement.HTTPMessageDiagnostic{
// 							Body: &armapimanagement.BodyDiagnosticSettings{
// 								Bytes: to.Ptr[int32](512),
// 							},
// 							Headers: []*string{
// 								to.Ptr("Content-type")},
// 							},
// 						},
// 						LoggerID: to.Ptr("/loggers/applicationinsights"),
// 						Sampling: &armapimanagement.SamplingSettings{
// 							Percentage: to.Ptr[float64](50),
// 							SamplingType: to.Ptr(armapimanagement.SamplingTypeFixed),
// 						},
// 					},
// 				}
Output:

func (*APIDiagnosticClient) Delete

func (client *APIDiagnosticClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, diagnosticID string, ifMatch string, options *APIDiagnosticClientDeleteOptions) (APIDiagnosticClientDeleteResponse, error)

Delete - Deletes the specified Diagnostic from an API. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - APIDiagnosticClientDeleteOptions contains the optional parameters for the APIDiagnosticClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiDiagnostic.json

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

func (*APIDiagnosticClient) Get

func (client *APIDiagnosticClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, diagnosticID string, options *APIDiagnosticClientGetOptions) (APIDiagnosticClientGetResponse, error)

Get - Gets the details of the Diagnostic for an API specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance.
  • options - APIDiagnosticClientGetOptions contains the optional parameters for the APIDiagnosticClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiDiagnostic.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIDiagnosticClient().Get(ctx, "rg1", "apimService1", "57d1f7558aa04f15146d9d8a", "applicationinsights", 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.DiagnosticContract = armapimanagement.DiagnosticContract{
// 	Name: to.Ptr("applicationinsights"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/diagnostics"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api/diagnostics/applicationinsights"),
// 	Properties: &armapimanagement.DiagnosticContractProperties{
// 		AlwaysLog: to.Ptr(armapimanagement.AlwaysLogAllErrors),
// 		Backend: &armapimanagement.PipelineDiagnosticSettings{
// 			Response: &armapimanagement.HTTPMessageDiagnostic{
// 				Body: &armapimanagement.BodyDiagnosticSettings{
// 					Bytes: to.Ptr[int32](100),
// 				},
// 				Headers: []*string{
// 				},
// 			},
// 			Request: &armapimanagement.HTTPMessageDiagnostic{
// 				Body: &armapimanagement.BodyDiagnosticSettings{
// 					Bytes: to.Ptr[int32](100),
// 				},
// 				Headers: []*string{
// 				},
// 			},
// 		},
// 		Frontend: &armapimanagement.PipelineDiagnosticSettings{
// 			Response: &armapimanagement.HTTPMessageDiagnostic{
// 				Body: &armapimanagement.BodyDiagnosticSettings{
// 					Bytes: to.Ptr[int32](100),
// 				},
// 				Headers: []*string{
// 				},
// 			},
// 			Request: &armapimanagement.HTTPMessageDiagnostic{
// 				Body: &armapimanagement.BodyDiagnosticSettings{
// 					Bytes: to.Ptr[int32](100),
// 				},
// 				Headers: []*string{
// 				},
// 			},
// 		},
// 		HTTPCorrelationProtocol: to.Ptr(armapimanagement.HTTPCorrelationProtocolLegacy),
// 		LogClientIP: to.Ptr(true),
// 		LoggerID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/aisamplingtest"),
// 		Sampling: &armapimanagement.SamplingSettings{
// 			Percentage: to.Ptr[float64](100),
// 			SamplingType: to.Ptr(armapimanagement.SamplingTypeFixed),
// 		},
// 	},
// }
Output:

func (*APIDiagnosticClient) GetEntityTag

func (client *APIDiagnosticClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiID string, diagnosticID string, options *APIDiagnosticClientGetEntityTagOptions) (APIDiagnosticClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance.
  • options - APIDiagnosticClientGetEntityTagOptions contains the optional parameters for the APIDiagnosticClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiDiagnostic.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewAPIDiagnosticClient().GetEntityTag(ctx, "rg1", "apimService1", "57d1f7558aa04f15146d9d8a", "applicationinsights", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*APIDiagnosticClient) NewListByServicePager

func (client *APIDiagnosticClient) NewListByServicePager(resourceGroupName string, serviceName string, apiID string, options *APIDiagnosticClientListByServiceOptions) *runtime.Pager[APIDiagnosticClientListByServiceResponse]

NewListByServicePager - Lists all diagnostics of an API.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • options - APIDiagnosticClientListByServiceOptions contains the optional parameters for the APIDiagnosticClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiDiagnostics.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAPIDiagnosticClient().NewListByServicePager("rg1", "apimService1", "echo-api", &armapimanagement.APIDiagnosticClientListByServiceOptions{Filter: nil,
	Top:  nil,
	Skip: 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.DiagnosticCollection = armapimanagement.DiagnosticCollection{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.DiagnosticContract{
	// 		{
	// 			Name: to.Ptr("applicationinsights"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/apis/diagnostics"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api/diagnostics/applicationinsights"),
	// 			Properties: &armapimanagement.DiagnosticContractProperties{
	// 				AlwaysLog: to.Ptr(armapimanagement.AlwaysLogAllErrors),
	// 				Backend: &armapimanagement.PipelineDiagnosticSettings{
	// 					Response: &armapimanagement.HTTPMessageDiagnostic{
	// 						Body: &armapimanagement.BodyDiagnosticSettings{
	// 							Bytes: to.Ptr[int32](100),
	// 						},
	// 						Headers: []*string{
	// 						},
	// 					},
	// 					Request: &armapimanagement.HTTPMessageDiagnostic{
	// 						Body: &armapimanagement.BodyDiagnosticSettings{
	// 							Bytes: to.Ptr[int32](100),
	// 						},
	// 						Headers: []*string{
	// 						},
	// 					},
	// 				},
	// 				Frontend: &armapimanagement.PipelineDiagnosticSettings{
	// 					Response: &armapimanagement.HTTPMessageDiagnostic{
	// 						Body: &armapimanagement.BodyDiagnosticSettings{
	// 							Bytes: to.Ptr[int32](100),
	// 						},
	// 						Headers: []*string{
	// 						},
	// 					},
	// 					Request: &armapimanagement.HTTPMessageDiagnostic{
	// 						Body: &armapimanagement.BodyDiagnosticSettings{
	// 							Bytes: to.Ptr[int32](100),
	// 						},
	// 						Headers: []*string{
	// 						},
	// 					},
	// 				},
	// 				HTTPCorrelationProtocol: to.Ptr(armapimanagement.HTTPCorrelationProtocolLegacy),
	// 				LogClientIP: to.Ptr(true),
	// 				LoggerID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/aisamplingtest"),
	// 				Sampling: &armapimanagement.SamplingSettings{
	// 					Percentage: to.Ptr[float64](100),
	// 					SamplingType: to.Ptr(armapimanagement.SamplingTypeFixed),
	// 				},
	// 			},
	// 	}},
	// }
}
Output:

func (*APIDiagnosticClient) Update

func (client *APIDiagnosticClient) Update(ctx context.Context, resourceGroupName string, serviceName string, apiID string, diagnosticID string, ifMatch string, parameters DiagnosticContract, options *APIDiagnosticClientUpdateOptions) (APIDiagnosticClientUpdateResponse, error)

Update - Updates the details of the Diagnostic for an API specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - Diagnostic Update parameters.
  • options - APIDiagnosticClientUpdateOptions contains the optional parameters for the APIDiagnosticClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiDiagnostic.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIDiagnosticClient().Update(ctx, "rg1", "apimService1", "echo-api", "applicationinsights", "*", armapimanagement.DiagnosticContract{
	Properties: &armapimanagement.DiagnosticContractProperties{
		AlwaysLog: to.Ptr(armapimanagement.AlwaysLogAllErrors),
		Backend: &armapimanagement.PipelineDiagnosticSettings{
			Response: &armapimanagement.HTTPMessageDiagnostic{
				Body: &armapimanagement.BodyDiagnosticSettings{
					Bytes: to.Ptr[int32](512),
				},
				Headers: []*string{
					to.Ptr("Content-type")},
			},
			Request: &armapimanagement.HTTPMessageDiagnostic{
				Body: &armapimanagement.BodyDiagnosticSettings{
					Bytes: to.Ptr[int32](512),
				},
				Headers: []*string{
					to.Ptr("Content-type")},
			},
		},
		Frontend: &armapimanagement.PipelineDiagnosticSettings{
			Response: &armapimanagement.HTTPMessageDiagnostic{
				Body: &armapimanagement.BodyDiagnosticSettings{
					Bytes: to.Ptr[int32](512),
				},
				Headers: []*string{
					to.Ptr("Content-type")},
			},
			Request: &armapimanagement.HTTPMessageDiagnostic{
				Body: &armapimanagement.BodyDiagnosticSettings{
					Bytes: to.Ptr[int32](512),
				},
				Headers: []*string{
					to.Ptr("Content-type")},
			},
		},
		LoggerID: to.Ptr("/loggers/applicationinsights"),
		Sampling: &armapimanagement.SamplingSettings{
			Percentage:   to.Ptr[float64](50),
			SamplingType: to.Ptr(armapimanagement.SamplingTypeFixed),
		},
	},
}, 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.DiagnosticContract = armapimanagement.DiagnosticContract{
// 	Name: to.Ptr("applicationinsights"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/diagnostics"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api/diagnostics/applicationinsights"),
// 	Properties: &armapimanagement.DiagnosticContractProperties{
// 		AlwaysLog: to.Ptr(armapimanagement.AlwaysLogAllErrors),
// 		Backend: &armapimanagement.PipelineDiagnosticSettings{
// 			Response: &armapimanagement.HTTPMessageDiagnostic{
// 				Body: &armapimanagement.BodyDiagnosticSettings{
// 					Bytes: to.Ptr[int32](100),
// 				},
// 				Headers: []*string{
// 				},
// 			},
// 			Request: &armapimanagement.HTTPMessageDiagnostic{
// 				Body: &armapimanagement.BodyDiagnosticSettings{
// 					Bytes: to.Ptr[int32](100),
// 				},
// 				Headers: []*string{
// 				},
// 			},
// 		},
// 		Frontend: &armapimanagement.PipelineDiagnosticSettings{
// 			Response: &armapimanagement.HTTPMessageDiagnostic{
// 				Body: &armapimanagement.BodyDiagnosticSettings{
// 					Bytes: to.Ptr[int32](100),
// 				},
// 				Headers: []*string{
// 				},
// 			},
// 			Request: &armapimanagement.HTTPMessageDiagnostic{
// 				Body: &armapimanagement.BodyDiagnosticSettings{
// 					Bytes: to.Ptr[int32](100),
// 				},
// 				Headers: []*string{
// 				},
// 			},
// 		},
// 		HTTPCorrelationProtocol: to.Ptr(armapimanagement.HTTPCorrelationProtocolLegacy),
// 		LogClientIP: to.Ptr(true),
// 		LoggerID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/aisamplingtest"),
// 		Sampling: &armapimanagement.SamplingSettings{
// 			Percentage: to.Ptr[float64](100),
// 			SamplingType: to.Ptr(armapimanagement.SamplingTypeFixed),
// 		},
// 	},
// }
Output:

type APIDiagnosticClientCreateOrUpdateOptions

type APIDiagnosticClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

APIDiagnosticClientCreateOrUpdateOptions contains the optional parameters for the APIDiagnosticClient.CreateOrUpdate method.

type APIDiagnosticClientCreateOrUpdateResponse

type APIDiagnosticClientCreateOrUpdateResponse struct {
	// Diagnostic details.
	DiagnosticContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIDiagnosticClientCreateOrUpdateResponse contains the response from method APIDiagnosticClient.CreateOrUpdate.

type APIDiagnosticClientDeleteOptions

type APIDiagnosticClientDeleteOptions struct {
}

APIDiagnosticClientDeleteOptions contains the optional parameters for the APIDiagnosticClient.Delete method.

type APIDiagnosticClientDeleteResponse

type APIDiagnosticClientDeleteResponse struct {
}

APIDiagnosticClientDeleteResponse contains the response from method APIDiagnosticClient.Delete.

type APIDiagnosticClientGetEntityTagOptions

type APIDiagnosticClientGetEntityTagOptions struct {
}

APIDiagnosticClientGetEntityTagOptions contains the optional parameters for the APIDiagnosticClient.GetEntityTag method.

type APIDiagnosticClientGetEntityTagResponse

type APIDiagnosticClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

APIDiagnosticClientGetEntityTagResponse contains the response from method APIDiagnosticClient.GetEntityTag.

type APIDiagnosticClientGetOptions

type APIDiagnosticClientGetOptions struct {
}

APIDiagnosticClientGetOptions contains the optional parameters for the APIDiagnosticClient.Get method.

type APIDiagnosticClientGetResponse

type APIDiagnosticClientGetResponse struct {
	// Diagnostic details.
	DiagnosticContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIDiagnosticClientGetResponse contains the response from method APIDiagnosticClient.Get.

type APIDiagnosticClientListByServiceOptions

type APIDiagnosticClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

APIDiagnosticClientListByServiceOptions contains the optional parameters for the APIDiagnosticClient.NewListByServicePager method.

type APIDiagnosticClientListByServiceResponse

type APIDiagnosticClientListByServiceResponse struct {
	// Paged Diagnostic list representation.
	DiagnosticCollection
}

APIDiagnosticClientListByServiceResponse contains the response from method APIDiagnosticClient.NewListByServicePager.

type APIDiagnosticClientUpdateOptions

type APIDiagnosticClientUpdateOptions struct {
}

APIDiagnosticClientUpdateOptions contains the optional parameters for the APIDiagnosticClient.Update method.

type APIDiagnosticClientUpdateResponse

type APIDiagnosticClientUpdateResponse struct {
	// Diagnostic details.
	DiagnosticContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIDiagnosticClientUpdateResponse contains the response from method APIDiagnosticClient.Update.

type APIEntityBaseContract

type APIEntityBaseContract struct {
	// Describes the revision of the API. If no value is provided, default revision 1 is created
	APIRevision *string

	// Description of the API Revision.
	APIRevisionDescription *string

	// Type of API.
	APIType *APIType

	// Indicates the version identifier of the API if the API is versioned
	APIVersion *string

	// Description of the API Version.
	APIVersionDescription *string

	// A resource identifier for the related ApiVersionSet.
	APIVersionSetID *string

	// Collection of authentication settings included into this API.
	AuthenticationSettings *AuthenticationSettingsContract

	// Contact information for the API.
	Contact *APIContactInformation

	// Description of the API. May include HTML formatting tags.
	Description *string

	// Indicates if API revision is current api revision.
	IsCurrent *bool

	// License information for the API.
	License *APILicenseInformation

	// Protocols over which API is made available.
	SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract

	// Specifies whether an API or Product subscription is required for accessing the API.
	SubscriptionRequired *bool

	// A URL to the Terms of Service for the API. MUST be in the format of a URL.
	TermsOfServiceURL *string

	// READ-ONLY; Indicates if API revision is accessible via the gateway.
	IsOnline *bool
}

APIEntityBaseContract - API base contract details.

func (APIEntityBaseContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIEntityBaseContract.

func (*APIEntityBaseContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIEntityBaseContract.

type APIExportClient

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

APIExportClient contains the methods for the APIExport group. Don't use this type directly, use NewAPIExportClient() instead.

func NewAPIExportClient

func NewAPIExportClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIExportClient, error)

NewAPIExportClient creates a new instance of APIExportClient 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 (*APIExportClient) Get

func (client *APIExportClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, formatParam ExportFormat, export ExportAPI, options *APIExportClientGetOptions) (APIExportClientGetResponse, error)

Get - Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • formatParam - Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 minutes.
  • export - Query parameter required to export the API details.
  • options - APIExportClientGetOptions contains the optional parameters for the APIExportClient.Get method.
Example (ApiManagementGetApiExportInOpenApi2Dot0)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiExportInOpenApi2dot0.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIExportClient().Get(ctx, "rg1", "apimService1", "echo-api", armapimanagement.ExportFormatSwagger, armapimanagement.ExportAPITrue, 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.APIExportResult = armapimanagement.APIExportResult{
// 	ExportResultFormat: to.Ptr(armapimanagement.ExportResultFormatSwagger),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api"),
// 	Value: &armapimanagement.APIExportResultValue{
// 		Link: to.Ptr("https://apimgmtstkjpszxxxxxxx.blob.core.windows.net/api-export/Swagger Petstore Extensive.json?sv=2015-07-08&sr=b&sig=mxhLsFuOonu8EXIjyFPV%2FnDra0qTIoip7N7MuU%2BTFsA%3D&se=2019-04-10T22:41:31Z&sp=r"),
// 	},
// }
Output:

Example (ApiManagementGetApiExportInOpenApi3Dot0)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiExportInOpenApi3dot0.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIExportClient().Get(ctx, "rg1", "apimService1", "aid9676", armapimanagement.ExportFormatOpenapi, armapimanagement.ExportAPITrue, 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.APIExportResult = armapimanagement.APIExportResult{
// 	ExportResultFormat: to.Ptr(armapimanagement.ExportResultFormatOpenAPI),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/aid9676"),
// 	Value: &armapimanagement.APIExportResultValue{
// 		Link: to.Ptr("https: //apimgmtstkjpszxxxxxxx.blob.core.windows.net/api-export/Swagger Petstore.yaml?storage-sas-signature"),
// 	},
// }
Output:

type APIExportClientGetOptions

type APIExportClientGetOptions struct {
}

APIExportClientGetOptions contains the optional parameters for the APIExportClient.Get method.

type APIExportClientGetResponse

type APIExportClientGetResponse struct {
	// API Export result.
	APIExportResult
}

APIExportClientGetResponse contains the response from method APIExportClient.Get.

type APIExportResult

type APIExportResult struct {
	// Format in which the API Details are exported to the Storage Blob with Sas Key valid for 5 minutes.
	ExportResultFormat *ExportResultFormat

	// ResourceId of the API which was exported.
	ID *string

	// The object defining the schema of the exported API Detail
	Value *APIExportResultValue
}

APIExportResult - API Export result.

func (APIExportResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIExportResult.

func (*APIExportResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIExportResult.

type APIExportResultValue

type APIExportResultValue struct {
	// Link to the Storage Blob containing the result of the export operation. The Blob Uri is only valid for 5 minutes.
	Link *string
}

APIExportResultValue - The object defining the schema of the exported API Detail

func (APIExportResultValue) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIExportResultValue.

func (*APIExportResultValue) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIExportResultValue.

type APIIssueAttachmentClient

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

APIIssueAttachmentClient contains the methods for the APIIssueAttachment group. Don't use this type directly, use NewAPIIssueAttachmentClient() instead.

func NewAPIIssueAttachmentClient

func NewAPIIssueAttachmentClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIIssueAttachmentClient, error)

NewAPIIssueAttachmentClient creates a new instance of APIIssueAttachmentClient 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 (*APIIssueAttachmentClient) CreateOrUpdate

func (client *APIIssueAttachmentClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, attachmentID string, parameters IssueAttachmentContract, options *APIIssueAttachmentClientCreateOrUpdateOptions) (APIIssueAttachmentClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates a new Attachment for the Issue in an API or updates an existing one. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • issueID - Issue identifier. Must be unique in the current API Management service instance.
  • attachmentID - Attachment identifier within an Issue. Must be unique in the current Issue.
  • parameters - Create parameters.
  • options - APIIssueAttachmentClientCreateOrUpdateOptions contains the optional parameters for the APIIssueAttachmentClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiIssueAttachment.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIIssueAttachmentClient().CreateOrUpdate(ctx, "rg1", "apimService1", "57d1f7558aa04f15146d9d8a", "57d2ef278aa04f0ad01d6cdc", "57d2ef278aa04f0888cba3f3", armapimanagement.IssueAttachmentContract{
	Properties: &armapimanagement.IssueAttachmentContractProperties{
		Content:       to.Ptr("IEJhc2U2NA=="),
		ContentFormat: to.Ptr("image/jpeg"),
		Title:         to.Ptr("Issue attachment."),
	},
}, &armapimanagement.APIIssueAttachmentClientCreateOrUpdateOptions{IfMatch: 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.IssueAttachmentContract = armapimanagement.IssueAttachmentContract{
// 	Name: to.Ptr("57d2ef278aa04f0888cba3f3"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/issues/attachments"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc/attachments/57d2ef278aa04f0888cba3f3"),
// 	Properties: &armapimanagement.IssueAttachmentContractProperties{
// 		Content: to.Ptr("https://.../image.jpg"),
// 		ContentFormat: to.Ptr("link"),
// 		Title: to.Ptr("Issue attachment."),
// 	},
// }
Output:

func (*APIIssueAttachmentClient) Delete

func (client *APIIssueAttachmentClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, attachmentID string, ifMatch string, options *APIIssueAttachmentClientDeleteOptions) (APIIssueAttachmentClientDeleteResponse, error)

Delete - Deletes the specified comment from an Issue. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • issueID - Issue identifier. Must be unique in the current API Management service instance.
  • attachmentID - Attachment identifier within an Issue. Must be unique in the current Issue.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - APIIssueAttachmentClientDeleteOptions contains the optional parameters for the APIIssueAttachmentClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiIssueAttachment.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewAPIIssueAttachmentClient().Delete(ctx, "rg1", "apimService1", "57d1f7558aa04f15146d9d8a", "57d2ef278aa04f0ad01d6cdc", "57d2ef278aa04f0888cba3f3", "*", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*APIIssueAttachmentClient) Get

func (client *APIIssueAttachmentClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, attachmentID string, options *APIIssueAttachmentClientGetOptions) (APIIssueAttachmentClientGetResponse, error)

Get - Gets the details of the issue Attachment for an API specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • issueID - Issue identifier. Must be unique in the current API Management service instance.
  • attachmentID - Attachment identifier within an Issue. Must be unique in the current Issue.
  • options - APIIssueAttachmentClientGetOptions contains the optional parameters for the APIIssueAttachmentClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssueAttachment.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIIssueAttachmentClient().Get(ctx, "rg1", "apimService1", "57d2ef278aa04f0888cba3f3", "57d2ef278aa04f0ad01d6cdc", "57d2ef278aa04f0888cba3f3", 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.IssueAttachmentContract = armapimanagement.IssueAttachmentContract{
// 	Name: to.Ptr("57d2ef278aa04f0888cba3f3"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/issues/attachments"),
// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc/attachments/57d2ef278aa04f0888cba3f3"),
// 	Properties: &armapimanagement.IssueAttachmentContractProperties{
// 		Content: to.Ptr("https://.../image.jpg"),
// 		ContentFormat: to.Ptr("link"),
// 		Title: to.Ptr("Issue attachment."),
// 	},
// }
Output:

func (*APIIssueAttachmentClient) GetEntityTag

func (client *APIIssueAttachmentClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, attachmentID string, options *APIIssueAttachmentClientGetEntityTagOptions) (APIIssueAttachmentClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • issueID - Issue identifier. Must be unique in the current API Management service instance.
  • attachmentID - Attachment identifier within an Issue. Must be unique in the current Issue.
  • options - APIIssueAttachmentClientGetEntityTagOptions contains the optional parameters for the APIIssueAttachmentClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiIssueAttachment.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewAPIIssueAttachmentClient().GetEntityTag(ctx, "rg1", "apimService1", "57d2ef278aa04f0888cba3f3", "57d2ef278aa04f0ad01d6cdc", "57d2ef278aa04f0888cba3f3", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*APIIssueAttachmentClient) NewListByServicePager

func (client *APIIssueAttachmentClient) NewListByServicePager(resourceGroupName string, serviceName string, apiID string, issueID string, options *APIIssueAttachmentClientListByServiceOptions) *runtime.Pager[APIIssueAttachmentClientListByServiceResponse]

NewListByServicePager - Lists all attachments for the Issue associated with the specified API.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • issueID - Issue identifier. Must be unique in the current API Management service instance.
  • options - APIIssueAttachmentClientListByServiceOptions contains the optional parameters for the APIIssueAttachmentClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiIssueAttachments.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAPIIssueAttachmentClient().NewListByServicePager("rg1", "apimService1", "57d1f7558aa04f15146d9d8a", "57d2ef278aa04f0ad01d6cdc", &armapimanagement.APIIssueAttachmentClientListByServiceOptions{Filter: nil,
	Top:  nil,
	Skip: 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.IssueAttachmentCollection = armapimanagement.IssueAttachmentCollection{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.IssueAttachmentContract{
	// 		{
	// 			Name: to.Ptr("57d2ef278aa04f0888cba3f3"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/apis/issues/attachments"),
	// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc/attachments/57d2ef278aa04f0888cba3f3"),
	// 			Properties: &armapimanagement.IssueAttachmentContractProperties{
	// 				Content: to.Ptr("https://.../image.jpg"),
	// 				ContentFormat: to.Ptr("link"),
	// 				Title: to.Ptr("Issue attachment."),
	// 			},
	// 	}},
	// }
}
Output:

type APIIssueAttachmentClientCreateOrUpdateOptions

type APIIssueAttachmentClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

APIIssueAttachmentClientCreateOrUpdateOptions contains the optional parameters for the APIIssueAttachmentClient.CreateOrUpdate method.

type APIIssueAttachmentClientCreateOrUpdateResponse

type APIIssueAttachmentClientCreateOrUpdateResponse struct {
	// Issue Attachment Contract details.
	IssueAttachmentContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIIssueAttachmentClientCreateOrUpdateResponse contains the response from method APIIssueAttachmentClient.CreateOrUpdate.

type APIIssueAttachmentClientDeleteOptions

type APIIssueAttachmentClientDeleteOptions struct {
}

APIIssueAttachmentClientDeleteOptions contains the optional parameters for the APIIssueAttachmentClient.Delete method.

type APIIssueAttachmentClientDeleteResponse

type APIIssueAttachmentClientDeleteResponse struct {
}

APIIssueAttachmentClientDeleteResponse contains the response from method APIIssueAttachmentClient.Delete.

type APIIssueAttachmentClientGetEntityTagOptions

type APIIssueAttachmentClientGetEntityTagOptions struct {
}

APIIssueAttachmentClientGetEntityTagOptions contains the optional parameters for the APIIssueAttachmentClient.GetEntityTag method.

type APIIssueAttachmentClientGetEntityTagResponse

type APIIssueAttachmentClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

APIIssueAttachmentClientGetEntityTagResponse contains the response from method APIIssueAttachmentClient.GetEntityTag.

type APIIssueAttachmentClientGetOptions

type APIIssueAttachmentClientGetOptions struct {
}

APIIssueAttachmentClientGetOptions contains the optional parameters for the APIIssueAttachmentClient.Get method.

type APIIssueAttachmentClientGetResponse

type APIIssueAttachmentClientGetResponse struct {
	// Issue Attachment Contract details.
	IssueAttachmentContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIIssueAttachmentClientGetResponse contains the response from method APIIssueAttachmentClient.Get.

type APIIssueAttachmentClientListByServiceOptions

type APIIssueAttachmentClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

APIIssueAttachmentClientListByServiceOptions contains the optional parameters for the APIIssueAttachmentClient.NewListByServicePager method.

type APIIssueAttachmentClientListByServiceResponse

type APIIssueAttachmentClientListByServiceResponse struct {
	// Paged Issue Attachment list representation.
	IssueAttachmentCollection
}

APIIssueAttachmentClientListByServiceResponse contains the response from method APIIssueAttachmentClient.NewListByServicePager.

type APIIssueClient

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

APIIssueClient contains the methods for the APIIssue group. Don't use this type directly, use NewAPIIssueClient() instead.

func NewAPIIssueClient

func NewAPIIssueClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIIssueClient, error)

NewAPIIssueClient creates a new instance of APIIssueClient 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 (*APIIssueClient) CreateOrUpdate

func (client *APIIssueClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, parameters IssueContract, options *APIIssueClientCreateOrUpdateOptions) (APIIssueClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates a new Issue for an API or updates an existing one. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • issueID - Issue identifier. Must be unique in the current API Management service instance.
  • parameters - Create parameters.
  • options - APIIssueClientCreateOrUpdateOptions contains the optional parameters for the APIIssueClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiIssue.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIIssueClient().CreateOrUpdate(ctx, "rg1", "apimService1", "57d1f7558aa04f15146d9d8a", "57d2ef278aa04f0ad01d6cdc", armapimanagement.IssueContract{
	Properties: &armapimanagement.IssueContractProperties{
		CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-01T22:21:20.467Z"); return t }()),
		State:       to.Ptr(armapimanagement.StateOpen),
		Description: to.Ptr("New API issue description"),
		Title:       to.Ptr("New API issue"),
		UserID:      to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1"),
	},
}, &armapimanagement.APIIssueClientCreateOrUpdateOptions{IfMatch: 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.IssueContract = armapimanagement.IssueContract{
// 	Name: to.Ptr("57d2ef278aa04f0ad01d6cdc"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/issues"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc"),
// 	Properties: &armapimanagement.IssueContractProperties{
// 		CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-01T22:21:20.467Z"); return t}()),
// 		State: to.Ptr(armapimanagement.StateOpen),
// 		Description: to.Ptr("New API issue description"),
// 		Title: to.Ptr("New API issue"),
// 		UserID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1"),
// 	},
// }
Output:

func (*APIIssueClient) Delete

func (client *APIIssueClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, ifMatch string, options *APIIssueClientDeleteOptions) (APIIssueClientDeleteResponse, error)

Delete - Deletes the specified Issue from an API. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • issueID - Issue identifier. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - APIIssueClientDeleteOptions contains the optional parameters for the APIIssueClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiIssue.json

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

func (*APIIssueClient) Get

func (client *APIIssueClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, options *APIIssueClientGetOptions) (APIIssueClientGetResponse, error)

Get - Gets the details of the Issue for an API specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • issueID - Issue identifier. Must be unique in the current API Management service instance.
  • options - APIIssueClientGetOptions contains the optional parameters for the APIIssueClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssue.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIIssueClient().Get(ctx, "rg1", "apimService1", "57d2ef278aa04f0888cba3f3", "57d2ef278aa04f0ad01d6cdc", &armapimanagement.APIIssueClientGetOptions{ExpandCommentsAttachments: 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.IssueContract = armapimanagement.IssueContract{
// 	Name: to.Ptr("57d2ef278aa04f0ad01d6cdc"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/issues"),
// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc"),
// 	Properties: &armapimanagement.IssueContractProperties{
// 		APIID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a"),
// 		CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-01T22:21:20.467Z"); return t}()),
// 		State: to.Ptr(armapimanagement.StateOpen),
// 		Description: to.Ptr("New API issue description"),
// 		Title: to.Ptr("New API issue"),
// 		UserID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1"),
// 	},
// }
Output:

func (*APIIssueClient) GetEntityTag

func (client *APIIssueClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, options *APIIssueClientGetEntityTagOptions) (APIIssueClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the Issue for an API specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • issueID - Issue identifier. Must be unique in the current API Management service instance.
  • options - APIIssueClientGetEntityTagOptions contains the optional parameters for the APIIssueClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiIssue.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewAPIIssueClient().GetEntityTag(ctx, "rg1", "apimService1", "57d2ef278aa04f0888cba3f3", "57d2ef278aa04f0ad01d6cdc", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*APIIssueClient) NewListByServicePager

func (client *APIIssueClient) NewListByServicePager(resourceGroupName string, serviceName string, apiID string, options *APIIssueClientListByServiceOptions) *runtime.Pager[APIIssueClientListByServiceResponse]

NewListByServicePager - Lists all issues associated with the specified API.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • options - APIIssueClientListByServiceOptions contains the optional parameters for the APIIssueClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiIssues.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAPIIssueClient().NewListByServicePager("rg1", "apimService1", "57d1f7558aa04f15146d9d8a", &armapimanagement.APIIssueClientListByServiceOptions{Filter: nil,
	ExpandCommentsAttachments: nil,
	Top:                       nil,
	Skip:                      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.IssueCollection = armapimanagement.IssueCollection{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.IssueContract{
	// 		{
	// 			Name: to.Ptr("57d2ef278aa04f0ad01d6cdc"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/apis/issues"),
	// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc"),
	// 			Properties: &armapimanagement.IssueContractProperties{
	// 				APIID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a"),
	// 				CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-01T22:21:20.467Z"); return t}()),
	// 				State: to.Ptr(armapimanagement.StateOpen),
	// 				Description: to.Ptr("New API issue description"),
	// 				Title: to.Ptr("New API issue"),
	// 				UserID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1"),
	// 			},
	// 	}},
	// }
}
Output:

func (*APIIssueClient) Update

func (client *APIIssueClient) Update(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, ifMatch string, parameters IssueUpdateContract, options *APIIssueClientUpdateOptions) (APIIssueClientUpdateResponse, error)

Update - Updates an existing issue for an API. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • issueID - Issue identifier. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - Update parameters.
  • options - APIIssueClientUpdateOptions contains the optional parameters for the APIIssueClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiIssue.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIIssueClient().Update(ctx, "rg1", "apimService1", "57d1f7558aa04f15146d9d8a", "57d2ef278aa04f0ad01d6cdc", "*", armapimanagement.IssueUpdateContract{
	Properties: &armapimanagement.IssueUpdateContractProperties{
		State: to.Ptr(armapimanagement.StateClosed),
	},
}, 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.IssueContract = armapimanagement.IssueContract{
// 	Name: to.Ptr("57d2ef278aa04f0ad01d6cdc"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/issues"),
// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc"),
// 	Properties: &armapimanagement.IssueContractProperties{
// 		APIID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a"),
// 		CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-01T22:21:20.467Z"); return t}()),
// 		State: to.Ptr(armapimanagement.StateOpen),
// 		Description: to.Ptr("New API issue description"),
// 		Title: to.Ptr("New API issue"),
// 		UserID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1"),
// 	},
// }
Output:

type APIIssueClientCreateOrUpdateOptions

type APIIssueClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

APIIssueClientCreateOrUpdateOptions contains the optional parameters for the APIIssueClient.CreateOrUpdate method.

type APIIssueClientCreateOrUpdateResponse

type APIIssueClientCreateOrUpdateResponse struct {
	// Issue Contract details.
	IssueContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIIssueClientCreateOrUpdateResponse contains the response from method APIIssueClient.CreateOrUpdate.

type APIIssueClientDeleteOptions

type APIIssueClientDeleteOptions struct {
}

APIIssueClientDeleteOptions contains the optional parameters for the APIIssueClient.Delete method.

type APIIssueClientDeleteResponse

type APIIssueClientDeleteResponse struct {
}

APIIssueClientDeleteResponse contains the response from method APIIssueClient.Delete.

type APIIssueClientGetEntityTagOptions

type APIIssueClientGetEntityTagOptions struct {
}

APIIssueClientGetEntityTagOptions contains the optional parameters for the APIIssueClient.GetEntityTag method.

type APIIssueClientGetEntityTagResponse

type APIIssueClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

APIIssueClientGetEntityTagResponse contains the response from method APIIssueClient.GetEntityTag.

type APIIssueClientGetOptions

type APIIssueClientGetOptions struct {
	// Expand the comment attachments.
	ExpandCommentsAttachments *bool
}

APIIssueClientGetOptions contains the optional parameters for the APIIssueClient.Get method.

type APIIssueClientGetResponse

type APIIssueClientGetResponse struct {
	// Issue Contract details.
	IssueContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIIssueClientGetResponse contains the response from method APIIssueClient.Get.

type APIIssueClientListByServiceOptions

type APIIssueClientListByServiceOptions struct {
	// Expand the comment attachments.
	ExpandCommentsAttachments *bool

	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | state | filter | eq | |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

APIIssueClientListByServiceOptions contains the optional parameters for the APIIssueClient.NewListByServicePager method.

type APIIssueClientListByServiceResponse

type APIIssueClientListByServiceResponse struct {
	// Paged Issue list representation.
	IssueCollection
}

APIIssueClientListByServiceResponse contains the response from method APIIssueClient.NewListByServicePager.

type APIIssueClientUpdateOptions

type APIIssueClientUpdateOptions struct {
}

APIIssueClientUpdateOptions contains the optional parameters for the APIIssueClient.Update method.

type APIIssueClientUpdateResponse

type APIIssueClientUpdateResponse struct {
	// Issue Contract details.
	IssueContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIIssueClientUpdateResponse contains the response from method APIIssueClient.Update.

type APIIssueCommentClient

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

APIIssueCommentClient contains the methods for the APIIssueComment group. Don't use this type directly, use NewAPIIssueCommentClient() instead.

func NewAPIIssueCommentClient

func NewAPIIssueCommentClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIIssueCommentClient, error)

NewAPIIssueCommentClient creates a new instance of APIIssueCommentClient 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 (*APIIssueCommentClient) CreateOrUpdate

func (client *APIIssueCommentClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, commentID string, parameters IssueCommentContract, options *APIIssueCommentClientCreateOrUpdateOptions) (APIIssueCommentClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates a new Comment for the Issue in an API or updates an existing one. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • issueID - Issue identifier. Must be unique in the current API Management service instance.
  • commentID - Comment identifier within an Issue. Must be unique in the current Issue.
  • parameters - Create parameters.
  • options - APIIssueCommentClientCreateOrUpdateOptions contains the optional parameters for the APIIssueCommentClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiIssueComment.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIIssueCommentClient().CreateOrUpdate(ctx, "rg1", "apimService1", "57d1f7558aa04f15146d9d8a", "57d2ef278aa04f0ad01d6cdc", "599e29ab193c3c0bd0b3e2fb", armapimanagement.IssueCommentContract{
	Properties: &armapimanagement.IssueCommentContractProperties{
		CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-01T22:21:20.467Z"); return t }()),
		Text:        to.Ptr("Issue comment."),
		UserID:      to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1"),
	},
}, &armapimanagement.APIIssueCommentClientCreateOrUpdateOptions{IfMatch: 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.IssueCommentContract = armapimanagement.IssueCommentContract{
// 	Name: to.Ptr("599e29ab193c3c0bd0b3e2fb"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/issues/comments"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc/comments/599e29ab193c3c0bd0b3e2fb"),
// 	Properties: &armapimanagement.IssueCommentContractProperties{
// 		CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-01T22:21:20.467Z"); return t}()),
// 		Text: to.Ptr("Issue comment."),
// 		UserID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1"),
// 	},
// }
Output:

func (*APIIssueCommentClient) Delete

func (client *APIIssueCommentClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, commentID string, ifMatch string, options *APIIssueCommentClientDeleteOptions) (APIIssueCommentClientDeleteResponse, error)

Delete - Deletes the specified comment from an Issue. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • issueID - Issue identifier. Must be unique in the current API Management service instance.
  • commentID - Comment identifier within an Issue. Must be unique in the current Issue.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - APIIssueCommentClientDeleteOptions contains the optional parameters for the APIIssueCommentClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiIssueComment.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewAPIIssueCommentClient().Delete(ctx, "rg1", "apimService1", "57d1f7558aa04f15146d9d8a", "57d2ef278aa04f0ad01d6cdc", "599e29ab193c3c0bd0b3e2fb", "*", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*APIIssueCommentClient) Get

func (client *APIIssueCommentClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, commentID string, options *APIIssueCommentClientGetOptions) (APIIssueCommentClientGetResponse, error)

Get - Gets the details of the issue Comment for an API specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • issueID - Issue identifier. Must be unique in the current API Management service instance.
  • commentID - Comment identifier within an Issue. Must be unique in the current Issue.
  • options - APIIssueCommentClientGetOptions contains the optional parameters for the APIIssueCommentClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssueComment.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIIssueCommentClient().Get(ctx, "rg1", "apimService1", "57d2ef278aa04f0888cba3f3", "57d2ef278aa04f0ad01d6cdc", "599e29ab193c3c0bd0b3e2fb", 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.IssueCommentContract = armapimanagement.IssueCommentContract{
// 	Name: to.Ptr("599e29ab193c3c0bd0b3e2fb"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/issues/comments"),
// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc/comments/599e29ab193c3c0bd0b3e2fb"),
// 	Properties: &armapimanagement.IssueCommentContractProperties{
// 		CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-01T22:21:20.467Z"); return t}()),
// 		Text: to.Ptr("Issue comment."),
// 		UserID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1"),
// 	},
// }
Output:

func (*APIIssueCommentClient) GetEntityTag

func (client *APIIssueCommentClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, commentID string, options *APIIssueCommentClientGetEntityTagOptions) (APIIssueCommentClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • issueID - Issue identifier. Must be unique in the current API Management service instance.
  • commentID - Comment identifier within an Issue. Must be unique in the current Issue.
  • options - APIIssueCommentClientGetEntityTagOptions contains the optional parameters for the APIIssueCommentClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiIssueComment.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewAPIIssueCommentClient().GetEntityTag(ctx, "rg1", "apimService1", "57d2ef278aa04f0888cba3f3", "57d2ef278aa04f0ad01d6cdc", "599e29ab193c3c0bd0b3e2fb", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*APIIssueCommentClient) NewListByServicePager

func (client *APIIssueCommentClient) NewListByServicePager(resourceGroupName string, serviceName string, apiID string, issueID string, options *APIIssueCommentClientListByServiceOptions) *runtime.Pager[APIIssueCommentClientListByServiceResponse]

NewListByServicePager - Lists all comments for the Issue associated with the specified API.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • issueID - Issue identifier. Must be unique in the current API Management service instance.
  • options - APIIssueCommentClientListByServiceOptions contains the optional parameters for the APIIssueCommentClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiIssueComments.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAPIIssueCommentClient().NewListByServicePager("rg1", "apimService1", "57d1f7558aa04f15146d9d8a", "57d2ef278aa04f0ad01d6cdc", &armapimanagement.APIIssueCommentClientListByServiceOptions{Filter: nil,
	Top:  nil,
	Skip: 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.IssueCommentCollection = armapimanagement.IssueCommentCollection{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.IssueCommentContract{
	// 		{
	// 			Name: to.Ptr("599e29ab193c3c0bd0b3e2fb"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/apis/issues/comments"),
	// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc/comments/599e29ab193c3c0bd0b3e2fb"),
	// 			Properties: &armapimanagement.IssueCommentContractProperties{
	// 				CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-01T22:21:20.467Z"); return t}()),
	// 				Text: to.Ptr("Issue comment."),
	// 				UserID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1"),
	// 			},
	// 	}},
	// }
}
Output:

type APIIssueCommentClientCreateOrUpdateOptions

type APIIssueCommentClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

APIIssueCommentClientCreateOrUpdateOptions contains the optional parameters for the APIIssueCommentClient.CreateOrUpdate method.

type APIIssueCommentClientCreateOrUpdateResponse

type APIIssueCommentClientCreateOrUpdateResponse struct {
	// Issue Comment Contract details.
	IssueCommentContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIIssueCommentClientCreateOrUpdateResponse contains the response from method APIIssueCommentClient.CreateOrUpdate.

type APIIssueCommentClientDeleteOptions

type APIIssueCommentClientDeleteOptions struct {
}

APIIssueCommentClientDeleteOptions contains the optional parameters for the APIIssueCommentClient.Delete method.

type APIIssueCommentClientDeleteResponse

type APIIssueCommentClientDeleteResponse struct {
}

APIIssueCommentClientDeleteResponse contains the response from method APIIssueCommentClient.Delete.

type APIIssueCommentClientGetEntityTagOptions

type APIIssueCommentClientGetEntityTagOptions struct {
}

APIIssueCommentClientGetEntityTagOptions contains the optional parameters for the APIIssueCommentClient.GetEntityTag method.

type APIIssueCommentClientGetEntityTagResponse

type APIIssueCommentClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

APIIssueCommentClientGetEntityTagResponse contains the response from method APIIssueCommentClient.GetEntityTag.

type APIIssueCommentClientGetOptions

type APIIssueCommentClientGetOptions struct {
}

APIIssueCommentClientGetOptions contains the optional parameters for the APIIssueCommentClient.Get method.

type APIIssueCommentClientGetResponse

type APIIssueCommentClientGetResponse struct {
	// Issue Comment Contract details.
	IssueCommentContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIIssueCommentClientGetResponse contains the response from method APIIssueCommentClient.Get.

type APIIssueCommentClientListByServiceOptions

type APIIssueCommentClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

APIIssueCommentClientListByServiceOptions contains the optional parameters for the APIIssueCommentClient.NewListByServicePager method.

type APIIssueCommentClientListByServiceResponse

type APIIssueCommentClientListByServiceResponse struct {
	// Paged Issue Comment list representation.
	IssueCommentCollection
}

APIIssueCommentClientListByServiceResponse contains the response from method APIIssueCommentClient.NewListByServicePager.

type APILicenseInformation

type APILicenseInformation struct {
	// The license name used for the API
	Name *string

	// A URL to the license used for the API. MUST be in the format of a URL
	URL *string
}

APILicenseInformation - API license information

func (APILicenseInformation) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APILicenseInformation.

func (*APILicenseInformation) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APILicenseInformation.

type APIManagementSKUCapacityScaleType

type APIManagementSKUCapacityScaleType string

APIManagementSKUCapacityScaleType - The scale type applicable to the sku.

const (
	APIManagementSKUCapacityScaleTypeAutomatic APIManagementSKUCapacityScaleType = "Automatic"
	APIManagementSKUCapacityScaleTypeManual    APIManagementSKUCapacityScaleType = "Manual"
	APIManagementSKUCapacityScaleTypeNone      APIManagementSKUCapacityScaleType = "None"
)

func PossibleAPIManagementSKUCapacityScaleTypeValues

func PossibleAPIManagementSKUCapacityScaleTypeValues() []APIManagementSKUCapacityScaleType

PossibleAPIManagementSKUCapacityScaleTypeValues returns the possible values for the APIManagementSKUCapacityScaleType const type.

type APIManagementSKURestrictionsReasonCode

type APIManagementSKURestrictionsReasonCode string

APIManagementSKURestrictionsReasonCode - The reason for restriction.

const (
	APIManagementSKURestrictionsReasonCodeNotAvailableForSubscription APIManagementSKURestrictionsReasonCode = "NotAvailableForSubscription"
	APIManagementSKURestrictionsReasonCodeQuotaID                     APIManagementSKURestrictionsReasonCode = "QuotaId"
)

func PossibleAPIManagementSKURestrictionsReasonCodeValues

func PossibleAPIManagementSKURestrictionsReasonCodeValues() []APIManagementSKURestrictionsReasonCode

PossibleAPIManagementSKURestrictionsReasonCodeValues returns the possible values for the APIManagementSKURestrictionsReasonCode const type.

type APIManagementSKURestrictionsType

type APIManagementSKURestrictionsType string

APIManagementSKURestrictionsType - The type of restrictions.

const (
	APIManagementSKURestrictionsTypeLocation APIManagementSKURestrictionsType = "Location"
	APIManagementSKURestrictionsTypeZone     APIManagementSKURestrictionsType = "Zone"
)

func PossibleAPIManagementSKURestrictionsTypeValues

func PossibleAPIManagementSKURestrictionsTypeValues() []APIManagementSKURestrictionsType

PossibleAPIManagementSKURestrictionsTypeValues returns the possible values for the APIManagementSKURestrictionsType const type.

type APIOperationClient

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

APIOperationClient contains the methods for the APIOperation group. Don't use this type directly, use NewAPIOperationClient() instead.

func NewAPIOperationClient

func NewAPIOperationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIOperationClient, error)

NewAPIOperationClient creates a new instance of APIOperationClient 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 (*APIOperationClient) CreateOrUpdate

func (client *APIOperationClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, parameters OperationContract, options *APIOperationClientCreateOrUpdateOptions) (APIOperationClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates a new operation in the API or updates an existing one. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • operationID - Operation identifier within an API. Must be unique in the current API Management service instance.
  • parameters - Create parameters.
  • options - APIOperationClientCreateOrUpdateOptions contains the optional parameters for the APIOperationClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiOperation.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIOperationClient().CreateOrUpdate(ctx, "rg1", "apimService1", "PetStoreTemplate2", "newoperations", armapimanagement.OperationContract{
	Properties: &armapimanagement.OperationContractProperties{
		Description:        to.Ptr("This can only be done by the logged in user."),
		TemplateParameters: []*armapimanagement.ParameterContract{},
		Request: &armapimanagement.RequestContract{
			Description:     to.Ptr("Created user object"),
			Headers:         []*armapimanagement.ParameterContract{},
			QueryParameters: []*armapimanagement.ParameterContract{},
			Representations: []*armapimanagement.RepresentationContract{
				{
					ContentType: to.Ptr("application/json"),
					SchemaID:    to.Ptr("592f6c1d0af5840ca8897f0c"),
					TypeName:    to.Ptr("User"),
				}},
		},
		Responses: []*armapimanagement.ResponseContract{
			{
				Description: to.Ptr("successful operation"),
				Headers:     []*armapimanagement.ParameterContract{},
				Representations: []*armapimanagement.RepresentationContract{
					{
						ContentType: to.Ptr("application/xml"),
					},
					{
						ContentType: to.Ptr("application/json"),
					}},
				StatusCode: to.Ptr[int32](200),
			}},
		Method:      to.Ptr("POST"),
		DisplayName: to.Ptr("createUser2"),
		URLTemplate: to.Ptr("/user1"),
	},
}, &armapimanagement.APIOperationClientCreateOrUpdateOptions{IfMatch: 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.OperationContract = armapimanagement.OperationContract{
// 	Name: to.Ptr("newoperations"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/operations"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/PetStoreTemplate2/operations/newoperations"),
// 	Properties: &armapimanagement.OperationContractProperties{
// 		Description: to.Ptr("This can only be done by the logged in user."),
// 		TemplateParameters: []*armapimanagement.ParameterContract{
// 		},
// 		Request: &armapimanagement.RequestContract{
// 			Description: to.Ptr("Created user object"),
// 			Headers: []*armapimanagement.ParameterContract{
// 			},
// 			QueryParameters: []*armapimanagement.ParameterContract{
// 			},
// 			Representations: []*armapimanagement.RepresentationContract{
// 				{
// 					ContentType: to.Ptr("application/json"),
// 					SchemaID: to.Ptr("592f6c1d0af5840ca8897f0c"),
// 					TypeName: to.Ptr("User"),
// 			}},
// 		},
// 		Responses: []*armapimanagement.ResponseContract{
// 			{
// 				Description: to.Ptr("successful operation"),
// 				Headers: []*armapimanagement.ParameterContract{
// 				},
// 				Representations: []*armapimanagement.RepresentationContract{
// 					{
// 						ContentType: to.Ptr("application/xml"),
// 					},
// 					{
// 						ContentType: to.Ptr("application/json"),
// 				}},
// 				StatusCode: to.Ptr[int32](200),
// 		}},
// 		Method: to.Ptr("POST"),
// 		DisplayName: to.Ptr("createUser2"),
// 		URLTemplate: to.Ptr("/user1"),
// 	},
// }
Output:

func (*APIOperationClient) Delete

func (client *APIOperationClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, ifMatch string, options *APIOperationClientDeleteOptions) (APIOperationClientDeleteResponse, error)

Delete - Deletes the specified operation in the API. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • operationID - Operation identifier within an API. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - APIOperationClientDeleteOptions contains the optional parameters for the APIOperationClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiOperation.json

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

func (*APIOperationClient) Get

func (client *APIOperationClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, options *APIOperationClientGetOptions) (APIOperationClientGetResponse, error)

Get - Gets the details of the API Operation specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • operationID - Operation identifier within an API. Must be unique in the current API Management service instance.
  • options - APIOperationClientGetOptions contains the optional parameters for the APIOperationClient.Get method.
Example (ApiManagementGetApiOperation)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperation.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIOperationClient().Get(ctx, "rg1", "apimService1", "57d2ef278aa04f0888cba3f3", "57d2ef278aa04f0ad01d6cdc", 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.OperationContract = armapimanagement.OperationContract{
// 	Name: to.Ptr("57d2ef278aa04f0ad01d6cdc"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/operations"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/operations/57d2ef278aa04f0ad01d6cdc"),
// 	Properties: &armapimanagement.OperationContractProperties{
// 		TemplateParameters: []*armapimanagement.ParameterContract{
// 		},
// 		Request: &armapimanagement.RequestContract{
// 			Description: to.Ptr("IFazioService_CancelOrder_InputMessage"),
// 			Headers: []*armapimanagement.ParameterContract{
// 			},
// 			QueryParameters: []*armapimanagement.ParameterContract{
// 			},
// 			Representations: []*armapimanagement.RepresentationContract{
// 				{
// 					ContentType: to.Ptr("text/xml"),
// 					SchemaID: to.Ptr("6980a395-f08b-4a59-8295-1440cbd909b8"),
// 					TypeName: to.Ptr("CancelOrder"),
// 			}},
// 		},
// 		Responses: []*armapimanagement.ResponseContract{
// 			{
// 				Description: to.Ptr("IFazioService_CancelOrder_OutputMessage"),
// 				Headers: []*armapimanagement.ParameterContract{
// 				},
// 				Representations: []*armapimanagement.RepresentationContract{
// 					{
// 						ContentType: to.Ptr("text/xml"),
// 						SchemaID: to.Ptr("6980a395-f08b-4a59-8295-1440cbd909b8"),
// 						TypeName: to.Ptr("CancelOrderResponse"),
// 				}},
// 				StatusCode: to.Ptr[int32](200),
// 		}},
// 		Method: to.Ptr("POST"),
// 		DisplayName: to.Ptr("CancelOrder"),
// 		URLTemplate: to.Ptr("/?soapAction=http://tempuri.org/IFazioService/CancelOrder"),
// 	},
// }
Output:

Example (ApiManagementGetApiOperationPetStore)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPetStore.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIOperationClient().Get(ctx, "rg1", "apimService1", "swagger-petstore", "loginUser", 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.OperationContract = armapimanagement.OperationContract{
// 	Name: to.Ptr("loginUser"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/operations"),
// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/swagger-petstore/operations/loginUser"),
// 	Properties: &armapimanagement.OperationContractProperties{
// 		Description: to.Ptr(""),
// 		TemplateParameters: []*armapimanagement.ParameterContract{
// 			{
// 				Name: to.Ptr("username"),
// 				Type: to.Ptr("string"),
// 				Description: to.Ptr("The user name for login"),
// 				Required: to.Ptr(true),
// 				Values: []*string{
// 				},
// 			},
// 			{
// 				Name: to.Ptr("password"),
// 				Type: to.Ptr("string"),
// 				Description: to.Ptr("The password for login in clear text"),
// 				Required: to.Ptr(true),
// 				Values: []*string{
// 				},
// 		}},
// 		Request: &armapimanagement.RequestContract{
// 			Headers: []*armapimanagement.ParameterContract{
// 			},
// 			QueryParameters: []*armapimanagement.ParameterContract{
// 			},
// 			Representations: []*armapimanagement.RepresentationContract{
// 			},
// 		},
// 		Responses: []*armapimanagement.ResponseContract{
// 			{
// 				Description: to.Ptr("successful operation"),
// 				Headers: []*armapimanagement.ParameterContract{
// 					{
// 						Name: to.Ptr("X-Rate-Limit"),
// 						Type: to.Ptr("integer"),
// 						Description: to.Ptr("calls per hour allowed by the user"),
// 						Values: []*string{
// 						},
// 					},
// 					{
// 						Name: to.Ptr("X-Expires-After"),
// 						Type: to.Ptr("string"),
// 						Description: to.Ptr("date in UTC when token expires"),
// 						Values: []*string{
// 						},
// 				}},
// 				Representations: []*armapimanagement.RepresentationContract{
// 					{
// 						ContentType: to.Ptr("application/xml"),
// 						SchemaID: to.Ptr("5ba91a35f373b513a0bf31c6"),
// 						TypeName: to.Ptr("UserLoginGet200ApplicationXmlResponse"),
// 					},
// 					{
// 						ContentType: to.Ptr("application/json"),
// 						SchemaID: to.Ptr("5ba91a35f373b513a0bf31c6"),
// 						TypeName: to.Ptr("UserLoginGet200ApplicationJsonResponse"),
// 				}},
// 				StatusCode: to.Ptr[int32](200),
// 			},
// 			{
// 				Description: to.Ptr("Invalid username/password supplied"),
// 				Headers: []*armapimanagement.ParameterContract{
// 				},
// 				Representations: []*armapimanagement.RepresentationContract{
// 					{
// 						ContentType: to.Ptr("application/xml"),
// 					},
// 					{
// 						ContentType: to.Ptr("application/json"),
// 				}},
// 				StatusCode: to.Ptr[int32](400),
// 		}},
// 		Method: to.Ptr("GET"),
// 		DisplayName: to.Ptr("Logs user into the system"),
// 		URLTemplate: to.Ptr("/user/login?username={username}&password={password}"),
// 	},
// }
Output:

func (*APIOperationClient) GetEntityTag

func (client *APIOperationClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, options *APIOperationClientGetEntityTagOptions) (APIOperationClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the API operation specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • operationID - Operation identifier within an API. Must be unique in the current API Management service instance.
  • options - APIOperationClientGetEntityTagOptions contains the optional parameters for the APIOperationClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiOperation.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewAPIOperationClient().GetEntityTag(ctx, "rg1", "apimService1", "57d2ef278aa04f0888cba3f3", "57d2ef278aa04f0ad01d6cdc", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*APIOperationClient) NewListByAPIPager

func (client *APIOperationClient) NewListByAPIPager(resourceGroupName string, serviceName string, apiID string, options *APIOperationClientListByAPIOptions) *runtime.Pager[APIOperationClientListByAPIResponse]

NewListByAPIPager - Lists a collection of the operations for the specified API.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • options - APIOperationClientListByAPIOptions contains the optional parameters for the APIOperationClient.NewListByAPIPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiOperations.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAPIOperationClient().NewListByAPIPager("rg1", "apimService1", "57d2ef278aa04f0888cba3f3", &armapimanagement.APIOperationClientListByAPIOptions{Filter: nil,
	Top:  nil,
	Skip: nil,
	Tags: 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.OperationCollection = armapimanagement.OperationCollection{
	// 	Count: to.Ptr[int64](5),
	// 	Value: []*armapimanagement.OperationContract{
	// 		{
	// 			Name: to.Ptr("57d2ef278aa04f0ad01d6cdc"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/apis/operations"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/operations/57d2ef278aa04f0ad01d6cdc"),
	// 			Properties: &armapimanagement.OperationContractProperties{
	// 				Method: to.Ptr("POST"),
	// 				DisplayName: to.Ptr("CancelOrder"),
	// 				URLTemplate: to.Ptr("/?soapAction=http://tempuri.org/IFazioService/CancelOrder"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("57d2ef278aa04f0ad01d6cda"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/apis/operations"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/operations/57d2ef278aa04f0ad01d6cda"),
	// 			Properties: &armapimanagement.OperationContractProperties{
	// 				Method: to.Ptr("POST"),
	// 				DisplayName: to.Ptr("GetMostRecentOrder"),
	// 				URLTemplate: to.Ptr("/?soapAction=http://tempuri.org/IFazioService/GetMostRecentOrder"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("57d2ef278aa04f0ad01d6cd9"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/apis/operations"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/operations/57d2ef278aa04f0ad01d6cd9"),
	// 			Properties: &armapimanagement.OperationContractProperties{
	// 				Method: to.Ptr("POST"),
	// 				DisplayName: to.Ptr("GetOpenOrders"),
	// 				URLTemplate: to.Ptr("/?soapAction=http://tempuri.org/IFazioService/GetOpenOrders"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("57d2ef278aa04f0ad01d6cdb"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/apis/operations"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/operations/57d2ef278aa04f0ad01d6cdb"),
	// 			Properties: &armapimanagement.OperationContractProperties{
	// 				Method: to.Ptr("POST"),
	// 				DisplayName: to.Ptr("GetOrder"),
	// 				URLTemplate: to.Ptr("/?soapAction=http://tempuri.org/IFazioService/GetOrder"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("57d2ef278aa04f0ad01d6cd8"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/apis/operations"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/operations/57d2ef278aa04f0ad01d6cd8"),
	// 			Properties: &armapimanagement.OperationContractProperties{
	// 				Method: to.Ptr("POST"),
	// 				DisplayName: to.Ptr("submitOrder"),
	// 				URLTemplate: to.Ptr("/?soapAction=http://tempuri.org/IFazioService/submitOrder"),
	// 			},
	// 	}},
	// }
}
Output:

func (*APIOperationClient) Update

func (client *APIOperationClient) Update(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, ifMatch string, parameters OperationUpdateContract, options *APIOperationClientUpdateOptions) (APIOperationClientUpdateResponse, error)

Update - Updates the details of the operation in the API specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • operationID - Operation identifier within an API. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - API Operation Update parameters.
  • options - APIOperationClientUpdateOptions contains the optional parameters for the APIOperationClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiOperation.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIOperationClient().Update(ctx, "rg1", "apimService1", "echo-api", "operationId", "*", armapimanagement.OperationUpdateContract{
	Properties: &armapimanagement.OperationUpdateContractProperties{
		TemplateParameters: []*armapimanagement.ParameterContract{},
		Request: &armapimanagement.RequestContract{
			QueryParameters: []*armapimanagement.ParameterContract{
				{
					Name:         to.Ptr("param1"),
					Type:         to.Ptr("string"),
					Description:  to.Ptr("A sample parameter that is required and has a default value of \"sample\"."),
					DefaultValue: to.Ptr("sample"),
					Required:     to.Ptr(true),
					Values: []*string{
						to.Ptr("sample")},
				}},
		},
		Responses: []*armapimanagement.ResponseContract{
			{
				Description:     to.Ptr("Returned in all cases."),
				Headers:         []*armapimanagement.ParameterContract{},
				Representations: []*armapimanagement.RepresentationContract{},
				StatusCode:      to.Ptr[int32](200),
			},
			{
				Description:     to.Ptr("Server Error."),
				Headers:         []*armapimanagement.ParameterContract{},
				Representations: []*armapimanagement.RepresentationContract{},
				StatusCode:      to.Ptr[int32](500),
			}},
		Method:      to.Ptr("GET"),
		DisplayName: to.Ptr("Retrieve resource"),
		URLTemplate: to.Ptr("/resource"),
	},
}, 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.OperationContract = armapimanagement.OperationContract{
// 	Name: to.Ptr("57d2ef278aa04f0ad01d6cdc"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/operations"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/operations/57d2ef278aa04f0ad01d6cdc"),
// 	Properties: &armapimanagement.OperationContractProperties{
// 		TemplateParameters: []*armapimanagement.ParameterContract{
// 		},
// 		Request: &armapimanagement.RequestContract{
// 			Description: to.Ptr("IFazioService_CancelOrder_InputMessage"),
// 			Headers: []*armapimanagement.ParameterContract{
// 			},
// 			QueryParameters: []*armapimanagement.ParameterContract{
// 			},
// 			Representations: []*armapimanagement.RepresentationContract{
// 				{
// 					ContentType: to.Ptr("text/xml"),
// 					SchemaID: to.Ptr("6980a395-f08b-4a59-8295-1440cbd909b8"),
// 					TypeName: to.Ptr("CancelOrder"),
// 			}},
// 		},
// 		Responses: []*armapimanagement.ResponseContract{
// 			{
// 				Description: to.Ptr("IFazioService_CancelOrder_OutputMessage"),
// 				Headers: []*armapimanagement.ParameterContract{
// 				},
// 				Representations: []*armapimanagement.RepresentationContract{
// 					{
// 						ContentType: to.Ptr("text/xml"),
// 						SchemaID: to.Ptr("6980a395-f08b-4a59-8295-1440cbd909b8"),
// 						TypeName: to.Ptr("CancelOrderResponse"),
// 				}},
// 				StatusCode: to.Ptr[int32](200),
// 		}},
// 		Method: to.Ptr("POST"),
// 		DisplayName: to.Ptr("CancelOrder"),
// 		URLTemplate: to.Ptr("/?soapAction=http://tempuri.org/IFazioService/CancelOrder"),
// 	},
// }
Output:

type APIOperationClientCreateOrUpdateOptions

type APIOperationClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

APIOperationClientCreateOrUpdateOptions contains the optional parameters for the APIOperationClient.CreateOrUpdate method.

type APIOperationClientCreateOrUpdateResponse

type APIOperationClientCreateOrUpdateResponse struct {
	// API Operation details.
	OperationContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIOperationClientCreateOrUpdateResponse contains the response from method APIOperationClient.CreateOrUpdate.

type APIOperationClientDeleteOptions

type APIOperationClientDeleteOptions struct {
}

APIOperationClientDeleteOptions contains the optional parameters for the APIOperationClient.Delete method.

type APIOperationClientDeleteResponse

type APIOperationClientDeleteResponse struct {
}

APIOperationClientDeleteResponse contains the response from method APIOperationClient.Delete.

type APIOperationClientGetEntityTagOptions

type APIOperationClientGetEntityTagOptions struct {
}

APIOperationClientGetEntityTagOptions contains the optional parameters for the APIOperationClient.GetEntityTag method.

type APIOperationClientGetEntityTagResponse

type APIOperationClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

APIOperationClientGetEntityTagResponse contains the response from method APIOperationClient.GetEntityTag.

type APIOperationClientGetOptions

type APIOperationClientGetOptions struct {
}

APIOperationClientGetOptions contains the optional parameters for the APIOperationClient.Get method.

type APIOperationClientGetResponse

type APIOperationClientGetResponse struct {
	// API Operation details.
	OperationContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIOperationClientGetResponse contains the response from method APIOperationClient.Get.

type APIOperationClientListByAPIOptions

type APIOperationClientListByAPIOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Include tags in the response.
	Tags *string

	// Number of records to return.
	Top *int32
}

APIOperationClientListByAPIOptions contains the optional parameters for the APIOperationClient.NewListByAPIPager method.

type APIOperationClientListByAPIResponse

type APIOperationClientListByAPIResponse struct {
	// Paged Operation list representation.
	OperationCollection
}

APIOperationClientListByAPIResponse contains the response from method APIOperationClient.NewListByAPIPager.

type APIOperationClientUpdateOptions

type APIOperationClientUpdateOptions struct {
}

APIOperationClientUpdateOptions contains the optional parameters for the APIOperationClient.Update method.

type APIOperationClientUpdateResponse

type APIOperationClientUpdateResponse struct {
	// API Operation details.
	OperationContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIOperationClientUpdateResponse contains the response from method APIOperationClient.Update.

type APIOperationPolicyClient

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

APIOperationPolicyClient contains the methods for the APIOperationPolicy group. Don't use this type directly, use NewAPIOperationPolicyClient() instead.

func NewAPIOperationPolicyClient

func NewAPIOperationPolicyClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIOperationPolicyClient, error)

NewAPIOperationPolicyClient creates a new instance of APIOperationPolicyClient 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 (*APIOperationPolicyClient) CreateOrUpdate

func (client *APIOperationPolicyClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, policyID PolicyIDName, parameters PolicyContract, options *APIOperationPolicyClientCreateOrUpdateOptions) (APIOperationPolicyClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates policy configuration for the API Operation level. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • operationID - Operation identifier within an API. Must be unique in the current API Management service instance.
  • policyID - The identifier of the Policy.
  • parameters - The policy contents to apply.
  • options - APIOperationPolicyClientCreateOrUpdateOptions contains the optional parameters for the APIOperationPolicyClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiOperationPolicy.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIOperationPolicyClient().CreateOrUpdate(ctx, "rg1", "apimService1", "5600b57e7e8880006a040001", "5600b57e7e8880006a080001", armapimanagement.PolicyIDNamePolicy, armapimanagement.PolicyContract{
	Properties: &armapimanagement.PolicyContractProperties{
		Format: to.Ptr(armapimanagement.PolicyContentFormatXML),
		Value:  to.Ptr("<policies> <inbound /> <backend>    <forward-request />  </backend>  <outbound /></policies>"),
	},
}, &armapimanagement.APIOperationPolicyClientCreateOrUpdateOptions{IfMatch: to.Ptr("*")})
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.PolicyContract = armapimanagement.PolicyContract{
// 	Name: to.Ptr("policy"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/operations/policies"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5600b57e7e8880006a040001/operations/5600b57e7e8880006a080001/policies/policy"),
// 	Properties: &armapimanagement.PolicyContractProperties{
// 		Value: to.Ptr("<policies>\r\n  <inbound />\r\n  <backend>\r\n    <forward-request />\r\n  </backend>\r\n  <outbound />\r\n</policies>"),
// 	},
// }
Output:

func (*APIOperationPolicyClient) Delete

func (client *APIOperationPolicyClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, policyID PolicyIDName, ifMatch string, options *APIOperationPolicyClientDeleteOptions) (APIOperationPolicyClientDeleteResponse, error)

Delete - Deletes the policy configuration at the Api Operation. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • operationID - Operation identifier within an API. Must be unique in the current API Management service instance.
  • policyID - The identifier of the Policy.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - APIOperationPolicyClientDeleteOptions contains the optional parameters for the APIOperationPolicyClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiOperationPolicy.json

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

func (*APIOperationPolicyClient) Get

func (client *APIOperationPolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, policyID PolicyIDName, options *APIOperationPolicyClientGetOptions) (APIOperationPolicyClientGetResponse, error)

Get - Get the policy configuration at the API Operation level. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • operationID - Operation identifier within an API. Must be unique in the current API Management service instance.
  • policyID - The identifier of the Policy.
  • options - APIOperationPolicyClientGetOptions contains the optional parameters for the APIOperationPolicyClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPolicy.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIOperationPolicyClient().Get(ctx, "rg1", "apimService1", "5600b539c53f5b0062040001", "5600b53ac53f5b0062080006", armapimanagement.PolicyIDNamePolicy, &armapimanagement.APIOperationPolicyClientGetOptions{Format: 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.PolicyContract = armapimanagement.PolicyContract{
// 	Name: to.Ptr("policy"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/operations/policies"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5600b539c53f5b0062040001/operations/5600b53ac53f5b0062080006/policies/policy"),
// 	Properties: &armapimanagement.PolicyContractProperties{
// 		Value: to.Ptr("<policies>\r\n  <inbound>\r\n    <base />\r\n  </inbound>\r\n  <backend>\r\n    <base />\r\n  </backend>\r\n  <outbound>\r\n    <base />\r\n    <set-header name=\"X-My-Sample\" exists-action=\"override\">\r\n      <value>This is a sample</value>\r\n      <!-- for multiple headers with the same name add additional value elements -->\r\n    </set-header>\r\n    <jsonp callback-parameter-name=\"ProcessResponse\" />\r\n  </outbound>\r\n</policies>"),
// 	},
// }
Output:

func (*APIOperationPolicyClient) GetEntityTag

func (client *APIOperationPolicyClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, policyID PolicyIDName, options *APIOperationPolicyClientGetEntityTagOptions) (APIOperationPolicyClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the API operation policy specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • operationID - Operation identifier within an API. Must be unique in the current API Management service instance.
  • policyID - The identifier of the Policy.
  • options - APIOperationPolicyClientGetEntityTagOptions contains the optional parameters for the APIOperationPolicyClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiOperationPolicy.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewAPIOperationPolicyClient().GetEntityTag(ctx, "rg1", "apimService1", "5600b539c53f5b0062040001", "5600b53ac53f5b0062080006", armapimanagement.PolicyIDNamePolicy, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*APIOperationPolicyClient) ListByOperation

func (client *APIOperationPolicyClient) ListByOperation(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, options *APIOperationPolicyClientListByOperationOptions) (APIOperationPolicyClientListByOperationResponse, error)

ListByOperation - Get the list of policy configuration at the API Operation level. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • operationID - Operation identifier within an API. Must be unique in the current API Management service instance.
  • options - APIOperationPolicyClientListByOperationOptions contains the optional parameters for the APIOperationPolicyClient.ListByOperation method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiOperationPolicies.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIOperationPolicyClient().ListByOperation(ctx, "rg1", "apimService1", "599e2953193c3c0bd0b3e2fa", "599e29ab193c3c0bd0b3e2fb", 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.PolicyCollection = armapimanagement.PolicyCollection{
// 	Count: to.Ptr[int64](1),
// 	Value: []*armapimanagement.PolicyContract{
// 		{
// 			Name: to.Ptr("policy"),
// 			Type: to.Ptr("Microsoft.ApiManagement/service/apis/operations/policies"),
// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/599e2953193c3c0bd0b3e2fa/operations/599e29ab193c3c0bd0b3e2fb/policies/policy"),
// 			Properties: &armapimanagement.PolicyContractProperties{
// 				Value: to.Ptr("<!--\r\n    IMPORTANT:\r\n    - Policy elements can appear only within the <inbound>, <outbound>, <backend> section elements.\r\n    - Only the <forward-request> policy element can appear within the <backend> section element.\r\n    - To apply a policy to the incoming request (before it is forwarded to the backend service), place a corresponding policy element within the <inbound> section element.\r\n    - To apply a policy to the outgoing response (before it is sent back to the caller), place a corresponding policy element within the <outbound> section element.\r\n    - To add a policy position the cursor at the desired insertion point and click on the round button associated with the policy.\r\n    - To remove a policy, delete the corresponding policy statement from the policy document.\r\n    - Position the <base> element within a section element to inherit all policies from the corresponding section element in the enclosing scope.\r\n    - Remove the <base> element to prevent inheriting policies from the corresponding section element in the enclosing scope.\r\n    - Policies are applied in the order of their appearance, from the top down.\r\n-->\r\n<policies>\r\n  <inbound>\r\n    <validate-jwt header-name=\"dd\">\r\n      <required-claims>\r\n        <claim name=\"bla\" separator=\"\">\r\n          <value>xxx</value>\r\n        </claim>\r\n      </required-claims>\r\n    </validate-jwt>\r\n    <base />\r\n  </inbound>\r\n  <backend>\r\n    <base />\r\n  </backend>\r\n  <outbound>\r\n    <base />\r\n  </outbound>\r\n</policies>"),
// 			},
// 	}},
// }
Output:

type APIOperationPolicyClientCreateOrUpdateOptions

type APIOperationPolicyClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

APIOperationPolicyClientCreateOrUpdateOptions contains the optional parameters for the APIOperationPolicyClient.CreateOrUpdate method.

type APIOperationPolicyClientCreateOrUpdateResponse

type APIOperationPolicyClientCreateOrUpdateResponse struct {
	// Policy Contract details.
	PolicyContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIOperationPolicyClientCreateOrUpdateResponse contains the response from method APIOperationPolicyClient.CreateOrUpdate.

type APIOperationPolicyClientDeleteOptions

type APIOperationPolicyClientDeleteOptions struct {
}

APIOperationPolicyClientDeleteOptions contains the optional parameters for the APIOperationPolicyClient.Delete method.

type APIOperationPolicyClientDeleteResponse

type APIOperationPolicyClientDeleteResponse struct {
}

APIOperationPolicyClientDeleteResponse contains the response from method APIOperationPolicyClient.Delete.

type APIOperationPolicyClientGetEntityTagOptions

type APIOperationPolicyClientGetEntityTagOptions struct {
}

APIOperationPolicyClientGetEntityTagOptions contains the optional parameters for the APIOperationPolicyClient.GetEntityTag method.

type APIOperationPolicyClientGetEntityTagResponse

type APIOperationPolicyClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

APIOperationPolicyClientGetEntityTagResponse contains the response from method APIOperationPolicyClient.GetEntityTag.

type APIOperationPolicyClientGetOptions

type APIOperationPolicyClientGetOptions struct {
	// Policy Export Format.
	Format *PolicyExportFormat
}

APIOperationPolicyClientGetOptions contains the optional parameters for the APIOperationPolicyClient.Get method.

type APIOperationPolicyClientGetResponse

type APIOperationPolicyClientGetResponse struct {
	// Policy Contract details.
	PolicyContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIOperationPolicyClientGetResponse contains the response from method APIOperationPolicyClient.Get.

type APIOperationPolicyClientListByOperationOptions

type APIOperationPolicyClientListByOperationOptions struct {
}

APIOperationPolicyClientListByOperationOptions contains the optional parameters for the APIOperationPolicyClient.ListByOperation method.

type APIOperationPolicyClientListByOperationResponse

type APIOperationPolicyClientListByOperationResponse struct {
	// The response of the list policy operation.
	PolicyCollection
}

APIOperationPolicyClientListByOperationResponse contains the response from method APIOperationPolicyClient.ListByOperation.

type APIPolicyClient

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

APIPolicyClient contains the methods for the APIPolicy group. Don't use this type directly, use NewAPIPolicyClient() instead.

func NewAPIPolicyClient

func NewAPIPolicyClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIPolicyClient, error)

NewAPIPolicyClient creates a new instance of APIPolicyClient 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 (*APIPolicyClient) CreateOrUpdate

func (client *APIPolicyClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, policyID PolicyIDName, parameters PolicyContract, options *APIPolicyClientCreateOrUpdateOptions) (APIPolicyClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates policy configuration for the API. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • policyID - The identifier of the Policy.
  • parameters - The policy contents to apply.
  • options - APIPolicyClientCreateOrUpdateOptions contains the optional parameters for the APIPolicyClient.CreateOrUpdate method.
Example (ApiManagementCreateApiPolicy)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiPolicy.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIPolicyClient().CreateOrUpdate(ctx, "rg1", "apimService1", "5600b57e7e8880006a040001", armapimanagement.PolicyIDNamePolicy, armapimanagement.PolicyContract{
	Properties: &armapimanagement.PolicyContractProperties{
		Format: to.Ptr(armapimanagement.PolicyContentFormatXML),
		Value:  to.Ptr("<policies> <inbound /> <backend>    <forward-request />  </backend>  <outbound /></policies>"),
	},
}, &armapimanagement.APIPolicyClientCreateOrUpdateOptions{IfMatch: to.Ptr("*")})
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.PolicyContract = armapimanagement.PolicyContract{
// 	Name: to.Ptr("policy"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/policies"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5600b57e7e8880006a040001/policies/policy"),
// 	Properties: &armapimanagement.PolicyContractProperties{
// 		Value: to.Ptr("<policies>\r\n  <inbound />\r\n  <backend>\r\n    <forward-request />\r\n  </backend>\r\n  <outbound />\r\n</policies>"),
// 	},
// }
Output:

Example (ApiManagementCreateApiPolicyNonXmlEncoded)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiPolicyNonXmlEncoded.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIPolicyClient().CreateOrUpdate(ctx, "rg1", "apimService1", "5600b57e7e8880006a040001", armapimanagement.PolicyIDNamePolicy, armapimanagement.PolicyContract{
	Properties: &armapimanagement.PolicyContractProperties{
		Format: to.Ptr(armapimanagement.PolicyContentFormatRawxml),
		Value:  to.Ptr("<policies>\r\n     <inbound>\r\n     <base />\r\n  <set-header name=\"newvalue\" exists-action=\"override\">\r\n   <value>\"@(context.Request.Headers.FirstOrDefault(h => h.Ke==\"Via\"))\" </value>\r\n    </set-header>\r\n  </inbound>\r\n      </policies>"),
	},
}, &armapimanagement.APIPolicyClientCreateOrUpdateOptions{IfMatch: to.Ptr("*")})
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.PolicyContract = armapimanagement.PolicyContract{
// 	Name: to.Ptr("policy"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/operations/policies"),
// 	ID: to.Ptr("/subscriptions/4c1a3bc6-89f9-46fe-a175-5d8984b25095/resourcegroups/Api-DF-West-US/providers/Microsoft.ApiManagement/service/samirmsiservice2/apis/echo-api/operations/create-resource/policies/policy"),
// 	Properties: &armapimanagement.PolicyContractProperties{
// 		Value: to.Ptr("<policies>\r\n  <inbound>\r\n    <base />\r\n    <set-header name=\"newvalue\" exists-action=\"override\">\r\n      <value>\"@(context.Request.Headers.FirstOrDefault(h =&gt; h.Ke==\"Via\"))\" </value>\r\n    </set-header>\r\n  </inbound>\r\n</policies>"),
// 	},
// }
Output:

func (*APIPolicyClient) Delete

func (client *APIPolicyClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, policyID PolicyIDName, ifMatch string, options *APIPolicyClientDeleteOptions) (APIPolicyClientDeleteResponse, error)

Delete - Deletes the policy configuration at the Api. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • policyID - The identifier of the Policy.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - APIPolicyClientDeleteOptions contains the optional parameters for the APIPolicyClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiPolicy.json

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

func (*APIPolicyClient) Get

func (client *APIPolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, policyID PolicyIDName, options *APIPolicyClientGetOptions) (APIPolicyClientGetResponse, error)

Get - Get the policy configuration at the API level. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • policyID - The identifier of the Policy.
  • options - APIPolicyClientGetOptions contains the optional parameters for the APIPolicyClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiPolicy.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIPolicyClient().Get(ctx, "rg1", "apimService1", "5600b59475ff190048040001", armapimanagement.PolicyIDNamePolicy, &armapimanagement.APIPolicyClientGetOptions{Format: 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.PolicyContract = armapimanagement.PolicyContract{
// 	Name: to.Ptr("policy"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/policies"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5600b59475ff190048040001/policies/policy"),
// 	Properties: &armapimanagement.PolicyContractProperties{
// 		Value: to.Ptr("<!--\r\n    IMPORTANT:\r\n    - Policy elements can appear only within the <inbound>, <outbound>, <backend> section elements.\r\n    - Only the <forward-request> policy element can appear within the <backend> section element.\r\n    - To apply a policy to the incoming request (before it is forwarded to the backend service), place a corresponding policy element within the <inbound> section element.\r\n    - To apply a policy to the outgoing response (before it is sent back to the caller), place a corresponding policy element within the <outbound> section element.\r\n    - To add a policy position the cursor at the desired insertion point and click on the round button associated with the policy.\r\n    - To remove a policy, delete the corresponding policy statement from the policy document.\r\n    - Position the <base> element within a section element to inherit all policies from the corresponding section element in the enclosing scope.\r\n    - Remove the <base> element to prevent inheriting policies from the corresponding section element in the enclosing scope.\r\n    - Policies are applied in the order of their appearance, from the top down.\r\n-->\r\n<policies>\r\n  <inbound>\r\n    <quota-by-key calls=\"5\" bandwidth=\"2\" renewal-period=\"&#x9;P3Y6M4DT12H30M5S\" counter-key=\"ba\" />\r\n    <base />\r\n  </inbound>\r\n  <backend>\r\n    <base />\r\n  </backend>\r\n  <outbound>\r\n    <log-to-eventhub logger-id=\"apimService1\" partition-key=\"@(context.Subscription.Id)\">\r\n@{\r\n	Random Random = new Random();\r\n				const string Chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz \";                \r\n                return string.Join(\",\", DateTime.UtcNow, new string(\r\n                    Enumerable.Repeat(Chars, Random.Next(2150400))\r\n                              .Select(s =&gt; s[Random.Next(s.Length)])\r\n                              .ToArray()));\r\n          }                           \r\n                        </log-to-eventhub>\r\n    <base />\r\n  </outbound>\r\n</policies>"),
// 	},
// }
Output:

func (*APIPolicyClient) GetEntityTag

func (client *APIPolicyClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiID string, policyID PolicyIDName, options *APIPolicyClientGetEntityTagOptions) (APIPolicyClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the API policy specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • policyID - The identifier of the Policy.
  • options - APIPolicyClientGetEntityTagOptions contains the optional parameters for the APIPolicyClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiPolicy.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewAPIPolicyClient().GetEntityTag(ctx, "rg1", "apimService1", "57d1f7558aa04f15146d9d8a", armapimanagement.PolicyIDNamePolicy, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*APIPolicyClient) ListByAPI

func (client *APIPolicyClient) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiID string, options *APIPolicyClientListByAPIOptions) (APIPolicyClientListByAPIResponse, error)

ListByAPI - Get the policy configuration at the API level. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • options - APIPolicyClientListByAPIOptions contains the optional parameters for the APIPolicyClient.ListByAPI method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiPolicies.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIPolicyClient().ListByAPI(ctx, "rg1", "apimService1", "5600b59475ff190048040001", 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.PolicyCollection = armapimanagement.PolicyCollection{
// 	Count: to.Ptr[int64](1),
// 	Value: []*armapimanagement.PolicyContract{
// 		{
// 			Name: to.Ptr("policy"),
// 			Type: to.Ptr("Microsoft.ApiManagement/service/apis/policies"),
// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5600b59475ff190048040001/policies/policy"),
// 			Properties: &armapimanagement.PolicyContractProperties{
// 				Value: to.Ptr("<!--\r\n    IMPORTANT:\r\n    - Policy elements can appear only within the <inbound>, <outbound>, <backend> section elements.\r\n    - Only the <forward-request> policy element can appear within the <backend> section element.\r\n    - To apply a policy to the incoming request (before it is forwarded to the backend service), place a corresponding policy element within the <inbound> section element.\r\n    - To apply a policy to the outgoing response (before it is sent back to the caller), place a corresponding policy element within the <outbound> section element.\r\n    - To add a policy position the cursor at the desired insertion point and click on the round button associated with the policy.\r\n    - To remove a policy, delete the corresponding policy statement from the policy document.\r\n    - Position the <base> element within a section element to inherit all policies from the corresponding section element in the enclosing scope.\r\n    - Remove the <base> element to prevent inheriting policies from the corresponding section element in the enclosing scope.\r\n    - Policies are applied in the order of their appearance, from the top down.\r\n-->\r\n<policies>\r\n  <inbound>\r\n    <quota-by-key calls=\"5\" bandwidth=\"2\" renewal-period=\"&#x9;P3Y6M4DT12H30M5S\" counter-key=\"ba\" />\r\n    <base />\r\n  </inbound>\r\n  <backend>\r\n    <base />\r\n  </backend>\r\n  <outbound>\r\n    <log-to-eventhub logger-id=\"apimService1\" partition-key=\"@(context.Subscription.Id)\">\r\n@{\r\n	Random Random = new Random();\r\n				const string Chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz \";                \r\n                return string.Join(\",\", DateTime.UtcNow, new string(\r\n                    Enumerable.Repeat(Chars, Random.Next(2150400))\r\n                              .Select(s =&gt; s[Random.Next(s.Length)])\r\n                              .ToArray()));\r\n          }                           \r\n                        </log-to-eventhub>\r\n    <base />\r\n  </outbound>\r\n</policies>"),
// 			},
// 	}},
// }
Output:

type APIPolicyClientCreateOrUpdateOptions

type APIPolicyClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

APIPolicyClientCreateOrUpdateOptions contains the optional parameters for the APIPolicyClient.CreateOrUpdate method.

type APIPolicyClientCreateOrUpdateResponse

type APIPolicyClientCreateOrUpdateResponse struct {
	// Policy Contract details.
	PolicyContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIPolicyClientCreateOrUpdateResponse contains the response from method APIPolicyClient.CreateOrUpdate.

type APIPolicyClientDeleteOptions

type APIPolicyClientDeleteOptions struct {
}

APIPolicyClientDeleteOptions contains the optional parameters for the APIPolicyClient.Delete method.

type APIPolicyClientDeleteResponse

type APIPolicyClientDeleteResponse struct {
}

APIPolicyClientDeleteResponse contains the response from method APIPolicyClient.Delete.

type APIPolicyClientGetEntityTagOptions

type APIPolicyClientGetEntityTagOptions struct {
}

APIPolicyClientGetEntityTagOptions contains the optional parameters for the APIPolicyClient.GetEntityTag method.

type APIPolicyClientGetEntityTagResponse

type APIPolicyClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

APIPolicyClientGetEntityTagResponse contains the response from method APIPolicyClient.GetEntityTag.

type APIPolicyClientGetOptions

type APIPolicyClientGetOptions struct {
	// Policy Export Format.
	Format *PolicyExportFormat
}

APIPolicyClientGetOptions contains the optional parameters for the APIPolicyClient.Get method.

type APIPolicyClientGetResponse

type APIPolicyClientGetResponse struct {
	// Policy Contract details.
	PolicyContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIPolicyClientGetResponse contains the response from method APIPolicyClient.Get.

type APIPolicyClientListByAPIOptions

type APIPolicyClientListByAPIOptions struct {
}

APIPolicyClientListByAPIOptions contains the optional parameters for the APIPolicyClient.ListByAPI method.

type APIPolicyClientListByAPIResponse

type APIPolicyClientListByAPIResponse struct {
	// The response of the list policy operation.
	PolicyCollection
}

APIPolicyClientListByAPIResponse contains the response from method APIPolicyClient.ListByAPI.

type APIProductClient

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

APIProductClient contains the methods for the APIProduct group. Don't use this type directly, use NewAPIProductClient() instead.

func NewAPIProductClient

func NewAPIProductClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIProductClient, error)

NewAPIProductClient creates a new instance of APIProductClient 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 (*APIProductClient) NewListByApisPager

func (client *APIProductClient) NewListByApisPager(resourceGroupName string, serviceName string, apiID string, options *APIProductClientListByApisOptions) *runtime.Pager[APIProductClientListByApisResponse]

NewListByApisPager - Lists all Products, which the API is part of.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • options - APIProductClientListByApisOptions contains the optional parameters for the APIProductClient.NewListByApisPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiProducts.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAPIProductClient().NewListByApisPager("rg1", "apimService1", "57d2ef278aa04f0888cba3f3", &armapimanagement.APIProductClientListByApisOptions{Filter: nil,
	Top:  nil,
	Skip: 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.ProductCollection = armapimanagement.ProductCollection{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.ProductContract{
	// 		{
	// 			Name: to.Ptr("5600b539c53f5b0062060002"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/apis/products"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b539c53f5b0062060002"),
	// 			Properties: &armapimanagement.ProductContractProperties{
	// 				Description: to.Ptr("Subscribers have completely unlimited access to the API. Administrator approval is required."),
	// 				ApprovalRequired: to.Ptr(true),
	// 				State: to.Ptr(armapimanagement.ProductStatePublished),
	// 				SubscriptionRequired: to.Ptr(true),
	// 				SubscriptionsLimit: to.Ptr[int32](1),
	// 				DisplayName: to.Ptr("Unlimited"),
	// 			},
	// 	}},
	// }
}
Output:

type APIProductClientListByApisOptions

type APIProductClientListByApisOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

APIProductClientListByApisOptions contains the optional parameters for the APIProductClient.NewListByApisPager method.

type APIProductClientListByApisResponse

type APIProductClientListByApisResponse struct {
	// Paged Products list representation.
	ProductCollection
}

APIProductClientListByApisResponse contains the response from method APIProductClient.NewListByApisPager.

type APIReleaseClient

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

APIReleaseClient contains the methods for the APIRelease group. Don't use this type directly, use NewAPIReleaseClient() instead.

func NewAPIReleaseClient

func NewAPIReleaseClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIReleaseClient, error)

NewAPIReleaseClient creates a new instance of APIReleaseClient 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 (*APIReleaseClient) CreateOrUpdate

func (client *APIReleaseClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, releaseID string, parameters APIReleaseContract, options *APIReleaseClientCreateOrUpdateOptions) (APIReleaseClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates a new Release for the API. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • releaseID - Release identifier within an API. Must be unique in the current API Management service instance.
  • parameters - Create parameters.
  • options - APIReleaseClientCreateOrUpdateOptions contains the optional parameters for the APIReleaseClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiRelease.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIReleaseClient().CreateOrUpdate(ctx, "rg1", "apimService1", "a1", "testrev", armapimanagement.APIReleaseContract{
	Properties: &armapimanagement.APIReleaseContractProperties{
		APIID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1"),
		Notes: to.Ptr("yahooagain"),
	},
}, &armapimanagement.APIReleaseClientCreateOrUpdateOptions{IfMatch: 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.APIReleaseContract = armapimanagement.APIReleaseContract{
// 	Name: to.Ptr("testrev"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/releases"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1/releases/testrev"),
// 	Properties: &armapimanagement.APIReleaseContractProperties{
// 		APIID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1"),
// 		CreatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-08T20:52:00.650Z"); return t}()),
// 		Notes: to.Ptr("yahooagain"),
// 		UpdatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-08T20:52:00.650Z"); return t}()),
// 	},
// }
Output:

func (*APIReleaseClient) Delete

func (client *APIReleaseClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, releaseID string, ifMatch string, options *APIReleaseClientDeleteOptions) (APIReleaseClientDeleteResponse, error)

Delete - Deletes the specified release in the API. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • releaseID - Release identifier within an API. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - APIReleaseClientDeleteOptions contains the optional parameters for the APIReleaseClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiRelease.json

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

func (*APIReleaseClient) Get

func (client *APIReleaseClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, releaseID string, options *APIReleaseClientGetOptions) (APIReleaseClientGetResponse, error)

Get - Returns the details of an API release. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • releaseID - Release identifier within an API. Must be unique in the current API Management service instance.
  • options - APIReleaseClientGetOptions contains the optional parameters for the APIReleaseClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiRelease.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIReleaseClient().Get(ctx, "rg1", "apimService1", "a1", "5a7cb545298324c53224a799", 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.APIReleaseContract = armapimanagement.APIReleaseContract{
// 	Name: to.Ptr("5a7cb545298324c53224a799"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/releases"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1/releases/5a7cb545298324c53224a799"),
// 	Properties: &armapimanagement.APIReleaseContractProperties{
// 		APIID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1"),
// 		CreatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-08T20:38:29.173Z"); return t}()),
// 		Notes: to.Ptr("yahoo"),
// 		UpdatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-08T20:38:29.173Z"); return t}()),
// 	},
// }
Output:

func (*APIReleaseClient) GetEntityTag

func (client *APIReleaseClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiID string, releaseID string, options *APIReleaseClientGetEntityTagOptions) (APIReleaseClientGetEntityTagResponse, error)

GetEntityTag - Returns the etag of an API release.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • releaseID - Release identifier within an API. Must be unique in the current API Management service instance.
  • options - APIReleaseClientGetEntityTagOptions contains the optional parameters for the APIReleaseClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiRelease.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewAPIReleaseClient().GetEntityTag(ctx, "rg1", "apimService1", "a1", "5a7cb545298324c53224a799", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*APIReleaseClient) NewListByServicePager

func (client *APIReleaseClient) NewListByServicePager(resourceGroupName string, serviceName string, apiID string, options *APIReleaseClientListByServiceOptions) *runtime.Pager[APIReleaseClientListByServiceResponse]

NewListByServicePager - Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • options - APIReleaseClientListByServiceOptions contains the optional parameters for the APIReleaseClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiReleases.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAPIReleaseClient().NewListByServicePager("rg1", "apimService1", "a1", &armapimanagement.APIReleaseClientListByServiceOptions{Filter: nil,
	Top:  nil,
	Skip: 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.APIReleaseCollection = armapimanagement.APIReleaseCollection{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.APIReleaseContract{
	// 		{
	// 			Name: to.Ptr("5a7cb545298324c53224a799"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/apis/releases"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1/releases/5a7cb545298324c53224a799"),
	// 			Properties: &armapimanagement.APIReleaseContractProperties{
	// 				CreatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-08T20:38:29.173Z"); return t}()),
	// 				Notes: to.Ptr("yahoo"),
	// 				UpdatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-08T20:38:29.173Z"); return t}()),
	// 			},
	// 	}},
	// }
}
Output:

func (*APIReleaseClient) Update

func (client *APIReleaseClient) Update(ctx context.Context, resourceGroupName string, serviceName string, apiID string, releaseID string, ifMatch string, parameters APIReleaseContract, options *APIReleaseClientUpdateOptions) (APIReleaseClientUpdateResponse, error)

Update - Updates the details of the release of the API specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • releaseID - Release identifier within an API. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - API Release Update parameters.
  • options - APIReleaseClientUpdateOptions contains the optional parameters for the APIReleaseClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiRelease.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIReleaseClient().Update(ctx, "rg1", "apimService1", "a1", "testrev", "*", armapimanagement.APIReleaseContract{
	Properties: &armapimanagement.APIReleaseContractProperties{
		APIID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1"),
		Notes: to.Ptr("yahooagain"),
	},
}, 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.APIReleaseContract = armapimanagement.APIReleaseContract{
// 	Name: to.Ptr("testrev"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/releases"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1/releases/testrev"),
// 	Properties: &armapimanagement.APIReleaseContractProperties{
// 		APIID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1"),
// 		CreatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-08T20:38:29.173Z"); return t}()),
// 		Notes: to.Ptr("yahoo"),
// 		UpdatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-08T20:38:29.173Z"); return t}()),
// 	},
// }
Output:

type APIReleaseClientCreateOrUpdateOptions

type APIReleaseClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

APIReleaseClientCreateOrUpdateOptions contains the optional parameters for the APIReleaseClient.CreateOrUpdate method.

type APIReleaseClientCreateOrUpdateResponse

type APIReleaseClientCreateOrUpdateResponse struct {
	// ApiRelease details.
	APIReleaseContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIReleaseClientCreateOrUpdateResponse contains the response from method APIReleaseClient.CreateOrUpdate.

type APIReleaseClientDeleteOptions

type APIReleaseClientDeleteOptions struct {
}

APIReleaseClientDeleteOptions contains the optional parameters for the APIReleaseClient.Delete method.

type APIReleaseClientDeleteResponse

type APIReleaseClientDeleteResponse struct {
}

APIReleaseClientDeleteResponse contains the response from method APIReleaseClient.Delete.

type APIReleaseClientGetEntityTagOptions

type APIReleaseClientGetEntityTagOptions struct {
}

APIReleaseClientGetEntityTagOptions contains the optional parameters for the APIReleaseClient.GetEntityTag method.

type APIReleaseClientGetEntityTagResponse

type APIReleaseClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

APIReleaseClientGetEntityTagResponse contains the response from method APIReleaseClient.GetEntityTag.

type APIReleaseClientGetOptions

type APIReleaseClientGetOptions struct {
}

APIReleaseClientGetOptions contains the optional parameters for the APIReleaseClient.Get method.

type APIReleaseClientGetResponse

type APIReleaseClientGetResponse struct {
	// ApiRelease details.
	APIReleaseContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIReleaseClientGetResponse contains the response from method APIReleaseClient.Get.

type APIReleaseClientListByServiceOptions

type APIReleaseClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

APIReleaseClientListByServiceOptions contains the optional parameters for the APIReleaseClient.NewListByServicePager method.

type APIReleaseClientListByServiceResponse

type APIReleaseClientListByServiceResponse struct {
	// Paged ApiRelease list representation.
	APIReleaseCollection
}

APIReleaseClientListByServiceResponse contains the response from method APIReleaseClient.NewListByServicePager.

type APIReleaseClientUpdateOptions

type APIReleaseClientUpdateOptions struct {
}

APIReleaseClientUpdateOptions contains the optional parameters for the APIReleaseClient.Update method.

type APIReleaseClientUpdateResponse

type APIReleaseClientUpdateResponse struct {
	// ApiRelease details.
	APIReleaseContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIReleaseClientUpdateResponse contains the response from method APIReleaseClient.Update.

type APIReleaseCollection

type APIReleaseCollection struct {
	// Total record count number across all pages.
	Count *int64

	// READ-ONLY; Next page link if any.
	NextLink *string

	// READ-ONLY; Page values.
	Value []*APIReleaseContract
}

APIReleaseCollection - Paged ApiRelease list representation.

func (APIReleaseCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIReleaseCollection.

func (*APIReleaseCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIReleaseCollection.

type APIReleaseContract

type APIReleaseContract struct {
	// ApiRelease entity contract properties.
	Properties *APIReleaseContractProperties

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

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

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

APIReleaseContract - ApiRelease details.

func (APIReleaseContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIReleaseContract.

func (*APIReleaseContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIReleaseContract.

type APIReleaseContractProperties

type APIReleaseContractProperties struct {
	// Identifier of the API the release belongs to.
	APIID *string

	// Release Notes
	Notes *string

	// READ-ONLY; The time the API was released. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified
	// by the ISO 8601 standard.
	CreatedDateTime *time.Time

	// READ-ONLY; The time the API release was updated.
	UpdatedDateTime *time.Time
}

APIReleaseContractProperties - API Release details

func (APIReleaseContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIReleaseContractProperties.

func (*APIReleaseContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIReleaseContractProperties.

type APIRevisionClient

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

APIRevisionClient contains the methods for the APIRevision group. Don't use this type directly, use NewAPIRevisionClient() instead.

func NewAPIRevisionClient

func NewAPIRevisionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIRevisionClient, error)

NewAPIRevisionClient creates a new instance of APIRevisionClient 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 (*APIRevisionClient) NewListByServicePager

func (client *APIRevisionClient) NewListByServicePager(resourceGroupName string, serviceName string, apiID string, options *APIRevisionClientListByServiceOptions) *runtime.Pager[APIRevisionClientListByServiceResponse]

NewListByServicePager - Lists all revisions of an API.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • options - APIRevisionClientListByServiceOptions contains the optional parameters for the APIRevisionClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiRevisions.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAPIRevisionClient().NewListByServicePager("rg1", "apimService1", "57d2ef278aa04f0888cba3f3", &armapimanagement.APIRevisionClientListByServiceOptions{Filter: nil,
	Top:  nil,
	Skip: 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.APIRevisionCollection = armapimanagement.APIRevisionCollection{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.APIRevisionContract{
	// 		{
	// 			APIID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1;rev=1"),
	// 			APIRevision: to.Ptr("1"),
	// 			CreatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-01T22:21:20.467Z"); return t}()),
	// 			IsCurrent: to.Ptr(true),
	// 			IsOnline: to.Ptr(true),
	// 			UpdatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-01T22:21:20.467Z"); return t}()),
	// 	}},
	// }
}
Output:

type APIRevisionClientListByServiceOptions

type APIRevisionClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

APIRevisionClientListByServiceOptions contains the optional parameters for the APIRevisionClient.NewListByServicePager method.

type APIRevisionClientListByServiceResponse

type APIRevisionClientListByServiceResponse struct {
	// Paged API Revision list representation.
	APIRevisionCollection
}

APIRevisionClientListByServiceResponse contains the response from method APIRevisionClient.NewListByServicePager.

type APIRevisionCollection

type APIRevisionCollection struct {
	// Total record count number across all pages.
	Count *int64

	// READ-ONLY; Next page link if any.
	NextLink *string

	// READ-ONLY; Page values.
	Value []*APIRevisionContract
}

APIRevisionCollection - Paged API Revision list representation.

func (APIRevisionCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIRevisionCollection.

func (*APIRevisionCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIRevisionCollection.

type APIRevisionContract

type APIRevisionContract struct {
	// READ-ONLY; Identifier of the API Revision.
	APIID *string

	// READ-ONLY; Revision number of API.
	APIRevision *string

	// READ-ONLY; The time the API Revision was created. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified
	// by the ISO 8601 standard.
	CreatedDateTime *time.Time

	// READ-ONLY; Description of the API Revision.
	Description *string

	// READ-ONLY; Indicates if API revision is accessible via the gateway.
	IsCurrent *bool

	// READ-ONLY; Indicates if API revision is the current api revision.
	IsOnline *bool

	// READ-ONLY; Gateway URL for accessing the non-current API Revision.
	PrivateURL *string

	// READ-ONLY; The time the API Revision were updated. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified
	// by the ISO 8601 standard.
	UpdatedDateTime *time.Time
}

APIRevisionContract - Summary of revision metadata.

func (APIRevisionContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIRevisionContract.

func (*APIRevisionContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIRevisionContract.

type APIRevisionInfoContract

type APIRevisionInfoContract struct {
	// Description of new API Revision.
	APIRevisionDescription *string

	// Version identifier for the new API Version.
	APIVersionName *string

	// Version set details
	APIVersionSet *APIVersionSetContractDetails

	// Resource identifier of API to be used to create the revision from.
	SourceAPIID *string
}

APIRevisionInfoContract - Object used to create an API Revision or Version based on an existing API Revision

func (APIRevisionInfoContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIRevisionInfoContract.

func (*APIRevisionInfoContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIRevisionInfoContract.

type APISchemaClient

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

APISchemaClient contains the methods for the APISchema group. Don't use this type directly, use NewAPISchemaClient() instead.

func NewAPISchemaClient

func NewAPISchemaClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APISchemaClient, error)

NewAPISchemaClient creates a new instance of APISchemaClient 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 (*APISchemaClient) BeginCreateOrUpdate

func (client *APISchemaClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, schemaID string, parameters SchemaContract, options *APISchemaClientBeginCreateOrUpdateOptions) (*runtime.Poller[APISchemaClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates schema configuration for the API. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • schemaID - Schema id identifier. Must be unique in the current API Management service instance.
  • parameters - The schema contents to apply.
  • options - APISchemaClientBeginCreateOrUpdateOptions contains the optional parameters for the APISchemaClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiSchema.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAPISchemaClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", "59d6bb8f1f7fab13dc67ec9b", "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", armapimanagement.SchemaContract{
	Properties: &armapimanagement.SchemaContractProperties{
		ContentType: to.Ptr("application/vnd.ms-azure-apim.xsd+xml"),
		Document: &armapimanagement.SchemaDocumentProperties{
			Value: to.Ptr("<s:schema elementFormDefault=\"qualified\" targetNamespace=\"http://ws.cdyne.com/WeatherWS/\" xmlns:tns=\"http://ws.cdyne.com/WeatherWS/\" xmlns:s=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap12=\"http://schemas.xmlsoap.org/wsdl/soap12/\" xmlns:mime=\"http://schemas.xmlsoap.org/wsdl/mime/\" xmlns:soap=\"http://schemas.xmlsoap.org/wsdl/soap/\" xmlns:tm=\"http://microsoft.com/wsdl/mime/textMatching/\" xmlns:http=\"http://schemas.xmlsoap.org/wsdl/http/\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\" xmlns:apim-wsdltns=\"http://ws.cdyne.com/WeatherWS/\">\r\n  <s:element name=\"GetWeatherInformation\">\r\n    <s:complexType />\r\n  </s:element>\r\n  <s:element name=\"GetWeatherInformationResponse\">\r\n    <s:complexType>\r\n      <s:sequence>\r\n        <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"GetWeatherInformationResult\" type=\"tns:ArrayOfWeatherDescription\" />\r\n      </s:sequence>\r\n    </s:complexType>\r\n  </s:element>\r\n  <s:complexType name=\"ArrayOfWeatherDescription\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"0\" maxOccurs=\"unbounded\" name=\"WeatherDescription\" type=\"tns:WeatherDescription\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:complexType name=\"WeatherDescription\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"WeatherID\" type=\"s:short\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Description\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"PictureURL\" type=\"s:string\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:element name=\"GetCityForecastByZIP\">\r\n    <s:complexType>\r\n      <s:sequence>\r\n        <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ZIP\" type=\"s:string\" />\r\n      </s:sequence>\r\n    </s:complexType>\r\n  </s:element>\r\n  <s:element name=\"GetCityForecastByZIPResponse\">\r\n    <s:complexType>\r\n      <s:sequence>\r\n        <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"GetCityForecastByZIPResult\" type=\"tns:ForecastReturn\" />\r\n      </s:sequence>\r\n    </s:complexType>\r\n  </s:element>\r\n  <s:complexType name=\"ForecastReturn\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Success\" type=\"s:boolean\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ResponseText\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"State\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"City\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"WeatherStationCity\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ForecastResult\" type=\"tns:ArrayOfForecast\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:complexType name=\"ArrayOfForecast\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"0\" maxOccurs=\"unbounded\" name=\"Forecast\" nillable=\"true\" type=\"tns:Forecast\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:complexType name=\"Forecast\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Date\" type=\"s:dateTime\" />\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"WeatherID\" type=\"s:short\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Desciption\" type=\"s:string\" />\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Temperatures\" type=\"tns:temp\" />\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"ProbabilityOfPrecipiation\" type=\"tns:POP\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:complexType name=\"temp\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"MorningLow\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"DaytimeHigh\" type=\"s:string\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:complexType name=\"POP\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Nighttime\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Daytime\" type=\"s:string\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:element name=\"GetCityWeatherByZIP\">\r\n    <s:complexType>\r\n      <s:sequence>\r\n        <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ZIP\" type=\"s:string\" />\r\n      </s:sequence>\r\n    </s:complexType>\r\n  </s:element>\r\n  <s:element name=\"GetCityWeatherByZIPResponse\">\r\n    <s:complexType>\r\n      <s:sequence>\r\n        <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"GetCityWeatherByZIPResult\" type=\"tns:WeatherReturn\" />\r\n      </s:sequence>\r\n    </s:complexType>\r\n  </s:element>\r\n  <s:complexType name=\"WeatherReturn\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Success\" type=\"s:boolean\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ResponseText\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"State\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"City\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"WeatherStationCity\" type=\"s:string\" />\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"WeatherID\" type=\"s:short\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Description\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Temperature\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"RelativeHumidity\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Wind\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Pressure\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Visibility\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"WindChill\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Remarks\" type=\"s:string\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:element name=\"ArrayOfWeatherDescription\" nillable=\"true\" type=\"tns:ArrayOfWeatherDescription\" />\r\n  <s:element name=\"ForecastReturn\" nillable=\"true\" type=\"tns:ForecastReturn\" />\r\n  <s:element name=\"WeatherReturn\" type=\"tns:WeatherReturn\" />\r\n</s:schema>"),
		},
	},
}, &armapimanagement.APISchemaClientBeginCreateOrUpdateOptions{IfMatch: 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.SchemaContract = armapimanagement.SchemaContract{
// 	Name: to.Ptr("ec12520d-9d48-4e7b-8f39-698ca2ac63f1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/schemas"),
// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/59d6bb8f1f7fab13dc67ec9b/schemas/ec12520d-9d48-4e7b-8f39-698ca2ac63f1"),
// 	Properties: &armapimanagement.SchemaContractProperties{
// 		ContentType: to.Ptr("application/vnd.ms-azure-apim.xsd+xml"),
// 		Document: &armapimanagement.SchemaDocumentProperties{
// 			Value: to.Ptr("<s:schema elementFormDefault=\"qualified\" targetNamespace=\"http://ws.cdyne.com/WeatherWS/\" xmlns:tns=\"http://ws.cdyne.com/WeatherWS/\" xmlns:s=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap12=\"http://schemas.xmlsoap.org/wsdl/soap12/\" xmlns:mime=\"http://schemas.xmlsoap.org/wsdl/mime/\" xmlns:soap=\"http://schemas.xmlsoap.org/wsdl/soap/\" xmlns:tm=\"http://microsoft.com/wsdl/mime/textMatching/\" xmlns:http=\"http://schemas.xmlsoap.org/wsdl/http/\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\" xmlns:apim-wsdltns=\"http://ws.cdyne.com/WeatherWS/\">\r\n  <s:element name=\"GetWeatherInformation\">\r\n    <s:complexType />\r\n  </s:element>\r\n  <s:element name=\"GetWeatherInformationResponse\">\r\n    <s:complexType>\r\n      <s:sequence>\r\n        <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"GetWeatherInformationResult\" type=\"tns:ArrayOfWeatherDescription\" />\r\n      </s:sequence>\r\n    </s:complexType>\r\n  </s:element>\r\n  <s:complexType name=\"ArrayOfWeatherDescription\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"0\" maxOccurs=\"unbounded\" name=\"WeatherDescription\" type=\"tns:WeatherDescription\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:complexType name=\"WeatherDescription\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"WeatherID\" type=\"s:short\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Description\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"PictureURL\" type=\"s:string\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:element name=\"GetCityForecastByZIP\">\r\n    <s:complexType>\r\n      <s:sequence>\r\n        <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ZIP\" type=\"s:string\" />\r\n      </s:sequence>\r\n    </s:complexType>\r\n  </s:element>\r\n  <s:element name=\"GetCityForecastByZIPResponse\">\r\n    <s:complexType>\r\n      <s:sequence>\r\n        <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"GetCityForecastByZIPResult\" type=\"tns:ForecastReturn\" />\r\n      </s:sequence>\r\n    </s:complexType>\r\n  </s:element>\r\n  <s:complexType name=\"ForecastReturn\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Success\" type=\"s:boolean\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ResponseText\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"State\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"City\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"WeatherStationCity\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ForecastResult\" type=\"tns:ArrayOfForecast\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:complexType name=\"ArrayOfForecast\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"0\" maxOccurs=\"unbounded\" name=\"Forecast\" nillable=\"true\" type=\"tns:Forecast\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:complexType name=\"Forecast\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Date\" type=\"s:dateTime\" />\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"WeatherID\" type=\"s:short\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Desciption\" type=\"s:string\" />\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Temperatures\" type=\"tns:temp\" />\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"ProbabilityOfPrecipiation\" type=\"tns:POP\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:complexType name=\"temp\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"MorningLow\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"DaytimeHigh\" type=\"s:string\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:complexType name=\"POP\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Nighttime\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Daytime\" type=\"s:string\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:element name=\"GetCityWeatherByZIP\">\r\n    <s:complexType>\r\n      <s:sequence>\r\n        <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ZIP\" type=\"s:string\" />\r\n      </s:sequence>\r\n    </s:complexType>\r\n  </s:element>\r\n  <s:element name=\"GetCityWeatherByZIPResponse\">\r\n    <s:complexType>\r\n      <s:sequence>\r\n        <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"GetCityWeatherByZIPResult\" type=\"tns:WeatherReturn\" />\r\n      </s:sequence>\r\n    </s:complexType>\r\n  </s:element>\r\n  <s:complexType name=\"WeatherReturn\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Success\" type=\"s:boolean\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ResponseText\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"State\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"City\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"WeatherStationCity\" type=\"s:string\" />\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"WeatherID\" type=\"s:short\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Description\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Temperature\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"RelativeHumidity\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Wind\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Pressure\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Visibility\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"WindChill\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Remarks\" type=\"s:string\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:element name=\"ArrayOfWeatherDescription\" nillable=\"true\" type=\"tns:ArrayOfWeatherDescription\" />\r\n  <s:element name=\"ForecastReturn\" nillable=\"true\" type=\"tns:ForecastReturn\" />\r\n  <s:element name=\"WeatherReturn\" type=\"tns:WeatherReturn\" />\r\n</s:schema>"),
// 		},
// 	},
// }
Output:

func (*APISchemaClient) Delete

func (client *APISchemaClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, schemaID string, ifMatch string, options *APISchemaClientDeleteOptions) (APISchemaClientDeleteResponse, error)

Delete - Deletes the schema configuration at the Api. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • schemaID - Schema id identifier. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - APISchemaClientDeleteOptions contains the optional parameters for the APISchemaClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiSchema.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewAPISchemaClient().Delete(ctx, "rg1", "apimService1", "59d5b28d1f7fab116c282650", "59d5b28e1f7fab116402044e", "*", &armapimanagement.APISchemaClientDeleteOptions{Force: nil})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*APISchemaClient) Get

func (client *APISchemaClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, schemaID string, options *APISchemaClientGetOptions) (APISchemaClientGetResponse, error)

Get - Get the schema configuration at the API level. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • schemaID - Schema id identifier. Must be unique in the current API Management service instance.
  • options - APISchemaClientGetOptions contains the optional parameters for the APISchemaClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiSchema.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPISchemaClient().Get(ctx, "rg1", "apimService1", "59d6bb8f1f7fab13dc67ec9b", "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", 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.SchemaContract = armapimanagement.SchemaContract{
// 	Name: to.Ptr("ec12520d-9d48-4e7b-8f39-698ca2ac63f1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/schemas"),
// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/59d6bb8f1f7fab13dc67ec9b/schemas/ec12520d-9d48-4e7b-8f39-698ca2ac63f1"),
// 	Properties: &armapimanagement.SchemaContractProperties{
// 		ContentType: to.Ptr("application/vnd.ms-azure-apim.xsd+xml"),
// 		Document: &armapimanagement.SchemaDocumentProperties{
// 			Value: to.Ptr("<s:schema elementFormDefault=\"qualified\" targetNamespace=\"http://ws.cdyne.com/WeatherWS/\" xmlns:tns=\"http://ws.cdyne.com/WeatherWS/\" xmlns:s=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap12=\"http://schemas.xmlsoap.org/wsdl/soap12/\" xmlns:mime=\"http://schemas.xmlsoap.org/wsdl/mime/\" xmlns:soap=\"http://schemas.xmlsoap.org/wsdl/soap/\" xmlns:tm=\"http://microsoft.com/wsdl/mime/textMatching/\" xmlns:http=\"http://schemas.xmlsoap.org/wsdl/http/\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\" xmlns:apim-wsdltns=\"http://ws.cdyne.com/WeatherWS/\">\r\n  <s:element name=\"GetWeatherInformation\">\r\n    <s:complexType />\r\n  </s:element>\r\n  <s:element name=\"GetWeatherInformationResponse\">\r\n    <s:complexType>\r\n      <s:sequence>\r\n        <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"GetWeatherInformationResult\" type=\"tns:ArrayOfWeatherDescription\" />\r\n      </s:sequence>\r\n    </s:complexType>\r\n  </s:element>\r\n  <s:complexType name=\"ArrayOfWeatherDescription\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"0\" maxOccurs=\"unbounded\" name=\"WeatherDescription\" type=\"tns:WeatherDescription\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:complexType name=\"WeatherDescription\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"WeatherID\" type=\"s:short\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Description\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"PictureURL\" type=\"s:string\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:element name=\"GetCityForecastByZIP\">\r\n    <s:complexType>\r\n      <s:sequence>\r\n        <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ZIP\" type=\"s:string\" />\r\n      </s:sequence>\r\n    </s:complexType>\r\n  </s:element>\r\n  <s:element name=\"GetCityForecastByZIPResponse\">\r\n    <s:complexType>\r\n      <s:sequence>\r\n        <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"GetCityForecastByZIPResult\" type=\"tns:ForecastReturn\" />\r\n      </s:sequence>\r\n    </s:complexType>\r\n  </s:element>\r\n  <s:complexType name=\"ForecastReturn\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Success\" type=\"s:boolean\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ResponseText\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"State\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"City\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"WeatherStationCity\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ForecastResult\" type=\"tns:ArrayOfForecast\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:complexType name=\"ArrayOfForecast\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"0\" maxOccurs=\"unbounded\" name=\"Forecast\" nillable=\"true\" type=\"tns:Forecast\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:complexType name=\"Forecast\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Date\" type=\"s:dateTime\" />\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"WeatherID\" type=\"s:short\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Desciption\" type=\"s:string\" />\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Temperatures\" type=\"tns:temp\" />\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"ProbabilityOfPrecipiation\" type=\"tns:POP\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:complexType name=\"temp\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"MorningLow\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"DaytimeHigh\" type=\"s:string\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:complexType name=\"POP\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Nighttime\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Daytime\" type=\"s:string\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:element name=\"GetCityWeatherByZIP\">\r\n    <s:complexType>\r\n      <s:sequence>\r\n        <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ZIP\" type=\"s:string\" />\r\n      </s:sequence>\r\n    </s:complexType>\r\n  </s:element>\r\n  <s:element name=\"GetCityWeatherByZIPResponse\">\r\n    <s:complexType>\r\n      <s:sequence>\r\n        <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"GetCityWeatherByZIPResult\" type=\"tns:WeatherReturn\" />\r\n      </s:sequence>\r\n    </s:complexType>\r\n  </s:element>\r\n  <s:complexType name=\"WeatherReturn\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Success\" type=\"s:boolean\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ResponseText\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"State\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"City\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"WeatherStationCity\" type=\"s:string\" />\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"WeatherID\" type=\"s:short\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Description\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Temperature\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"RelativeHumidity\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Wind\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Pressure\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Visibility\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"WindChill\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Remarks\" type=\"s:string\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:element name=\"ArrayOfWeatherDescription\" nillable=\"true\" type=\"tns:ArrayOfWeatherDescription\" />\r\n  <s:element name=\"ForecastReturn\" nillable=\"true\" type=\"tns:ForecastReturn\" />\r\n  <s:element name=\"WeatherReturn\" type=\"tns:WeatherReturn\" />\r\n</s:schema>"),
// 		},
// 	},
// }
Output:

func (*APISchemaClient) GetEntityTag

func (client *APISchemaClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiID string, schemaID string, options *APISchemaClientGetEntityTagOptions) (APISchemaClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the schema specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • schemaID - Schema id identifier. Must be unique in the current API Management service instance.
  • options - APISchemaClientGetEntityTagOptions contains the optional parameters for the APISchemaClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiSchema.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewAPISchemaClient().GetEntityTag(ctx, "rg1", "apimService1", "57d1f7558aa04f15146d9d8a", "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*APISchemaClient) NewListByAPIPager

func (client *APISchemaClient) NewListByAPIPager(resourceGroupName string, serviceName string, apiID string, options *APISchemaClientListByAPIOptions) *runtime.Pager[APISchemaClientListByAPIResponse]

NewListByAPIPager - Get the schema configuration at the API level.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • options - APISchemaClientListByAPIOptions contains the optional parameters for the APISchemaClient.NewListByAPIPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiSchemas.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAPISchemaClient().NewListByAPIPager("rg1", "apimService1", "59d5b28d1f7fab116c282650", &armapimanagement.APISchemaClientListByAPIOptions{Filter: nil,
	Top:  nil,
	Skip: 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.SchemaCollection = armapimanagement.SchemaCollection{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.SchemaContract{
	// 		{
	// 			Name: to.Ptr("59d5b28e1f7fab116402044e"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/apis/schemas"),
	// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/59d5b28d1f7fab116c282650/schemas/59d5b28e1f7fab116402044e"),
	// 			Properties: &armapimanagement.SchemaContractProperties{
	// 				ContentType: to.Ptr("application/vnd.ms-azure-apim.xsd+xml"),
	// 				Document: &armapimanagement.SchemaDocumentProperties{
	// 					Value: to.Ptr("<s:schema elementFormDefault=\"qualified\" targetNamespace=\"http://ws.cdyne.com/WeatherWS/\" xmlns:tns=\"http://ws.cdyne.com/WeatherWS/\" xmlns:s=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap12=\"http://schemas.xmlsoap.org/wsdl/soap12/\" xmlns:mime=\"http://schemas.xmlsoap.org/wsdl/mime/\" xmlns:soap=\"http://schemas.xmlsoap.org/wsdl/soap/\" xmlns:tm=\"http://microsoft.com/wsdl/mime/textMatching/\" xmlns:http=\"http://schemas.xmlsoap.org/wsdl/http/\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\" xmlns:apim-wsdltns=\"http://ws.cdyne.com/WeatherWS/\">\r\n  <s:element name=\"GetWeatherInformation\">\r\n    <s:complexType />\r\n  </s:element>\r\n  <s:element name=\"GetWeatherInformationResponse\">\r\n    <s:complexType>\r\n      <s:sequence>\r\n        <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"GetWeatherInformationResult\" type=\"tns:ArrayOfWeatherDescription\" />\r\n      </s:sequence>\r\n    </s:complexType>\r\n  </s:element>\r\n  <s:complexType name=\"ArrayOfWeatherDescription\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"0\" maxOccurs=\"unbounded\" name=\"WeatherDescription\" type=\"tns:WeatherDescription\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:complexType name=\"WeatherDescription\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"WeatherID\" type=\"s:short\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Description\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"PictureURL\" type=\"s:string\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:element name=\"GetCityForecastByZIP\">\r\n    <s:complexType>\r\n      <s:sequence>\r\n        <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ZIP\" type=\"s:string\" />\r\n      </s:sequence>\r\n    </s:complexType>\r\n  </s:element>\r\n  <s:element name=\"GetCityForecastByZIPResponse\">\r\n    <s:complexType>\r\n      <s:sequence>\r\n        <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"GetCityForecastByZIPResult\" type=\"tns:ForecastReturn\" />\r\n      </s:sequence>\r\n    </s:complexType>\r\n  </s:element>\r\n  <s:complexType name=\"ForecastReturn\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Success\" type=\"s:boolean\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ResponseText\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"State\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"City\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"WeatherStationCity\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ForecastResult\" type=\"tns:ArrayOfForecast\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:complexType name=\"ArrayOfForecast\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"0\" maxOccurs=\"unbounded\" name=\"Forecast\" nillable=\"true\" type=\"tns:Forecast\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:complexType name=\"Forecast\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Date\" type=\"s:dateTime\" />\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"WeatherID\" type=\"s:short\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Desciption\" type=\"s:string\" />\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Temperatures\" type=\"tns:temp\" />\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"ProbabilityOfPrecipiation\" type=\"tns:POP\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:complexType name=\"temp\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"MorningLow\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"DaytimeHigh\" type=\"s:string\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:complexType name=\"POP\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Nighttime\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Daytime\" type=\"s:string\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:element name=\"GetCityWeatherByZIP\">\r\n    <s:complexType>\r\n      <s:sequence>\r\n        <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ZIP\" type=\"s:string\" />\r\n      </s:sequence>\r\n    </s:complexType>\r\n  </s:element>\r\n  <s:element name=\"GetCityWeatherByZIPResponse\">\r\n    <s:complexType>\r\n      <s:sequence>\r\n        <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"GetCityWeatherByZIPResult\" type=\"tns:WeatherReturn\" />\r\n      </s:sequence>\r\n    </s:complexType>\r\n  </s:element>\r\n  <s:complexType name=\"WeatherReturn\">\r\n    <s:sequence>\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Success\" type=\"s:boolean\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ResponseText\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"State\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"City\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"WeatherStationCity\" type=\"s:string\" />\r\n      <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"WeatherID\" type=\"s:short\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Description\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Temperature\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"RelativeHumidity\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Wind\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Pressure\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Visibility\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"WindChill\" type=\"s:string\" />\r\n      <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Remarks\" type=\"s:string\" />\r\n    </s:sequence>\r\n  </s:complexType>\r\n  <s:element name=\"ArrayOfWeatherDescription\" nillable=\"true\" type=\"tns:ArrayOfWeatherDescription\" />\r\n  <s:element name=\"ForecastReturn\" nillable=\"true\" type=\"tns:ForecastReturn\" />\r\n  <s:element name=\"WeatherReturn\" type=\"tns:WeatherReturn\" />\r\n</s:schema>"),
	// 				},
	// 			},
	// 	}},
	// }
}
Output:

type APISchemaClientBeginCreateOrUpdateOptions

type APISchemaClientBeginCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

APISchemaClientBeginCreateOrUpdateOptions contains the optional parameters for the APISchemaClient.BeginCreateOrUpdate method.

type APISchemaClientCreateOrUpdateResponse

type APISchemaClientCreateOrUpdateResponse struct {
	// API Schema Contract details.
	SchemaContract
}

APISchemaClientCreateOrUpdateResponse contains the response from method APISchemaClient.BeginCreateOrUpdate.

type APISchemaClientDeleteOptions

type APISchemaClientDeleteOptions struct {
	// If true removes all references to the schema before deleting it.
	Force *bool
}

APISchemaClientDeleteOptions contains the optional parameters for the APISchemaClient.Delete method.

type APISchemaClientDeleteResponse

type APISchemaClientDeleteResponse struct {
}

APISchemaClientDeleteResponse contains the response from method APISchemaClient.Delete.

type APISchemaClientGetEntityTagOptions

type APISchemaClientGetEntityTagOptions struct {
}

APISchemaClientGetEntityTagOptions contains the optional parameters for the APISchemaClient.GetEntityTag method.

type APISchemaClientGetEntityTagResponse

type APISchemaClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

APISchemaClientGetEntityTagResponse contains the response from method APISchemaClient.GetEntityTag.

type APISchemaClientGetOptions

type APISchemaClientGetOptions struct {
}

APISchemaClientGetOptions contains the optional parameters for the APISchemaClient.Get method.

type APISchemaClientGetResponse

type APISchemaClientGetResponse struct {
	// API Schema Contract details.
	SchemaContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APISchemaClientGetResponse contains the response from method APISchemaClient.Get.

type APISchemaClientListByAPIOptions

type APISchemaClientListByAPIOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

APISchemaClientListByAPIOptions contains the optional parameters for the APISchemaClient.NewListByAPIPager method.

type APISchemaClientListByAPIResponse

type APISchemaClientListByAPIResponse struct {
	// The response of the list schema operation.
	SchemaCollection
}

APISchemaClientListByAPIResponse contains the response from method APISchemaClient.NewListByAPIPager.

type APITagDescriptionClient

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

APITagDescriptionClient contains the methods for the APITagDescription group. Don't use this type directly, use NewAPITagDescriptionClient() instead.

func NewAPITagDescriptionClient

func NewAPITagDescriptionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APITagDescriptionClient, error)

NewAPITagDescriptionClient creates a new instance of APITagDescriptionClient 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 (*APITagDescriptionClient) CreateOrUpdate

func (client *APITagDescriptionClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagDescriptionID string, parameters TagDescriptionCreateParameters, options *APITagDescriptionClientCreateOrUpdateOptions) (APITagDescriptionClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create/Update tag description in scope of the Api. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • tagDescriptionID - Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names.
  • parameters - Create parameters.
  • options - APITagDescriptionClientCreateOrUpdateOptions contains the optional parameters for the APITagDescriptionClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiTagDescription.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPITagDescriptionClient().CreateOrUpdate(ctx, "rg1", "apimService1", "5931a75ae4bbd512a88c680b", "tagId1", armapimanagement.TagDescriptionCreateParameters{
	Properties: &armapimanagement.TagDescriptionBaseProperties{
		Description:             to.Ptr("Some description that will be displayed for operation's tag if the tag is assigned to operation of the API"),
		ExternalDocsDescription: to.Ptr("Description of the external docs resource"),
		ExternalDocsURL:         to.Ptr("http://some.url/additionaldoc"),
	},
}, &armapimanagement.APITagDescriptionClientCreateOrUpdateOptions{IfMatch: 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.TagDescriptionContract = armapimanagement.TagDescriptionContract{
// 	Name: to.Ptr("tagId1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/tagDescriptions"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5931a75ae4bbd512a88c680b/tagDescriptions/tagId1"),
// 	Properties: &armapimanagement.TagDescriptionContractProperties{
// 		Description: to.Ptr("Some description that will be displayed for operation's tag if the tag is assigned to operation of the API"),
// 		ExternalDocsDescription: to.Ptr("some additional info"),
// 		ExternalDocsURL: to.Ptr("http://some_url.com"),
// 		DisplayName: to.Ptr("tag1"),
// 		TagID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/tagId1"),
// 	},
// }
Output:

func (*APITagDescriptionClient) Delete

func (client *APITagDescriptionClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagDescriptionID string, ifMatch string, options *APITagDescriptionClientDeleteOptions) (APITagDescriptionClientDeleteResponse, error)

Delete - Delete tag description for the Api. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • tagDescriptionID - Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - APITagDescriptionClientDeleteOptions contains the optional parameters for the APITagDescriptionClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiTagDescription.json

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

func (*APITagDescriptionClient) Get

func (client *APITagDescriptionClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagDescriptionID string, options *APITagDescriptionClientGetOptions) (APITagDescriptionClientGetResponse, error)

Get - Get Tag description in scope of API If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • tagDescriptionID - Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names.
  • options - APITagDescriptionClientGetOptions contains the optional parameters for the APITagDescriptionClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiTagDescription.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPITagDescriptionClient().Get(ctx, "rg1", "apimService1", "59d6bb8f1f7fab13dc67ec9b", "59306a29e4bbd510dc24e5f9", 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.TagDescriptionContract = armapimanagement.TagDescriptionContract{
// 	Name: to.Ptr("59306a29e4bbd510dc24e5f9"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/tagDescriptions"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/59d6bb8f1f7fab13dc67ec9b/tagDescriptions/59306a29e4bbd510dc24e5f9"),
// 	Properties: &armapimanagement.TagDescriptionContractProperties{
// 		ExternalDocsDescription: to.Ptr("some additional info"),
// 		ExternalDocsURL: to.Ptr("http://some_url.com"),
// 		DisplayName: to.Ptr("tag1"),
// 		TagID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/59306a29e4bbd510dc24e5f9"),
// 	},
// }
Output:

func (*APITagDescriptionClient) GetEntityTag

func (client *APITagDescriptionClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagDescriptionID string, options *APITagDescriptionClientGetEntityTagOptions) (APITagDescriptionClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state version of the tag specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • tagDescriptionID - Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names.
  • options - APITagDescriptionClientGetEntityTagOptions contains the optional parameters for the APITagDescriptionClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiTagDescription.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewAPITagDescriptionClient().GetEntityTag(ctx, "rg1", "apimService1", "59d6bb8f1f7fab13dc67ec9b", "59306a29e4bbd510dc24e5f9", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*APITagDescriptionClient) NewListByServicePager

func (client *APITagDescriptionClient) NewListByServicePager(resourceGroupName string, serviceName string, apiID string, options *APITagDescriptionClientListByServiceOptions) *runtime.Pager[APITagDescriptionClientListByServiceResponse]

NewListByServicePager - Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • options - APITagDescriptionClientListByServiceOptions contains the optional parameters for the APITagDescriptionClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiTagDescriptions.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAPITagDescriptionClient().NewListByServicePager("rg1", "apimService1", "57d2ef278aa04f0888cba3f3", &armapimanagement.APITagDescriptionClientListByServiceOptions{Filter: nil,
	Top:  nil,
	Skip: 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.TagDescriptionCollection = armapimanagement.TagDescriptionCollection{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.TagDescriptionContract{
	// 		{
	// 			Name: to.Ptr("5600b539c53f5b0062060002"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/tags"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tagDescriptions/5600b539c53f5b0062060002"),
	// 			Properties: &armapimanagement.TagDescriptionContractProperties{
	// 				ExternalDocsDescription: to.Ptr("some additional info"),
	// 				ExternalDocsURL: to.Ptr("http://some_url.com"),
	// 				DisplayName: to.Ptr("tag1"),
	// 				TagID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/5600b539c53f5b0062060002"),
	// 			},
	// 	}},
	// }
}
Output:

type APITagDescriptionClientCreateOrUpdateOptions

type APITagDescriptionClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

APITagDescriptionClientCreateOrUpdateOptions contains the optional parameters for the APITagDescriptionClient.CreateOrUpdate method.

type APITagDescriptionClientCreateOrUpdateResponse

type APITagDescriptionClientCreateOrUpdateResponse struct {
	// Contract details.
	TagDescriptionContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APITagDescriptionClientCreateOrUpdateResponse contains the response from method APITagDescriptionClient.CreateOrUpdate.

type APITagDescriptionClientDeleteOptions

type APITagDescriptionClientDeleteOptions struct {
}

APITagDescriptionClientDeleteOptions contains the optional parameters for the APITagDescriptionClient.Delete method.

type APITagDescriptionClientDeleteResponse

type APITagDescriptionClientDeleteResponse struct {
}

APITagDescriptionClientDeleteResponse contains the response from method APITagDescriptionClient.Delete.

type APITagDescriptionClientGetEntityTagOptions

type APITagDescriptionClientGetEntityTagOptions struct {
}

APITagDescriptionClientGetEntityTagOptions contains the optional parameters for the APITagDescriptionClient.GetEntityTag method.

type APITagDescriptionClientGetEntityTagResponse

type APITagDescriptionClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

APITagDescriptionClientGetEntityTagResponse contains the response from method APITagDescriptionClient.GetEntityTag.

type APITagDescriptionClientGetOptions

type APITagDescriptionClientGetOptions struct {
}

APITagDescriptionClientGetOptions contains the optional parameters for the APITagDescriptionClient.Get method.

type APITagDescriptionClientGetResponse

type APITagDescriptionClientGetResponse struct {
	// Contract details.
	TagDescriptionContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APITagDescriptionClientGetResponse contains the response from method APITagDescriptionClient.Get.

type APITagDescriptionClientListByServiceOptions

type APITagDescriptionClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

APITagDescriptionClientListByServiceOptions contains the optional parameters for the APITagDescriptionClient.NewListByServicePager method.

type APITagDescriptionClientListByServiceResponse

type APITagDescriptionClientListByServiceResponse struct {
	// Paged TagDescription list representation.
	TagDescriptionCollection
}

APITagDescriptionClientListByServiceResponse contains the response from method APITagDescriptionClient.NewListByServicePager.

type APITagResourceContractProperties

type APITagResourceContractProperties struct {
	// Describes the revision of the API. If no value is provided, default revision 1 is created
	APIRevision *string

	// Description of the API Revision.
	APIRevisionDescription *string

	// Type of API.
	APIType *APIType

	// Indicates the version identifier of the API if the API is versioned
	APIVersion *string

	// Description of the API Version.
	APIVersionDescription *string

	// A resource identifier for the related ApiVersionSet.
	APIVersionSetID *string

	// Collection of authentication settings included into this API.
	AuthenticationSettings *AuthenticationSettingsContract

	// Contact information for the API.
	Contact *APIContactInformation

	// Description of the API. May include HTML formatting tags.
	Description *string

	// API identifier in the form /apis/{apiId}.
	ID *string

	// Indicates if API revision is current api revision.
	IsCurrent *bool

	// License information for the API.
	License *APILicenseInformation

	// API name.
	Name *string

	// Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It
	// is appended to the API endpoint base URL specified during the service instance
	// creation to form a public URL for this API.
	Path *string

	// Describes on which protocols the operations in this API can be invoked.
	Protocols []*Protocol

	// Absolute URL of the backend service implementing this API.
	ServiceURL *string

	// Protocols over which API is made available.
	SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract

	// Specifies whether an API or Product subscription is required for accessing the API.
	SubscriptionRequired *bool

	// A URL to the Terms of Service for the API. MUST be in the format of a URL.
	TermsOfServiceURL *string

	// READ-ONLY; Indicates if API revision is accessible via the gateway.
	IsOnline *bool
}

APITagResourceContractProperties - API contract properties for the Tag Resources.

func (APITagResourceContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APITagResourceContractProperties.

func (*APITagResourceContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APITagResourceContractProperties.

type APIType

type APIType string

APIType - Type of API.

const (
	APITypeGraphql   APIType = "graphql"
	APITypeHTTP      APIType = "http"
	APITypeSoap      APIType = "soap"
	APITypeWebsocket APIType = "websocket"
)

func PossibleAPITypeValues

func PossibleAPITypeValues() []APIType

PossibleAPITypeValues returns the possible values for the APIType const type.

type APIUpdateContract

type APIUpdateContract struct {
	// Properties of the API entity that can be updated.
	Properties *APIContractUpdateProperties
}

APIUpdateContract - API update contract details.

func (APIUpdateContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIUpdateContract.

func (*APIUpdateContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIUpdateContract.

type APIVersionConstraint

type APIVersionConstraint struct {
	// Limit control plane API calls to API Management service with version equal to or newer than this value.
	MinAPIVersion *string
}

APIVersionConstraint - Control Plane Apis version constraint for the API Management service.

func (APIVersionConstraint) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIVersionConstraint.

func (*APIVersionConstraint) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIVersionConstraint.

type APIVersionSetClient

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

APIVersionSetClient contains the methods for the APIVersionSet group. Don't use this type directly, use NewAPIVersionSetClient() instead.

func NewAPIVersionSetClient

func NewAPIVersionSetClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIVersionSetClient, error)

NewAPIVersionSetClient creates a new instance of APIVersionSetClient 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 (*APIVersionSetClient) CreateOrUpdate

func (client *APIVersionSetClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string, parameters APIVersionSetContract, options *APIVersionSetClientCreateOrUpdateOptions) (APIVersionSetClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or Updates a Api Version Set. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • versionSetID - Api Version Set identifier. Must be unique in the current API Management service instance.
  • parameters - Create or update parameters.
  • options - APIVersionSetClientCreateOrUpdateOptions contains the optional parameters for the APIVersionSetClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiVersionSet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIVersionSetClient().CreateOrUpdate(ctx, "rg1", "apimService1", "api1", armapimanagement.APIVersionSetContract{
	Properties: &armapimanagement.APIVersionSetContractProperties{
		Description:      to.Ptr("Version configuration"),
		DisplayName:      to.Ptr("api set 1"),
		VersioningScheme: to.Ptr(armapimanagement.VersioningSchemeSegment),
	},
}, &armapimanagement.APIVersionSetClientCreateOrUpdateOptions{IfMatch: 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.APIVersionSetContract = armapimanagement.APIVersionSetContract{
// 	Name: to.Ptr("api1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/api-version-sets"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/api1"),
// 	Properties: &armapimanagement.APIVersionSetContractProperties{
// 		Description: to.Ptr("Version configuration"),
// 		DisplayName: to.Ptr("api set 1"),
// 		VersioningScheme: to.Ptr(armapimanagement.VersioningSchemeSegment),
// 	},
// }
Output:

func (*APIVersionSetClient) Delete

func (client *APIVersionSetClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string, ifMatch string, options *APIVersionSetClientDeleteOptions) (APIVersionSetClientDeleteResponse, error)

Delete - Deletes specific Api Version Set. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • versionSetID - Api Version Set identifier. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - APIVersionSetClientDeleteOptions contains the optional parameters for the APIVersionSetClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiVersionSet.json

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

func (*APIVersionSetClient) Get

func (client *APIVersionSetClient) Get(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string, options *APIVersionSetClientGetOptions) (APIVersionSetClientGetResponse, error)

Get - Gets the details of the Api Version Set specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • versionSetID - Api Version Set identifier. Must be unique in the current API Management service instance.
  • options - APIVersionSetClientGetOptions contains the optional parameters for the APIVersionSetClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiVersionSet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIVersionSetClient().Get(ctx, "rg1", "apimService1", "vs1", 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.APIVersionSetContract = armapimanagement.APIVersionSetContract{
// 	Name: to.Ptr("vs1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/api-version-sets"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/vs1"),
// 	Properties: &armapimanagement.APIVersionSetContractProperties{
// 		Description: to.Ptr("Version configuration"),
// 		DisplayName: to.Ptr("Version Set 1"),
// 		VersioningScheme: to.Ptr(armapimanagement.VersioningSchemeSegment),
// 	},
// }
Output:

func (*APIVersionSetClient) GetEntityTag

func (client *APIVersionSetClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string, options *APIVersionSetClientGetEntityTagOptions) (APIVersionSetClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the Api Version Set specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • versionSetID - Api Version Set identifier. Must be unique in the current API Management service instance.
  • options - APIVersionSetClientGetEntityTagOptions contains the optional parameters for the APIVersionSetClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiVersionSet.json

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

func (*APIVersionSetClient) NewListByServicePager

func (client *APIVersionSetClient) NewListByServicePager(resourceGroupName string, serviceName string, options *APIVersionSetClientListByServiceOptions) *runtime.Pager[APIVersionSetClientListByServiceResponse]

NewListByServicePager - Lists a collection of API Version Sets in the specified service instance.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - APIVersionSetClientListByServiceOptions contains the optional parameters for the APIVersionSetClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiVersionSets.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAPIVersionSetClient().NewListByServicePager("rg1", "apimService1", &armapimanagement.APIVersionSetClientListByServiceOptions{Filter: nil,
	Top:  nil,
	Skip: 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.APIVersionSetCollection = armapimanagement.APIVersionSetCollection{
	// 	Count: to.Ptr[int64](2),
	// 	Value: []*armapimanagement.APIVersionSetContract{
	// 		{
	// 			Name: to.Ptr("vs1"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/api-version-sets"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/vs1"),
	// 			Properties: &armapimanagement.APIVersionSetContractProperties{
	// 				Description: to.Ptr("Version configuration"),
	// 				DisplayName: to.Ptr("api set 1"),
	// 				VersioningScheme: to.Ptr(armapimanagement.VersioningSchemeSegment),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("vs2"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/api-version-sets"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/vs2"),
	// 			Properties: &armapimanagement.APIVersionSetContractProperties{
	// 				Description: to.Ptr("Version configuration 2"),
	// 				DisplayName: to.Ptr("api set 2"),
	// 				VersioningScheme: to.Ptr(armapimanagement.VersioningSchemeQuery),
	// 			},
	// 	}},
	// }
}
Output:

func (*APIVersionSetClient) Update

func (client *APIVersionSetClient) Update(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string, ifMatch string, parameters APIVersionSetUpdateParameters, options *APIVersionSetClientUpdateOptions) (APIVersionSetClientUpdateResponse, error)

Update - Updates the details of the Api VersionSet specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • versionSetID - Api Version Set identifier. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - Update parameters.
  • options - APIVersionSetClientUpdateOptions contains the optional parameters for the APIVersionSetClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiVersionSet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIVersionSetClient().Update(ctx, "rg1", "apimService1", "vs1", "*", armapimanagement.APIVersionSetUpdateParameters{
	Properties: &armapimanagement.APIVersionSetUpdateParametersProperties{
		Description:      to.Ptr("Version configuration"),
		DisplayName:      to.Ptr("api set 1"),
		VersioningScheme: to.Ptr(armapimanagement.VersioningSchemeSegment),
	},
}, 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.APIVersionSetContract = armapimanagement.APIVersionSetContract{
// 	Name: to.Ptr("vs1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/api-version-sets"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/vs1"),
// 	Properties: &armapimanagement.APIVersionSetContractProperties{
// 		Description: to.Ptr("Version configuration"),
// 		DisplayName: to.Ptr("api set 1"),
// 		VersioningScheme: to.Ptr(armapimanagement.VersioningSchemeSegment),
// 	},
// }
Output:

type APIVersionSetClientCreateOrUpdateOptions

type APIVersionSetClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

APIVersionSetClientCreateOrUpdateOptions contains the optional parameters for the APIVersionSetClient.CreateOrUpdate method.

type APIVersionSetClientCreateOrUpdateResponse

type APIVersionSetClientCreateOrUpdateResponse struct {
	// API Version Set Contract details.
	APIVersionSetContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIVersionSetClientCreateOrUpdateResponse contains the response from method APIVersionSetClient.CreateOrUpdate.

type APIVersionSetClientDeleteOptions

type APIVersionSetClientDeleteOptions struct {
}

APIVersionSetClientDeleteOptions contains the optional parameters for the APIVersionSetClient.Delete method.

type APIVersionSetClientDeleteResponse

type APIVersionSetClientDeleteResponse struct {
}

APIVersionSetClientDeleteResponse contains the response from method APIVersionSetClient.Delete.

type APIVersionSetClientGetEntityTagOptions

type APIVersionSetClientGetEntityTagOptions struct {
}

APIVersionSetClientGetEntityTagOptions contains the optional parameters for the APIVersionSetClient.GetEntityTag method.

type APIVersionSetClientGetEntityTagResponse

type APIVersionSetClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

APIVersionSetClientGetEntityTagResponse contains the response from method APIVersionSetClient.GetEntityTag.

type APIVersionSetClientGetOptions

type APIVersionSetClientGetOptions struct {
}

APIVersionSetClientGetOptions contains the optional parameters for the APIVersionSetClient.Get method.

type APIVersionSetClientGetResponse

type APIVersionSetClientGetResponse struct {
	// API Version Set Contract details.
	APIVersionSetContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIVersionSetClientGetResponse contains the response from method APIVersionSetClient.Get.

type APIVersionSetClientListByServiceOptions

type APIVersionSetClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

APIVersionSetClientListByServiceOptions contains the optional parameters for the APIVersionSetClient.NewListByServicePager method.

type APIVersionSetClientListByServiceResponse

type APIVersionSetClientListByServiceResponse struct {
	// Paged API Version Set list representation.
	APIVersionSetCollection
}

APIVersionSetClientListByServiceResponse contains the response from method APIVersionSetClient.NewListByServicePager.

type APIVersionSetClientUpdateOptions

type APIVersionSetClientUpdateOptions struct {
}

APIVersionSetClientUpdateOptions contains the optional parameters for the APIVersionSetClient.Update method.

type APIVersionSetClientUpdateResponse

type APIVersionSetClientUpdateResponse struct {
	// API Version Set Contract details.
	APIVersionSetContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIVersionSetClientUpdateResponse contains the response from method APIVersionSetClient.Update.

type APIVersionSetCollection

type APIVersionSetCollection struct {
	// Total record count number across all pages.
	Count *int64

	// Next page link if any.
	NextLink *string

	// Page values.
	Value []*APIVersionSetContract
}

APIVersionSetCollection - Paged API Version Set list representation.

func (APIVersionSetCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIVersionSetCollection.

func (*APIVersionSetCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIVersionSetCollection.

type APIVersionSetContract

type APIVersionSetContract struct {
	// API VersionSet contract properties.
	Properties *APIVersionSetContractProperties

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

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

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

APIVersionSetContract - API Version Set Contract details.

func (APIVersionSetContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIVersionSetContract.

func (*APIVersionSetContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIVersionSetContract.

type APIVersionSetContractDetails

type APIVersionSetContractDetails struct {
	// Description of API Version Set.
	Description *string

	// Identifier for existing API Version Set. Omit this value to create a new Version Set.
	ID *string

	// The display Name of the API Version Set.
	Name *string

	// Name of HTTP header parameter that indicates the API Version if versioningScheme is set to header.
	VersionHeaderName *string

	// Name of query parameter that indicates the API Version if versioningScheme is set to query.
	VersionQueryName *string

	// An value that determines where the API Version identifier will be located in a HTTP request.
	VersioningScheme *APIVersionSetContractDetailsVersioningScheme
}

APIVersionSetContractDetails - An API Version Set contains the common configuration for a set of API Versions relating

func (APIVersionSetContractDetails) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIVersionSetContractDetails.

func (*APIVersionSetContractDetails) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIVersionSetContractDetails.

type APIVersionSetContractDetailsVersioningScheme

type APIVersionSetContractDetailsVersioningScheme string

APIVersionSetContractDetailsVersioningScheme - An value that determines where the API Version identifier will be located in a HTTP request.

const (
	// APIVersionSetContractDetailsVersioningSchemeHeader - The API Version is passed in a HTTP header.
	APIVersionSetContractDetailsVersioningSchemeHeader APIVersionSetContractDetailsVersioningScheme = "Header"
	// APIVersionSetContractDetailsVersioningSchemeQuery - The API Version is passed in a query parameter.
	APIVersionSetContractDetailsVersioningSchemeQuery APIVersionSetContractDetailsVersioningScheme = "Query"
	// APIVersionSetContractDetailsVersioningSchemeSegment - The API Version is passed in a path segment.
	APIVersionSetContractDetailsVersioningSchemeSegment APIVersionSetContractDetailsVersioningScheme = "Segment"
)

func PossibleAPIVersionSetContractDetailsVersioningSchemeValues

func PossibleAPIVersionSetContractDetailsVersioningSchemeValues() []APIVersionSetContractDetailsVersioningScheme

PossibleAPIVersionSetContractDetailsVersioningSchemeValues returns the possible values for the APIVersionSetContractDetailsVersioningScheme const type.

type APIVersionSetContractProperties

type APIVersionSetContractProperties struct {
	// REQUIRED; Name of API Version Set
	DisplayName *string

	// REQUIRED; An value that determines where the API Version identifier will be located in a HTTP request.
	VersioningScheme *VersioningScheme

	// Description of API Version Set.
	Description *string

	// Name of HTTP header parameter that indicates the API Version if versioningScheme is set to header.
	VersionHeaderName *string

	// Name of query parameter that indicates the API Version if versioningScheme is set to query.
	VersionQueryName *string
}

APIVersionSetContractProperties - Properties of an API Version Set.

func (APIVersionSetContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIVersionSetContractProperties.

func (*APIVersionSetContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIVersionSetContractProperties.

type APIVersionSetEntityBase

type APIVersionSetEntityBase struct {
	// Description of API Version Set.
	Description *string

	// Name of HTTP header parameter that indicates the API Version if versioningScheme is set to header.
	VersionHeaderName *string

	// Name of query parameter that indicates the API Version if versioningScheme is set to query.
	VersionQueryName *string
}

APIVersionSetEntityBase - API Version set base parameters

func (APIVersionSetEntityBase) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIVersionSetEntityBase.

func (*APIVersionSetEntityBase) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIVersionSetEntityBase.

type APIVersionSetUpdateParameters

type APIVersionSetUpdateParameters struct {
	// Parameters to update or create an API Version Set Contract.
	Properties *APIVersionSetUpdateParametersProperties
}

APIVersionSetUpdateParameters - Parameters to update or create an API Version Set Contract.

func (APIVersionSetUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIVersionSetUpdateParameters.

func (*APIVersionSetUpdateParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIVersionSetUpdateParameters.

type APIVersionSetUpdateParametersProperties

type APIVersionSetUpdateParametersProperties struct {
	// Description of API Version Set.
	Description *string

	// Name of API Version Set
	DisplayName *string

	// Name of HTTP header parameter that indicates the API Version if versioningScheme is set to header.
	VersionHeaderName *string

	// Name of query parameter that indicates the API Version if versioningScheme is set to query.
	VersionQueryName *string

	// An value that determines where the API Version identifier will be located in a HTTP request.
	VersioningScheme *VersioningScheme
}

APIVersionSetUpdateParametersProperties - Properties used to create or update an API Version Set.

func (APIVersionSetUpdateParametersProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIVersionSetUpdateParametersProperties.

func (*APIVersionSetUpdateParametersProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIVersionSetUpdateParametersProperties.

type APIWikiClient

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

APIWikiClient contains the methods for the APIWiki group. Don't use this type directly, use NewAPIWikiClient() instead.

func NewAPIWikiClient

func NewAPIWikiClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIWikiClient, error)

NewAPIWikiClient creates a new instance of APIWikiClient 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 (*APIWikiClient) CreateOrUpdate

func (client *APIWikiClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, parameters WikiContract, options *APIWikiClientCreateOrUpdateOptions) (APIWikiClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates a new Wiki for an API or updates an existing one. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • parameters - Create parameters.
  • options - APIWikiClientCreateOrUpdateOptions contains the optional parameters for the APIWikiClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiWiki.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIWikiClient().CreateOrUpdate(ctx, "rg1", "apimService1", "57d1f7558aa04f15146d9d8a", armapimanagement.WikiContract{
	Properties: &armapimanagement.WikiContractProperties{
		Documents: []*armapimanagement.WikiDocumentationContract{
			{
				DocumentationID: to.Ptr("docId1"),
			},
			{
				DocumentationID: to.Ptr("docId2"),
			}},
	},
}, &armapimanagement.APIWikiClientCreateOrUpdateOptions{IfMatch: 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.WikiContract = armapimanagement.WikiContract{
// 	Name: to.Ptr("default"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/wikis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/wikis/default"),
// 	Properties: &armapimanagement.WikiContractProperties{
// 		Documents: []*armapimanagement.WikiDocumentationContract{
// 			{
// 				DocumentationID: to.Ptr("docId1"),
// 			},
// 			{
// 				DocumentationID: to.Ptr("docId2"),
// 		}},
// 	},
// }
Output:

func (*APIWikiClient) Delete

func (client *APIWikiClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, ifMatch string, options *APIWikiClientDeleteOptions) (APIWikiClientDeleteResponse, error)

Delete - Deletes the specified Wiki from an API. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - APIWikiClientDeleteOptions contains the optional parameters for the APIWikiClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiWiki.json

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

func (*APIWikiClient) Get

func (client *APIWikiClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, options *APIWikiClientGetOptions) (APIWikiClientGetResponse, error)

Get - Gets the details of the Wiki for an API specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • options - APIWikiClientGetOptions contains the optional parameters for the APIWikiClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiWiki.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIWikiClient().Get(ctx, "rg1", "apimService1", "57d1f7558aa04f15146d9d8a", 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.WikiContract = armapimanagement.WikiContract{
// 	Name: to.Ptr("default"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/wikis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/wikis/default"),
// 	Properties: &armapimanagement.WikiContractProperties{
// 		Documents: []*armapimanagement.WikiDocumentationContract{
// 			{
// 				DocumentationID: to.Ptr("docId1"),
// 			},
// 			{
// 				DocumentationID: to.Ptr("docId2"),
// 		}},
// 	},
// }
Output:

func (*APIWikiClient) GetEntityTag

func (client *APIWikiClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiID string, options *APIWikiClientGetEntityTagOptions) (APIWikiClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the Wiki for an API specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • options - APIWikiClientGetEntityTagOptions contains the optional parameters for the APIWikiClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiWiki.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewAPIWikiClient().GetEntityTag(ctx, "rg1", "apimService1", "57d1f7558aa04f15146d9d8a", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*APIWikiClient) Update

func (client *APIWikiClient) Update(ctx context.Context, resourceGroupName string, serviceName string, apiID string, ifMatch string, parameters WikiUpdateContract, options *APIWikiClientUpdateOptions) (APIWikiClientUpdateResponse, error)

Update - Updates the details of the Wiki for an API specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - Wiki Update parameters.
  • options - APIWikiClientUpdateOptions contains the optional parameters for the APIWikiClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiWiki.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIWikiClient().Update(ctx, "rg1", "apimService1", "57d1f7558aa04f15146d9d8a", "*", armapimanagement.WikiUpdateContract{
	Properties: &armapimanagement.WikiContractProperties{
		Documents: []*armapimanagement.WikiDocumentationContract{
			{
				DocumentationID: to.Ptr("docId1"),
			}},
	},
}, 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.WikiContract = armapimanagement.WikiContract{
// 	Name: to.Ptr("default"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/wikis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/wikis/default"),
// 	Properties: &armapimanagement.WikiContractProperties{
// 		Documents: []*armapimanagement.WikiDocumentationContract{
// 			{
// 				DocumentationID: to.Ptr("docId1"),
// 		}},
// 	},
// }
Output:

type APIWikiClientCreateOrUpdateOptions

type APIWikiClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

APIWikiClientCreateOrUpdateOptions contains the optional parameters for the APIWikiClient.CreateOrUpdate method.

type APIWikiClientCreateOrUpdateResponse

type APIWikiClientCreateOrUpdateResponse struct {
	// Wiki properties
	WikiContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIWikiClientCreateOrUpdateResponse contains the response from method APIWikiClient.CreateOrUpdate.

type APIWikiClientDeleteOptions

type APIWikiClientDeleteOptions struct {
}

APIWikiClientDeleteOptions contains the optional parameters for the APIWikiClient.Delete method.

type APIWikiClientDeleteResponse

type APIWikiClientDeleteResponse struct {
}

APIWikiClientDeleteResponse contains the response from method APIWikiClient.Delete.

type APIWikiClientGetEntityTagOptions

type APIWikiClientGetEntityTagOptions struct {
}

APIWikiClientGetEntityTagOptions contains the optional parameters for the APIWikiClient.GetEntityTag method.

type APIWikiClientGetEntityTagResponse

type APIWikiClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

APIWikiClientGetEntityTagResponse contains the response from method APIWikiClient.GetEntityTag.

type APIWikiClientGetOptions

type APIWikiClientGetOptions struct {
}

APIWikiClientGetOptions contains the optional parameters for the APIWikiClient.Get method.

type APIWikiClientGetResponse

type APIWikiClientGetResponse struct {
	// Wiki properties
	WikiContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIWikiClientGetResponse contains the response from method APIWikiClient.Get.

type APIWikiClientUpdateOptions

type APIWikiClientUpdateOptions struct {
}

APIWikiClientUpdateOptions contains the optional parameters for the APIWikiClient.Update method.

type APIWikiClientUpdateResponse

type APIWikiClientUpdateResponse struct {
	// Wiki properties
	WikiContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIWikiClientUpdateResponse contains the response from method APIWikiClient.Update.

type APIWikisClient

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

APIWikisClient contains the methods for the APIWikis group. Don't use this type directly, use NewAPIWikisClient() instead.

func NewAPIWikisClient

func NewAPIWikisClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIWikisClient, error)

NewAPIWikisClient creates a new instance of APIWikisClient 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 (*APIWikisClient) NewListPager

func (client *APIWikisClient) NewListPager(resourceGroupName string, serviceName string, apiID string, options *APIWikisClientListOptions) *runtime.Pager[APIWikisClientListResponse]

NewListPager - Gets the wikis for an API specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • options - APIWikisClientListOptions contains the optional parameters for the APIWikisClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiWikis.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAPIWikisClient().NewListPager("rg1", "apimService1", "57d1f7558aa04f15146d9d8a", &armapimanagement.APIWikisClientListOptions{Filter: nil,
	Top:  nil,
	Skip: 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.WikiCollection = armapimanagement.WikiCollection{
	// 	Value: []*armapimanagement.WikiContract{
	// 		{
	// 			Name: to.Ptr("default"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/apis/wikis"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/wikis/default"),
	// 			Properties: &armapimanagement.WikiContractProperties{
	// 				Documents: []*armapimanagement.WikiDocumentationContract{
	// 					{
	// 						DocumentationID: to.Ptr("docId1"),
	// 					},
	// 					{
	// 						DocumentationID: to.Ptr("docId2"),
	// 				}},
	// 			},
	// 	}},
	// }
}
Output:

type APIWikisClientListOptions

type APIWikisClientListOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | eq | contains |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

APIWikisClientListOptions contains the optional parameters for the APIWikisClient.NewListPager method.

type APIWikisClientListResponse

type APIWikisClientListResponse struct {
	// Paged Wiki list representation.
	WikiCollection
}

APIWikisClientListResponse contains the response from method APIWikisClient.NewListPager.

type AccessIDName

type AccessIDName string
const (
	AccessIDNameAccess    AccessIDName = "access"
	AccessIDNameGitAccess AccessIDName = "gitAccess"
)

func PossibleAccessIDNameValues

func PossibleAccessIDNameValues() []AccessIDName

PossibleAccessIDNameValues returns the possible values for the AccessIDName const type.

type AccessInformationCollection

type AccessInformationCollection struct {
	// Total record count number across all pages.
	Count *int64

	// READ-ONLY; Next page link if any.
	NextLink *string

	// READ-ONLY; Page values.
	Value []*AccessInformationContract
}

AccessInformationCollection - Paged AccessInformation list representation.

func (AccessInformationCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AccessInformationCollection.

func (*AccessInformationCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccessInformationCollection.

type AccessInformationContract

type AccessInformationContract struct {
	// AccessInformation entity contract properties.
	Properties *AccessInformationContractProperties

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

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

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

AccessInformationContract - Tenant Settings.

func (AccessInformationContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AccessInformationContract.

func (*AccessInformationContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccessInformationContract.

type AccessInformationContractProperties

type AccessInformationContractProperties struct {
	// Determines whether direct access is enabled.
	Enabled *bool

	// Access Information type ('access' or 'gitAccess')
	ID *string

	// Principal (User) Identifier.
	PrincipalID *string
}

AccessInformationContractProperties - Tenant access information contract of the API Management service.

func (AccessInformationContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AccessInformationContractProperties.

func (*AccessInformationContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccessInformationContractProperties.

type AccessInformationCreateParameterProperties

type AccessInformationCreateParameterProperties struct {
	// Determines whether direct access is enabled.
	Enabled *bool

	// Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.
	PrimaryKey *string

	// Principal (User) Identifier.
	PrincipalID *string

	// Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the
	// value.
	SecondaryKey *string
}

AccessInformationCreateParameterProperties - Tenant access information update parameters of the API Management service

func (AccessInformationCreateParameterProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type AccessInformationCreateParameterProperties.

func (*AccessInformationCreateParameterProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccessInformationCreateParameterProperties.

type AccessInformationCreateParameters

type AccessInformationCreateParameters struct {
	// Tenant access information update parameter properties.
	Properties *AccessInformationCreateParameterProperties
}

AccessInformationCreateParameters - Tenant access information update parameters.

func (AccessInformationCreateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AccessInformationCreateParameters.

func (*AccessInformationCreateParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccessInformationCreateParameters.

type AccessInformationSecretsContract

type AccessInformationSecretsContract struct {
	// Determines whether direct access is enabled.
	Enabled *bool

	// Access Information type ('access' or 'gitAccess')
	ID *string

	// Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.
	PrimaryKey *string

	// Principal (User) Identifier.
	PrincipalID *string

	// Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the
	// value.
	SecondaryKey *string
}

AccessInformationSecretsContract - Tenant access information contract of the API Management service.

func (AccessInformationSecretsContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AccessInformationSecretsContract.

func (*AccessInformationSecretsContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccessInformationSecretsContract.

type AccessInformationUpdateParameterProperties

type AccessInformationUpdateParameterProperties struct {
	// Determines whether direct access is enabled.
	Enabled *bool
}

AccessInformationUpdateParameterProperties - Tenant access information update parameters of the API Management service

func (AccessInformationUpdateParameterProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type AccessInformationUpdateParameterProperties.

func (*AccessInformationUpdateParameterProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccessInformationUpdateParameterProperties.

type AccessInformationUpdateParameters

type AccessInformationUpdateParameters struct {
	// Tenant access information update parameter properties.
	Properties *AccessInformationUpdateParameterProperties
}

AccessInformationUpdateParameters - Tenant access information update parameters.

func (AccessInformationUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AccessInformationUpdateParameters.

func (*AccessInformationUpdateParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccessInformationUpdateParameters.

type AccessType

type AccessType string

AccessType - The type of access to be used for the storage account.

const (
	// AccessTypeAccessKey - Use access key.
	AccessTypeAccessKey AccessType = "AccessKey"
	// AccessTypeSystemAssignedManagedIdentity - Use system assigned managed identity.
	AccessTypeSystemAssignedManagedIdentity AccessType = "SystemAssignedManagedIdentity"
	// AccessTypeUserAssignedManagedIdentity - Use user assigned managed identity.
	AccessTypeUserAssignedManagedIdentity AccessType = "UserAssignedManagedIdentity"
)

func PossibleAccessTypeValues

func PossibleAccessTypeValues() []AccessType

PossibleAccessTypeValues returns the possible values for the AccessType const type.

type AdditionalLocation

type AdditionalLocation struct {
	// REQUIRED; The location name of the additional region among Azure Data center regions.
	Location *string

	// REQUIRED; SKU properties of the API Management service.
	SKU *ServiceSKUProperties

	// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway
	// in this additional location.
	DisableGateway *bool

	// Property can be used to enable NAT Gateway for this API Management service.
	NatGatewayState *NatGatewayState

	// Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the location. Supported
	// only for Premium SKU being deployed in Virtual Network.
	PublicIPAddressID *string

	// Virtual network configuration for the location.
	VirtualNetworkConfiguration *VirtualNetworkConfiguration

	// A list of availability zones denoting where the resource needs to come from.
	Zones []*string

	// READ-ONLY; Gateway URL of the API Management service in the Region.
	GatewayRegionalURL *string

	// READ-ONLY; Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium
	// SKU on stv2 platform.
	OutboundPublicIPAddresses []*string

	// READ-ONLY; Compute Platform Version running the service.
	PlatformVersion *PlatformVersion

	// READ-ONLY; Private Static Load Balanced IP addresses of the API Management service which is deployed in an Internal Virtual
	// Network in a particular additional location. Available only for Basic, Standard,
	// Premium and Isolated SKU.
	PrivateIPAddresses []*string

	// READ-ONLY; Public Static Load Balanced IP addresses of the API Management service in the additional location. Available
	// only for Basic, Standard, Premium and Isolated SKU.
	PublicIPAddresses []*string
}

AdditionalLocation - Description of an additional API Management resource location.

func (AdditionalLocation) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AdditionalLocation.

func (*AdditionalLocation) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AdditionalLocation.

type AlwaysLog

type AlwaysLog string

AlwaysLog - Specifies for what type of messages sampling settings should not apply.

const (
	// AlwaysLogAllErrors - Always log all erroneous request regardless of sampling settings.
	AlwaysLogAllErrors AlwaysLog = "allErrors"
)

func PossibleAlwaysLogValues

func PossibleAlwaysLogValues() []AlwaysLog

PossibleAlwaysLogValues returns the possible values for the AlwaysLog const type.

type ApimIdentityType

type ApimIdentityType string

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

const (
	ApimIdentityTypeNone                       ApimIdentityType = "None"
	ApimIdentityTypeSystemAssigned             ApimIdentityType = "SystemAssigned"
	ApimIdentityTypeSystemAssignedUserAssigned ApimIdentityType = "SystemAssigned, UserAssigned"
	ApimIdentityTypeUserAssigned               ApimIdentityType = "UserAssigned"
)

func PossibleApimIdentityTypeValues

func PossibleApimIdentityTypeValues() []ApimIdentityType

PossibleApimIdentityTypeValues returns the possible values for the ApimIdentityType const type.

type ApimResource

type ApimResource struct {
	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type for API Management resource is set to Microsoft.ApiManagement.
	Type *string
}

ApimResource - The Resource definition.

func (ApimResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ApimResource.

func (*ApimResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ApimResource.

type AppType

type AppType string
const (
	// AppTypeDeveloperPortal - User create request was sent by new developer portal.
	AppTypeDeveloperPortal AppType = "developerPortal"
	// AppTypePortal - User create request was sent by legacy developer portal.
	AppTypePortal AppType = "portal"
)

func PossibleAppTypeValues

func PossibleAppTypeValues() []AppType

PossibleAppTypeValues returns the possible values for the AppType const type.

type ArmIDWrapper

type ArmIDWrapper struct {
	// READ-ONLY
	ID *string
}

ArmIDWrapper - A wrapper for an ARM resource id

func (ArmIDWrapper) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ArmIDWrapper.

func (*ArmIDWrapper) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ArmIDWrapper.

type AssociationContract

type AssociationContract struct {
	// Association entity contract properties.
	Properties *AssociationContractProperties

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

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

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

AssociationContract - Association entity details.

func (AssociationContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AssociationContract.

func (*AssociationContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AssociationContract.

type AssociationContractProperties

type AssociationContractProperties struct {
	// Provisioning state.
	ProvisioningState *string
}

AssociationContractProperties - Association entity contract properties.

func (AssociationContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AssociationContractProperties.

func (*AssociationContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AssociationContractProperties.

type AsyncOperationStatus

type AsyncOperationStatus string

AsyncOperationStatus - Status of an async operation.

const (
	AsyncOperationStatusFailed     AsyncOperationStatus = "Failed"
	AsyncOperationStatusInProgress AsyncOperationStatus = "InProgress"
	AsyncOperationStatusStarted    AsyncOperationStatus = "Started"
	AsyncOperationStatusSucceeded  AsyncOperationStatus = "Succeeded"
)

func PossibleAsyncOperationStatusValues

func PossibleAsyncOperationStatusValues() []AsyncOperationStatus

PossibleAsyncOperationStatusValues returns the possible values for the AsyncOperationStatus const type.

type AsyncResolverStatus

type AsyncResolverStatus string

AsyncResolverStatus - Status of an async resolver.

const (
	AsyncResolverStatusFailed     AsyncResolverStatus = "Failed"
	AsyncResolverStatusInProgress AsyncResolverStatus = "InProgress"
	AsyncResolverStatusStarted    AsyncResolverStatus = "Started"
	AsyncResolverStatusSucceeded  AsyncResolverStatus = "Succeeded"
)

func PossibleAsyncResolverStatusValues

func PossibleAsyncResolverStatusValues() []AsyncResolverStatus

PossibleAsyncResolverStatusValues returns the possible values for the AsyncResolverStatus const type.

type AuthenticationSettingsContract

type AuthenticationSettingsContract struct {
	// OAuth2 Authentication settings
	OAuth2 *OAuth2AuthenticationSettingsContract

	// Collection of OAuth2 authentication settings included into this API.
	OAuth2AuthenticationSettings []*OAuth2AuthenticationSettingsContract

	// OpenID Connect Authentication Settings
	Openid *OpenIDAuthenticationSettingsContract

	// Collection of Open ID Connect authentication settings included into this API.
	OpenidAuthenticationSettings []*OpenIDAuthenticationSettingsContract
}

AuthenticationSettingsContract - API Authentication Settings.

func (AuthenticationSettingsContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AuthenticationSettingsContract.

func (*AuthenticationSettingsContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AuthenticationSettingsContract.

type AuthorizationAccessPolicyClient

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

AuthorizationAccessPolicyClient contains the methods for the AuthorizationAccessPolicy group. Don't use this type directly, use NewAuthorizationAccessPolicyClient() instead.

func NewAuthorizationAccessPolicyClient

func NewAuthorizationAccessPolicyClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AuthorizationAccessPolicyClient, error)

NewAuthorizationAccessPolicyClient creates a new instance of AuthorizationAccessPolicyClient 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 (*AuthorizationAccessPolicyClient) CreateOrUpdate

func (client *AuthorizationAccessPolicyClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, authorizationID string, authorizationAccessPolicyID string, parameters AuthorizationAccessPolicyContract, options *AuthorizationAccessPolicyClientCreateOrUpdateOptions) (AuthorizationAccessPolicyClientCreateOrUpdateResponse, error)

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

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • authorizationProviderID - Identifier of the authorization provider.
  • authorizationID - Identifier of the authorization.
  • authorizationAccessPolicyID - Identifier of the authorization access policy.
  • parameters - Create parameters.
  • options - AuthorizationAccessPolicyClientCreateOrUpdateOptions contains the optional parameters for the AuthorizationAccessPolicyClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationAccessPolicy.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAuthorizationAccessPolicyClient().CreateOrUpdate(ctx, "rg1", "apimService1", "aadwithauthcode", "authz1", "fe0bed83-631f-4149-bd0b-0464b1bc7cab", armapimanagement.AuthorizationAccessPolicyContract{
	Properties: &armapimanagement.AuthorizationAccessPolicyContractProperties{
		ObjectID: to.Ptr("fe0bed83-631f-4149-bd0b-0464b1bc7cab"),
		TenantID: to.Ptr("13932a0d-5c63-4d37-901d-1df9c97722ff"),
	},
}, &armapimanagement.AuthorizationAccessPolicyClientCreateOrUpdateOptions{IfMatch: 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.AuthorizationAccessPolicyContract = armapimanagement.AuthorizationAccessPolicyContract{
// 	Name: to.Ptr("fe0bed83-631f-4149-bd0b-0464b1bc7cab"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/authorizationProviders/authorizations/accessPolicies"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithauthcode/authorizations/authz1/accessPolicies"),
// 	Properties: &armapimanagement.AuthorizationAccessPolicyContractProperties{
// 		ObjectID: to.Ptr("fe0bed83-631f-4149-bd0b-0464b1bc7cab"),
// 		TenantID: to.Ptr("13932a0d-5c63-4d37-901d-1df9c97722ff"),
// 	},
// }
Output:

func (*AuthorizationAccessPolicyClient) Delete

func (client *AuthorizationAccessPolicyClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, authorizationID string, authorizationAccessPolicyID string, ifMatch string, options *AuthorizationAccessPolicyClientDeleteOptions) (AuthorizationAccessPolicyClientDeleteResponse, error)

Delete - Deletes specific access policy from the Authorization. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • authorizationProviderID - Identifier of the authorization provider.
  • authorizationID - Identifier of the authorization.
  • authorizationAccessPolicyID - Identifier of the authorization access policy.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - AuthorizationAccessPolicyClientDeleteOptions contains the optional parameters for the AuthorizationAccessPolicyClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteAuthorizationAccessPolicy.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewAuthorizationAccessPolicyClient().Delete(ctx, "rg1", "apimService1", "aadwithauthcode", "authz1", "fe0bed83-631f-4149-bd0b-0464b1bc7cab", "*", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*AuthorizationAccessPolicyClient) Get

func (client *AuthorizationAccessPolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, authorizationID string, authorizationAccessPolicyID string, options *AuthorizationAccessPolicyClientGetOptions) (AuthorizationAccessPolicyClientGetResponse, error)

Get - Gets the details of the authorization access policy specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • authorizationProviderID - Identifier of the authorization provider.
  • authorizationID - Identifier of the authorization.
  • authorizationAccessPolicyID - Identifier of the authorization access policy.
  • options - AuthorizationAccessPolicyClientGetOptions contains the optional parameters for the AuthorizationAccessPolicyClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationAccessPolicy.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAuthorizationAccessPolicyClient().Get(ctx, "rg1", "apimService1", "aadwithauthcode", "authz1", "fe0bed83-631f-4149-bd0b-0464b1bc7cab", 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.AuthorizationAccessPolicyContract = armapimanagement.AuthorizationAccessPolicyContract{
// 	Name: to.Ptr("fe0bed83-631f-4149-bd0b-0464b1bc7cab"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/authorizationProviders/authorizations/accessPolicies"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithauthcode/authorizations/authz1/accessPolicies"),
// 	Properties: &armapimanagement.AuthorizationAccessPolicyContractProperties{
// 		ObjectID: to.Ptr("fe0bed83-631f-4149-bd0b-0464b1bc7cab"),
// 		TenantID: to.Ptr("13932a0d-5c63-4d37-901d-1df9c97722ff"),
// 	},
// }
Output:

func (*AuthorizationAccessPolicyClient) NewListByAuthorizationPager

func (client *AuthorizationAccessPolicyClient) NewListByAuthorizationPager(resourceGroupName string, serviceName string, authorizationProviderID string, authorizationID string, options *AuthorizationAccessPolicyClientListByAuthorizationOptions) *runtime.Pager[AuthorizationAccessPolicyClientListByAuthorizationResponse]

NewListByAuthorizationPager - Lists a collection of authorization access policy defined within a authorization.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • authorizationProviderID - Identifier of the authorization provider.
  • authorizationID - Identifier of the authorization.
  • options - AuthorizationAccessPolicyClientListByAuthorizationOptions contains the optional parameters for the AuthorizationAccessPolicyClient.NewListByAuthorizationPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListAuthorizationAccessPolicies.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAuthorizationAccessPolicyClient().NewListByAuthorizationPager("rg1", "apimService1", "aadwithauthcode", "authz1", &armapimanagement.AuthorizationAccessPolicyClientListByAuthorizationOptions{Filter: nil,
	Top:  nil,
	Skip: 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.AuthorizationAccessPolicyCollection = armapimanagement.AuthorizationAccessPolicyCollection{
	// 	Value: []*armapimanagement.AuthorizationAccessPolicyContract{
	// 		{
	// 			Name: to.Ptr("fe0bed83-631f-4149-bd0b-0464b1bc7cab"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/authorizationProviders/authorizations/accessPolicies"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithauthcode/authorizations/authz1/accessPolicies"),
	// 			Properties: &armapimanagement.AuthorizationAccessPolicyContractProperties{
	// 				ObjectID: to.Ptr("fe0bed83-631f-4149-bd0b-0464b1bc7cab"),
	// 				TenantID: to.Ptr("13932a0d-5c63-4d37-901d-1df9c97722ff"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("5585d6cd-2289-42e9-ab9b-3e2e23d74b4a"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/authorizationProviders/authorizations/accessPolicies"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithauthcode/authorizations/authz1/accessPolicies"),
	// 			Properties: &armapimanagement.AuthorizationAccessPolicyContractProperties{
	// 				ObjectID: to.Ptr("5585d6cd-2289-42e9-ab9b-3e2e23d74b4a"),
	// 				TenantID: to.Ptr("13932a0d-5c63-4d37-901d-1df9c97722ff"),
	// 			},
	// 	}},
	// }
}
Output:

type AuthorizationAccessPolicyClientCreateOrUpdateOptions

type AuthorizationAccessPolicyClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

AuthorizationAccessPolicyClientCreateOrUpdateOptions contains the optional parameters for the AuthorizationAccessPolicyClient.CreateOrUpdate method.

type AuthorizationAccessPolicyClientCreateOrUpdateResponse

type AuthorizationAccessPolicyClientCreateOrUpdateResponse struct {
	// Authorization access policy contract.
	AuthorizationAccessPolicyContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

AuthorizationAccessPolicyClientCreateOrUpdateResponse contains the response from method AuthorizationAccessPolicyClient.CreateOrUpdate.

type AuthorizationAccessPolicyClientDeleteOptions

type AuthorizationAccessPolicyClientDeleteOptions struct {
}

AuthorizationAccessPolicyClientDeleteOptions contains the optional parameters for the AuthorizationAccessPolicyClient.Delete method.

type AuthorizationAccessPolicyClientDeleteResponse

type AuthorizationAccessPolicyClientDeleteResponse struct {
}

AuthorizationAccessPolicyClientDeleteResponse contains the response from method AuthorizationAccessPolicyClient.Delete.

type AuthorizationAccessPolicyClientGetOptions

type AuthorizationAccessPolicyClientGetOptions struct {
}

AuthorizationAccessPolicyClientGetOptions contains the optional parameters for the AuthorizationAccessPolicyClient.Get method.

type AuthorizationAccessPolicyClientGetResponse

type AuthorizationAccessPolicyClientGetResponse struct {
	// Authorization access policy contract.
	AuthorizationAccessPolicyContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

AuthorizationAccessPolicyClientGetResponse contains the response from method AuthorizationAccessPolicyClient.Get.

type AuthorizationAccessPolicyClientListByAuthorizationOptions

type AuthorizationAccessPolicyClientListByAuthorizationOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

AuthorizationAccessPolicyClientListByAuthorizationOptions contains the optional parameters for the AuthorizationAccessPolicyClient.NewListByAuthorizationPager method.

type AuthorizationAccessPolicyClientListByAuthorizationResponse

type AuthorizationAccessPolicyClientListByAuthorizationResponse struct {
	// Paged Authorization Access Policy list representation.
	AuthorizationAccessPolicyCollection
}

AuthorizationAccessPolicyClientListByAuthorizationResponse contains the response from method AuthorizationAccessPolicyClient.NewListByAuthorizationPager.

type AuthorizationAccessPolicyCollection

type AuthorizationAccessPolicyCollection struct {
	// Total record count number across all pages.
	Count *int64

	// Next page link if any.
	NextLink *string

	// Page values.
	Value []*AuthorizationAccessPolicyContract
}

AuthorizationAccessPolicyCollection - Paged Authorization Access Policy list representation.

func (AuthorizationAccessPolicyCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AuthorizationAccessPolicyCollection.

func (*AuthorizationAccessPolicyCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationAccessPolicyCollection.

type AuthorizationAccessPolicyContract

type AuthorizationAccessPolicyContract struct {
	// Properties of the Authorization Contract.
	Properties *AuthorizationAccessPolicyContractProperties

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

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

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

AuthorizationAccessPolicyContract - Authorization access policy contract.

func (AuthorizationAccessPolicyContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AuthorizationAccessPolicyContract.

func (*AuthorizationAccessPolicyContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationAccessPolicyContract.

type AuthorizationAccessPolicyContractProperties

type AuthorizationAccessPolicyContractProperties struct {
	// The Object Id
	ObjectID *string

	// The Tenant Id
	TenantID *string
}

AuthorizationAccessPolicyContractProperties - Authorization Access Policy details.

func (AuthorizationAccessPolicyContractProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type AuthorizationAccessPolicyContractProperties.

func (*AuthorizationAccessPolicyContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationAccessPolicyContractProperties.

type AuthorizationClient

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

AuthorizationClient contains the methods for the Authorization group. Don't use this type directly, use NewAuthorizationClient() instead.

func NewAuthorizationClient

func NewAuthorizationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AuthorizationClient, error)

NewAuthorizationClient creates a new instance of AuthorizationClient 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 (*AuthorizationClient) ConfirmConsentCode

func (client *AuthorizationClient) ConfirmConsentCode(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, authorizationID string, parameters AuthorizationConfirmConsentCodeRequestContract, options *AuthorizationClientConfirmConsentCodeOptions) (AuthorizationClientConfirmConsentCodeResponse, error)

ConfirmConsentCode - Confirm valid consent code to suppress Authorizations anti-phishing page. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • authorizationProviderID - Identifier of the authorization provider.
  • authorizationID - Identifier of the authorization.
  • parameters - Create parameters.
  • options - AuthorizationClientConfirmConsentCodeOptions contains the optional parameters for the AuthorizationClient.ConfirmConsentCode method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPostAuthorizationConfirmConsentCodeRequest.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewAuthorizationClient().ConfirmConsentCode(ctx, "rg1", "apimService1", "aadwithauthcode", "authz1", armapimanagement.AuthorizationConfirmConsentCodeRequestContract{
	ConsentCode: to.Ptr("theconsentcode"),
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*AuthorizationClient) CreateOrUpdate

func (client *AuthorizationClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, authorizationID string, parameters AuthorizationContract, options *AuthorizationClientCreateOrUpdateOptions) (AuthorizationClientCreateOrUpdateResponse, error)

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

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • authorizationProviderID - Identifier of the authorization provider.
  • authorizationID - Identifier of the authorization.
  • parameters - Create parameters.
  • options - AuthorizationClientCreateOrUpdateOptions contains the optional parameters for the AuthorizationClient.CreateOrUpdate method.
Example (ApiManagementCreateAuthorizationAadAuthCode)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationAADAuthCode.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAuthorizationClient().CreateOrUpdate(ctx, "rg1", "apimService1", "aadwithauthcode", "authz2", armapimanagement.AuthorizationContract{
	Properties: &armapimanagement.AuthorizationContractProperties{
		AuthorizationType: to.Ptr(armapimanagement.AuthorizationTypeOAuth2),
		OAuth2GrantType:   to.Ptr(armapimanagement.OAuth2GrantTypeAuthorizationCode),
	},
}, &armapimanagement.AuthorizationClientCreateOrUpdateOptions{IfMatch: 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.AuthorizationContract = armapimanagement.AuthorizationContract{
// 	Name: to.Ptr("authz2"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/authorizationProviders/authorizations"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithauthcode/authorizations/authz2"),
// 	Properties: &armapimanagement.AuthorizationContractProperties{
// 		AuthorizationType: to.Ptr(armapimanagement.AuthorizationTypeOAuth2),
// 		Error: &armapimanagement.AuthorizationError{
// 			Code: to.Ptr("Unauthenticated"),
// 			Message: to.Ptr("This connection is not authenticated."),
// 		},
// 		OAuth2GrantType: to.Ptr(armapimanagement.OAuth2GrantTypeAuthorizationCode),
// 		Status: to.Ptr("Error"),
// 	},
// }
Output:

Example (ApiManagementCreateAuthorizationAadClientCred)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationAADClientCred.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAuthorizationClient().CreateOrUpdate(ctx, "rg1", "apimService1", "aadwithclientcred", "authz1", armapimanagement.AuthorizationContract{
	Properties: &armapimanagement.AuthorizationContractProperties{
		AuthorizationType: to.Ptr(armapimanagement.AuthorizationTypeOAuth2),
		OAuth2GrantType:   to.Ptr(armapimanagement.OAuth2GrantTypeAuthorizationCode),
		Parameters: map[string]*string{
			"clientId":     to.Ptr("53790925-fdd3-4b80-bc7a-4c3aaf25801d"),
			"clientSecret": to.Ptr("FcJkQ3iPSaKAQRA7Ft8Q~fZ1X5vKmqzUAfJagcJ8"),
		},
	},
}, &armapimanagement.AuthorizationClientCreateOrUpdateOptions{IfMatch: 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.AuthorizationContract = armapimanagement.AuthorizationContract{
// 	Name: to.Ptr("authz1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/authorizationProviders/authorizations"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithclientcred/authorizations/authz1"),
// 	Properties: &armapimanagement.AuthorizationContractProperties{
// 		AuthorizationType: to.Ptr(armapimanagement.AuthorizationTypeOAuth2),
// 		OAuth2GrantType: to.Ptr(armapimanagement.OAuth2GrantTypeClientCredentials),
// 		Parameters: map[string]*string{
// 			"clientId": to.Ptr("53790925-fdd3-4b80-bc7a-4c3aaf25801d"),
// 		},
// 		Status: to.Ptr("Connected"),
// 	},
// }
Output:

func (*AuthorizationClient) Delete

func (client *AuthorizationClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, authorizationID string, ifMatch string, options *AuthorizationClientDeleteOptions) (AuthorizationClientDeleteResponse, error)

Delete - Deletes specific Authorization from the Authorization provider. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • authorizationProviderID - Identifier of the authorization provider.
  • authorizationID - Identifier of the authorization.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - AuthorizationClientDeleteOptions contains the optional parameters for the AuthorizationClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteAuthorization.json

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

func (*AuthorizationClient) Get

func (client *AuthorizationClient) Get(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, authorizationID string, options *AuthorizationClientGetOptions) (AuthorizationClientGetResponse, error)

Get - Gets the details of the authorization specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • authorizationProviderID - Identifier of the authorization provider.
  • authorizationID - Identifier of the authorization.
  • options - AuthorizationClientGetOptions contains the optional parameters for the AuthorizationClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorization.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAuthorizationClient().Get(ctx, "rg1", "apimService1", "aadwithauthcode", "authz1", 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.AuthorizationContract = armapimanagement.AuthorizationContract{
// 	Name: to.Ptr("authz1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/authorizationProviders/authorizations"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithauthcode/authorizations/authz1"),
// 	Properties: &armapimanagement.AuthorizationContractProperties{
// 		AuthorizationType: to.Ptr(armapimanagement.AuthorizationTypeOAuth2),
// 		OAuth2GrantType: to.Ptr(armapimanagement.OAuth2GrantTypeAuthorizationCode),
// 		Status: to.Ptr("Connected"),
// 	},
// }
Output:

func (*AuthorizationClient) NewListByAuthorizationProviderPager

func (client *AuthorizationClient) NewListByAuthorizationProviderPager(resourceGroupName string, serviceName string, authorizationProviderID string, options *AuthorizationClientListByAuthorizationProviderOptions) *runtime.Pager[AuthorizationClientListByAuthorizationProviderResponse]

NewListByAuthorizationProviderPager - Lists a collection of authorization providers defined within a authorization provider.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • authorizationProviderID - Identifier of the authorization provider.
  • options - AuthorizationClientListByAuthorizationProviderOptions contains the optional parameters for the AuthorizationClient.NewListByAuthorizationProviderPager method.
Example (ApiManagementListAuthorizationsAuthCode)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListAuthorizationsAuthCode.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAuthorizationClient().NewListByAuthorizationProviderPager("rg1", "apimService1", "aadwithauthcode", &armapimanagement.AuthorizationClientListByAuthorizationProviderOptions{Filter: nil,
	Top:  nil,
	Skip: 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.AuthorizationCollection = armapimanagement.AuthorizationCollection{
	// 	Value: []*armapimanagement.AuthorizationContract{
	// 		{
	// 			Name: to.Ptr("authz1"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/authorizationProviders/authorizations"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithauthcode/authorizations/authz1"),
	// 			Properties: &armapimanagement.AuthorizationContractProperties{
	// 				AuthorizationType: to.Ptr(armapimanagement.AuthorizationTypeOAuth2),
	// 				OAuth2GrantType: to.Ptr(armapimanagement.OAuth2GrantTypeAuthorizationCode),
	// 				Status: to.Ptr("Connected"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("authz2"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/authorizationProviders/authorizations"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithauthcode/authorizations/authz2"),
	// 			Properties: &armapimanagement.AuthorizationContractProperties{
	// 				AuthorizationType: to.Ptr(armapimanagement.AuthorizationTypeOAuth2),
	// 				Error: &armapimanagement.AuthorizationError{
	// 					Code: to.Ptr("Unauthenticated"),
	// 					Message: to.Ptr("This connection is not authenticated."),
	// 				},
	// 				OAuth2GrantType: to.Ptr(armapimanagement.OAuth2GrantTypeAuthorizationCode),
	// 				Status: to.Ptr("Error"),
	// 			},
	// 	}},
	// }
}
Output:

Example (ApiManagementListAuthorizationsClientCred)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListAuthorizationsClientCred.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAuthorizationClient().NewListByAuthorizationProviderPager("rg1", "apimService1", "aadwithclientcred", &armapimanagement.AuthorizationClientListByAuthorizationProviderOptions{Filter: nil,
	Top:  nil,
	Skip: 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.AuthorizationCollection = armapimanagement.AuthorizationCollection{
	// 	Value: []*armapimanagement.AuthorizationContract{
	// 		{
	// 			Name: to.Ptr("authz1"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/authorizationProviders/authorizations"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithclientcred/authorizations/authz1"),
	// 			Properties: &armapimanagement.AuthorizationContractProperties{
	// 				AuthorizationType: to.Ptr(armapimanagement.AuthorizationTypeOAuth2),
	// 				OAuth2GrantType: to.Ptr(armapimanagement.OAuth2GrantTypeClientCredentials),
	// 				Parameters: map[string]*string{
	// 					"clientId": to.Ptr("53790925-fdd3-4b80-bc7a-4c3aaf25801d"),
	// 				},
	// 				Status: to.Ptr("Connected"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("authz2"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/authorizationProviders/authorizations"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithclientcred/authorizations/authz2"),
	// 			Properties: &armapimanagement.AuthorizationContractProperties{
	// 				AuthorizationType: to.Ptr(armapimanagement.AuthorizationTypeOAuth2),
	// 				Error: &armapimanagement.AuthorizationError{
	// 					Code: to.Ptr("Unauthorized"),
	// 					Message: to.Ptr("Failed to acquire access token for service using client credentials flow: IdentityProvider=aadwithclientcred. Correlation Id=6299d09b-03b7-46ed-b355-0453451d7e49, UTC TimeStamp=5/14/2022 4:53:19 PM, Error: Failed to exchange client credentials for token. Response code=Unauthorized, Details:\r\n{\"error\":\"invalid_client\",\"error_description\":\"AADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID, for a secret added to app '53790925-fdd3-4b80-bc7a-4c3aaf25801d'.\\r\\nTrace ID: 4a18d3cd-9ad5-4664-b3eb-daaa2f435f00\\r\\nCorrelation ID: dde60c16-35cb-4572-8226-bfb4233af8d7\\r\\nTimestamp: 2022-05-14 16:53:19Z\",\"error_codes\":[7000215],\"timestamp\":\"2022-05-14 16:53:19Z\",\"trace_id\":\"4a18d3cd-9ad5-4664-b3eb-daaa2f435f00\",\"correlation_id\":\"dde60c16-35cb-4572-8226-bfb4233af8d7\",\"error_uri\":\"https://login.windows.net/error?code=7000215\"}"),
	// 				},
	// 				OAuth2GrantType: to.Ptr(armapimanagement.OAuth2GrantTypeClientCredentials),
	// 				Parameters: map[string]*string{
	// 					"clientId": to.Ptr("53790925-fdd3-4b80-bc7a-4c3aaf25801d"),
	// 				},
	// 				Status: to.Ptr("Error"),
	// 			},
	// 	}},
	// }
}
Output:

type AuthorizationClientConfirmConsentCodeOptions

type AuthorizationClientConfirmConsentCodeOptions struct {
}

AuthorizationClientConfirmConsentCodeOptions contains the optional parameters for the AuthorizationClient.ConfirmConsentCode method.

type AuthorizationClientConfirmConsentCodeResponse

type AuthorizationClientConfirmConsentCodeResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

AuthorizationClientConfirmConsentCodeResponse contains the response from method AuthorizationClient.ConfirmConsentCode.

type AuthorizationClientCreateOrUpdateOptions

type AuthorizationClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

AuthorizationClientCreateOrUpdateOptions contains the optional parameters for the AuthorizationClient.CreateOrUpdate method.

type AuthorizationClientCreateOrUpdateResponse

type AuthorizationClientCreateOrUpdateResponse struct {
	// Authorization contract.
	AuthorizationContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

AuthorizationClientCreateOrUpdateResponse contains the response from method AuthorizationClient.CreateOrUpdate.

type AuthorizationClientDeleteOptions

type AuthorizationClientDeleteOptions struct {
}

AuthorizationClientDeleteOptions contains the optional parameters for the AuthorizationClient.Delete method.

type AuthorizationClientDeleteResponse

type AuthorizationClientDeleteResponse struct {
}

AuthorizationClientDeleteResponse contains the response from method AuthorizationClient.Delete.

type AuthorizationClientGetOptions

type AuthorizationClientGetOptions struct {
}

AuthorizationClientGetOptions contains the optional parameters for the AuthorizationClient.Get method.

type AuthorizationClientGetResponse

type AuthorizationClientGetResponse struct {
	// Authorization contract.
	AuthorizationContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

AuthorizationClientGetResponse contains the response from method AuthorizationClient.Get.

type AuthorizationClientListByAuthorizationProviderOptions

type AuthorizationClientListByAuthorizationProviderOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

AuthorizationClientListByAuthorizationProviderOptions contains the optional parameters for the AuthorizationClient.NewListByAuthorizationProviderPager method.

type AuthorizationClientListByAuthorizationProviderResponse

type AuthorizationClientListByAuthorizationProviderResponse struct {
	// Paged Authorization list representation.
	AuthorizationCollection
}

AuthorizationClientListByAuthorizationProviderResponse contains the response from method AuthorizationClient.NewListByAuthorizationProviderPager.

type AuthorizationCollection

type AuthorizationCollection struct {
	// Total record count number across all pages.
	Count *int64

	// Next page link if any.
	NextLink *string

	// Page values.
	Value []*AuthorizationContract
}

AuthorizationCollection - Paged Authorization list representation.

func (AuthorizationCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AuthorizationCollection.

func (*AuthorizationCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationCollection.

type AuthorizationConfirmConsentCodeRequestContract

type AuthorizationConfirmConsentCodeRequestContract struct {
	// The consent code from the authorization server after authorizing and consenting.
	ConsentCode *string
}

AuthorizationConfirmConsentCodeRequestContract - Authorization confirm consent code request contract.

func (AuthorizationConfirmConsentCodeRequestContract) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type AuthorizationConfirmConsentCodeRequestContract.

func (*AuthorizationConfirmConsentCodeRequestContract) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationConfirmConsentCodeRequestContract.

type AuthorizationContract

type AuthorizationContract struct {
	// Properties of the Authorization Contract.
	Properties *AuthorizationContractProperties

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

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

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

AuthorizationContract - Authorization contract.

func (AuthorizationContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AuthorizationContract.

func (*AuthorizationContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationContract.

type AuthorizationContractProperties

type AuthorizationContractProperties struct {
	// Authorization type options
	AuthorizationType *AuthorizationType

	// Authorization error details.
	Error *AuthorizationError

	// OAuth2 grant type options
	OAuth2GrantType *OAuth2GrantType

	// Authorization parameters
	Parameters map[string]*string

	// Status of the Authorization
	Status *string
}

AuthorizationContractProperties - Authorization details.

func (AuthorizationContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AuthorizationContractProperties.

func (*AuthorizationContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationContractProperties.

type AuthorizationError

type AuthorizationError struct {
	// Error code
	Code *string

	// Error message
	Message *string
}

AuthorizationError - Authorization error details.

func (AuthorizationError) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AuthorizationError.

func (*AuthorizationError) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationError.

type AuthorizationLoginLinksClient

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

AuthorizationLoginLinksClient contains the methods for the AuthorizationLoginLinks group. Don't use this type directly, use NewAuthorizationLoginLinksClient() instead.

func NewAuthorizationLoginLinksClient

func NewAuthorizationLoginLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AuthorizationLoginLinksClient, error)

NewAuthorizationLoginLinksClient creates a new instance of AuthorizationLoginLinksClient 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 (*AuthorizationLoginLinksClient) Post

func (client *AuthorizationLoginLinksClient) Post(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, authorizationID string, parameters AuthorizationLoginRequestContract, options *AuthorizationLoginLinksClientPostOptions) (AuthorizationLoginLinksClientPostResponse, error)

Post - Gets authorization login links. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • authorizationProviderID - Identifier of the authorization provider.
  • authorizationID - Identifier of the authorization.
  • parameters - Create parameters.
  • options - AuthorizationLoginLinksClientPostOptions contains the optional parameters for the AuthorizationLoginLinksClient.Post method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationLoginRequest.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAuthorizationLoginLinksClient().Post(ctx, "rg1", "apimService1", "aadwithauthcode", "authz1", armapimanagement.AuthorizationLoginRequestContract{
	PostLoginRedirectURL: to.Ptr("https://www.bing.com/"),
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.AuthorizationLoginResponseContract = armapimanagement.AuthorizationLoginResponseContract{
// 	LoginLink: to.Ptr("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1/login?data=eyJMb2dpbklkIjoiY2YtODNmYzQ5N2YyZWYxNDA4MzlmNDdjZDU3YWY3MmZmODctYW5nYW50aS1wcmV2aWV3X2FhZC1hdXRoY29kZV9vYXV0aDItY29kZV90b2tlbiIsIlNlc3Npb25JZCI6IiIsIkxvZ0Nvbm5lY3Rpb25JZCI6ImF1dGh6MiIsIkxvZ0Nvbm5lY3RvcklkIjoiYWFkLWF1dGhjb2RlIiwiTG9nRW52aXJvbm1lbnRJZCI6ImFuZ2FudGktcHJld"),
// }
Output:

type AuthorizationLoginLinksClientPostOptions

type AuthorizationLoginLinksClientPostOptions struct {
}

AuthorizationLoginLinksClientPostOptions contains the optional parameters for the AuthorizationLoginLinksClient.Post method.

type AuthorizationLoginLinksClientPostResponse

type AuthorizationLoginLinksClientPostResponse struct {
	// Authorization login response contract.
	AuthorizationLoginResponseContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

AuthorizationLoginLinksClientPostResponse contains the response from method AuthorizationLoginLinksClient.Post.

type AuthorizationLoginRequestContract

type AuthorizationLoginRequestContract struct {
	// The redirect URL after login has completed.
	PostLoginRedirectURL *string
}

AuthorizationLoginRequestContract - Authorization login request contract.

func (AuthorizationLoginRequestContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AuthorizationLoginRequestContract.

func (*AuthorizationLoginRequestContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationLoginRequestContract.

type AuthorizationLoginResponseContract

type AuthorizationLoginResponseContract struct {
	// The login link
	LoginLink *string
}

AuthorizationLoginResponseContract - Authorization login response contract.

func (AuthorizationLoginResponseContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AuthorizationLoginResponseContract.

func (*AuthorizationLoginResponseContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationLoginResponseContract.

type AuthorizationMethod

type AuthorizationMethod string
const (
	AuthorizationMethodDELETE  AuthorizationMethod = "DELETE"
	AuthorizationMethodGET     AuthorizationMethod = "GET"
	AuthorizationMethodHEAD    AuthorizationMethod = "HEAD"
	AuthorizationMethodOPTIONS AuthorizationMethod = "OPTIONS"
	AuthorizationMethodPATCH   AuthorizationMethod = "PATCH"
	AuthorizationMethodPOST    AuthorizationMethod = "POST"
	AuthorizationMethodPUT     AuthorizationMethod = "PUT"
	AuthorizationMethodTRACE   AuthorizationMethod = "TRACE"
)

func PossibleAuthorizationMethodValues

func PossibleAuthorizationMethodValues() []AuthorizationMethod

PossibleAuthorizationMethodValues returns the possible values for the AuthorizationMethod const type.

type AuthorizationProviderClient

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

AuthorizationProviderClient contains the methods for the AuthorizationProvider group. Don't use this type directly, use NewAuthorizationProviderClient() instead.

func NewAuthorizationProviderClient

func NewAuthorizationProviderClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AuthorizationProviderClient, error)

NewAuthorizationProviderClient creates a new instance of AuthorizationProviderClient 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 (*AuthorizationProviderClient) CreateOrUpdate

func (client *AuthorizationProviderClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, parameters AuthorizationProviderContract, options *AuthorizationProviderClientCreateOrUpdateOptions) (AuthorizationProviderClientCreateOrUpdateResponse, error)

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

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • authorizationProviderID - Identifier of the authorization provider.
  • parameters - Create parameters.
  • options - AuthorizationProviderClientCreateOrUpdateOptions contains the optional parameters for the AuthorizationProviderClient.CreateOrUpdate method.
Example (ApiManagementCreateAuthorizationProviderAadAuthCode)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationProviderAADAuthCode.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAuthorizationProviderClient().CreateOrUpdate(ctx, "rg1", "apimService1", "aadwithauthcode", armapimanagement.AuthorizationProviderContract{
	Properties: &armapimanagement.AuthorizationProviderContractProperties{
		DisplayName:      to.Ptr("aadwithauthcode"),
		IdentityProvider: to.Ptr("aad"),
		Oauth2: &armapimanagement.AuthorizationProviderOAuth2Settings{
			GrantTypes: &armapimanagement.AuthorizationProviderOAuth2GrantTypes{
				AuthorizationCode: map[string]*string{
					"clientId":     to.Ptr("59790825-fdd3-4b10-bc7a-4c3aaf25801d"),
					"clientSecret": to.Ptr("Q3iPSaKQ~fZFcJk5vKmqzUAfJagcJ8"),
					"resourceUri":  to.Ptr("https://graph.microsoft.com"),
					"scopes":       to.Ptr("User.Read.All Group.Read.All"),
				},
			},
			RedirectURL: to.Ptr("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"),
		},
	},
}, &armapimanagement.AuthorizationProviderClientCreateOrUpdateOptions{IfMatch: 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.AuthorizationProviderContract = armapimanagement.AuthorizationProviderContract{
// 	Name: to.Ptr("aadwithauthcode"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/authorizationProviders"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithauthcode"),
// 	Properties: &armapimanagement.AuthorizationProviderContractProperties{
// 		DisplayName: to.Ptr("aadwithauthcode"),
// 		IdentityProvider: to.Ptr("aad"),
// 		Oauth2: &armapimanagement.AuthorizationProviderOAuth2Settings{
// 			GrantTypes: &armapimanagement.AuthorizationProviderOAuth2GrantTypes{
// 				AuthorizationCode: map[string]*string{
// 					"clientId": to.Ptr("53790825-fdd3-4b80-bc7a-4c3aaf25801d"),
// 					"loginUri": to.Ptr("https://login.windows.net"),
// 					"resourceUri": to.Ptr("https://graph.microsoft.com"),
// 					"scopes": to.Ptr("User.Read.All Group.Read.All"),
// 					"tenantId": to.Ptr("common"),
// 				},
// 			},
// 			RedirectURL: to.Ptr("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"),
// 		},
// 	},
// }
Output:

Example (ApiManagementCreateAuthorizationProviderAadClientCred)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationProviderAADClientCred.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAuthorizationProviderClient().CreateOrUpdate(ctx, "rg1", "apimService1", "aadwithclientcred", armapimanagement.AuthorizationProviderContract{
	Properties: &armapimanagement.AuthorizationProviderContractProperties{
		DisplayName:      to.Ptr("aadwithclientcred"),
		IdentityProvider: to.Ptr("aad"),
		Oauth2: &armapimanagement.AuthorizationProviderOAuth2Settings{
			GrantTypes: &armapimanagement.AuthorizationProviderOAuth2GrantTypes{
				AuthorizationCode: map[string]*string{
					"resourceUri": to.Ptr("https://graph.microsoft.com"),
					"scopes":      to.Ptr("User.Read.All Group.Read.All"),
				},
			},
			RedirectURL: to.Ptr("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"),
		},
	},
}, &armapimanagement.AuthorizationProviderClientCreateOrUpdateOptions{IfMatch: 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.AuthorizationProviderContract = armapimanagement.AuthorizationProviderContract{
// 	Name: to.Ptr("aadwithclientcred"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/authorizationProviders"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithclientcred"),
// 	Properties: &armapimanagement.AuthorizationProviderContractProperties{
// 		DisplayName: to.Ptr("aadwithclientcred"),
// 		IdentityProvider: to.Ptr("aad"),
// 		Oauth2: &armapimanagement.AuthorizationProviderOAuth2Settings{
// 			GrantTypes: &armapimanagement.AuthorizationProviderOAuth2GrantTypes{
// 				ClientCredentials: map[string]*string{
// 					"loginUri": to.Ptr("https://login.windows.net"),
// 					"resourceUri": to.Ptr("https://graph.microsoft.com"),
// 					"scopes": to.Ptr("User.Read.All Group.Read.All"),
// 					"tenantId": to.Ptr("common"),
// 				},
// 			},
// 			RedirectURL: to.Ptr("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"),
// 		},
// 	},
// }
Output:

Example (ApiManagementCreateAuthorizationProviderGenericOAuth2)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationProviderGenericOAuth2.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAuthorizationProviderClient().CreateOrUpdate(ctx, "rg1", "apimService1", "eventbrite", armapimanagement.AuthorizationProviderContract{
	Properties: &armapimanagement.AuthorizationProviderContractProperties{
		DisplayName:      to.Ptr("eventbrite"),
		IdentityProvider: to.Ptr("oauth2"),
		Oauth2: &armapimanagement.AuthorizationProviderOAuth2Settings{
			GrantTypes: &armapimanagement.AuthorizationProviderOAuth2GrantTypes{
				AuthorizationCode: map[string]*string{
					"authorizationUrl": to.Ptr("https://www.eventbrite.com/oauth/authorize"),
					"clientId":         to.Ptr("ZYIJTBTABHOUQQDLZY"),
					"clientSecret":     to.Ptr("Q3iPSaKQ~fZFcJk5vKmqzUAfJagcJ8"),
					"refreshUrl":       to.Ptr("https://www.eventbrite.com/oauth/token"),
					"scopes":           nil,
					"tokenUrl":         to.Ptr("https://www.eventbrite.com/oauth/token"),
				},
			},
			RedirectURL: to.Ptr("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"),
		},
	},
}, &armapimanagement.AuthorizationProviderClientCreateOrUpdateOptions{IfMatch: 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.AuthorizationProviderContract = armapimanagement.AuthorizationProviderContract{
// 	Name: to.Ptr("eventbrite"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/authorizationProviders"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/eventbrite"),
// 	Properties: &armapimanagement.AuthorizationProviderContractProperties{
// 		DisplayName: to.Ptr("eventbrite"),
// 		IdentityProvider: to.Ptr("oauth2"),
// 		Oauth2: &armapimanagement.AuthorizationProviderOAuth2Settings{
// 			GrantTypes: &armapimanagement.AuthorizationProviderOAuth2GrantTypes{
// 				AuthorizationCode: map[string]*string{
// 					"authorizationUrl": to.Ptr("https://www.eventbrite.com/oauth/authorize"),
// 					"clientId": to.Ptr("ZYIJTBTABHOUQQDLZY"),
// 					"refreshUrl": to.Ptr("https://www.eventbrite.com/oauth/token"),
// 					"scopes": nil,
// 					"tokenUrl": to.Ptr("https://www.eventbrite.com/oauth/token"),
// 				},
// 			},
// 			RedirectURL: to.Ptr("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"),
// 		},
// 	},
// }
Output:

Example (ApiManagementCreateAuthorizationProviderOobGoogle)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationProviderOOBGoogle.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAuthorizationProviderClient().CreateOrUpdate(ctx, "rg1", "apimService1", "google", armapimanagement.AuthorizationProviderContract{
	Properties: &armapimanagement.AuthorizationProviderContractProperties{
		DisplayName:      to.Ptr("google"),
		IdentityProvider: to.Ptr("google"),
		Oauth2: &armapimanagement.AuthorizationProviderOAuth2Settings{
			GrantTypes: &armapimanagement.AuthorizationProviderOAuth2GrantTypes{
				AuthorizationCode: map[string]*string{
					"clientId":     to.Ptr("508791967882-5qv6o2i99a75un7329vlegtk78kr766h.apps.googleusercontent.com"),
					"clientSecret": to.Ptr("qDN0VyVFjU1OsOyT5Kz8ce"),
					"scopes":       to.Ptr("openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email"),
				},
			},
			RedirectURL: to.Ptr("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"),
		},
	},
}, &armapimanagement.AuthorizationProviderClientCreateOrUpdateOptions{IfMatch: 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.AuthorizationProviderContract = armapimanagement.AuthorizationProviderContract{
// 	Name: to.Ptr("google"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/authorizationProviders"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/google"),
// 	Properties: &armapimanagement.AuthorizationProviderContractProperties{
// 		DisplayName: to.Ptr("google"),
// 		IdentityProvider: to.Ptr("google"),
// 		Oauth2: &armapimanagement.AuthorizationProviderOAuth2Settings{
// 			GrantTypes: &armapimanagement.AuthorizationProviderOAuth2GrantTypes{
// 				AuthorizationCode: map[string]*string{
// 					"clientId": to.Ptr("508791967882-5qv6o2i99a75un7329vlegtk78kr766h.apps.googleusercontent.com"),
// 					"scopes": to.Ptr("openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email"),
// 				},
// 			},
// 			RedirectURL: to.Ptr("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"),
// 		},
// 	},
// }
Output:

func (*AuthorizationProviderClient) Delete

func (client *AuthorizationProviderClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, ifMatch string, options *AuthorizationProviderClientDeleteOptions) (AuthorizationProviderClientDeleteResponse, error)

Delete - Deletes specific authorization provider from the API Management service instance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • authorizationProviderID - Identifier of the authorization provider.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - AuthorizationProviderClientDeleteOptions contains the optional parameters for the AuthorizationProviderClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteAuthorizationProvider.json

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

func (*AuthorizationProviderClient) Get

func (client *AuthorizationProviderClient) Get(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, options *AuthorizationProviderClientGetOptions) (AuthorizationProviderClientGetResponse, error)

Get - Gets the details of the authorization provider specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • authorizationProviderID - Identifier of the authorization provider.
  • options - AuthorizationProviderClientGetOptions contains the optional parameters for the AuthorizationProviderClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationProvider.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAuthorizationProviderClient().Get(ctx, "rg1", "apimService1", "aadwithauthcode", 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.AuthorizationProviderContract = armapimanagement.AuthorizationProviderContract{
// 	Name: to.Ptr("aadwithauthcode"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/authorizationProviders"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithauthcode"),
// 	Properties: &armapimanagement.AuthorizationProviderContractProperties{
// 		DisplayName: to.Ptr("aadwithauthcode"),
// 		IdentityProvider: to.Ptr("aad"),
// 		Oauth2: &armapimanagement.AuthorizationProviderOAuth2Settings{
// 			GrantTypes: &armapimanagement.AuthorizationProviderOAuth2GrantTypes{
// 				AuthorizationCode: map[string]*string{
// 					"clientId": to.Ptr("53790825-fdd3-4b80-bc7a-4c3aaf25801d"),
// 					"loginUri": to.Ptr("https://login.windows.net"),
// 					"resourceUri": to.Ptr("https://graph.microsoft.com"),
// 					"scopes": to.Ptr("User.Read.All Group.Read.All"),
// 					"tenantId": to.Ptr("common"),
// 				},
// 			},
// 			RedirectURL: to.Ptr("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"),
// 		},
// 	},
// }
Output:

func (*AuthorizationProviderClient) NewListByServicePager

NewListByServicePager - Lists a collection of authorization providers defined within a service instance.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - AuthorizationProviderClientListByServiceOptions contains the optional parameters for the AuthorizationProviderClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListAuthorizationProviders.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAuthorizationProviderClient().NewListByServicePager("rg1", "apimService1", &armapimanagement.AuthorizationProviderClientListByServiceOptions{Filter: nil,
	Top:  nil,
	Skip: 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.AuthorizationProviderCollection = armapimanagement.AuthorizationProviderCollection{
	// 	Value: []*armapimanagement.AuthorizationProviderContract{
	// 		{
	// 			Name: to.Ptr("aadwithauthcode"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/authorizationProviders"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithauthcode"),
	// 			Properties: &armapimanagement.AuthorizationProviderContractProperties{
	// 				DisplayName: to.Ptr("aadwithauthcode"),
	// 				IdentityProvider: to.Ptr("aad"),
	// 				Oauth2: &armapimanagement.AuthorizationProviderOAuth2Settings{
	// 					GrantTypes: &armapimanagement.AuthorizationProviderOAuth2GrantTypes{
	// 						AuthorizationCode: map[string]*string{
	// 							"clientId": to.Ptr("53790825-fdd3-4b80-bc7a-4c3aaf25801d"),
	// 							"loginUri": to.Ptr("https://login.windows.net"),
	// 							"resourceUri": to.Ptr("https://graph.microsoft.com"),
	// 							"scopes": to.Ptr("User.Read.All Group.Read.All"),
	// 							"tenantId": to.Ptr("common"),
	// 						},
	// 					},
	// 					RedirectURL: to.Ptr("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"),
	// 				},
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("aadwithclientcred"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/authorizationProviders"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithclientcred"),
	// 			Properties: &armapimanagement.AuthorizationProviderContractProperties{
	// 				DisplayName: to.Ptr("aadwithclientcred"),
	// 				IdentityProvider: to.Ptr("aad"),
	// 				Oauth2: &armapimanagement.AuthorizationProviderOAuth2Settings{
	// 					GrantTypes: &armapimanagement.AuthorizationProviderOAuth2GrantTypes{
	// 						ClientCredentials: map[string]*string{
	// 							"loginUri": to.Ptr("https://login.windows.net"),
	// 							"resourceUri": to.Ptr("https://graph.microsoft.com"),
	// 							"scopes": to.Ptr("User.Read.All Group.Read.All"),
	// 							"tenantId": to.Ptr("common"),
	// 						},
	// 					},
	// 					RedirectURL: to.Ptr("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"),
	// 				},
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("google"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/authorizationProviders"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/google"),
	// 			Properties: &armapimanagement.AuthorizationProviderContractProperties{
	// 				DisplayName: to.Ptr("google"),
	// 				IdentityProvider: to.Ptr("google"),
	// 				Oauth2: &armapimanagement.AuthorizationProviderOAuth2Settings{
	// 					GrantTypes: &armapimanagement.AuthorizationProviderOAuth2GrantTypes{
	// 						AuthorizationCode: map[string]*string{
	// 							"clientId": to.Ptr("508791967882-5qv6o2i99a75un7329vlegtk78kr766h.apps.googleusercontent.com"),
	// 							"scopes": to.Ptr("openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email"),
	// 						},
	// 					},
	// 					RedirectURL: to.Ptr("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"),
	// 				},
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("eventbrite"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/authorizationProviders"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/eventbrite"),
	// 			Properties: &armapimanagement.AuthorizationProviderContractProperties{
	// 				DisplayName: to.Ptr("eventbrite"),
	// 				IdentityProvider: to.Ptr("oauth2"),
	// 				Oauth2: &armapimanagement.AuthorizationProviderOAuth2Settings{
	// 					GrantTypes: &armapimanagement.AuthorizationProviderOAuth2GrantTypes{
	// 						AuthorizationCode: map[string]*string{
	// 							"authorizationUrl": to.Ptr("https://www.eventbrite.com/oauth/authorize"),
	// 							"clientId": to.Ptr("ZYIJTBTABHOUQQDLZY"),
	// 							"refreshUrl": to.Ptr("https://www.eventbrite.com/oauth/token"),
	// 							"scopes": nil,
	// 							"tokenUrl": to.Ptr("https://www.eventbrite.com/oauth/token"),
	// 						},
	// 					},
	// 					RedirectURL: to.Ptr("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"),
	// 				},
	// 			},
	// 	}},
	// }
}
Output:

type AuthorizationProviderClientCreateOrUpdateOptions

type AuthorizationProviderClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

AuthorizationProviderClientCreateOrUpdateOptions contains the optional parameters for the AuthorizationProviderClient.CreateOrUpdate method.

type AuthorizationProviderClientCreateOrUpdateResponse

type AuthorizationProviderClientCreateOrUpdateResponse struct {
	// Authorization Provider contract.
	AuthorizationProviderContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

AuthorizationProviderClientCreateOrUpdateResponse contains the response from method AuthorizationProviderClient.CreateOrUpdate.

type AuthorizationProviderClientDeleteOptions

type AuthorizationProviderClientDeleteOptions struct {
}

AuthorizationProviderClientDeleteOptions contains the optional parameters for the AuthorizationProviderClient.Delete method.

type AuthorizationProviderClientDeleteResponse

type AuthorizationProviderClientDeleteResponse struct {
}

AuthorizationProviderClientDeleteResponse contains the response from method AuthorizationProviderClient.Delete.

type AuthorizationProviderClientGetOptions

type AuthorizationProviderClientGetOptions struct {
}

AuthorizationProviderClientGetOptions contains the optional parameters for the AuthorizationProviderClient.Get method.

type AuthorizationProviderClientGetResponse

type AuthorizationProviderClientGetResponse struct {
	// Authorization Provider contract.
	AuthorizationProviderContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

AuthorizationProviderClientGetResponse contains the response from method AuthorizationProviderClient.Get.

type AuthorizationProviderClientListByServiceOptions

type AuthorizationProviderClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

AuthorizationProviderClientListByServiceOptions contains the optional parameters for the AuthorizationProviderClient.NewListByServicePager method.

type AuthorizationProviderClientListByServiceResponse

type AuthorizationProviderClientListByServiceResponse struct {
	// Paged Authorization Provider list representation.
	AuthorizationProviderCollection
}

AuthorizationProviderClientListByServiceResponse contains the response from method AuthorizationProviderClient.NewListByServicePager.

type AuthorizationProviderCollection

type AuthorizationProviderCollection struct {
	// Next page link if any.
	NextLink *string

	// Page values.
	Value []*AuthorizationProviderContract
}

AuthorizationProviderCollection - Paged Authorization Provider list representation.

func (AuthorizationProviderCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AuthorizationProviderCollection.

func (*AuthorizationProviderCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationProviderCollection.

type AuthorizationProviderContract

type AuthorizationProviderContract struct {
	// Properties of the Authorization Provider Contract.
	Properties *AuthorizationProviderContractProperties

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

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

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

AuthorizationProviderContract - Authorization Provider contract.

func (AuthorizationProviderContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AuthorizationProviderContract.

func (*AuthorizationProviderContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationProviderContract.

type AuthorizationProviderContractProperties

type AuthorizationProviderContractProperties struct {
	// Authorization Provider name. Must be 1 to 300 characters long.
	DisplayName *string

	// Identity provider name. Must be 1 to 300 characters long.
	IdentityProvider *string

	// OAuth2 settings
	Oauth2 *AuthorizationProviderOAuth2Settings
}

AuthorizationProviderContractProperties - Authorization Provider details.

func (AuthorizationProviderContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AuthorizationProviderContractProperties.

func (*AuthorizationProviderContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationProviderContractProperties.

type AuthorizationProviderOAuth2GrantTypes

type AuthorizationProviderOAuth2GrantTypes struct {
	// OAuth2 authorization code grant parameters
	AuthorizationCode map[string]*string

	// OAuth2 client credential grant parameters
	ClientCredentials map[string]*string
}

AuthorizationProviderOAuth2GrantTypes - Authorization Provider oauth2 grant types settings

func (AuthorizationProviderOAuth2GrantTypes) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AuthorizationProviderOAuth2GrantTypes.

func (*AuthorizationProviderOAuth2GrantTypes) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationProviderOAuth2GrantTypes.

type AuthorizationProviderOAuth2Settings

type AuthorizationProviderOAuth2Settings struct {
	// OAuth2 settings
	GrantTypes *AuthorizationProviderOAuth2GrantTypes

	// Redirect URL to be set in the OAuth application.
	RedirectURL *string
}

AuthorizationProviderOAuth2Settings - OAuth2 settings details

func (AuthorizationProviderOAuth2Settings) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AuthorizationProviderOAuth2Settings.

func (*AuthorizationProviderOAuth2Settings) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationProviderOAuth2Settings.

type AuthorizationServerClient

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

AuthorizationServerClient contains the methods for the AuthorizationServer group. Don't use this type directly, use NewAuthorizationServerClient() instead.

func NewAuthorizationServerClient

func NewAuthorizationServerClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AuthorizationServerClient, error)

NewAuthorizationServerClient creates a new instance of AuthorizationServerClient 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 (*AuthorizationServerClient) CreateOrUpdate

CreateOrUpdate - Creates new authorization server or updates an existing authorization server. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • authsid - Identifier of the authorization server.
  • parameters - Create or update parameters.
  • options - AuthorizationServerClientCreateOrUpdateOptions contains the optional parameters for the AuthorizationServerClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationServer.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAuthorizationServerClient().CreateOrUpdate(ctx, "rg1", "apimService1", "newauthServer", armapimanagement.AuthorizationServerContract{
	Properties: &armapimanagement.AuthorizationServerContractProperties{
		Description: to.Ptr("test server"),
		AuthorizationMethods: []*armapimanagement.AuthorizationMethod{
			to.Ptr(armapimanagement.AuthorizationMethodGET)},
		BearerTokenSendingMethods: []*armapimanagement.BearerTokenSendingMethod{
			to.Ptr(armapimanagement.BearerTokenSendingMethodAuthorizationHeader)},
		DefaultScope:               to.Ptr("read write"),
		ResourceOwnerPassword:      to.Ptr("pwd"),
		ResourceOwnerUsername:      to.Ptr("un"),
		SupportState:               to.Ptr(true),
		TokenEndpoint:              to.Ptr("https://www.contoso.com/oauth2/token"),
		AuthorizationEndpoint:      to.Ptr("https://www.contoso.com/oauth2/auth"),
		ClientID:                   to.Ptr("1"),
		ClientRegistrationEndpoint: to.Ptr("https://www.contoso.com/apps"),
		ClientSecret:               to.Ptr("2"),
		DisplayName:                to.Ptr("test2"),
		GrantTypes: []*armapimanagement.GrantType{
			to.Ptr(armapimanagement.GrantTypeAuthorizationCode),
			to.Ptr(armapimanagement.GrantTypeImplicit)},
		UseInAPIDocumentation: to.Ptr(true),
		UseInTestConsole:      to.Ptr(false),
	},
}, &armapimanagement.AuthorizationServerClientCreateOrUpdateOptions{IfMatch: 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.AuthorizationServerContract = armapimanagement.AuthorizationServerContract{
// 	Name: to.Ptr("newauthServer"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/authorizationServers"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationServers/newauthServer"),
// 	Properties: &armapimanagement.AuthorizationServerContractProperties{
// 		Description: to.Ptr("test server"),
// 		AuthorizationMethods: []*armapimanagement.AuthorizationMethod{
// 			to.Ptr(armapimanagement.AuthorizationMethodGET)},
// 			BearerTokenSendingMethods: []*armapimanagement.BearerTokenSendingMethod{
// 				to.Ptr(armapimanagement.BearerTokenSendingMethodAuthorizationHeader)},
// 				DefaultScope: to.Ptr("read write"),
// 				ResourceOwnerPassword: to.Ptr("pwd"),
// 				ResourceOwnerUsername: to.Ptr("un"),
// 				SupportState: to.Ptr(true),
// 				TokenEndpoint: to.Ptr("https://www.contoso.com/oauth2/token"),
// 				AuthorizationEndpoint: to.Ptr("https://www.contoso.com/oauth2/auth"),
// 				ClientID: to.Ptr("1"),
// 				ClientRegistrationEndpoint: to.Ptr("https://www.contoso.com/apps"),
// 				DisplayName: to.Ptr("test2"),
// 				GrantTypes: []*armapimanagement.GrantType{
// 					to.Ptr(armapimanagement.GrantTypeAuthorizationCode),
// 					to.Ptr(armapimanagement.GrantTypeImplicit)},
// 					UseInAPIDocumentation: to.Ptr(true),
// 					UseInTestConsole: to.Ptr(false),
// 				},
// 			}
Output:

func (*AuthorizationServerClient) Delete

func (client *AuthorizationServerClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, authsid string, ifMatch string, options *AuthorizationServerClientDeleteOptions) (AuthorizationServerClientDeleteResponse, error)

Delete - Deletes specific authorization server instance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • authsid - Identifier of the authorization server.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - AuthorizationServerClientDeleteOptions contains the optional parameters for the AuthorizationServerClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteAuthorizationServer.json

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

func (*AuthorizationServerClient) Get

Get - Gets the details of the authorization server specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • authsid - Identifier of the authorization server.
  • options - AuthorizationServerClientGetOptions contains the optional parameters for the AuthorizationServerClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationServer.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAuthorizationServerClient().Get(ctx, "rg1", "apimService1", "newauthServer2", 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.AuthorizationServerContract = armapimanagement.AuthorizationServerContract{
// 	Name: to.Ptr("newauthServer2"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/authorizationServers"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationServers/newauthServer2"),
// 	Properties: &armapimanagement.AuthorizationServerContractProperties{
// 		Description: to.Ptr("test server"),
// 		AuthorizationMethods: []*armapimanagement.AuthorizationMethod{
// 			to.Ptr(armapimanagement.AuthorizationMethodGET)},
// 			BearerTokenSendingMethods: []*armapimanagement.BearerTokenSendingMethod{
// 				to.Ptr(armapimanagement.BearerTokenSendingMethodAuthorizationHeader)},
// 				ClientAuthenticationMethod: []*armapimanagement.ClientAuthenticationMethod{
// 					to.Ptr(armapimanagement.ClientAuthenticationMethodBasic)},
// 					DefaultScope: to.Ptr("read write"),
// 					ResourceOwnerPassword: to.Ptr("pwd"),
// 					ResourceOwnerUsername: to.Ptr("un"),
// 					SupportState: to.Ptr(true),
// 					TokenEndpoint: to.Ptr("https://www.contoso.com/oauth2/token"),
// 					AuthorizationEndpoint: to.Ptr("https://www.contoso.com/oauth2/auth"),
// 					ClientID: to.Ptr("1"),
// 					ClientRegistrationEndpoint: to.Ptr("https://www.contoso.com/apps"),
// 					DisplayName: to.Ptr("test3"),
// 					GrantTypes: []*armapimanagement.GrantType{
// 						to.Ptr(armapimanagement.GrantTypeAuthorizationCode),
// 						to.Ptr(armapimanagement.GrantTypeImplicit)},
// 						UseInAPIDocumentation: to.Ptr(true),
// 						UseInTestConsole: to.Ptr(false),
// 					},
// 				}
Output:

func (*AuthorizationServerClient) GetEntityTag

GetEntityTag - Gets the entity state (Etag) version of the authorizationServer specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • authsid - Identifier of the authorization server.
  • options - AuthorizationServerClientGetEntityTagOptions contains the optional parameters for the AuthorizationServerClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadAuthorizationServer.json

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

func (*AuthorizationServerClient) ListSecrets

ListSecrets - Gets the client secret details of the authorization server. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • authsid - Identifier of the authorization server.
  • options - AuthorizationServerClientListSecretsOptions contains the optional parameters for the AuthorizationServerClient.ListSecrets method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementAuthorizationServerListSecrets.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAuthorizationServerClient().ListSecrets(ctx, "rg1", "apimService1", "newauthServer2", 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.AuthorizationServerSecretsContract = armapimanagement.AuthorizationServerSecretsContract{
// 	ClientSecret: to.Ptr("2"),
// 	ResourceOwnerPassword: to.Ptr("pwd"),
// 	ResourceOwnerUsername: to.Ptr("un"),
// }
Output:

func (*AuthorizationServerClient) NewListByServicePager

NewListByServicePager - Lists a collection of authorization servers defined within a service instance.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - AuthorizationServerClientListByServiceOptions contains the optional parameters for the AuthorizationServerClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListAuthorizationServers.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAuthorizationServerClient().NewListByServicePager("rg1", "apimService1", &armapimanagement.AuthorizationServerClientListByServiceOptions{Filter: nil,
	Top:  nil,
	Skip: 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.AuthorizationServerCollection = armapimanagement.AuthorizationServerCollection{
	// 	Value: []*armapimanagement.AuthorizationServerContract{
	// 		{
	// 			Name: to.Ptr("newauthServer"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/authorizationServers"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationServers/newauthServer"),
	// 			Properties: &armapimanagement.AuthorizationServerContractProperties{
	// 				Description: to.Ptr("test server"),
	// 				AuthorizationMethods: []*armapimanagement.AuthorizationMethod{
	// 					to.Ptr(armapimanagement.AuthorizationMethodGET)},
	// 					BearerTokenSendingMethods: []*armapimanagement.BearerTokenSendingMethod{
	// 						to.Ptr(armapimanagement.BearerTokenSendingMethodAuthorizationHeader)},
	// 						DefaultScope: to.Ptr("read write"),
	// 						ResourceOwnerPassword: to.Ptr("pwd"),
	// 						ResourceOwnerUsername: to.Ptr("un"),
	// 						SupportState: to.Ptr(true),
	// 						TokenEndpoint: to.Ptr("https://www.contoso.com/oauth2/token"),
	// 						AuthorizationEndpoint: to.Ptr("https://www.contoso.com/oauth2/auth"),
	// 						ClientID: to.Ptr("1"),
	// 						ClientRegistrationEndpoint: to.Ptr("https://www.contoso.com/apps"),
	// 						DisplayName: to.Ptr("test2"),
	// 						GrantTypes: []*armapimanagement.GrantType{
	// 							to.Ptr(armapimanagement.GrantTypeAuthorizationCode),
	// 							to.Ptr(armapimanagement.GrantTypeImplicit)},
	// 							UseInAPIDocumentation: to.Ptr(false),
	// 							UseInTestConsole: to.Ptr(true),
	// 						},
	// 					},
	// 					{
	// 						Name: to.Ptr("newauthServer2"),
	// 						Type: to.Ptr("Microsoft.ApiManagement/service/authorizationServers"),
	// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationServers/newauthServer2"),
	// 						Properties: &armapimanagement.AuthorizationServerContractProperties{
	// 							Description: to.Ptr("test server"),
	// 							AuthorizationMethods: []*armapimanagement.AuthorizationMethod{
	// 								to.Ptr(armapimanagement.AuthorizationMethodGET)},
	// 								BearerTokenSendingMethods: []*armapimanagement.BearerTokenSendingMethod{
	// 									to.Ptr(armapimanagement.BearerTokenSendingMethodAuthorizationHeader)},
	// 									ClientAuthenticationMethod: []*armapimanagement.ClientAuthenticationMethod{
	// 										to.Ptr(armapimanagement.ClientAuthenticationMethodBasic)},
	// 										DefaultScope: to.Ptr("read write"),
	// 										ResourceOwnerPassword: to.Ptr("pwd"),
	// 										ResourceOwnerUsername: to.Ptr("un"),
	// 										SupportState: to.Ptr(true),
	// 										TokenEndpoint: to.Ptr("https://www.contoso.com/oauth2/token"),
	// 										AuthorizationEndpoint: to.Ptr("https://www.contoso.com/oauth2/auth"),
	// 										ClientID: to.Ptr("1"),
	// 										ClientRegistrationEndpoint: to.Ptr("https://www.contoso.com/apps"),
	// 										DisplayName: to.Ptr("test3"),
	// 										GrantTypes: []*armapimanagement.GrantType{
	// 											to.Ptr(armapimanagement.GrantTypeAuthorizationCode),
	// 											to.Ptr(armapimanagement.GrantTypeImplicit)},
	// 											UseInAPIDocumentation: to.Ptr(true),
	// 											UseInTestConsole: to.Ptr(false),
	// 										},
	// 								}},
	// 							}
}
Output:

func (*AuthorizationServerClient) Update

Update - Updates the details of the authorization server specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • authsid - Identifier of the authorization server.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - OAuth2 Server settings Update parameters.
  • options - AuthorizationServerClientUpdateOptions contains the optional parameters for the AuthorizationServerClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateAuthorizationServer.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAuthorizationServerClient().Update(ctx, "rg1", "apimService1", "newauthServer", "*", armapimanagement.AuthorizationServerUpdateContract{
	Properties: &armapimanagement.AuthorizationServerUpdateContractProperties{
		ClientID:              to.Ptr("update"),
		ClientSecret:          to.Ptr("updated"),
		UseInAPIDocumentation: to.Ptr(true),
		UseInTestConsole:      to.Ptr(false),
	},
}, 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.AuthorizationServerContract = armapimanagement.AuthorizationServerContract{
// 	Name: to.Ptr("newauthServer"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/authorizationServers"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationServers/newauthServer"),
// 	Properties: &armapimanagement.AuthorizationServerContractProperties{
// 		Description: to.Ptr("test server"),
// 		AuthorizationMethods: []*armapimanagement.AuthorizationMethod{
// 			to.Ptr(armapimanagement.AuthorizationMethodGET)},
// 			BearerTokenSendingMethods: []*armapimanagement.BearerTokenSendingMethod{
// 				to.Ptr(armapimanagement.BearerTokenSendingMethodAuthorizationHeader)},
// 				ClientAuthenticationMethod: []*armapimanagement.ClientAuthenticationMethod{
// 					to.Ptr(armapimanagement.ClientAuthenticationMethodBasic)},
// 					DefaultScope: to.Ptr("read write"),
// 					ResourceOwnerPassword: to.Ptr("pwd"),
// 					ResourceOwnerUsername: to.Ptr("un"),
// 					SupportState: to.Ptr(true),
// 					TokenEndpoint: to.Ptr("https://www.contoso.com/oauth2/token"),
// 					AuthorizationEndpoint: to.Ptr("https://www.contoso.com/oauth2/auth"),
// 					ClientID: to.Ptr("updated"),
// 					ClientRegistrationEndpoint: to.Ptr("https://www.contoso.com/apps"),
// 					DisplayName: to.Ptr("test3"),
// 					GrantTypes: []*armapimanagement.GrantType{
// 						to.Ptr(armapimanagement.GrantTypeAuthorizationCode),
// 						to.Ptr(armapimanagement.GrantTypeImplicit)},
// 						UseInAPIDocumentation: to.Ptr(true),
// 						UseInTestConsole: to.Ptr(false),
// 					},
// 				}
Output:

type AuthorizationServerClientCreateOrUpdateOptions

type AuthorizationServerClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

AuthorizationServerClientCreateOrUpdateOptions contains the optional parameters for the AuthorizationServerClient.CreateOrUpdate method.

type AuthorizationServerClientCreateOrUpdateResponse

type AuthorizationServerClientCreateOrUpdateResponse struct {
	// External OAuth authorization server settings.
	AuthorizationServerContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

AuthorizationServerClientCreateOrUpdateResponse contains the response from method AuthorizationServerClient.CreateOrUpdate.

type AuthorizationServerClientDeleteOptions

type AuthorizationServerClientDeleteOptions struct {
}

AuthorizationServerClientDeleteOptions contains the optional parameters for the AuthorizationServerClient.Delete method.

type AuthorizationServerClientDeleteResponse

type AuthorizationServerClientDeleteResponse struct {
}

AuthorizationServerClientDeleteResponse contains the response from method AuthorizationServerClient.Delete.

type AuthorizationServerClientGetEntityTagOptions

type AuthorizationServerClientGetEntityTagOptions struct {
}

AuthorizationServerClientGetEntityTagOptions contains the optional parameters for the AuthorizationServerClient.GetEntityTag method.

type AuthorizationServerClientGetEntityTagResponse

type AuthorizationServerClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

AuthorizationServerClientGetEntityTagResponse contains the response from method AuthorizationServerClient.GetEntityTag.

type AuthorizationServerClientGetOptions

type AuthorizationServerClientGetOptions struct {
}

AuthorizationServerClientGetOptions contains the optional parameters for the AuthorizationServerClient.Get method.

type AuthorizationServerClientGetResponse

type AuthorizationServerClientGetResponse struct {
	// External OAuth authorization server settings.
	AuthorizationServerContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

AuthorizationServerClientGetResponse contains the response from method AuthorizationServerClient.Get.

type AuthorizationServerClientListByServiceOptions

type AuthorizationServerClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

AuthorizationServerClientListByServiceOptions contains the optional parameters for the AuthorizationServerClient.NewListByServicePager method.

type AuthorizationServerClientListByServiceResponse

type AuthorizationServerClientListByServiceResponse struct {
	// Paged OAuth2 Authorization Servers list representation.
	AuthorizationServerCollection
}

AuthorizationServerClientListByServiceResponse contains the response from method AuthorizationServerClient.NewListByServicePager.

type AuthorizationServerClientListSecretsOptions

type AuthorizationServerClientListSecretsOptions struct {
}

AuthorizationServerClientListSecretsOptions contains the optional parameters for the AuthorizationServerClient.ListSecrets method.

type AuthorizationServerClientListSecretsResponse

type AuthorizationServerClientListSecretsResponse struct {
	// OAuth Server Secrets Contract.
	AuthorizationServerSecretsContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

AuthorizationServerClientListSecretsResponse contains the response from method AuthorizationServerClient.ListSecrets.

type AuthorizationServerClientUpdateOptions

type AuthorizationServerClientUpdateOptions struct {
}

AuthorizationServerClientUpdateOptions contains the optional parameters for the AuthorizationServerClient.Update method.

type AuthorizationServerClientUpdateResponse

type AuthorizationServerClientUpdateResponse struct {
	// External OAuth authorization server settings.
	AuthorizationServerContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

AuthorizationServerClientUpdateResponse contains the response from method AuthorizationServerClient.Update.

type AuthorizationServerCollection

type AuthorizationServerCollection struct {
	// Total record count number across all pages.
	Count *int64

	// Next page link if any.
	NextLink *string

	// Page values.
	Value []*AuthorizationServerContract
}

AuthorizationServerCollection - Paged OAuth2 Authorization Servers list representation.

func (AuthorizationServerCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AuthorizationServerCollection.

func (*AuthorizationServerCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationServerCollection.

type AuthorizationServerContract

type AuthorizationServerContract struct {
	// Properties of the External OAuth authorization server Contract.
	Properties *AuthorizationServerContractProperties

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

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

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

AuthorizationServerContract - External OAuth authorization server settings.

func (AuthorizationServerContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AuthorizationServerContract.

func (*AuthorizationServerContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationServerContract.

type AuthorizationServerContractBaseProperties

type AuthorizationServerContractBaseProperties struct {
	// HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
	AuthorizationMethods []*AuthorizationMethod

	// Specifies the mechanism by which access token is passed to the API.
	BearerTokenSendingMethods []*BearerTokenSendingMethod

	// Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or
	// Body. When Body is specified, client credentials and other parameters are passed
	// within the request body in the application/x-www-form-urlencoded format.
	ClientAuthenticationMethod []*ClientAuthenticationMethod

	// Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in
	// the form of a string containing space-delimited values.
	DefaultScope *string

	// Description of the authorization server. Can contain HTML formatting tags.
	Description *string

	// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default
	// resource owner password.
	ResourceOwnerPassword *string

	// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default
	// resource owner username.
	ResourceOwnerUsername *string

	// If true, authorization server will include state parameter from the authorization request to its response. Client may use
	// state parameter to raise protocol security.
	SupportState *bool

	// Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects
	// with name and value string properties, i.e. {"name" : "name value", "value":
	// "a value"}.
	TokenBodyParameters []*TokenBodyParameterContract

	// OAuth token endpoint. Contains absolute URI to entity being referenced.
	TokenEndpoint *string
}

AuthorizationServerContractBaseProperties - External OAuth authorization server Update settings contract.

func (AuthorizationServerContractBaseProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type AuthorizationServerContractBaseProperties.

func (*AuthorizationServerContractBaseProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationServerContractBaseProperties.

type AuthorizationServerContractProperties

type AuthorizationServerContractProperties struct {
	// REQUIRED; OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.
	AuthorizationEndpoint *string

	// REQUIRED; Client or app id registered with this authorization server.
	ClientID *string

	// REQUIRED; Optional reference to a page where client or app registration for this authorization server is performed. Contains
	// absolute URL to entity being referenced.
	ClientRegistrationEndpoint *string

	// REQUIRED; User-friendly authorization server name.
	DisplayName *string

	// REQUIRED; Form of an authorization grant, which the client uses to request the access token.
	GrantTypes []*GrantType

	// HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
	AuthorizationMethods []*AuthorizationMethod

	// Specifies the mechanism by which access token is passed to the API.
	BearerTokenSendingMethods []*BearerTokenSendingMethod

	// Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or
	// Body. When Body is specified, client credentials and other parameters are passed
	// within the request body in the application/x-www-form-urlencoded format.
	ClientAuthenticationMethod []*ClientAuthenticationMethod

	// Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use
	// '/listSecrets' POST request to get the value.
	ClientSecret *string

	// Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in
	// the form of a string containing space-delimited values.
	DefaultScope *string

	// Description of the authorization server. Can contain HTML formatting tags.
	Description *string

	// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default
	// resource owner password.
	ResourceOwnerPassword *string

	// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default
	// resource owner username.
	ResourceOwnerUsername *string

	// If true, authorization server will include state parameter from the authorization request to its response. Client may use
	// state parameter to raise protocol security.
	SupportState *bool

	// Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects
	// with name and value string properties, i.e. {"name" : "name value", "value":
	// "a value"}.
	TokenBodyParameters []*TokenBodyParameterContract

	// OAuth token endpoint. Contains absolute URI to entity being referenced.
	TokenEndpoint *string

	// If true, the authorization server will be used in the API documentation in the developer portal. False by default if no
	// value is provided.
	UseInAPIDocumentation *bool

	// If true, the authorization server may be used in the developer portal test console. True by default if no value is provided.
	UseInTestConsole *bool
}

AuthorizationServerContractProperties - External OAuth authorization server settings Properties.

func (AuthorizationServerContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AuthorizationServerContractProperties.

func (*AuthorizationServerContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationServerContractProperties.

type AuthorizationServerSecretsContract

type AuthorizationServerSecretsContract struct {
	// oAuth Authorization Server Secrets.
	ClientSecret *string

	// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default
	// resource owner password.
	ResourceOwnerPassword *string

	// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default
	// resource owner username.
	ResourceOwnerUsername *string
}

AuthorizationServerSecretsContract - OAuth Server Secrets Contract.

func (AuthorizationServerSecretsContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AuthorizationServerSecretsContract.

func (*AuthorizationServerSecretsContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationServerSecretsContract.

type AuthorizationServerUpdateContract

type AuthorizationServerUpdateContract struct {
	// Properties of the External OAuth authorization server update Contract.
	Properties *AuthorizationServerUpdateContractProperties

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

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

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

AuthorizationServerUpdateContract - External OAuth authorization server settings.

func (AuthorizationServerUpdateContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AuthorizationServerUpdateContract.

func (*AuthorizationServerUpdateContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationServerUpdateContract.

type AuthorizationServerUpdateContractProperties

type AuthorizationServerUpdateContractProperties struct {
	// OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.
	AuthorizationEndpoint *string

	// HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
	AuthorizationMethods []*AuthorizationMethod

	// Specifies the mechanism by which access token is passed to the API.
	BearerTokenSendingMethods []*BearerTokenSendingMethod

	// Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or
	// Body. When Body is specified, client credentials and other parameters are passed
	// within the request body in the application/x-www-form-urlencoded format.
	ClientAuthenticationMethod []*ClientAuthenticationMethod

	// Client or app id registered with this authorization server.
	ClientID *string

	// Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute
	// URL to entity being referenced.
	ClientRegistrationEndpoint *string

	// Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use
	// '/listSecrets' POST request to get the value.
	ClientSecret *string

	// Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in
	// the form of a string containing space-delimited values.
	DefaultScope *string

	// Description of the authorization server. Can contain HTML formatting tags.
	Description *string

	// User-friendly authorization server name.
	DisplayName *string

	// Form of an authorization grant, which the client uses to request the access token.
	GrantTypes []*GrantType

	// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default
	// resource owner password.
	ResourceOwnerPassword *string

	// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default
	// resource owner username.
	ResourceOwnerUsername *string

	// If true, authorization server will include state parameter from the authorization request to its response. Client may use
	// state parameter to raise protocol security.
	SupportState *bool

	// Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects
	// with name and value string properties, i.e. {"name" : "name value", "value":
	// "a value"}.
	TokenBodyParameters []*TokenBodyParameterContract

	// OAuth token endpoint. Contains absolute URI to entity being referenced.
	TokenEndpoint *string

	// If true, the authorization server will be used in the API documentation in the developer portal. False by default if no
	// value is provided.
	UseInAPIDocumentation *bool

	// If true, the authorization server may be used in the developer portal test console. True by default if no value is provided.
	UseInTestConsole *bool
}

AuthorizationServerUpdateContractProperties - External OAuth authorization server Update settings contract.

func (AuthorizationServerUpdateContractProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type AuthorizationServerUpdateContractProperties.

func (*AuthorizationServerUpdateContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationServerUpdateContractProperties.

type AuthorizationType

type AuthorizationType string

AuthorizationType - Authorization type options

const (
	// AuthorizationTypeOAuth2 - OAuth2 authorization type
	AuthorizationTypeOAuth2 AuthorizationType = "OAuth2"
)

func PossibleAuthorizationTypeValues

func PossibleAuthorizationTypeValues() []AuthorizationType

PossibleAuthorizationTypeValues returns the possible values for the AuthorizationType const type.

type BackendAuthorizationHeaderCredentials

type BackendAuthorizationHeaderCredentials struct {
	// REQUIRED; Authentication Parameter value.
	Parameter *string

	// REQUIRED; Authentication Scheme name.
	Scheme *string
}

BackendAuthorizationHeaderCredentials - Authorization header information.

func (BackendAuthorizationHeaderCredentials) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type BackendAuthorizationHeaderCredentials.

func (*BackendAuthorizationHeaderCredentials) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type BackendAuthorizationHeaderCredentials.

type BackendBaseParameters

type BackendBaseParameters struct {
	// Backend Credentials Contract Properties
	Credentials *BackendCredentialsContract

	// Backend Description.
	Description *string

	// Backend Properties contract
	Properties *BackendProperties

	// Backend gateway Contract Properties
	Proxy *BackendProxyContract

	// Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or
	// API Apps.
	ResourceID *string

	// Backend TLS Properties
	TLS *BackendTLSProperties

	// Backend Title.
	Title *string
}

BackendBaseParameters - Backend entity base Parameter set.

func (BackendBaseParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type BackendBaseParameters.

func (*BackendBaseParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type BackendBaseParameters.

type BackendClient

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

BackendClient contains the methods for the Backend group. Don't use this type directly, use NewBackendClient() instead.

func NewBackendClient

func NewBackendClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackendClient, error)

NewBackendClient creates a new instance of BackendClient 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 (*BackendClient) CreateOrUpdate

func (client *BackendClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, backendID string, parameters BackendContract, options *BackendClientCreateOrUpdateOptions) (BackendClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or Updates a backend. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • backendID - Identifier of the Backend entity. Must be unique in the current API Management service instance.
  • parameters - Create parameters.
  • options - BackendClientCreateOrUpdateOptions contains the optional parameters for the BackendClient.CreateOrUpdate method.
Example (ApiManagementCreateBackendProxyBackend)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateBackendProxyBackend.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewBackendClient().CreateOrUpdate(ctx, "rg1", "apimService1", "proxybackend", armapimanagement.BackendContract{
	Properties: &armapimanagement.BackendContractProperties{
		Description: to.Ptr("description5308"),
		Credentials: &armapimanagement.BackendCredentialsContract{
			Authorization: &armapimanagement.BackendAuthorizationHeaderCredentials{
				Parameter: to.Ptr("opensesma"),
				Scheme:    to.Ptr("Basic"),
			},
			Header: map[string][]*string{
				"x-my-1": {
					to.Ptr("val1"),
					to.Ptr("val2")},
			},
			Query: map[string][]*string{
				"sv": {
					to.Ptr("xx"),
					to.Ptr("bb"),
					to.Ptr("cc")},
			},
		},
		Proxy: &armapimanagement.BackendProxyContract{
			Password: to.Ptr("<password>"),
			URL:      to.Ptr("http://192.168.1.1:8080"),
			Username: to.Ptr("Contoso\\admin"),
		},
		TLS: &armapimanagement.BackendTLSProperties{
			ValidateCertificateChain: to.Ptr(true),
			ValidateCertificateName:  to.Ptr(true),
		},
		URL:      to.Ptr("https://backendname2644/"),
		Protocol: to.Ptr(armapimanagement.BackendProtocolHTTP),
	},
}, &armapimanagement.BackendClientCreateOrUpdateOptions{IfMatch: 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.BackendContract = armapimanagement.BackendContract{
// 	Name: to.Ptr("proxybackend"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/backends"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/proxybackend"),
// 	Properties: &armapimanagement.BackendContractProperties{
// 		Description: to.Ptr("description5308"),
// 		Credentials: &armapimanagement.BackendCredentialsContract{
// 			Authorization: &armapimanagement.BackendAuthorizationHeaderCredentials{
// 				Parameter: to.Ptr("opensesma"),
// 				Scheme: to.Ptr("Basic"),
// 			},
// 			Header: map[string][]*string{
// 				"x-my-1": []*string{
// 					to.Ptr("val1"),
// 					to.Ptr("val2")},
// 				},
// 				Query: map[string][]*string{
// 					"sv": []*string{
// 						to.Ptr("xx"),
// 						to.Ptr("bb"),
// 						to.Ptr("cc")},
// 					},
// 				},
// 				Proxy: &armapimanagement.BackendProxyContract{
// 					Password: to.Ptr("<password>"),
// 					URL: to.Ptr("http://192.168.1.1:8080"),
// 					Username: to.Ptr("Contoso\\admin"),
// 				},
// 				TLS: &armapimanagement.BackendTLSProperties{
// 					ValidateCertificateChain: to.Ptr(false),
// 					ValidateCertificateName: to.Ptr(false),
// 				},
// 				URL: to.Ptr("https://backendname2644/"),
// 				Protocol: to.Ptr(armapimanagement.BackendProtocolHTTP),
// 			},
// 		}
Output:

Example (ApiManagementCreateBackendServiceFabric)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateBackendServiceFabric.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewBackendClient().CreateOrUpdate(ctx, "rg1", "apimService1", "sfbackend", armapimanagement.BackendContract{
	Properties: &armapimanagement.BackendContractProperties{
		Description: to.Ptr("Service Fabric Test App 1"),
		Properties: &armapimanagement.BackendProperties{
			ServiceFabricCluster: &armapimanagement.BackendServiceFabricClusterProperties{
				ClientCertificateID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1"),
				ManagementEndpoints: []*string{
					to.Ptr("https://somecluster.com")},
				MaxPartitionResolutionRetries: to.Ptr[int32](5),
				ServerX509Names: []*armapimanagement.X509CertificateName{
					{
						Name:                        to.Ptr("ServerCommonName1"),
						IssuerCertificateThumbprint: to.Ptr("IssuerCertificateThumbprint1"),
					}},
			},
		},
		URL:      to.Ptr("fabric:/mytestapp/mytestservice"),
		Protocol: to.Ptr(armapimanagement.BackendProtocolHTTP),
	},
}, &armapimanagement.BackendClientCreateOrUpdateOptions{IfMatch: 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.BackendContract = armapimanagement.BackendContract{
// 	Name: to.Ptr("sfbackend"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/backends"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/sfbackend"),
// 	Properties: &armapimanagement.BackendContractProperties{
// 		Description: to.Ptr("Service Fabric Test App 1"),
// 		Properties: &armapimanagement.BackendProperties{
// 			ServiceFabricCluster: &armapimanagement.BackendServiceFabricClusterProperties{
// 				ClientCertificateID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1"),
// 				ManagementEndpoints: []*string{
// 					to.Ptr("https://somecluster.com")},
// 					MaxPartitionResolutionRetries: to.Ptr[int32](5),
// 					ServerX509Names: []*armapimanagement.X509CertificateName{
// 						{
// 							Name: to.Ptr("ServerCommonName1"),
// 							IssuerCertificateThumbprint: to.Ptr("IssuerCertificateThumbprint1"),
// 					}},
// 				},
// 			},
// 			URL: to.Ptr("fabric:/mytestapp/mytestservice"),
// 			Protocol: to.Ptr(armapimanagement.BackendProtocolHTTP),
// 		},
// 	}
Output:

func (*BackendClient) Delete

func (client *BackendClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, backendID string, ifMatch string, options *BackendClientDeleteOptions) (BackendClientDeleteResponse, error)

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

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • backendID - Identifier of the Backend entity. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - BackendClientDeleteOptions contains the optional parameters for the BackendClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteBackend.json

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

func (*BackendClient) Get

func (client *BackendClient) Get(ctx context.Context, resourceGroupName string, serviceName string, backendID string, options *BackendClientGetOptions) (BackendClientGetResponse, error)

Get - Gets the details of the backend specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • backendID - Identifier of the Backend entity. Must be unique in the current API Management service instance.
  • options - BackendClientGetOptions contains the optional parameters for the BackendClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetBackend.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewBackendClient().Get(ctx, "rg1", "apimService1", "sfbackend", 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.BackendContract = armapimanagement.BackendContract{
// 	Name: to.Ptr("sfbackend"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/backends"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/sfbackend"),
// 	Properties: &armapimanagement.BackendContractProperties{
// 		Description: to.Ptr("Service Fabric Test App 1"),
// 		Properties: &armapimanagement.BackendProperties{
// 			ServiceFabricCluster: &armapimanagement.BackendServiceFabricClusterProperties{
// 				ClientCertificateID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1"),
// 				ManagementEndpoints: []*string{
// 					to.Ptr("https://somecluster.com")},
// 					MaxPartitionResolutionRetries: to.Ptr[int32](5),
// 					ServerX509Names: []*armapimanagement.X509CertificateName{
// 						{
// 							Name: to.Ptr("ServerCommonName1"),
// 							IssuerCertificateThumbprint: to.Ptr("IssuerCertificateThumbprint1"),
// 					}},
// 				},
// 			},
// 			URL: to.Ptr("fabric:/mytestapp/mytestservice"),
// 			Protocol: to.Ptr(armapimanagement.BackendProtocolHTTP),
// 		},
// 	}
Output:

func (*BackendClient) GetEntityTag

func (client *BackendClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, backendID string, options *BackendClientGetEntityTagOptions) (BackendClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the backend specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • backendID - Identifier of the Backend entity. Must be unique in the current API Management service instance.
  • options - BackendClientGetEntityTagOptions contains the optional parameters for the BackendClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadBackend.json

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

func (*BackendClient) NewListByServicePager

func (client *BackendClient) NewListByServicePager(resourceGroupName string, serviceName string, options *BackendClientListByServiceOptions) *runtime.Pager[BackendClientListByServiceResponse]

NewListByServicePager - Lists a collection of backends in the specified service instance.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - BackendClientListByServiceOptions contains the optional parameters for the BackendClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListBackends.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewBackendClient().NewListByServicePager("rg1", "apimService1", &armapimanagement.BackendClientListByServiceOptions{Filter: nil,
	Top:  nil,
	Skip: 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.BackendCollection = armapimanagement.BackendCollection{
	// 	Count: to.Ptr[int64](2),
	// 	Value: []*armapimanagement.BackendContract{
	// 		{
	// 			Name: to.Ptr("proxybackend"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/backends"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/proxybackend"),
	// 			Properties: &armapimanagement.BackendContractProperties{
	// 				Description: to.Ptr("description5308"),
	// 				Credentials: &armapimanagement.BackendCredentialsContract{
	// 					Authorization: &armapimanagement.BackendAuthorizationHeaderCredentials{
	// 						Parameter: to.Ptr("opensesma"),
	// 						Scheme: to.Ptr("Basic"),
	// 					},
	// 					Header: map[string][]*string{
	// 						"x-my-1": []*string{
	// 							to.Ptr("val1"),
	// 							to.Ptr("val2")},
	// 						},
	// 						Query: map[string][]*string{
	// 							"sv": []*string{
	// 								to.Ptr("xx"),
	// 								to.Ptr("bb"),
	// 								to.Ptr("cc")},
	// 							},
	// 						},
	// 						Proxy: &armapimanagement.BackendProxyContract{
	// 							Password: to.Ptr("<password>"),
	// 							URL: to.Ptr("http://192.168.1.1:8080"),
	// 							Username: to.Ptr("Contoso\\admin"),
	// 						},
	// 						TLS: &armapimanagement.BackendTLSProperties{
	// 							ValidateCertificateChain: to.Ptr(false),
	// 							ValidateCertificateName: to.Ptr(false),
	// 						},
	// 						URL: to.Ptr("https://backendname2644/"),
	// 						Protocol: to.Ptr(armapimanagement.BackendProtocolHTTP),
	// 					},
	// 				},
	// 				{
	// 					Name: to.Ptr("sfbackend"),
	// 					Type: to.Ptr("Microsoft.ApiManagement/service/backends"),
	// 					ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/sfbackend"),
	// 					Properties: &armapimanagement.BackendContractProperties{
	// 						Description: to.Ptr("Service Fabric Test App 1"),
	// 						Properties: &armapimanagement.BackendProperties{
	// 							ServiceFabricCluster: &armapimanagement.BackendServiceFabricClusterProperties{
	// 								ClientCertificateID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1"),
	// 								ManagementEndpoints: []*string{
	// 									to.Ptr("https://somecluster.com")},
	// 									MaxPartitionResolutionRetries: to.Ptr[int32](5),
	// 									ServerX509Names: []*armapimanagement.X509CertificateName{
	// 										{
	// 											Name: to.Ptr("ServerCommonName1"),
	// 											IssuerCertificateThumbprint: to.Ptr("IssuerCertificateThumbprint1"),
	// 									}},
	// 								},
	// 							},
	// 							URL: to.Ptr("fabric:/mytestapp/mytestservice"),
	// 							Protocol: to.Ptr(armapimanagement.BackendProtocolHTTP),
	// 						},
	// 				}},
	// 			}
}
Output:

func (*BackendClient) Reconnect

func (client *BackendClient) Reconnect(ctx context.Context, resourceGroupName string, serviceName string, backendID string, options *BackendClientReconnectOptions) (BackendClientReconnectResponse, error)

Reconnect - Notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • backendID - Identifier of the Backend entity. Must be unique in the current API Management service instance.
  • options - BackendClientReconnectOptions contains the optional parameters for the BackendClient.Reconnect method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackendReconnect.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewBackendClient().Reconnect(ctx, "rg1", "apimService1", "proxybackend", &armapimanagement.BackendClientReconnectOptions{Parameters: &armapimanagement.BackendReconnectContract{
	Properties: &armapimanagement.BackendReconnectProperties{
		After: to.Ptr("PT3S"),
	},
},
})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*BackendClient) Update

func (client *BackendClient) Update(ctx context.Context, resourceGroupName string, serviceName string, backendID string, ifMatch string, parameters BackendUpdateParameters, options *BackendClientUpdateOptions) (BackendClientUpdateResponse, error)

Update - Updates an existing backend. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • backendID - Identifier of the Backend entity. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - Update parameters.
  • options - BackendClientUpdateOptions contains the optional parameters for the BackendClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateBackend.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewBackendClient().Update(ctx, "rg1", "apimService1", "proxybackend", "*", armapimanagement.BackendUpdateParameters{
	Properties: &armapimanagement.BackendUpdateParameterProperties{
		Description: to.Ptr("description5308"),
		TLS: &armapimanagement.BackendTLSProperties{
			ValidateCertificateChain: to.Ptr(false),
			ValidateCertificateName:  to.Ptr(true),
		},
	},
}, 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.BackendContract = armapimanagement.BackendContract{
// 	Name: to.Ptr("proxybackend"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/backends"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/proxybackend"),
// 	Properties: &armapimanagement.BackendContractProperties{
// 		Description: to.Ptr("description5308"),
// 		Credentials: &armapimanagement.BackendCredentialsContract{
// 			Authorization: &armapimanagement.BackendAuthorizationHeaderCredentials{
// 				Parameter: to.Ptr("opensesma"),
// 				Scheme: to.Ptr("Basic"),
// 			},
// 			Header: map[string][]*string{
// 				"x-my-1": []*string{
// 					to.Ptr("val1"),
// 					to.Ptr("val2")},
// 				},
// 				Query: map[string][]*string{
// 					"sv": []*string{
// 						to.Ptr("xx"),
// 						to.Ptr("bb"),
// 						to.Ptr("cc")},
// 					},
// 				},
// 				Proxy: &armapimanagement.BackendProxyContract{
// 					Password: to.Ptr("<password>"),
// 					URL: to.Ptr("http://192.168.1.1:8080"),
// 					Username: to.Ptr("Contoso\\admin"),
// 				},
// 				TLS: &armapimanagement.BackendTLSProperties{
// 					ValidateCertificateChain: to.Ptr(false),
// 					ValidateCertificateName: to.Ptr(true),
// 				},
// 				URL: to.Ptr("https://backendname2644/"),
// 				Protocol: to.Ptr(armapimanagement.BackendProtocolHTTP),
// 			},
// 		}
Output:

type BackendClientCreateOrUpdateOptions

type BackendClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

BackendClientCreateOrUpdateOptions contains the optional parameters for the BackendClient.CreateOrUpdate method.

type BackendClientCreateOrUpdateResponse

type BackendClientCreateOrUpdateResponse struct {
	// Backend details.
	BackendContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

BackendClientCreateOrUpdateResponse contains the response from method BackendClient.CreateOrUpdate.

type BackendClientDeleteOptions

type BackendClientDeleteOptions struct {
}

BackendClientDeleteOptions contains the optional parameters for the BackendClient.Delete method.

type BackendClientDeleteResponse

type BackendClientDeleteResponse struct {
}

BackendClientDeleteResponse contains the response from method BackendClient.Delete.

type BackendClientGetEntityTagOptions

type BackendClientGetEntityTagOptions struct {
}

BackendClientGetEntityTagOptions contains the optional parameters for the BackendClient.GetEntityTag method.

type BackendClientGetEntityTagResponse

type BackendClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

BackendClientGetEntityTagResponse contains the response from method BackendClient.GetEntityTag.

type BackendClientGetOptions

type BackendClientGetOptions struct {
}

BackendClientGetOptions contains the optional parameters for the BackendClient.Get method.

type BackendClientGetResponse

type BackendClientGetResponse struct {
	// Backend details.
	BackendContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

BackendClientGetResponse contains the response from method BackendClient.Get.

type BackendClientListByServiceOptions

type BackendClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

BackendClientListByServiceOptions contains the optional parameters for the BackendClient.NewListByServicePager method.

type BackendClientListByServiceResponse

type BackendClientListByServiceResponse struct {
	// Paged Backend list representation.
	BackendCollection
}

BackendClientListByServiceResponse contains the response from method BackendClient.NewListByServicePager.

type BackendClientReconnectOptions

type BackendClientReconnectOptions struct {
	// Reconnect request parameters.
	Parameters *BackendReconnectContract
}

BackendClientReconnectOptions contains the optional parameters for the BackendClient.Reconnect method.

type BackendClientReconnectResponse

type BackendClientReconnectResponse struct {
}

BackendClientReconnectResponse contains the response from method BackendClient.Reconnect.

type BackendClientUpdateOptions

type BackendClientUpdateOptions struct {
}

BackendClientUpdateOptions contains the optional parameters for the BackendClient.Update method.

type BackendClientUpdateResponse

type BackendClientUpdateResponse struct {
	// Backend details.
	BackendContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

BackendClientUpdateResponse contains the response from method BackendClient.Update.

type BackendCollection

type BackendCollection struct {
	// Total record count number across all pages.
	Count *int64

	// Next page link if any.
	NextLink *string

	// Backend values.
	Value []*BackendContract
}

BackendCollection - Paged Backend list representation.

func (BackendCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type BackendCollection.

func (*BackendCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type BackendCollection.

type BackendContract

type BackendContract struct {
	// Backend entity contract properties.
	Properties *BackendContractProperties

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

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

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

BackendContract - Backend details.

func (BackendContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type BackendContract.

func (*BackendContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type BackendContract.

type BackendContractProperties

type BackendContractProperties struct {
	// REQUIRED; Backend communication protocol.
	Protocol *BackendProtocol

	// REQUIRED; Runtime Url of the Backend.
	URL *string

	// Backend Credentials Contract Properties
	Credentials *BackendCredentialsContract

	// Backend Description.
	Description *string

	// Backend Properties contract
	Properties *BackendProperties

	// Backend gateway Contract Properties
	Proxy *BackendProxyContract

	// Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or
	// API Apps.
	ResourceID *string

	// Backend TLS Properties
	TLS *BackendTLSProperties

	// Backend Title.
	Title *string
}

BackendContractProperties - Parameters supplied to the Create Backend operation.

func (BackendContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type BackendContractProperties.

func (*BackendContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type BackendContractProperties.

type BackendCredentialsContract

type BackendCredentialsContract struct {
	// Authorization header authentication
	Authorization *BackendAuthorizationHeaderCredentials

	// List of Client Certificate Thumbprints. Will be ignored if certificatesIds are provided.
	Certificate []*string

	// List of Client Certificate Ids.
	CertificateIDs []*string

	// Header Parameter description.
	Header map[string][]*string

	// Query Parameter description.
	Query map[string][]*string
}

BackendCredentialsContract - Details of the Credentials used to connect to Backend.

func (BackendCredentialsContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type BackendCredentialsContract.

func (*BackendCredentialsContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type BackendCredentialsContract.

type BackendProperties

type BackendProperties struct {
	// Backend Service Fabric Cluster Properties
	ServiceFabricCluster *BackendServiceFabricClusterProperties
}

BackendProperties - Properties specific to the Backend Type.

func (BackendProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type BackendProperties.

func (*BackendProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type BackendProperties.

type BackendProtocol

type BackendProtocol string

BackendProtocol - Backend communication protocol.

const (
	// BackendProtocolHTTP - The Backend is a RESTful service.
	BackendProtocolHTTP BackendProtocol = "http"
	// BackendProtocolSoap - The Backend is a SOAP service.
	BackendProtocolSoap BackendProtocol = "soap"
)

func PossibleBackendProtocolValues

func PossibleBackendProtocolValues() []BackendProtocol

PossibleBackendProtocolValues returns the possible values for the BackendProtocol const type.

type BackendProxyContract

type BackendProxyContract struct {
	// REQUIRED; WebProxy Server AbsoluteUri property which includes the entire URI stored in the Uri instance, including all
	// fragments and query strings.
	URL *string

	// Password to connect to the WebProxy Server
	Password *string

	// Username to connect to the WebProxy server
	Username *string
}

BackendProxyContract - Details of the Backend WebProxy Server to use in the Request to Backend.

func (BackendProxyContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type BackendProxyContract.

func (*BackendProxyContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type BackendProxyContract.

type BackendReconnectContract

type BackendReconnectContract struct {
	// Reconnect request properties.
	Properties *BackendReconnectProperties

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

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

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

BackendReconnectContract - Reconnect request parameters.

func (BackendReconnectContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type BackendReconnectContract.

func (*BackendReconnectContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type BackendReconnectContract.

type BackendReconnectProperties

type BackendReconnectProperties struct {
	// Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconnect is PT2M.
	After *string
}

BackendReconnectProperties - Properties to control reconnect requests.

func (BackendReconnectProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type BackendReconnectProperties.

func (*BackendReconnectProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type BackendReconnectProperties.

type BackendServiceFabricClusterProperties

type BackendServiceFabricClusterProperties struct {
	// REQUIRED; The cluster management endpoint.
	ManagementEndpoints []*string

	// The client certificate id for the management endpoint.
	ClientCertificateID *string

	// The client certificate thumbprint for the management endpoint. Will be ignored if certificatesIds are provided
	ClientCertificatethumbprint *string

	// Maximum number of retries while attempting resolve the partition.
	MaxPartitionResolutionRetries *int32

	// Thumbprints of certificates cluster management service uses for tls communication
	ServerCertificateThumbprints []*string

	// Server X509 Certificate Names Collection
	ServerX509Names []*X509CertificateName
}

BackendServiceFabricClusterProperties - Properties of the Service Fabric Type Backend.

func (BackendServiceFabricClusterProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type BackendServiceFabricClusterProperties.

func (*BackendServiceFabricClusterProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type BackendServiceFabricClusterProperties.

type BackendTLSProperties

type BackendTLSProperties struct {
	// Flag indicating whether SSL certificate chain validation should be done when using self-signed certificates for this backend
	// host.
	ValidateCertificateChain *bool

	// Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for this backend
	// host.
	ValidateCertificateName *bool
}

BackendTLSProperties - Properties controlling TLS Certificate Validation.

func (BackendTLSProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type BackendTLSProperties.

func (*BackendTLSProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type BackendTLSProperties.

type BackendUpdateParameterProperties

type BackendUpdateParameterProperties struct {
	// Backend Credentials Contract Properties
	Credentials *BackendCredentialsContract

	// Backend Description.
	Description *string

	// Backend Properties contract
	Properties *BackendProperties

	// Backend communication protocol.
	Protocol *BackendProtocol

	// Backend gateway Contract Properties
	Proxy *BackendProxyContract

	// Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or
	// API Apps.
	ResourceID *string

	// Backend TLS Properties
	TLS *BackendTLSProperties

	// Backend Title.
	Title *string

	// Runtime Url of the Backend.
	URL *string
}

BackendUpdateParameterProperties - Parameters supplied to the Update Backend operation.

func (BackendUpdateParameterProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type BackendUpdateParameterProperties.

func (*BackendUpdateParameterProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type BackendUpdateParameterProperties.

type BackendUpdateParameters

type BackendUpdateParameters struct {
	// Backend entity update contract properties.
	Properties *BackendUpdateParameterProperties
}

BackendUpdateParameters - Backend update parameters.

func (BackendUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type BackendUpdateParameters.

func (*BackendUpdateParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type BackendUpdateParameters.

type BearerTokenSendingMethod

type BearerTokenSendingMethod string
const (
	BearerTokenSendingMethodAuthorizationHeader BearerTokenSendingMethod = "authorizationHeader"
	BearerTokenSendingMethodQuery               BearerTokenSendingMethod = "query"
)

func PossibleBearerTokenSendingMethodValues

func PossibleBearerTokenSendingMethodValues() []BearerTokenSendingMethod

PossibleBearerTokenSendingMethodValues returns the possible values for the BearerTokenSendingMethod const type.

type BearerTokenSendingMethods

type BearerTokenSendingMethods string

BearerTokenSendingMethods - Form of an authorization grant, which the client uses to request the access token.

const (
	// BearerTokenSendingMethodsAuthorizationHeader - Access token will be transmitted in the Authorization header using Bearer
	// schema
	BearerTokenSendingMethodsAuthorizationHeader BearerTokenSendingMethods = "authorizationHeader"
	// BearerTokenSendingMethodsQuery - Access token will be transmitted as query parameters.
	BearerTokenSendingMethodsQuery BearerTokenSendingMethods = "query"
)

func PossibleBearerTokenSendingMethodsValues

func PossibleBearerTokenSendingMethodsValues() []BearerTokenSendingMethods

PossibleBearerTokenSendingMethodsValues returns the possible values for the BearerTokenSendingMethods const type.

type BodyDiagnosticSettings

type BodyDiagnosticSettings struct {
	// Number of request body bytes to log.
	Bytes *int32
}

BodyDiagnosticSettings - Body logging settings.

func (BodyDiagnosticSettings) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type BodyDiagnosticSettings.

func (*BodyDiagnosticSettings) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type BodyDiagnosticSettings.

type CacheClient

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

CacheClient contains the methods for the Cache group. Don't use this type directly, use NewCacheClient() instead.

func NewCacheClient

func NewCacheClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CacheClient, error)

NewCacheClient creates a new instance of CacheClient 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 (*CacheClient) CreateOrUpdate

func (client *CacheClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, parameters CacheContract, options *CacheClientCreateOrUpdateOptions) (CacheClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates an External Cache to be used in Api Management instance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • cacheID - Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier).
  • parameters - Create or Update parameters.
  • options - CacheClientCreateOrUpdateOptions contains the optional parameters for the CacheClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateCache.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCacheClient().CreateOrUpdate(ctx, "rg1", "apimService1", "c1", armapimanagement.CacheContract{
	Properties: &armapimanagement.CacheContractProperties{
		Description:      to.Ptr("Redis cache instances in West India"),
		ConnectionString: to.Ptr("apim.redis.cache.windows.net:6380,password=xc,ssl=True,abortConnect=False"),
		ResourceID:       to.Ptr("https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1"),
		UseFromLocation:  to.Ptr("default"),
	},
}, &armapimanagement.CacheClientCreateOrUpdateOptions{IfMatch: 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.CacheContract = armapimanagement.CacheContract{
// 	Name: to.Ptr("c1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/caches"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/caches/c1"),
// 	Properties: &armapimanagement.CacheContractProperties{
// 		Description: to.Ptr("Redis cache instances in West India"),
// 		ConnectionString: to.Ptr("{{5f7fbca77a891a2200f3db38}}"),
// 		ResourceID: to.Ptr("https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1"),
// 		UseFromLocation: to.Ptr("default"),
// 	},
// }
Output:

func (*CacheClient) Delete

func (client *CacheClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, ifMatch string, options *CacheClientDeleteOptions) (CacheClientDeleteResponse, error)

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

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • cacheID - Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier).
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - CacheClientDeleteOptions contains the optional parameters for the CacheClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteCache.json

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

func (*CacheClient) Get

func (client *CacheClient) Get(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, options *CacheClientGetOptions) (CacheClientGetResponse, error)

Get - Gets the details of the Cache specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • cacheID - Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier).
  • options - CacheClientGetOptions contains the optional parameters for the CacheClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCache.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCacheClient().Get(ctx, "rg1", "apimService1", "c1", 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.CacheContract = armapimanagement.CacheContract{
// 	Name: to.Ptr("c1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/caches"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/caches/c1"),
// 	Properties: &armapimanagement.CacheContractProperties{
// 		Description: to.Ptr("Redis cache instances in West India"),
// 		ConnectionString: to.Ptr("{{5f7fbca77a891a2200f3db38}}"),
// 		ResourceID: to.Ptr("https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1"),
// 		UseFromLocation: to.Ptr("default"),
// 	},
// }
Output:

func (*CacheClient) GetEntityTag

func (client *CacheClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, options *CacheClientGetEntityTagOptions) (CacheClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the Cache specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • cacheID - Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier).
  • options - CacheClientGetEntityTagOptions contains the optional parameters for the CacheClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadCache.json

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

func (*CacheClient) NewListByServicePager

func (client *CacheClient) NewListByServicePager(resourceGroupName string, serviceName string, options *CacheClientListByServiceOptions) *runtime.Pager[CacheClientListByServiceResponse]

NewListByServicePager - Lists a collection of all external Caches in the specified service instance.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - CacheClientListByServiceOptions contains the optional parameters for the CacheClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListCaches.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewCacheClient().NewListByServicePager("rg1", "apimService1", &armapimanagement.CacheClientListByServiceOptions{Top: nil,
	Skip: 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.CacheCollection = armapimanagement.CacheCollection{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.CacheContract{
	// 		{
	// 			Name: to.Ptr("c1"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/caches"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/caches/c1"),
	// 			Properties: &armapimanagement.CacheContractProperties{
	// 				Description: to.Ptr("Redis cache instances in West India"),
	// 				ConnectionString: to.Ptr("{{5f7fbca77a891a2200f3db38}}"),
	// 				ResourceID: to.Ptr("https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1"),
	// 				UseFromLocation: to.Ptr("default"),
	// 			},
	// 	}},
	// }
}
Output:

func (*CacheClient) Update

func (client *CacheClient) Update(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, ifMatch string, parameters CacheUpdateParameters, options *CacheClientUpdateOptions) (CacheClientUpdateResponse, error)

Update - Updates the details of the cache specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • cacheID - Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier).
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - Update parameters.
  • options - CacheClientUpdateOptions contains the optional parameters for the CacheClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateCache.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCacheClient().Update(ctx, "rg1", "apimService1", "c1", "*", armapimanagement.CacheUpdateParameters{
	Properties: &armapimanagement.CacheUpdateProperties{
		UseFromLocation: to.Ptr("westindia"),
	},
}, 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.CacheContract = armapimanagement.CacheContract{
// 	Name: to.Ptr("c1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/caches"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/caches/c1"),
// 	Properties: &armapimanagement.CacheContractProperties{
// 		Description: to.Ptr("Redis cache instances in West India"),
// 		ConnectionString: to.Ptr("{{5f7fbca77a891a2200f3db38}}"),
// 		ResourceID: to.Ptr("https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1"),
// 		UseFromLocation: to.Ptr("westindia"),
// 	},
// }
Output:

type CacheClientCreateOrUpdateOptions

type CacheClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

CacheClientCreateOrUpdateOptions contains the optional parameters for the CacheClient.CreateOrUpdate method.

type CacheClientCreateOrUpdateResponse

type CacheClientCreateOrUpdateResponse struct {
	// Cache details.
	CacheContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

CacheClientCreateOrUpdateResponse contains the response from method CacheClient.CreateOrUpdate.

type CacheClientDeleteOptions

type CacheClientDeleteOptions struct {
}

CacheClientDeleteOptions contains the optional parameters for the CacheClient.Delete method.

type CacheClientDeleteResponse

type CacheClientDeleteResponse struct {
}

CacheClientDeleteResponse contains the response from method CacheClient.Delete.

type CacheClientGetEntityTagOptions

type CacheClientGetEntityTagOptions struct {
}

CacheClientGetEntityTagOptions contains the optional parameters for the CacheClient.GetEntityTag method.

type CacheClientGetEntityTagResponse

type CacheClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

CacheClientGetEntityTagResponse contains the response from method CacheClient.GetEntityTag.

type CacheClientGetOptions

type CacheClientGetOptions struct {
}

CacheClientGetOptions contains the optional parameters for the CacheClient.Get method.

type CacheClientGetResponse

type CacheClientGetResponse struct {
	// Cache details.
	CacheContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

CacheClientGetResponse contains the response from method CacheClient.Get.

type CacheClientListByServiceOptions

type CacheClientListByServiceOptions struct {
	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

CacheClientListByServiceOptions contains the optional parameters for the CacheClient.NewListByServicePager method.

type CacheClientListByServiceResponse

type CacheClientListByServiceResponse struct {
	// Paged Caches list representation.
	CacheCollection
}

CacheClientListByServiceResponse contains the response from method CacheClient.NewListByServicePager.

type CacheClientUpdateOptions

type CacheClientUpdateOptions struct {
}

CacheClientUpdateOptions contains the optional parameters for the CacheClient.Update method.

type CacheClientUpdateResponse

type CacheClientUpdateResponse struct {
	// Cache details.
	CacheContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

CacheClientUpdateResponse contains the response from method CacheClient.Update.

type CacheCollection

type CacheCollection struct {
	// Total record count number across all pages.
	Count *int64

	// Next page link if any.
	NextLink *string

	// Page values.
	Value []*CacheContract
}

CacheCollection - Paged Caches list representation.

func (CacheCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CacheCollection.

func (*CacheCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CacheCollection.

type CacheContract

type CacheContract struct {
	// Cache properties details.
	Properties *CacheContractProperties

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

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

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

CacheContract - Cache details.

func (CacheContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CacheContract.

func (*CacheContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CacheContract.

type CacheContractProperties

type CacheContractProperties struct {
	// REQUIRED; Runtime connection string to cache
	ConnectionString *string

	// REQUIRED; Location identifier to use cache from (should be either 'default' or valid Azure region identifier)
	UseFromLocation *string

	// Cache description
	Description *string

	// Original uri of entity in external system cache points to
	ResourceID *string
}

CacheContractProperties - Properties of the Cache contract.

func (CacheContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CacheContractProperties.

func (*CacheContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CacheContractProperties.

type CacheUpdateParameters

type CacheUpdateParameters struct {
	// Cache update properties details.
	Properties *CacheUpdateProperties
}

CacheUpdateParameters - Cache update details.

func (CacheUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CacheUpdateParameters.

func (*CacheUpdateParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CacheUpdateParameters.

type CacheUpdateProperties

type CacheUpdateProperties struct {
	// Runtime connection string to cache
	ConnectionString *string

	// Cache description
	Description *string

	// Original uri of entity in external system cache points to
	ResourceID *string

	// Location identifier to use cache from (should be either 'default' or valid Azure region identifier)
	UseFromLocation *string
}

CacheUpdateProperties - Parameters supplied to the Update Cache operation.

func (CacheUpdateProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CacheUpdateProperties.

func (*CacheUpdateProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CacheUpdateProperties.

type CertificateClient

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

CertificateClient contains the methods for the Certificate group. Don't use this type directly, use NewCertificateClient() instead.

func NewCertificateClient

func NewCertificateClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CertificateClient, error)

NewCertificateClient creates a new instance of CertificateClient 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 (*CertificateClient) CreateOrUpdate

func (client *CertificateClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, certificateID string, parameters CertificateCreateOrUpdateParameters, options *CertificateClientCreateOrUpdateOptions) (CertificateClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates the certificate being used for authentication with the backend. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • certificateID - Identifier of the certificate entity. Must be unique in the current API Management service instance.
  • parameters - Create or Update parameters.
  • options - CertificateClientCreateOrUpdateOptions contains the optional parameters for the CertificateClient.CreateOrUpdate method.
Example (ApiManagementCreateCertificate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateCertificate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCertificateClient().CreateOrUpdate(ctx, "rg1", "apimService1", "tempcert", armapimanagement.CertificateCreateOrUpdateParameters{
	Properties: &armapimanagement.CertificateCreateOrUpdateProperties{
		Data:     to.Ptr("****************Base 64 Encoded Certificate *******************************"),
		Password: to.Ptr("****Certificate Password******"),
	},
}, &armapimanagement.CertificateClientCreateOrUpdateOptions{IfMatch: 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.CertificateContract = armapimanagement.CertificateContract{
// 	Name: to.Ptr("tempcert"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/certificates"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/tempcert"),
// 	Properties: &armapimanagement.CertificateContractProperties{
// 		ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-17T21:55:07.000Z"); return t}()),
// 		Subject: to.Ptr("CN=contoso.com"),
// 		Thumbprint: to.Ptr("*******************3"),
// 	},
// }
Output:

Example (ApiManagementCreateCertificateWithKeyVault)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateCertificateWithKeyVault.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCertificateClient().CreateOrUpdate(ctx, "rg1", "apimService1", "templateCertkv", armapimanagement.CertificateCreateOrUpdateParameters{
	Properties: &armapimanagement.CertificateCreateOrUpdateProperties{
		KeyVault: &armapimanagement.KeyVaultContractCreateProperties{
			IdentityClientID: to.Ptr("ceaa6b06-c00f-43ef-99ac-f53d1fe876a0"),
			SecretIdentifier: to.Ptr("https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert"),
		},
	},
}, &armapimanagement.CertificateClientCreateOrUpdateOptions{IfMatch: 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.CertificateContract = armapimanagement.CertificateContract{
// 	Name: to.Ptr("templateCertkv"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/certificates"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/templateCertkv"),
// 	Properties: &armapimanagement.CertificateContractProperties{
// 		ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2037-01-01T07:00:00.000Z"); return t}()),
// 		KeyVault: &armapimanagement.KeyVaultContractProperties{
// 			IdentityClientID: to.Ptr("ceaa6b06-c00f-43ef-99ac-f53d1fe876a0"),
// 			SecretIdentifier: to.Ptr("https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert"),
// 			LastStatus: &armapimanagement.KeyVaultLastAccessStatusContractProperties{
// 				Code: to.Ptr("Success"),
// 				TimeStampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-22T00:24:53.319Z"); return t}()),
// 			},
// 		},
// 		Subject: to.Ptr("CN=*.msitesting.net"),
// 		Thumbprint: to.Ptr("EA**********************9AD690"),
// 	},
// }
Output:

func (*CertificateClient) Delete

func (client *CertificateClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, certificateID string, ifMatch string, options *CertificateClientDeleteOptions) (CertificateClientDeleteResponse, error)

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

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • certificateID - Identifier of the certificate entity. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - CertificateClientDeleteOptions contains the optional parameters for the CertificateClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteCertificate.json

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

func (*CertificateClient) Get

func (client *CertificateClient) Get(ctx context.Context, resourceGroupName string, serviceName string, certificateID string, options *CertificateClientGetOptions) (CertificateClientGetResponse, error)

Get - Gets the details of the certificate specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • certificateID - Identifier of the certificate entity. Must be unique in the current API Management service instance.
  • options - CertificateClientGetOptions contains the optional parameters for the CertificateClient.Get method.
Example (ApiManagementGetCertificate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCertificate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCertificateClient().Get(ctx, "rg1", "apimService1", "templateCert1", 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.CertificateContract = armapimanagement.CertificateContract{
// 	Name: to.Ptr("templateCert1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/certificates"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/templateCert1"),
// 	Properties: &armapimanagement.CertificateContractProperties{
// 		ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-23T17:03:41.000Z"); return t}()),
// 		Subject: to.Ptr("CN=mutual-authcert"),
// 		Thumbprint: to.Ptr("EBA**********************8594A6"),
// 	},
// }
Output:

Example (ApiManagementGetCertificateWithKeyVault)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCertificateWithKeyVault.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCertificateClient().Get(ctx, "rg1", "apimService1", "templateCertkv", 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.CertificateContract = armapimanagement.CertificateContract{
// 	Name: to.Ptr("templateCertkv"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/certificates"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/templateCertkv"),
// 	Properties: &armapimanagement.CertificateContractProperties{
// 		ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2037-01-01T07:00:00.000Z"); return t}()),
// 		KeyVault: &armapimanagement.KeyVaultContractProperties{
// 			IdentityClientID: to.Ptr("ceaa6b06-c00f-43ef-99ac-f53d1fe876a0"),
// 			SecretIdentifier: to.Ptr("https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert"),
// 			LastStatus: &armapimanagement.KeyVaultLastAccessStatusContractProperties{
// 				Code: to.Ptr("Success"),
// 				TimeStampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-22T00:24:53.319Z"); return t}()),
// 			},
// 		},
// 		Subject: to.Ptr("CN=*.msitesting.net"),
// 		Thumbprint: to.Ptr("EA**********************9AD690"),
// 	},
// }
Output:

func (*CertificateClient) GetEntityTag

func (client *CertificateClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, certificateID string, options *CertificateClientGetEntityTagOptions) (CertificateClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the certificate specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • certificateID - Identifier of the certificate entity. Must be unique in the current API Management service instance.
  • options - CertificateClientGetEntityTagOptions contains the optional parameters for the CertificateClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadCertificate.json

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

func (*CertificateClient) NewListByServicePager

func (client *CertificateClient) NewListByServicePager(resourceGroupName string, serviceName string, options *CertificateClientListByServiceOptions) *runtime.Pager[CertificateClientListByServiceResponse]

NewListByServicePager - Lists a collection of all certificates in the specified service instance.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - CertificateClientListByServiceOptions contains the optional parameters for the CertificateClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListCertificates.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewCertificateClient().NewListByServicePager("rg1", "apimService1", &armapimanagement.CertificateClientListByServiceOptions{Filter: nil,
	Top:                     nil,
	Skip:                    nil,
	IsKeyVaultRefreshFailed: 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.CertificateCollection = armapimanagement.CertificateCollection{
	// 	Count: to.Ptr[int64](2),
	// 	Value: []*armapimanagement.CertificateContract{
	// 		{
	// 			Name: to.Ptr("templateCert1"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/certificates"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/kjoshiarmtemplateCert1"),
	// 			Properties: &armapimanagement.CertificateContractProperties{
	// 				ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-23T17:03:41.000Z"); return t}()),
	// 				Subject: to.Ptr("CN=mutual-authcert"),
	// 				Thumbprint: to.Ptr("EBA************************48594A6"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("templateCertkv"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/certificates"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/templateCertkv"),
	// 			Properties: &armapimanagement.CertificateContractProperties{
	// 				ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2037-01-01T07:00:00.000Z"); return t}()),
	// 				KeyVault: &armapimanagement.KeyVaultContractProperties{
	// 					IdentityClientID: to.Ptr("ceaa6b06-c00f-43ef-99ac-f53d1fe876a0"),
	// 					SecretIdentifier: to.Ptr("https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert"),
	// 					LastStatus: &armapimanagement.KeyVaultLastAccessStatusContractProperties{
	// 						Code: to.Ptr("Success"),
	// 						TimeStampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-22T00:24:53.319Z"); return t}()),
	// 					},
	// 				},
	// 				Subject: to.Ptr("CN=*.msitesting.net"),
	// 				Thumbprint: to.Ptr("EA**********************9AD690"),
	// 			},
	// 	}},
	// }
}
Output:

func (*CertificateClient) RefreshSecret

func (client *CertificateClient) RefreshSecret(ctx context.Context, resourceGroupName string, serviceName string, certificateID string, options *CertificateClientRefreshSecretOptions) (CertificateClientRefreshSecretResponse, error)

RefreshSecret - From KeyVault, Refresh the certificate being used for authentication with the backend. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • certificateID - Identifier of the certificate entity. Must be unique in the current API Management service instance.
  • options - CertificateClientRefreshSecretOptions contains the optional parameters for the CertificateClient.RefreshSecret method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementRefreshCertificate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCertificateClient().RefreshSecret(ctx, "rg1", "apimService1", "templateCertkv", 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.CertificateContract = armapimanagement.CertificateContract{
// 	Name: to.Ptr("templateCertkv"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/certificates"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/templateCertkv"),
// 	Properties: &armapimanagement.CertificateContractProperties{
// 		ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2037-01-01T07:00:00.000Z"); return t}()),
// 		KeyVault: &armapimanagement.KeyVaultContractProperties{
// 			IdentityClientID: to.Ptr("ceaa6b06-c00f-43ef-99ac-f53d1fe876a0"),
// 			SecretIdentifier: to.Ptr("https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert"),
// 			LastStatus: &armapimanagement.KeyVaultLastAccessStatusContractProperties{
// 				Code: to.Ptr("Success"),
// 				TimeStampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-22T00:24:53.319Z"); return t}()),
// 			},
// 		},
// 		Subject: to.Ptr("CN=*.msitesting.net"),
// 		Thumbprint: to.Ptr("EA**********************9AD690"),
// 	},
// }
Output:

type CertificateClientCreateOrUpdateOptions

type CertificateClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

CertificateClientCreateOrUpdateOptions contains the optional parameters for the CertificateClient.CreateOrUpdate method.

type CertificateClientCreateOrUpdateResponse

type CertificateClientCreateOrUpdateResponse struct {
	// Certificate details.
	CertificateContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

CertificateClientCreateOrUpdateResponse contains the response from method CertificateClient.CreateOrUpdate.

type CertificateClientDeleteOptions

type CertificateClientDeleteOptions struct {
}

CertificateClientDeleteOptions contains the optional parameters for the CertificateClient.Delete method.

type CertificateClientDeleteResponse

type CertificateClientDeleteResponse struct {
}

CertificateClientDeleteResponse contains the response from method CertificateClient.Delete.

type CertificateClientGetEntityTagOptions

type CertificateClientGetEntityTagOptions struct {
}

CertificateClientGetEntityTagOptions contains the optional parameters for the CertificateClient.GetEntityTag method.

type CertificateClientGetEntityTagResponse

type CertificateClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

CertificateClientGetEntityTagResponse contains the response from method CertificateClient.GetEntityTag.

type CertificateClientGetOptions

type CertificateClientGetOptions struct {
}

CertificateClientGetOptions contains the optional parameters for the CertificateClient.Get method.

type CertificateClientGetResponse

type CertificateClientGetResponse struct {
	// Certificate details.
	CertificateContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

CertificateClientGetResponse contains the response from method CertificateClient.Get.

type CertificateClientListByServiceOptions

type CertificateClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | expirationDate | filter | ge, le, eq, ne, gt, lt | |
	Filter *string

	// When set to true, the response contains only certificates entities which failed refresh.
	IsKeyVaultRefreshFailed *bool

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

CertificateClientListByServiceOptions contains the optional parameters for the CertificateClient.NewListByServicePager method.

type CertificateClientListByServiceResponse

type CertificateClientListByServiceResponse struct {
	// Paged Certificates list representation.
	CertificateCollection
}

CertificateClientListByServiceResponse contains the response from method CertificateClient.NewListByServicePager.

type CertificateClientRefreshSecretOptions

type CertificateClientRefreshSecretOptions struct {
}

CertificateClientRefreshSecretOptions contains the optional parameters for the CertificateClient.RefreshSecret method.

type CertificateClientRefreshSecretResponse

type CertificateClientRefreshSecretResponse struct {
	// Certificate details.
	CertificateContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

CertificateClientRefreshSecretResponse contains the response from method CertificateClient.RefreshSecret.

type CertificateCollection

type CertificateCollection struct {
	// Total record count number across all pages.
	Count *int64

	// Next page link if any.
	NextLink *string

	// Page values.
	Value []*CertificateContract
}

CertificateCollection - Paged Certificates list representation.

func (CertificateCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CertificateCollection.

func (*CertificateCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CertificateCollection.

type CertificateConfiguration

type CertificateConfiguration struct {
	// REQUIRED; The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only Root and CertificateAuthority
	// are valid locations.
	StoreName *CertificateConfigurationStoreName

	// Certificate information.
	Certificate *CertificateInformation

	// Certificate Password.
	CertificatePassword *string

	// Base64 Encoded certificate.
	EncodedCertificate *string
}

CertificateConfiguration - Certificate configuration which consist of non-trusted intermediates and root certificates.

func (CertificateConfiguration) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CertificateConfiguration.

func (*CertificateConfiguration) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CertificateConfiguration.

type CertificateConfigurationStoreName

type CertificateConfigurationStoreName string

CertificateConfigurationStoreName - The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only Root and CertificateAuthority are valid locations.

const (
	CertificateConfigurationStoreNameCertificateAuthority CertificateConfigurationStoreName = "CertificateAuthority"
	CertificateConfigurationStoreNameRoot                 CertificateConfigurationStoreName = "Root"
)

func PossibleCertificateConfigurationStoreNameValues

func PossibleCertificateConfigurationStoreNameValues() []CertificateConfigurationStoreName

PossibleCertificateConfigurationStoreNameValues returns the possible values for the CertificateConfigurationStoreName const type.

type CertificateContract

type CertificateContract struct {
	// Certificate properties details.
	Properties *CertificateContractProperties

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

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

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

CertificateContract - Certificate details.

func (CertificateContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CertificateContract.

func (*CertificateContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CertificateContract.

type CertificateContractProperties

type CertificateContractProperties struct {
	// REQUIRED; Expiration date of the certificate. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified
	// by the ISO 8601 standard.
	ExpirationDate *time.Time

	// REQUIRED; Subject attribute of the certificate.
	Subject *string

	// REQUIRED; Thumbprint of the certificate.
	Thumbprint *string

	// KeyVault location details of the certificate.
	KeyVault *KeyVaultContractProperties
}

CertificateContractProperties - Properties of the Certificate contract.

func (CertificateContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CertificateContractProperties.

func (*CertificateContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CertificateContractProperties.

type CertificateCreateOrUpdateParameters

type CertificateCreateOrUpdateParameters struct {
	// Certificate create or update properties details.
	Properties *CertificateCreateOrUpdateProperties
}

CertificateCreateOrUpdateParameters - Certificate create or update details.

func (CertificateCreateOrUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CertificateCreateOrUpdateParameters.

func (*CertificateCreateOrUpdateParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CertificateCreateOrUpdateParameters.

type CertificateCreateOrUpdateProperties

type CertificateCreateOrUpdateProperties struct {
	// Base 64 encoded certificate using the application/x-pkcs12 representation.
	Data *string

	// KeyVault location details of the certificate.
	KeyVault *KeyVaultContractCreateProperties

	// Password for the Certificate
	Password *string
}

CertificateCreateOrUpdateProperties - Parameters supplied to the CreateOrUpdate certificate operation.

func (CertificateCreateOrUpdateProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CertificateCreateOrUpdateProperties.

func (*CertificateCreateOrUpdateProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CertificateCreateOrUpdateProperties.

type CertificateInformation

type CertificateInformation struct {
	// REQUIRED; Expiration date of the certificate. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified
	// by the ISO 8601 standard.
	Expiry *time.Time

	// REQUIRED; Subject of the certificate.
	Subject *string

	// REQUIRED; Thumbprint of the certificate.
	Thumbprint *string
}

CertificateInformation - SSL certificate information.

func (CertificateInformation) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CertificateInformation.

func (*CertificateInformation) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CertificateInformation.

type CertificateSource

type CertificateSource string

CertificateSource - Certificate Source.

const (
	CertificateSourceBuiltIn  CertificateSource = "BuiltIn"
	CertificateSourceCustom   CertificateSource = "Custom"
	CertificateSourceKeyVault CertificateSource = "KeyVault"
	CertificateSourceManaged  CertificateSource = "Managed"
)

func PossibleCertificateSourceValues

func PossibleCertificateSourceValues() []CertificateSource

PossibleCertificateSourceValues returns the possible values for the CertificateSource const type.

type CertificateStatus

type CertificateStatus string

CertificateStatus - Certificate Status.

const (
	CertificateStatusCompleted  CertificateStatus = "Completed"
	CertificateStatusFailed     CertificateStatus = "Failed"
	CertificateStatusInProgress CertificateStatus = "InProgress"
)

func PossibleCertificateStatusValues

func PossibleCertificateStatusValues() []CertificateStatus

PossibleCertificateStatusValues returns the possible values for the CertificateStatus const type.

type Client

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

Client contains the methods for the APIManagementClient group. Don't use this type directly, use NewClient() instead.

func NewClient

func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error)

NewClient creates a new instance of Client 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 (*Client) BeginPerformConnectivityCheckAsync

func (client *Client) BeginPerformConnectivityCheckAsync(ctx context.Context, resourceGroupName string, serviceName string, connectivityCheckRequestParams ConnectivityCheckRequest, options *ClientBeginPerformConnectivityCheckAsyncOptions) (*runtime.Poller[ClientPerformConnectivityCheckAsyncResponse], error)

BeginPerformConnectivityCheckAsync - Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • connectivityCheckRequestParams - Connectivity Check request parameters.
  • options - ClientBeginPerformConnectivityCheckAsyncOptions contains the optional parameters for the Client.BeginPerformConnectivityCheckAsync method.
Example (HttpConnectivityCheck)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPerformConnectivityCheckHttpConnect.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewClient().BeginPerformConnectivityCheckAsync(ctx, "rg1", "apimService1", armapimanagement.ConnectivityCheckRequest{
	Destination: &armapimanagement.ConnectivityCheckRequestDestination{
		Address: to.Ptr("https://microsoft.com"),
		Port:    to.Ptr[int64](3306),
	},
	ProtocolConfiguration: &armapimanagement.ConnectivityCheckRequestProtocolConfiguration{
		HTTPConfiguration: &armapimanagement.ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration{
			Method: to.Ptr(armapimanagement.MethodGET),
			Headers: []*armapimanagement.HTTPHeader{
				{
					Name:  to.Ptr("Authorization"),
					Value: to.Ptr("******"),
				}},
			ValidStatusCodes: []*int64{
				to.Ptr[int64](200),
				to.Ptr[int64](204)},
		},
	},
	Source: &armapimanagement.ConnectivityCheckRequestSource{
		Region: to.Ptr("northeurope"),
	},
	Protocol: to.Ptr(armapimanagement.ConnectivityCheckProtocolHTTPS),
}, 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.ConnectivityCheckResponse = armapimanagement.ConnectivityCheckResponse{
// 	AvgLatencyInMs: to.Ptr[int64](260),
// 	ConnectionStatus: to.Ptr(armapimanagement.ConnectionStatus("Reachable")),
// 	Hops: []*armapimanagement.ConnectivityHop{
// 		{
// 			Type: to.Ptr("Source"),
// 			Address: to.Ptr("20.82.216.48"),
// 			ID: to.Ptr("c60e2296-5ebc-48cc-80e8-7e6d2981e7b2"),
// 			Issues: []*armapimanagement.ConnectivityIssue{
// 			},
// 			NextHopIDs: []*string{
// 				to.Ptr("26aa44e7-04f1-462f-aa5d-5951957b5650")},
// 				ResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1"),
// 			},
// 			{
// 				Type: to.Ptr("Internet"),
// 				Address: to.Ptr("40.113.200.201"),
// 				ID: to.Ptr("26aa44e7-04f1-462f-aa5d-5951957b5650"),
// 				Issues: []*armapimanagement.ConnectivityIssue{
// 				},
// 				NextHopIDs: []*string{
// 				},
// 		}},
// 		MaxLatencyInMs: to.Ptr[int64](281),
// 		MinLatencyInMs: to.Ptr[int64](250),
// 		ProbesFailed: to.Ptr[int64](0),
// 		ProbesSent: to.Ptr[int64](3),
// 	}
Output:

Example (TcpConnectivityCheck)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPerformConnectivityCheck.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewClient().BeginPerformConnectivityCheckAsync(ctx, "rg1", "apimService1", armapimanagement.ConnectivityCheckRequest{
	Destination: &armapimanagement.ConnectivityCheckRequestDestination{
		Address: to.Ptr("8.8.8.8"),
		Port:    to.Ptr[int64](53),
	},
	PreferredIPVersion: to.Ptr(armapimanagement.PreferredIPVersionIPv4),
	Source: &armapimanagement.ConnectivityCheckRequestSource{
		Region: to.Ptr("northeurope"),
	},
}, 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.ConnectivityCheckResponse = armapimanagement.ConnectivityCheckResponse{
// 	AvgLatencyInMs: to.Ptr[int64](1),
// 	ConnectionStatus: to.Ptr(armapimanagement.ConnectionStatusConnected),
// 	Hops: []*armapimanagement.ConnectivityHop{
// 		{
// 			Type: to.Ptr("Source"),
// 			Address: to.Ptr("10.1.1.4"),
// 			ID: to.Ptr("7dbbe7aa-60ba-4650-831e-63d775d38e9e"),
// 			Issues: []*armapimanagement.ConnectivityIssue{
// 			},
// 			NextHopIDs: []*string{
// 				to.Ptr("75c8d819-b208-4584-a311-1aa45ce753f9")},
// 				ResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1"),
// 			},
// 			{
// 				Type: to.Ptr("Internet"),
// 				Address: to.Ptr("8.8.8.8"),
// 				ID: to.Ptr("75c8d819-b208-4584-a311-1aa45ce753f9"),
// 				Issues: []*armapimanagement.ConnectivityIssue{
// 				},
// 				NextHopIDs: []*string{
// 				},
// 		}},
// 		MaxLatencyInMs: to.Ptr[int64](4),
// 		MinLatencyInMs: to.Ptr[int64](1),
// 		ProbesFailed: to.Ptr[int64](0),
// 		ProbesSent: to.Ptr[int64](100),
// 	}
Output:

type ClientAuthenticationMethod

type ClientAuthenticationMethod string
const (
	// ClientAuthenticationMethodBasic - Basic Client Authentication method.
	ClientAuthenticationMethodBasic ClientAuthenticationMethod = "Basic"
	// ClientAuthenticationMethodBody - Body based Authentication method.
	ClientAuthenticationMethodBody ClientAuthenticationMethod = "Body"
)

func PossibleClientAuthenticationMethodValues

func PossibleClientAuthenticationMethodValues() []ClientAuthenticationMethod

PossibleClientAuthenticationMethodValues returns the possible values for the ClientAuthenticationMethod const type.

type ClientBeginPerformConnectivityCheckAsyncOptions

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

ClientBeginPerformConnectivityCheckAsyncOptions contains the optional parameters for the Client.BeginPerformConnectivityCheckAsync method.

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) NewAPIClient

func (c *ClientFactory) NewAPIClient() *APIClient

NewAPIClient creates a new instance of APIClient.

func (*ClientFactory) NewAPIDiagnosticClient

func (c *ClientFactory) NewAPIDiagnosticClient() *APIDiagnosticClient

NewAPIDiagnosticClient creates a new instance of APIDiagnosticClient.

func (*ClientFactory) NewAPIExportClient

func (c *ClientFactory) NewAPIExportClient() *APIExportClient

NewAPIExportClient creates a new instance of APIExportClient.

func (*ClientFactory) NewAPIIssueAttachmentClient

func (c *ClientFactory) NewAPIIssueAttachmentClient() *APIIssueAttachmentClient

NewAPIIssueAttachmentClient creates a new instance of APIIssueAttachmentClient.

func (*ClientFactory) NewAPIIssueClient

func (c *ClientFactory) NewAPIIssueClient() *APIIssueClient

NewAPIIssueClient creates a new instance of APIIssueClient.

func (*ClientFactory) NewAPIIssueCommentClient

func (c *ClientFactory) NewAPIIssueCommentClient() *APIIssueCommentClient

NewAPIIssueCommentClient creates a new instance of APIIssueCommentClient.

func (*ClientFactory) NewAPIOperationClient

func (c *ClientFactory) NewAPIOperationClient() *APIOperationClient

NewAPIOperationClient creates a new instance of APIOperationClient.

func (*ClientFactory) NewAPIOperationPolicyClient

func (c *ClientFactory) NewAPIOperationPolicyClient() *APIOperationPolicyClient

NewAPIOperationPolicyClient creates a new instance of APIOperationPolicyClient.

func (*ClientFactory) NewAPIPolicyClient

func (c *ClientFactory) NewAPIPolicyClient() *APIPolicyClient

NewAPIPolicyClient creates a new instance of APIPolicyClient.

func (*ClientFactory) NewAPIProductClient

func (c *ClientFactory) NewAPIProductClient() *APIProductClient

NewAPIProductClient creates a new instance of APIProductClient.

func (*ClientFactory) NewAPIReleaseClient

func (c *ClientFactory) NewAPIReleaseClient() *APIReleaseClient

NewAPIReleaseClient creates a new instance of APIReleaseClient.

func (*ClientFactory) NewAPIRevisionClient

func (c *ClientFactory) NewAPIRevisionClient() *APIRevisionClient

NewAPIRevisionClient creates a new instance of APIRevisionClient.

func (*ClientFactory) NewAPISchemaClient

func (c *ClientFactory) NewAPISchemaClient() *APISchemaClient

NewAPISchemaClient creates a new instance of APISchemaClient.

func (*ClientFactory) NewAPITagDescriptionClient

func (c *ClientFactory) NewAPITagDescriptionClient() *APITagDescriptionClient

NewAPITagDescriptionClient creates a new instance of APITagDescriptionClient.

func (*ClientFactory) NewAPIVersionSetClient

func (c *ClientFactory) NewAPIVersionSetClient() *APIVersionSetClient

NewAPIVersionSetClient creates a new instance of APIVersionSetClient.

func (*ClientFactory) NewAPIWikiClient

func (c *ClientFactory) NewAPIWikiClient() *APIWikiClient

NewAPIWikiClient creates a new instance of APIWikiClient.

func (*ClientFactory) NewAPIWikisClient

func (c *ClientFactory) NewAPIWikisClient() *APIWikisClient

NewAPIWikisClient creates a new instance of APIWikisClient.

func (*ClientFactory) NewAuthorizationAccessPolicyClient

func (c *ClientFactory) NewAuthorizationAccessPolicyClient() *AuthorizationAccessPolicyClient

NewAuthorizationAccessPolicyClient creates a new instance of AuthorizationAccessPolicyClient.

func (*ClientFactory) NewAuthorizationClient

func (c *ClientFactory) NewAuthorizationClient() *AuthorizationClient

NewAuthorizationClient creates a new instance of AuthorizationClient.

func (*ClientFactory) NewAuthorizationLoginLinksClient

func (c *ClientFactory) NewAuthorizationLoginLinksClient() *AuthorizationLoginLinksClient

NewAuthorizationLoginLinksClient creates a new instance of AuthorizationLoginLinksClient.

func (*ClientFactory) NewAuthorizationProviderClient

func (c *ClientFactory) NewAuthorizationProviderClient() *AuthorizationProviderClient

NewAuthorizationProviderClient creates a new instance of AuthorizationProviderClient.

func (*ClientFactory) NewAuthorizationServerClient

func (c *ClientFactory) NewAuthorizationServerClient() *AuthorizationServerClient

NewAuthorizationServerClient creates a new instance of AuthorizationServerClient.

func (*ClientFactory) NewBackendClient

func (c *ClientFactory) NewBackendClient() *BackendClient

NewBackendClient creates a new instance of BackendClient.

func (*ClientFactory) NewCacheClient

func (c *ClientFactory) NewCacheClient() *CacheClient

NewCacheClient creates a new instance of CacheClient.

func (*ClientFactory) NewCertificateClient

func (c *ClientFactory) NewCertificateClient() *CertificateClient

NewCertificateClient creates a new instance of CertificateClient.

func (*ClientFactory) NewClient

func (c *ClientFactory) NewClient() *Client

NewClient creates a new instance of Client.

func (*ClientFactory) NewContentItemClient

func (c *ClientFactory) NewContentItemClient() *ContentItemClient

NewContentItemClient creates a new instance of ContentItemClient.

func (*ClientFactory) NewContentTypeClient

func (c *ClientFactory) NewContentTypeClient() *ContentTypeClient

NewContentTypeClient creates a new instance of ContentTypeClient.

func (*ClientFactory) NewDelegationSettingsClient

func (c *ClientFactory) NewDelegationSettingsClient() *DelegationSettingsClient

NewDelegationSettingsClient creates a new instance of DelegationSettingsClient.

func (*ClientFactory) NewDeletedServicesClient

func (c *ClientFactory) NewDeletedServicesClient() *DeletedServicesClient

NewDeletedServicesClient creates a new instance of DeletedServicesClient.

func (*ClientFactory) NewDiagnosticClient

func (c *ClientFactory) NewDiagnosticClient() *DiagnosticClient

NewDiagnosticClient creates a new instance of DiagnosticClient.

func (*ClientFactory) NewDocumentationClient

func (c *ClientFactory) NewDocumentationClient() *DocumentationClient

NewDocumentationClient creates a new instance of DocumentationClient.

func (*ClientFactory) NewEmailTemplateClient

func (c *ClientFactory) NewEmailTemplateClient() *EmailTemplateClient

NewEmailTemplateClient creates a new instance of EmailTemplateClient.

func (*ClientFactory) NewGatewayAPIClient

func (c *ClientFactory) NewGatewayAPIClient() *GatewayAPIClient

NewGatewayAPIClient creates a new instance of GatewayAPIClient.

func (*ClientFactory) NewGatewayCertificateAuthorityClient

func (c *ClientFactory) NewGatewayCertificateAuthorityClient() *GatewayCertificateAuthorityClient

NewGatewayCertificateAuthorityClient creates a new instance of GatewayCertificateAuthorityClient.

func (*ClientFactory) NewGatewayClient

func (c *ClientFactory) NewGatewayClient() *GatewayClient

NewGatewayClient creates a new instance of GatewayClient.

func (*ClientFactory) NewGatewayHostnameConfigurationClient

func (c *ClientFactory) NewGatewayHostnameConfigurationClient() *GatewayHostnameConfigurationClient

NewGatewayHostnameConfigurationClient creates a new instance of GatewayHostnameConfigurationClient.

func (*ClientFactory) NewGlobalSchemaClient

func (c *ClientFactory) NewGlobalSchemaClient() *GlobalSchemaClient

NewGlobalSchemaClient creates a new instance of GlobalSchemaClient.

func (*ClientFactory) NewGraphQLAPIResolverClient

func (c *ClientFactory) NewGraphQLAPIResolverClient() *GraphQLAPIResolverClient

NewGraphQLAPIResolverClient creates a new instance of GraphQLAPIResolverClient.

func (*ClientFactory) NewGraphQLAPIResolverPolicyClient

func (c *ClientFactory) NewGraphQLAPIResolverPolicyClient() *GraphQLAPIResolverPolicyClient

NewGraphQLAPIResolverPolicyClient creates a new instance of GraphQLAPIResolverPolicyClient.

func (*ClientFactory) NewGroupClient

func (c *ClientFactory) NewGroupClient() *GroupClient

NewGroupClient creates a new instance of GroupClient.

func (*ClientFactory) NewGroupUserClient

func (c *ClientFactory) NewGroupUserClient() *GroupUserClient

NewGroupUserClient creates a new instance of GroupUserClient.

func (*ClientFactory) NewIdentityProviderClient

func (c *ClientFactory) NewIdentityProviderClient() *IdentityProviderClient

NewIdentityProviderClient creates a new instance of IdentityProviderClient.

func (*ClientFactory) NewIssueClient

func (c *ClientFactory) NewIssueClient() *IssueClient

NewIssueClient creates a new instance of IssueClient.

func (*ClientFactory) NewLoggerClient

func (c *ClientFactory) NewLoggerClient() *LoggerClient

NewLoggerClient creates a new instance of LoggerClient.

func (*ClientFactory) NewNamedValueClient

func (c *ClientFactory) NewNamedValueClient() *NamedValueClient

NewNamedValueClient creates a new instance of NamedValueClient.

func (*ClientFactory) NewNetworkStatusClient

func (c *ClientFactory) NewNetworkStatusClient() *NetworkStatusClient

NewNetworkStatusClient creates a new instance of NetworkStatusClient.

func (*ClientFactory) NewNotificationClient

func (c *ClientFactory) NewNotificationClient() *NotificationClient

NewNotificationClient creates a new instance of NotificationClient.

func (*ClientFactory) NewNotificationRecipientEmailClient

func (c *ClientFactory) NewNotificationRecipientEmailClient() *NotificationRecipientEmailClient

NewNotificationRecipientEmailClient creates a new instance of NotificationRecipientEmailClient.

func (*ClientFactory) NewNotificationRecipientUserClient

func (c *ClientFactory) NewNotificationRecipientUserClient() *NotificationRecipientUserClient

NewNotificationRecipientUserClient creates a new instance of NotificationRecipientUserClient.

func (*ClientFactory) NewOpenIDConnectProviderClient

func (c *ClientFactory) NewOpenIDConnectProviderClient() *OpenIDConnectProviderClient

NewOpenIDConnectProviderClient creates a new instance of OpenIDConnectProviderClient.

func (*ClientFactory) NewOperationClient

func (c *ClientFactory) NewOperationClient() *OperationClient

NewOperationClient creates a new instance of OperationClient.

func (*ClientFactory) NewOperationsClient

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewOutboundNetworkDependenciesEndpointsClient

func (c *ClientFactory) NewOutboundNetworkDependenciesEndpointsClient() *OutboundNetworkDependenciesEndpointsClient

NewOutboundNetworkDependenciesEndpointsClient creates a new instance of OutboundNetworkDependenciesEndpointsClient.

func (*ClientFactory) NewPolicyClient

func (c *ClientFactory) NewPolicyClient() *PolicyClient

NewPolicyClient creates a new instance of PolicyClient.

func (*ClientFactory) NewPolicyDescriptionClient

func (c *ClientFactory) NewPolicyDescriptionClient() *PolicyDescriptionClient

NewPolicyDescriptionClient creates a new instance of PolicyDescriptionClient.

func (*ClientFactory) NewPolicyFragmentClient

func (c *ClientFactory) NewPolicyFragmentClient() *PolicyFragmentClient

NewPolicyFragmentClient creates a new instance of PolicyFragmentClient.

func (*ClientFactory) NewPortalConfigClient

func (c *ClientFactory) NewPortalConfigClient() *PortalConfigClient

NewPortalConfigClient creates a new instance of PortalConfigClient.

func (*ClientFactory) NewPortalRevisionClient

func (c *ClientFactory) NewPortalRevisionClient() *PortalRevisionClient

NewPortalRevisionClient creates a new instance of PortalRevisionClient.

func (*ClientFactory) NewPortalSettingsClient

func (c *ClientFactory) NewPortalSettingsClient() *PortalSettingsClient

NewPortalSettingsClient creates a new instance of PortalSettingsClient.

func (*ClientFactory) NewPrivateEndpointConnectionClient

func (c *ClientFactory) NewPrivateEndpointConnectionClient() *PrivateEndpointConnectionClient

NewPrivateEndpointConnectionClient creates a new instance of PrivateEndpointConnectionClient.

func (*ClientFactory) NewProductAPIClient

func (c *ClientFactory) NewProductAPIClient() *ProductAPIClient

NewProductAPIClient creates a new instance of ProductAPIClient.

func (*ClientFactory) NewProductClient

func (c *ClientFactory) NewProductClient() *ProductClient

NewProductClient creates a new instance of ProductClient.

func (*ClientFactory) NewProductGroupClient

func (c *ClientFactory) NewProductGroupClient() *ProductGroupClient

NewProductGroupClient creates a new instance of ProductGroupClient.

func (*ClientFactory) NewProductPolicyClient

func (c *ClientFactory) NewProductPolicyClient() *ProductPolicyClient

NewProductPolicyClient creates a new instance of ProductPolicyClient.

func (*ClientFactory) NewProductSubscriptionsClient

func (c *ClientFactory) NewProductSubscriptionsClient() *ProductSubscriptionsClient

NewProductSubscriptionsClient creates a new instance of ProductSubscriptionsClient.

func (*ClientFactory) NewProductWikiClient

func (c *ClientFactory) NewProductWikiClient() *ProductWikiClient

NewProductWikiClient creates a new instance of ProductWikiClient.

func (*ClientFactory) NewProductWikisClient

func (c *ClientFactory) NewProductWikisClient() *ProductWikisClient

NewProductWikisClient creates a new instance of ProductWikisClient.

func (*ClientFactory) NewQuotaByCounterKeysClient

func (c *ClientFactory) NewQuotaByCounterKeysClient() *QuotaByCounterKeysClient

NewQuotaByCounterKeysClient creates a new instance of QuotaByCounterKeysClient.

func (*ClientFactory) NewQuotaByPeriodKeysClient

func (c *ClientFactory) NewQuotaByPeriodKeysClient() *QuotaByPeriodKeysClient

NewQuotaByPeriodKeysClient creates a new instance of QuotaByPeriodKeysClient.

func (*ClientFactory) NewRegionClient

func (c *ClientFactory) NewRegionClient() *RegionClient

NewRegionClient creates a new instance of RegionClient.

func (*ClientFactory) NewReportsClient

func (c *ClientFactory) NewReportsClient() *ReportsClient

NewReportsClient creates a new instance of ReportsClient.

func (*ClientFactory) NewSKUsClient

func (c *ClientFactory) NewSKUsClient() *SKUsClient

NewSKUsClient creates a new instance of SKUsClient.

func (*ClientFactory) NewServiceClient

func (c *ClientFactory) NewServiceClient() *ServiceClient

NewServiceClient creates a new instance of ServiceClient.

func (*ClientFactory) NewServiceSKUsClient

func (c *ClientFactory) NewServiceSKUsClient() *ServiceSKUsClient

NewServiceSKUsClient creates a new instance of ServiceSKUsClient.

func (*ClientFactory) NewSignInSettingsClient

func (c *ClientFactory) NewSignInSettingsClient() *SignInSettingsClient

NewSignInSettingsClient creates a new instance of SignInSettingsClient.

func (*ClientFactory) NewSignUpSettingsClient

func (c *ClientFactory) NewSignUpSettingsClient() *SignUpSettingsClient

NewSignUpSettingsClient creates a new instance of SignUpSettingsClient.

func (*ClientFactory) NewSubscriptionClient

func (c *ClientFactory) NewSubscriptionClient() *SubscriptionClient

NewSubscriptionClient creates a new instance of SubscriptionClient.

func (*ClientFactory) NewTagClient

func (c *ClientFactory) NewTagClient() *TagClient

NewTagClient creates a new instance of TagClient.

func (*ClientFactory) NewTagResourceClient

func (c *ClientFactory) NewTagResourceClient() *TagResourceClient

NewTagResourceClient creates a new instance of TagResourceClient.

func (*ClientFactory) NewTenantAccessClient

func (c *ClientFactory) NewTenantAccessClient() *TenantAccessClient

NewTenantAccessClient creates a new instance of TenantAccessClient.

func (*ClientFactory) NewTenantAccessGitClient

func (c *ClientFactory) NewTenantAccessGitClient() *TenantAccessGitClient

NewTenantAccessGitClient creates a new instance of TenantAccessGitClient.

func (*ClientFactory) NewTenantConfigurationClient

func (c *ClientFactory) NewTenantConfigurationClient() *TenantConfigurationClient

NewTenantConfigurationClient creates a new instance of TenantConfigurationClient.

func (*ClientFactory) NewTenantSettingsClient

func (c *ClientFactory) NewTenantSettingsClient() *TenantSettingsClient

NewTenantSettingsClient creates a new instance of TenantSettingsClient.

func (*ClientFactory) NewUserClient

func (c *ClientFactory) NewUserClient() *UserClient

NewUserClient creates a new instance of UserClient.

func (*ClientFactory) NewUserConfirmationPasswordClient

func (c *ClientFactory) NewUserConfirmationPasswordClient() *UserConfirmationPasswordClient

NewUserConfirmationPasswordClient creates a new instance of UserConfirmationPasswordClient.

func (*ClientFactory) NewUserGroupClient

func (c *ClientFactory) NewUserGroupClient() *UserGroupClient

NewUserGroupClient creates a new instance of UserGroupClient.

func (*ClientFactory) NewUserIdentitiesClient

func (c *ClientFactory) NewUserIdentitiesClient() *UserIdentitiesClient

NewUserIdentitiesClient creates a new instance of UserIdentitiesClient.

func (*ClientFactory) NewUserSubscriptionClient

func (c *ClientFactory) NewUserSubscriptionClient() *UserSubscriptionClient

NewUserSubscriptionClient creates a new instance of UserSubscriptionClient.

type ClientPerformConnectivityCheckAsyncResponse

type ClientPerformConnectivityCheckAsyncResponse struct {
	// Information on the connectivity status.
	ConnectivityCheckResponse
}

ClientPerformConnectivityCheckAsyncResponse contains the response from method Client.BeginPerformConnectivityCheckAsync.

type ClientSecretContract

type ClientSecretContract struct {
	// Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.
	ClientSecret *string
}

ClientSecretContract - Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.

func (ClientSecretContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ClientSecretContract.

func (*ClientSecretContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ClientSecretContract.

type ConfigurationIDName

type ConfigurationIDName string
const (
	ConfigurationIDNameConfiguration ConfigurationIDName = "configuration"
)

func PossibleConfigurationIDNameValues

func PossibleConfigurationIDNameValues() []ConfigurationIDName

PossibleConfigurationIDNameValues returns the possible values for the ConfigurationIDName const type.

type Confirmation

type Confirmation string

Confirmation - Determines the type of confirmation e-mail that will be sent to the newly created user.

const (
	// ConfirmationInvite - Send an e-mail inviting the user to sign-up and complete registration.
	ConfirmationInvite Confirmation = "invite"
	// ConfirmationSignup - Send an e-mail to the user confirming they have successfully signed up.
	ConfirmationSignup Confirmation = "signup"
)

func PossibleConfirmationValues

func PossibleConfirmationValues() []Confirmation

PossibleConfirmationValues returns the possible values for the Confirmation const type.

type ConnectionStatus

type ConnectionStatus string

ConnectionStatus - The connection status.

const (
	ConnectionStatusConnected    ConnectionStatus = "Connected"
	ConnectionStatusDegraded     ConnectionStatus = "Degraded"
	ConnectionStatusDisconnected ConnectionStatus = "Disconnected"
	ConnectionStatusUnknown      ConnectionStatus = "Unknown"
)

func PossibleConnectionStatusValues

func PossibleConnectionStatusValues() []ConnectionStatus

PossibleConnectionStatusValues returns the possible values for the ConnectionStatus const type.

type ConnectivityCheckProtocol

type ConnectivityCheckProtocol string

ConnectivityCheckProtocol - The request's protocol. Specific protocol configuration can be available based on this selection. The specified destination address must be coherent with this value.

const (
	ConnectivityCheckProtocolHTTP  ConnectivityCheckProtocol = "HTTP"
	ConnectivityCheckProtocolHTTPS ConnectivityCheckProtocol = "HTTPS"
	ConnectivityCheckProtocolTCP   ConnectivityCheckProtocol = "TCP"
)

func PossibleConnectivityCheckProtocolValues

func PossibleConnectivityCheckProtocolValues() []ConnectivityCheckProtocol

PossibleConnectivityCheckProtocolValues returns the possible values for the ConnectivityCheckProtocol const type.

type ConnectivityCheckRequest

type ConnectivityCheckRequest struct {
	// REQUIRED; The connectivity check operation destination.
	Destination *ConnectivityCheckRequestDestination

	// REQUIRED; Definitions about the connectivity check origin.
	Source *ConnectivityCheckRequestSource

	// The IP version to be used. Only IPv4 is supported for now.
	PreferredIPVersion *PreferredIPVersion

	// The request's protocol. Specific protocol configuration can be available based on this selection. The specified destination
	// address must be coherent with this value.
	Protocol *ConnectivityCheckProtocol

	// Protocol-specific configuration.
	ProtocolConfiguration *ConnectivityCheckRequestProtocolConfiguration
}

ConnectivityCheckRequest - A request to perform the connectivity check operation on a API Management service.

func (ConnectivityCheckRequest) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ConnectivityCheckRequest.

func (*ConnectivityCheckRequest) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityCheckRequest.

type ConnectivityCheckRequestDestination

type ConnectivityCheckRequestDestination struct {
	// REQUIRED; Destination address. Can either be an IP address or a FQDN.
	Address *string

	// REQUIRED; Destination port.
	Port *int64
}

ConnectivityCheckRequestDestination - The connectivity check operation destination.

func (ConnectivityCheckRequestDestination) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ConnectivityCheckRequestDestination.

func (*ConnectivityCheckRequestDestination) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityCheckRequestDestination.

type ConnectivityCheckRequestProtocolConfiguration

type ConnectivityCheckRequestProtocolConfiguration struct {
	// Configuration for HTTP or HTTPS requests.
	HTTPConfiguration *ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration
}

ConnectivityCheckRequestProtocolConfiguration - Protocol-specific configuration.

func (ConnectivityCheckRequestProtocolConfiguration) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type ConnectivityCheckRequestProtocolConfiguration.

func (*ConnectivityCheckRequestProtocolConfiguration) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityCheckRequestProtocolConfiguration.

type ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration

type ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration struct {
	// List of headers to be included in the request.
	Headers []*HTTPHeader

	// The HTTP method to be used.
	Method *Method

	// List of HTTP status codes considered valid for the request response.
	ValidStatusCodes []*int64
}

ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration - Configuration for HTTP or HTTPS requests.

func (ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration.

func (*ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration.

type ConnectivityCheckRequestSource

type ConnectivityCheckRequestSource struct {
	// REQUIRED; The API Management service region from where to start the connectivity check operation.
	Region *string

	// The particular VMSS instance from which to fire the request.
	Instance *int64
}

ConnectivityCheckRequestSource - Definitions about the connectivity check origin.

func (ConnectivityCheckRequestSource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ConnectivityCheckRequestSource.

func (*ConnectivityCheckRequestSource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityCheckRequestSource.

type ConnectivityCheckResponse

type ConnectivityCheckResponse struct {
	// READ-ONLY; Average latency in milliseconds.
	AvgLatencyInMs *int64

	// READ-ONLY; The connection status.
	ConnectionStatus *ConnectionStatus

	// READ-ONLY; List of hops between the source and the destination.
	Hops []*ConnectivityHop

	// READ-ONLY; Maximum latency in milliseconds.
	MaxLatencyInMs *int64

	// READ-ONLY; Minimum latency in milliseconds.
	MinLatencyInMs *int64

	// READ-ONLY; Number of failed probes.
	ProbesFailed *int64

	// READ-ONLY; Total number of probes sent.
	ProbesSent *int64
}

ConnectivityCheckResponse - Information on the connectivity status.

func (ConnectivityCheckResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ConnectivityCheckResponse.

func (*ConnectivityCheckResponse) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityCheckResponse.

type ConnectivityHop

type ConnectivityHop struct {
	// READ-ONLY; The IP address of the hop.
	Address *string

	// READ-ONLY; The ID of the hop.
	ID *string

	// READ-ONLY; List of issues.
	Issues []*ConnectivityIssue

	// READ-ONLY; List of next hop identifiers.
	NextHopIDs []*string

	// READ-ONLY; The ID of the resource corresponding to this hop.
	ResourceID *string

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

ConnectivityHop - Information about a hop between the source and the destination.

func (ConnectivityHop) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ConnectivityHop.

func (*ConnectivityHop) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityHop.

type ConnectivityIssue

type ConnectivityIssue struct {
	// READ-ONLY; Provides additional context on the issue.
	Context []map[string]*string

	// READ-ONLY; The origin of the issue.
	Origin *Origin

	// READ-ONLY; The severity of the issue.
	Severity *Severity

	// READ-ONLY; The type of issue.
	Type *IssueType
}

ConnectivityIssue - Information about an issue encountered in the process of checking for connectivity.

func (ConnectivityIssue) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ConnectivityIssue.

func (*ConnectivityIssue) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityIssue.

type ConnectivityStatusContract

type ConnectivityStatusContract struct {
	// REQUIRED; Whether this is optional.
	IsOptional *bool

	// REQUIRED; The date when the resource connectivity status last Changed from success to failure or vice-versa. The date conforms
	// to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601
	// standard.
	LastStatusChange *time.Time

	// REQUIRED; The date when the resource connectivity status was last updated. This status should be updated every 15 minutes.
	// If this status has not been updated, then it means that the service has lost network
	// connectivity to the resource, from inside the Virtual Network.The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ
	// as specified by the ISO 8601 standard.
	LastUpdated *time.Time

	// REQUIRED; The hostname of the resource which the service depends on. This can be the database, storage or any other azure
	// resource on which the service depends upon.
	Name *string

	// REQUIRED; Resource Type.
	ResourceType *string

	// REQUIRED; Resource Connectivity Status Type identifier.
	Status *ConnectivityStatusType

	// Error details of the connectivity to the resource.
	Error *string
}

ConnectivityStatusContract - Details about connectivity to a resource.

func (ConnectivityStatusContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ConnectivityStatusContract.

func (*ConnectivityStatusContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityStatusContract.

type ConnectivityStatusType

type ConnectivityStatusType string

ConnectivityStatusType - Resource Connectivity Status Type identifier.

const (
	ConnectivityStatusTypeFailure      ConnectivityStatusType = "failure"
	ConnectivityStatusTypeInitializing ConnectivityStatusType = "initializing"
	ConnectivityStatusTypeSuccess      ConnectivityStatusType = "success"
)

func PossibleConnectivityStatusTypeValues

func PossibleConnectivityStatusTypeValues() []ConnectivityStatusType

PossibleConnectivityStatusTypeValues returns the possible values for the ConnectivityStatusType const type.

type ContentFormat

type ContentFormat string

ContentFormat - Format of the Content in which the API is getting imported.

const (
	// ContentFormatGraphqlLink - The GraphQL API endpoint hosted on a publicly accessible internet address.
	ContentFormatGraphqlLink ContentFormat = "graphql-link"
	// ContentFormatOpenapi - The contents are inline and Content Type is a OpenAPI 3.0 YAML Document.
	ContentFormatOpenapi ContentFormat = "openapi"
	// ContentFormatOpenapiJSON - The contents are inline and Content Type is a OpenAPI 3.0 JSON Document.
	ContentFormatOpenapiJSON ContentFormat = "openapi+json"
	// ContentFormatOpenapiJSONLink - The OpenAPI 3.0 JSON document is hosted on a publicly accessible internet address.
	ContentFormatOpenapiJSONLink ContentFormat = "openapi+json-link"
	// ContentFormatOpenapiLink - The OpenAPI 3.0 YAML document is hosted on a publicly accessible internet address.
	ContentFormatOpenapiLink ContentFormat = "openapi-link"
	// ContentFormatSwaggerJSON - The contents are inline and Content Type is a OpenAPI 2.0 JSON Document.
	ContentFormatSwaggerJSON ContentFormat = "swagger-json"
	// ContentFormatSwaggerLinkJSON - The OpenAPI 2.0 JSON document is hosted on a publicly accessible internet address.
	ContentFormatSwaggerLinkJSON ContentFormat = "swagger-link-json"
	// ContentFormatWadlLinkJSON - The WADL document is hosted on a publicly accessible internet address.
	ContentFormatWadlLinkJSON ContentFormat = "wadl-link-json"
	// ContentFormatWadlXML - The contents are inline and Content type is a WADL document.
	ContentFormatWadlXML ContentFormat = "wadl-xml"
	// ContentFormatWsdl - The contents are inline and the document is a WSDL/Soap document.
	ContentFormatWsdl ContentFormat = "wsdl"
	// ContentFormatWsdlLink - The WSDL document is hosted on a publicly accessible internet address.
	ContentFormatWsdlLink ContentFormat = "wsdl-link"
)

func PossibleContentFormatValues

func PossibleContentFormatValues() []ContentFormat

PossibleContentFormatValues returns the possible values for the ContentFormat const type.

type ContentItemClient

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

ContentItemClient contains the methods for the ContentItem group. Don't use this type directly, use NewContentItemClient() instead.

func NewContentItemClient

func NewContentItemClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ContentItemClient, error)

NewContentItemClient creates a new instance of ContentItemClient 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 (*ContentItemClient) CreateOrUpdate

func (client *ContentItemClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, contentItemID string, parameters ContentItemContract, options *ContentItemClientCreateOrUpdateOptions) (ContentItemClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates a new developer portal's content item specified by the provided content type. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • contentTypeID - Content type identifier.
  • contentItemID - Content item identifier.
  • parameters - Create or update parameters.
  • options - ContentItemClientCreateOrUpdateOptions contains the optional parameters for the ContentItemClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateContentTypeContentItem.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewContentItemClient().CreateOrUpdate(ctx, "rg1", "apimService1", "page", "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", armapimanagement.ContentItemContract{
	Properties: map[string]any{
		"en_us": map[string]any{
			"description": "Short story about the company.",
			"documentId":  "contentTypes/document/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8",
			"keywords":    "company, about",
			"permalink":   "/about",
			"title":       "About",
		},
	},
}, &armapimanagement.ContentItemClientCreateOrUpdateOptions{IfMatch: 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.ContentItemContract = armapimanagement.ContentItemContract{
// 	Name: to.Ptr("4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/contentTypes/contentItems"),
// 	ID: to.Ptr("/contentTypes/page/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"),
// 	Properties: map[string]any{
// 		"en_us": map[string]any{
// 			"description": "Short story about the company.",
// 			"documentId": "contentTypes/document/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8",
// 			"keywords": "company, about",
// 			"permalink": "/about",
// 			"title": "About",
// 		},
// 	},
// }
Output:

func (*ContentItemClient) Delete

func (client *ContentItemClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, contentItemID string, ifMatch string, options *ContentItemClientDeleteOptions) (ContentItemClientDeleteResponse, error)

Delete - Removes the specified developer portal's content item. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • contentTypeID - Content type identifier.
  • contentItemID - Content item identifier.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - ContentItemClientDeleteOptions contains the optional parameters for the ContentItemClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteContentTypeContentItem.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewContentItemClient().Delete(ctx, "rg1", "apimService1", "page", "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", "*", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*ContentItemClient) Get

func (client *ContentItemClient) Get(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, contentItemID string, options *ContentItemClientGetOptions) (ContentItemClientGetResponse, error)

Get - Returns the developer portal's content item specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • contentTypeID - Content type identifier.
  • contentItemID - Content item identifier.
  • options - ContentItemClientGetOptions contains the optional parameters for the ContentItemClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetContentTypeContentItem.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewContentItemClient().Get(ctx, "rg1", "apimService1", "page", "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", 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.ContentItemContract = armapimanagement.ContentItemContract{
// 	Name: to.Ptr("4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/contentTypes/contentItems"),
// 	ID: to.Ptr("/contentTypes/page/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"),
// 	Properties: map[string]any{
// 		"en_us": map[string]any{
// 			"description": "Short story about the company.",
// 			"documentId": "contentTypes/document/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8",
// 			"keywords": "company, about",
// 			"permalink": "/about",
// 			"title": "About",
// 		},
// 	},
// }
Output:

func (*ContentItemClient) GetEntityTag

func (client *ContentItemClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, contentItemID string, options *ContentItemClientGetEntityTagOptions) (ContentItemClientGetEntityTagResponse, error)

GetEntityTag - Returns the entity state (ETag) version of the developer portal's content item specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • contentTypeID - Content type identifier.
  • contentItemID - Content item identifier.
  • options - ContentItemClientGetEntityTagOptions contains the optional parameters for the ContentItemClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadContentTypeContentItem.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewContentItemClient().GetEntityTag(ctx, "rg1", "apimService1", "page", "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*ContentItemClient) NewListByServicePager

func (client *ContentItemClient) NewListByServicePager(resourceGroupName string, serviceName string, contentTypeID string, options *ContentItemClientListByServiceOptions) *runtime.Pager[ContentItemClientListByServiceResponse]

NewListByServicePager - Lists developer portal's content items specified by the provided content type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • contentTypeID - Content type identifier.
  • options - ContentItemClientListByServiceOptions contains the optional parameters for the ContentItemClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListContentTypeContentItems.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewContentItemClient().NewListByServicePager("rg1", "apimService1", "page", 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.ContentItemCollection = armapimanagement.ContentItemCollection{
	// 	Value: []*armapimanagement.ContentItemContract{
	// 		{
	// 			Name: to.Ptr("4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/contentTypes/contentItems"),
	// 			ID: to.Ptr("/contentTypes/page/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"),
	// 			Properties: map[string]any{
	// 				"en_us": map[string]any{
	// 					"description": "Short story about the company.",
	// 					"documentId": "contentTypes/document/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8",
	// 					"keywords": "company, about",
	// 					"permalink": "/about",
	// 					"title": "About",
	// 				},
	// 			},
	// 	}},
	// }
}
Output:

type ContentItemClientCreateOrUpdateOptions

type ContentItemClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

ContentItemClientCreateOrUpdateOptions contains the optional parameters for the ContentItemClient.CreateOrUpdate method.

type ContentItemClientCreateOrUpdateResponse

type ContentItemClientCreateOrUpdateResponse struct {
	// Content type contract details.
	ContentItemContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

ContentItemClientCreateOrUpdateResponse contains the response from method ContentItemClient.CreateOrUpdate.

type ContentItemClientDeleteOptions

type ContentItemClientDeleteOptions struct {
}

ContentItemClientDeleteOptions contains the optional parameters for the ContentItemClient.Delete method.

type ContentItemClientDeleteResponse

type ContentItemClientDeleteResponse struct {
}

ContentItemClientDeleteResponse contains the response from method ContentItemClient.Delete.

type ContentItemClientGetEntityTagOptions

type ContentItemClientGetEntityTagOptions struct {
}

ContentItemClientGetEntityTagOptions contains the optional parameters for the ContentItemClient.GetEntityTag method.

type ContentItemClientGetEntityTagResponse

type ContentItemClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

ContentItemClientGetEntityTagResponse contains the response from method ContentItemClient.GetEntityTag.

type ContentItemClientGetOptions

type ContentItemClientGetOptions struct {
}

ContentItemClientGetOptions contains the optional parameters for the ContentItemClient.Get method.

type ContentItemClientGetResponse

type ContentItemClientGetResponse struct {
	// Content type contract details.
	ContentItemContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

ContentItemClientGetResponse contains the response from method ContentItemClient.Get.

type ContentItemClientListByServiceOptions

type ContentItemClientListByServiceOptions struct {
}

ContentItemClientListByServiceOptions contains the optional parameters for the ContentItemClient.NewListByServicePager method.

type ContentItemClientListByServiceResponse

type ContentItemClientListByServiceResponse struct {
	// Paged list of content items.
	ContentItemCollection
}

ContentItemClientListByServiceResponse contains the response from method ContentItemClient.NewListByServicePager.

type ContentItemCollection

type ContentItemCollection struct {
	// READ-ONLY; Next page link, if any.
	NextLink *string

	// READ-ONLY; Collection of content items.
	Value []*ContentItemContract
}

ContentItemCollection - Paged list of content items.

func (ContentItemCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ContentItemCollection.

func (*ContentItemCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ContentItemCollection.

type ContentItemContract

type ContentItemContract struct {
	// Properties of the content item.
	Properties map[string]any

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

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

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

ContentItemContract - Content type contract details.

func (ContentItemContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ContentItemContract.

func (*ContentItemContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ContentItemContract.

type ContentTypeClient

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

ContentTypeClient contains the methods for the ContentType group. Don't use this type directly, use NewContentTypeClient() instead.

func NewContentTypeClient

func NewContentTypeClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ContentTypeClient, error)

NewContentTypeClient creates a new instance of ContentTypeClient 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 (*ContentTypeClient) CreateOrUpdate

func (client *ContentTypeClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, parameters ContentTypeContract, options *ContentTypeClientCreateOrUpdateOptions) (ContentTypeClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the c- prefix. Built-in content types can't be modified. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • contentTypeID - Content type identifier.
  • parameters - Create or update parameters.
  • options - ContentTypeClientCreateOrUpdateOptions contains the optional parameters for the ContentTypeClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateContentType.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewContentTypeClient().CreateOrUpdate(ctx, "rg1", "apimService1", "page", armapimanagement.ContentTypeContract{
	Properties: &armapimanagement.ContentTypeContractProperties{
		Name: to.Ptr("Page"),
		Schema: map[string]any{
			"additionalProperties": false,
			"properties": map[string]any{
				"en_us": map[string]any{
					"type":                 "object",
					"additionalProperties": false,
					"properties": map[string]any{
						"description": map[string]any{
							"type":        "string",
							"description": "Page description. This property gets included in SEO attributes.",
							"indexed":     true,
							"title":       "Description",
						},
						"documentId": map[string]any{
							"type":        "string",
							"description": "Reference to page content document.",
							"title":       "Document ID",
						},
						"keywords": map[string]any{
							"type":        "string",
							"description": "Page keywords. This property gets included in SEO attributes.",
							"indexed":     true,
							"title":       "Keywords",
						},
						"permalink": map[string]any{
							"type":        "string",
							"description": "Page permalink, e.g. '/about'.",
							"indexed":     true,
							"title":       "Permalink",
						},
						"title": map[string]any{
							"type":        "string",
							"description": "Page title. This property gets included in SEO attributes.",
							"indexed":     true,
							"title":       "Title",
						},
					},
					"required": []any{
						"title",
						"permalink",
						"documentId",
					},
				},
			},
		},
		Description: to.Ptr("A regular page"),
		Version:     to.Ptr("1.0.0"),
	},
}, &armapimanagement.ContentTypeClientCreateOrUpdateOptions{IfMatch: 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.ContentTypeContract = armapimanagement.ContentTypeContract{
// 	Name: to.Ptr("page"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/contentTypes"),
// 	ID: to.Ptr("/contentTypes/page"),
// 	Properties: &armapimanagement.ContentTypeContractProperties{
// 		Name: to.Ptr("Page"),
// 		Schema: map[string]any{
// 			"additionalProperties": false,
// 			"properties":map[string]any{
// 				"en_us":map[string]any{
// 					"type": "object",
// 					"additionalProperties": false,
// 					"properties":map[string]any{
// 						"description":map[string]any{
// 							"type": "string",
// 							"description": "Page description. This property gets included in SEO attributes.",
// 							"indexed": true,
// 							"title": "Description",
// 						},
// 						"documentId":map[string]any{
// 							"type": "string",
// 							"description": "Reference to page content document.",
// 							"title": "Document ID",
// 						},
// 						"keywords":map[string]any{
// 							"type": "string",
// 							"description": "Page keywords. This property gets included in SEO attributes.",
// 							"indexed": true,
// 							"title": "Keywords",
// 						},
// 						"permalink":map[string]any{
// 							"type": "string",
// 							"description": "Page permalink, e.g. '/about'.",
// 							"indexed": true,
// 							"title": "Permalink",
// 						},
// 						"title":map[string]any{
// 							"type": "string",
// 							"description": "Page title. This property gets included in SEO attributes.",
// 							"indexed": true,
// 							"title": "Title",
// 						},
// 					},
// 					"required":[]any{
// 						"title",
// 						"permalink",
// 						"documentId",
// 					},
// 				},
// 			},
// 		},
// 		Description: to.Ptr("A regular page"),
// 		Version: to.Ptr("1.0.0"),
// 	},
// }
Output:

func (*ContentTypeClient) Delete

func (client *ContentTypeClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, ifMatch string, options *ContentTypeClientDeleteOptions) (ContentTypeClientDeleteResponse, error)

Delete - Removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the c- prefix) can't be removed. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • contentTypeID - Content type identifier.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - ContentTypeClientDeleteOptions contains the optional parameters for the ContentTypeClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteContentType.json

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

func (*ContentTypeClient) Get

func (client *ContentTypeClient) Get(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, options *ContentTypeClientGetOptions) (ContentTypeClientGetResponse, error)

Get - Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • contentTypeID - Content type identifier.
  • options - ContentTypeClientGetOptions contains the optional parameters for the ContentTypeClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetContentType.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewContentTypeClient().Get(ctx, "rg1", "apimService1", "page", 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.ContentTypeContract = armapimanagement.ContentTypeContract{
// 	Name: to.Ptr("page"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/contentTypes"),
// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/contentTypes/page"),
// 	Properties: &armapimanagement.ContentTypeContractProperties{
// 		Name: to.Ptr("Page"),
// 		Schema: map[string]any{
// 			"additionalProperties": false,
// 			"properties":map[string]any{
// 				"en_us":map[string]any{
// 					"type": "object",
// 					"additionalProperties": false,
// 					"properties":map[string]any{
// 						"description":map[string]any{
// 							"type": "string",
// 							"description": "Page description. This property gets included in SEO attributes.",
// 							"indexed": true,
// 							"title": "Description",
// 						},
// 						"documentId":map[string]any{
// 							"type": "string",
// 							"description": "Reference to page content document.",
// 							"title": "Document ID",
// 						},
// 						"keywords":map[string]any{
// 							"type": "string",
// 							"description": "Page keywords. This property gets included in SEO attributes.",
// 							"indexed": true,
// 							"title": "Keywords",
// 						},
// 						"permalink":map[string]any{
// 							"type": "string",
// 							"description": "Page permalink, e.g. '/about'.",
// 							"indexed": true,
// 							"title": "Permalink",
// 						},
// 						"title":map[string]any{
// 							"type": "string",
// 							"description": "Page title. This property gets included in SEO attributes.",
// 							"indexed": true,
// 							"title": "Title",
// 						},
// 					},
// 					"required":[]any{
// 						"title",
// 						"permalink",
// 						"documentId",
// 					},
// 				},
// 			},
// 		},
// 		Description: to.Ptr("A regular page"),
// 		Version: to.Ptr("1.0.0"),
// 	},
// }
Output:

func (*ContentTypeClient) NewListByServicePager

func (client *ContentTypeClient) NewListByServicePager(resourceGroupName string, serviceName string, options *ContentTypeClientListByServiceOptions) *runtime.Pager[ContentTypeClientListByServiceResponse]

NewListByServicePager - Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - ContentTypeClientListByServiceOptions contains the optional parameters for the ContentTypeClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListContentTypes.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewContentTypeClient().NewListByServicePager("rg1", "apimService1", 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.ContentTypeCollection = armapimanagement.ContentTypeCollection{
	// 	Value: []*armapimanagement.ContentTypeContract{
	// 		{
	// 			Name: to.Ptr("page"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/contentTypes"),
	// 			ID: to.Ptr("/contentTypes/page"),
	// 			Properties: &armapimanagement.ContentTypeContractProperties{
	// 				Name: to.Ptr("Page"),
	// 				Schema: map[string]any{
	// 					"additionalProperties": false,
	// 					"properties":map[string]any{
	// 						"en_us":map[string]any{
	// 							"type": "object",
	// 							"additionalProperties": false,
	// 							"properties":map[string]any{
	// 								"description":map[string]any{
	// 									"type": "string",
	// 									"description": "Page description. This property gets included in SEO attributes.",
	// 									"indexed": true,
	// 									"title": "Description",
	// 								},
	// 								"documentId":map[string]any{
	// 									"type": "string",
	// 									"description": "Reference to page content document.",
	// 									"title": "Document ID",
	// 								},
	// 								"keywords":map[string]any{
	// 									"type": "string",
	// 									"description": "Page keywords. This property gets included in SEO attributes.",
	// 									"indexed": true,
	// 									"title": "Keywords",
	// 								},
	// 								"permalink":map[string]any{
	// 									"type": "string",
	// 									"description": "Page permalink, e.g. '/about'.",
	// 									"indexed": true,
	// 									"title": "Permalink",
	// 								},
	// 								"title":map[string]any{
	// 									"type": "string",
	// 									"description": "Page title. This property gets included in SEO attributes.",
	// 									"indexed": true,
	// 									"title": "Title",
	// 								},
	// 							},
	// 							"required":[]any{
	// 								"title",
	// 								"permalink",
	// 								"documentId",
	// 							},
	// 						},
	// 					},
	// 				},
	// 				Description: to.Ptr("A regular page"),
	// 				Version: to.Ptr("1.0.0"),
	// 			},
	// 	}},
	// }
}
Output:

type ContentTypeClientCreateOrUpdateOptions

type ContentTypeClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

ContentTypeClientCreateOrUpdateOptions contains the optional parameters for the ContentTypeClient.CreateOrUpdate method.

type ContentTypeClientCreateOrUpdateResponse

type ContentTypeClientCreateOrUpdateResponse struct {
	// Content type contract details.
	ContentTypeContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

ContentTypeClientCreateOrUpdateResponse contains the response from method ContentTypeClient.CreateOrUpdate.

type ContentTypeClientDeleteOptions

type ContentTypeClientDeleteOptions struct {
}

ContentTypeClientDeleteOptions contains the optional parameters for the ContentTypeClient.Delete method.

type ContentTypeClientDeleteResponse

type ContentTypeClientDeleteResponse struct {
}

ContentTypeClientDeleteResponse contains the response from method ContentTypeClient.Delete.

type ContentTypeClientGetOptions

type ContentTypeClientGetOptions struct {
}

ContentTypeClientGetOptions contains the optional parameters for the ContentTypeClient.Get method.

type ContentTypeClientGetResponse

type ContentTypeClientGetResponse struct {
	// Content type contract details.
	ContentTypeContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

ContentTypeClientGetResponse contains the response from method ContentTypeClient.Get.

type ContentTypeClientListByServiceOptions

type ContentTypeClientListByServiceOptions struct {
}

ContentTypeClientListByServiceOptions contains the optional parameters for the ContentTypeClient.NewListByServicePager method.

type ContentTypeClientListByServiceResponse

type ContentTypeClientListByServiceResponse struct {
	// Paged list of content types.
	ContentTypeCollection
}

ContentTypeClientListByServiceResponse contains the response from method ContentTypeClient.NewListByServicePager.

type ContentTypeCollection

type ContentTypeCollection struct {
	// READ-ONLY; Next page link, if any.
	NextLink *string

	// READ-ONLY; Collection of content types.
	Value []*ContentTypeContract
}

ContentTypeCollection - Paged list of content types.

func (ContentTypeCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ContentTypeCollection.

func (*ContentTypeCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ContentTypeCollection.

type ContentTypeContract

type ContentTypeContract struct {
	// Properties of the content type.
	Properties *ContentTypeContractProperties

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

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

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

ContentTypeContract - Content type contract details.

func (ContentTypeContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ContentTypeContract.

func (*ContentTypeContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ContentTypeContract.

type ContentTypeContractProperties

type ContentTypeContractProperties struct {
	// Content type description.
	Description *string

	// Content type identifier
	ID *string

	// Content type name. Must be 1 to 250 characters long.
	Name *string

	// Content type schema.
	Schema any

	// Content type version.
	Version *string
}

func (ContentTypeContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ContentTypeContractProperties.

func (*ContentTypeContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ContentTypeContractProperties.

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 DataMasking

type DataMasking struct {
	// Masking settings for headers
	Headers []*DataMaskingEntity

	// Masking settings for Url query parameters
	QueryParams []*DataMaskingEntity
}

func (DataMasking) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DataMasking.

func (*DataMasking) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DataMasking.

type DataMaskingEntity

type DataMaskingEntity struct {
	// Data masking mode.
	Mode *DataMaskingMode

	// The name of an entity to mask (e.g. a name of a header or a query parameter).
	Value *string
}

func (DataMaskingEntity) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DataMaskingEntity.

func (*DataMaskingEntity) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DataMaskingEntity.

type DataMaskingMode

type DataMaskingMode string

DataMaskingMode - Data masking mode.

const (
	// DataMaskingModeHide - Hide the presence of an entity.
	DataMaskingModeHide DataMaskingMode = "Hide"
	// DataMaskingModeMask - Mask the value of an entity.
	DataMaskingModeMask DataMaskingMode = "Mask"
)

func PossibleDataMaskingModeValues

func PossibleDataMaskingModeValues() []DataMaskingMode

PossibleDataMaskingModeValues returns the possible values for the DataMaskingMode const type.

type DelegationSettingsClient

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

DelegationSettingsClient contains the methods for the DelegationSettings group. Don't use this type directly, use NewDelegationSettingsClient() instead.

func NewDelegationSettingsClient

func NewDelegationSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DelegationSettingsClient, error)

NewDelegationSettingsClient creates a new instance of DelegationSettingsClient 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 (*DelegationSettingsClient) CreateOrUpdate

CreateOrUpdate - Create or Update Delegation settings. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • parameters - Create or update parameters.
  • options - DelegationSettingsClientCreateOrUpdateOptions contains the optional parameters for the DelegationSettingsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsPutDelegation.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDelegationSettingsClient().CreateOrUpdate(ctx, "rg1", "apimService1", armapimanagement.PortalDelegationSettings{
	Properties: &armapimanagement.PortalDelegationSettingsProperties{
		Subscriptions: &armapimanagement.SubscriptionsDelegationSettingsProperties{
			Enabled: to.Ptr(true),
		},
		URL: to.Ptr("http://contoso.com/delegation"),
		UserRegistration: &armapimanagement.RegistrationDelegationSettingsProperties{
			Enabled: to.Ptr(true),
		},
		ValidationKey: to.Ptr("<validationKey>"),
	},
}, &armapimanagement.DelegationSettingsClientCreateOrUpdateOptions{IfMatch: to.Ptr("*")})
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.PortalDelegationSettings = armapimanagement.PortalDelegationSettings{
// 	Name: to.Ptr("delegation"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/portalsettings"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/delegation"),
// 	Properties: &armapimanagement.PortalDelegationSettingsProperties{
// 		Subscriptions: &armapimanagement.SubscriptionsDelegationSettingsProperties{
// 			Enabled: to.Ptr(true),
// 		},
// 		URL: to.Ptr("http://contoso.com/delegation"),
// 		UserRegistration: &armapimanagement.RegistrationDelegationSettingsProperties{
// 			Enabled: to.Ptr(true),
// 		},
// 	},
// }
Output:

func (*DelegationSettingsClient) Get

Get - Get Delegation Settings for the Portal. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - DelegationSettingsClientGetOptions contains the optional parameters for the DelegationSettingsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsGetDelegation.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDelegationSettingsClient().Get(ctx, "rg1", "apimService1", 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.PortalDelegationSettings = armapimanagement.PortalDelegationSettings{
// 	Name: to.Ptr("delegation"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/portalsettings"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/delegation"),
// 	Properties: &armapimanagement.PortalDelegationSettingsProperties{
// 		Subscriptions: &armapimanagement.SubscriptionsDelegationSettingsProperties{
// 			Enabled: to.Ptr(true),
// 		},
// 		URL: to.Ptr("http://contoso.com/delegation"),
// 		UserRegistration: &armapimanagement.RegistrationDelegationSettingsProperties{
// 			Enabled: to.Ptr(true),
// 		},
// 	},
// }
Output:

func (*DelegationSettingsClient) GetEntityTag

GetEntityTag - Gets the entity state (Etag) version of the DelegationSettings.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - DelegationSettingsClientGetEntityTagOptions contains the optional parameters for the DelegationSettingsClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadDelegationSettings.json

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

func (*DelegationSettingsClient) ListSecrets

ListSecrets - Gets the secret validation key of the DelegationSettings. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - DelegationSettingsClientListSecretsOptions contains the optional parameters for the DelegationSettingsClient.ListSecrets method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSecretsPortalSettingsValidationKey.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDelegationSettingsClient().ListSecrets(ctx, "rg1", "apimService1", 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.PortalSettingValidationKeyContract = armapimanagement.PortalSettingValidationKeyContract{
// 	ValidationKey: to.Ptr("<validationKey>"),
// }
Output:

func (*DelegationSettingsClient) Update

Update - Update Delegation settings. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - Update Delegation settings.
  • options - DelegationSettingsClientUpdateOptions contains the optional parameters for the DelegationSettingsClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsUpdateDelegation.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewDelegationSettingsClient().Update(ctx, "rg1", "apimService1", "*", armapimanagement.PortalDelegationSettings{
	Properties: &armapimanagement.PortalDelegationSettingsProperties{
		Subscriptions: &armapimanagement.SubscriptionsDelegationSettingsProperties{
			Enabled: to.Ptr(true),
		},
		URL: to.Ptr("http://contoso.com/delegation"),
		UserRegistration: &armapimanagement.RegistrationDelegationSettingsProperties{
			Enabled: to.Ptr(true),
		},
		ValidationKey: to.Ptr("<validationKey>"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

type DelegationSettingsClientCreateOrUpdateOptions

type DelegationSettingsClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

DelegationSettingsClientCreateOrUpdateOptions contains the optional parameters for the DelegationSettingsClient.CreateOrUpdate method.

type DelegationSettingsClientCreateOrUpdateResponse

type DelegationSettingsClientCreateOrUpdateResponse struct {
	// Delegation settings for a developer portal.
	PortalDelegationSettings
}

DelegationSettingsClientCreateOrUpdateResponse contains the response from method DelegationSettingsClient.CreateOrUpdate.

type DelegationSettingsClientGetEntityTagOptions

type DelegationSettingsClientGetEntityTagOptions struct {
}

DelegationSettingsClientGetEntityTagOptions contains the optional parameters for the DelegationSettingsClient.GetEntityTag method.

type DelegationSettingsClientGetEntityTagResponse

type DelegationSettingsClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

DelegationSettingsClientGetEntityTagResponse contains the response from method DelegationSettingsClient.GetEntityTag.

type DelegationSettingsClientGetOptions

type DelegationSettingsClientGetOptions struct {
}

DelegationSettingsClientGetOptions contains the optional parameters for the DelegationSettingsClient.Get method.

type DelegationSettingsClientGetResponse

type DelegationSettingsClientGetResponse struct {
	// Delegation settings for a developer portal.
	PortalDelegationSettings

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

DelegationSettingsClientGetResponse contains the response from method DelegationSettingsClient.Get.

type DelegationSettingsClientListSecretsOptions

type DelegationSettingsClientListSecretsOptions struct {
}

DelegationSettingsClientListSecretsOptions contains the optional parameters for the DelegationSettingsClient.ListSecrets method.

type DelegationSettingsClientListSecretsResponse

type DelegationSettingsClientListSecretsResponse struct {
	// Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.
	PortalSettingValidationKeyContract
}

DelegationSettingsClientListSecretsResponse contains the response from method DelegationSettingsClient.ListSecrets.

type DelegationSettingsClientUpdateOptions

type DelegationSettingsClientUpdateOptions struct {
}

DelegationSettingsClientUpdateOptions contains the optional parameters for the DelegationSettingsClient.Update method.

type DelegationSettingsClientUpdateResponse

type DelegationSettingsClientUpdateResponse struct {
}

DelegationSettingsClientUpdateResponse contains the response from method DelegationSettingsClient.Update.

type DeletedServiceContract

type DeletedServiceContract struct {
	// Deleted API Management Service details.
	Properties *DeletedServiceContractProperties

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

	// READ-ONLY; API Management Service Master Location.
	Location *string

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

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

DeletedServiceContract - Deleted API Management Service information.

func (DeletedServiceContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeletedServiceContract.

func (*DeletedServiceContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeletedServiceContract.

type DeletedServiceContractProperties

type DeletedServiceContractProperties struct {
	// UTC Timestamp when the service was soft-deleted. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified
	// by the ISO 8601 standard.
	DeletionDate *time.Time

	// UTC Date and Time when the service will be automatically purged. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ
	// as specified by the ISO 8601 standard.
	ScheduledPurgeDate *time.Time

	// Fully-qualified API Management Service Resource ID
	ServiceID *string
}

func (DeletedServiceContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeletedServiceContractProperties.

func (*DeletedServiceContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeletedServiceContractProperties.

type DeletedServicesClient

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

DeletedServicesClient contains the methods for the DeletedServices group. Don't use this type directly, use NewDeletedServicesClient() instead.

func NewDeletedServicesClient

func NewDeletedServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DeletedServicesClient, error)

NewDeletedServicesClient creates a new instance of DeletedServicesClient 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 (*DeletedServicesClient) BeginPurge

BeginPurge - Purges Api Management Service (deletes it with no option to undelete). If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • serviceName - The name of the API Management service.
  • location - The location of the deleted API Management service.
  • options - DeletedServicesClientBeginPurgeOptions contains the optional parameters for the DeletedServicesClient.BeginPurge method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeletedServicesPurge.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDeletedServicesClient().BeginPurge(ctx, "apimService3", "westus", 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 (*DeletedServicesClient) GetByName

GetByName - Get soft-deleted Api Management Service by name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • serviceName - The name of the API Management service.
  • location - The location of the deleted API Management service.
  • options - DeletedServicesClientGetByNameOptions contains the optional parameters for the DeletedServicesClient.GetByName method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDeletedServiceByName.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDeletedServicesClient().GetByName(ctx, "apimService3", "westus", 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.DeletedServiceContract = armapimanagement.DeletedServiceContract{
// 	Name: to.Ptr("apimService3"),
// 	Type: to.Ptr("Microsoft.ApiManagement/deletedservices"),
// 	ID: to.Ptr("/subscriptions/subid/providers/Microsoft.ApiManagement/locations/westus/deletedservices/apimService3"),
// 	Location: to.Ptr("West US"),
// 	Properties: &armapimanagement.DeletedServiceContractProperties{
// 		DeletionDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-27T15:33:55.542Z"); return t}()),
// 		ScheduledPurgeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-27T15:33:55.542Z"); return t}()),
// 		ServiceID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService3"),
// 	},
// }
Output:

func (*DeletedServicesClient) NewListBySubscriptionPager

NewListBySubscriptionPager - Lists all soft-deleted services available for undelete for the given subscription.

Generated from API version 2022-08-01

  • options - DeletedServicesClientListBySubscriptionOptions contains the optional parameters for the DeletedServicesClient.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeletedServicesListBySubscription.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewDeletedServicesClient().NewListBySubscriptionPager(nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.DeletedServicesCollection = armapimanagement.DeletedServicesCollection{
	// 	Value: []*armapimanagement.DeletedServiceContract{
	// 		{
	// 			Name: to.Ptr("apimService3"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/deletedservices"),
	// 			ID: to.Ptr("/subscriptions/subid/providers/Microsoft.ApiManagement/locations/westus/deletedservices/apimService3"),
	// 			Location: to.Ptr("West US"),
	// 			Properties: &armapimanagement.DeletedServiceContractProperties{
	// 				DeletionDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-27T15:33:55.542Z"); return t}()),
	// 				ScheduledPurgeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-27T15:33:55.542Z"); return t}()),
	// 				ServiceID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService3"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("apimService"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/deletedservices"),
	// 			ID: to.Ptr("/subscriptions/subid/providers/Microsoft.ApiManagement/locations/westus2/deletedservices/apimService"),
	// 			Location: to.Ptr("West US 2"),
	// 			Properties: &armapimanagement.DeletedServiceContractProperties{
	// 				DeletionDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-27T15:33:55.542Z"); return t}()),
	// 				ScheduledPurgeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-27T15:33:55.542Z"); return t}()),
	// 				ServiceID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService"),
	// 			},
	// 	}},
	// }
}
Output:

type DeletedServicesClientBeginPurgeOptions

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

DeletedServicesClientBeginPurgeOptions contains the optional parameters for the DeletedServicesClient.BeginPurge method.

type DeletedServicesClientGetByNameOptions

type DeletedServicesClientGetByNameOptions struct {
}

DeletedServicesClientGetByNameOptions contains the optional parameters for the DeletedServicesClient.GetByName method.

type DeletedServicesClientGetByNameResponse

type DeletedServicesClientGetByNameResponse struct {
	// Deleted API Management Service information.
	DeletedServiceContract
}

DeletedServicesClientGetByNameResponse contains the response from method DeletedServicesClient.GetByName.

type DeletedServicesClientListBySubscriptionOptions

type DeletedServicesClientListBySubscriptionOptions struct {
}

DeletedServicesClientListBySubscriptionOptions contains the optional parameters for the DeletedServicesClient.NewListBySubscriptionPager method.

type DeletedServicesClientListBySubscriptionResponse

type DeletedServicesClientListBySubscriptionResponse struct {
	// Paged deleted API Management Services List Representation.
	DeletedServicesCollection
}

DeletedServicesClientListBySubscriptionResponse contains the response from method DeletedServicesClient.NewListBySubscriptionPager.

type DeletedServicesClientPurgeResponse

type DeletedServicesClientPurgeResponse struct {
	// Deleted API Management Service information.
	DeletedServiceContract
}

DeletedServicesClientPurgeResponse contains the response from method DeletedServicesClient.BeginPurge.

type DeletedServicesCollection

type DeletedServicesCollection struct {
	// READ-ONLY; Next page link if any.
	NextLink *string

	// READ-ONLY; Page values.
	Value []*DeletedServiceContract
}

DeletedServicesCollection - Paged deleted API Management Services List Representation.

func (DeletedServicesCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeletedServicesCollection.

func (*DeletedServicesCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeletedServicesCollection.

type DeployConfigurationParameterProperties

type DeployConfigurationParameterProperties struct {
	// REQUIRED; The name of the Git branch from which the configuration is to be deployed to the configuration database.
	Branch *string

	// The value enforcing deleting subscriptions to products that are deleted in this update.
	Force *bool
}

DeployConfigurationParameterProperties - Parameters supplied to the Deploy Configuration operation.

func (DeployConfigurationParameterProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeployConfigurationParameterProperties.

func (*DeployConfigurationParameterProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeployConfigurationParameterProperties.

type DeployConfigurationParameters

type DeployConfigurationParameters struct {
	// Deploy Configuration Parameter contract properties.
	Properties *DeployConfigurationParameterProperties
}

DeployConfigurationParameters - Deploy Tenant Configuration Contract.

func (DeployConfigurationParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DeployConfigurationParameters.

func (*DeployConfigurationParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DeployConfigurationParameters.

type DiagnosticClient

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

DiagnosticClient contains the methods for the Diagnostic group. Don't use this type directly, use NewDiagnosticClient() instead.

func NewDiagnosticClient

func NewDiagnosticClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DiagnosticClient, error)

NewDiagnosticClient creates a new instance of DiagnosticClient 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 (*DiagnosticClient) CreateOrUpdate

func (client *DiagnosticClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, parameters DiagnosticContract, options *DiagnosticClientCreateOrUpdateOptions) (DiagnosticClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates a new Diagnostic or updates an existing one. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance.
  • parameters - Create parameters.
  • options - DiagnosticClientCreateOrUpdateOptions contains the optional parameters for the DiagnosticClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateDiagnostic.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDiagnosticClient().CreateOrUpdate(ctx, "rg1", "apimService1", "applicationinsights", armapimanagement.DiagnosticContract{
	Properties: &armapimanagement.DiagnosticContractProperties{
		AlwaysLog: to.Ptr(armapimanagement.AlwaysLogAllErrors),
		Backend: &armapimanagement.PipelineDiagnosticSettings{
			Response: &armapimanagement.HTTPMessageDiagnostic{
				Body: &armapimanagement.BodyDiagnosticSettings{
					Bytes: to.Ptr[int32](512),
				},
				Headers: []*string{
					to.Ptr("Content-type")},
			},
			Request: &armapimanagement.HTTPMessageDiagnostic{
				Body: &armapimanagement.BodyDiagnosticSettings{
					Bytes: to.Ptr[int32](512),
				},
				Headers: []*string{
					to.Ptr("Content-type")},
			},
		},
		Frontend: &armapimanagement.PipelineDiagnosticSettings{
			Response: &armapimanagement.HTTPMessageDiagnostic{
				Body: &armapimanagement.BodyDiagnosticSettings{
					Bytes: to.Ptr[int32](512),
				},
				Headers: []*string{
					to.Ptr("Content-type")},
			},
			Request: &armapimanagement.HTTPMessageDiagnostic{
				Body: &armapimanagement.BodyDiagnosticSettings{
					Bytes: to.Ptr[int32](512),
				},
				Headers: []*string{
					to.Ptr("Content-type")},
			},
		},
		LoggerID: to.Ptr("/loggers/azuremonitor"),
		Sampling: &armapimanagement.SamplingSettings{
			Percentage:   to.Ptr[float64](50),
			SamplingType: to.Ptr(armapimanagement.SamplingTypeFixed),
		},
	},
}, &armapimanagement.DiagnosticClientCreateOrUpdateOptions{IfMatch: 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.DiagnosticContract = armapimanagement.DiagnosticContract{
// 	Name: to.Ptr("applicationinsights"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/diagnostics"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/diagnostics/applicationinsights"),
// 	Properties: &armapimanagement.DiagnosticContractProperties{
// 		AlwaysLog: to.Ptr(armapimanagement.AlwaysLogAllErrors),
// 		Backend: &armapimanagement.PipelineDiagnosticSettings{
// 			Response: &armapimanagement.HTTPMessageDiagnostic{
// 				Body: &armapimanagement.BodyDiagnosticSettings{
// 					Bytes: to.Ptr[int32](512),
// 				},
// 				Headers: []*string{
// 					to.Ptr("Content-type")},
// 				},
// 				Request: &armapimanagement.HTTPMessageDiagnostic{
// 					Body: &armapimanagement.BodyDiagnosticSettings{
// 						Bytes: to.Ptr[int32](512),
// 					},
// 					Headers: []*string{
// 						to.Ptr("Content-type")},
// 					},
// 				},
// 				Frontend: &armapimanagement.PipelineDiagnosticSettings{
// 					Response: &armapimanagement.HTTPMessageDiagnostic{
// 						Body: &armapimanagement.BodyDiagnosticSettings{
// 							Bytes: to.Ptr[int32](512),
// 						},
// 						Headers: []*string{
// 							to.Ptr("Content-type")},
// 						},
// 						Request: &armapimanagement.HTTPMessageDiagnostic{
// 							Body: &armapimanagement.BodyDiagnosticSettings{
// 								Bytes: to.Ptr[int32](512),
// 							},
// 							Headers: []*string{
// 								to.Ptr("Content-type")},
// 							},
// 						},
// 						LoggerID: to.Ptr("/loggers/applicationinsights"),
// 						Sampling: &armapimanagement.SamplingSettings{
// 							Percentage: to.Ptr[float64](50),
// 							SamplingType: to.Ptr(armapimanagement.SamplingTypeFixed),
// 						},
// 					},
// 				}
Output:

func (*DiagnosticClient) Delete

func (client *DiagnosticClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, ifMatch string, options *DiagnosticClientDeleteOptions) (DiagnosticClientDeleteResponse, error)

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

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - DiagnosticClientDeleteOptions contains the optional parameters for the DiagnosticClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteDiagnostic.json

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

func (*DiagnosticClient) Get

func (client *DiagnosticClient) Get(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, options *DiagnosticClientGetOptions) (DiagnosticClientGetResponse, error)

Get - Gets the details of the Diagnostic specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance.
  • options - DiagnosticClientGetOptions contains the optional parameters for the DiagnosticClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDiagnostic.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDiagnosticClient().Get(ctx, "rg1", "apimService1", "applicationinsights", 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.DiagnosticContract = armapimanagement.DiagnosticContract{
// 	Name: to.Ptr("applicationinsights"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/diagnostics"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/diagnostics/applicationinsights"),
// 	Properties: &armapimanagement.DiagnosticContractProperties{
// 		AlwaysLog: to.Ptr(armapimanagement.AlwaysLogAllErrors),
// 		Backend: &armapimanagement.PipelineDiagnosticSettings{
// 			Response: &armapimanagement.HTTPMessageDiagnostic{
// 				Body: &armapimanagement.BodyDiagnosticSettings{
// 					Bytes: to.Ptr[int32](100),
// 				},
// 				Headers: []*string{
// 				},
// 			},
// 			Request: &armapimanagement.HTTPMessageDiagnostic{
// 				Body: &armapimanagement.BodyDiagnosticSettings{
// 					Bytes: to.Ptr[int32](100),
// 				},
// 				Headers: []*string{
// 				},
// 			},
// 		},
// 		Frontend: &armapimanagement.PipelineDiagnosticSettings{
// 			Response: &armapimanagement.HTTPMessageDiagnostic{
// 				Body: &armapimanagement.BodyDiagnosticSettings{
// 					Bytes: to.Ptr[int32](100),
// 				},
// 				Headers: []*string{
// 				},
// 			},
// 			Request: &armapimanagement.HTTPMessageDiagnostic{
// 				Body: &armapimanagement.BodyDiagnosticSettings{
// 					Bytes: to.Ptr[int32](100),
// 				},
// 				Headers: []*string{
// 				},
// 			},
// 		},
// 		HTTPCorrelationProtocol: to.Ptr(armapimanagement.HTTPCorrelationProtocolLegacy),
// 		LogClientIP: to.Ptr(true),
// 		LoggerID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/aisamplingtest"),
// 		Sampling: &armapimanagement.SamplingSettings{
// 			Percentage: to.Ptr[float64](100),
// 			SamplingType: to.Ptr(armapimanagement.SamplingTypeFixed),
// 		},
// 	},
// }
Output:

func (*DiagnosticClient) GetEntityTag

func (client *DiagnosticClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, options *DiagnosticClientGetEntityTagOptions) (DiagnosticClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the Diagnostic specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance.
  • options - DiagnosticClientGetEntityTagOptions contains the optional parameters for the DiagnosticClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadDiagnostic.json

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

func (*DiagnosticClient) NewListByServicePager

func (client *DiagnosticClient) NewListByServicePager(resourceGroupName string, serviceName string, options *DiagnosticClientListByServiceOptions) *runtime.Pager[DiagnosticClientListByServiceResponse]

NewListByServicePager - Lists all diagnostics of the API Management service instance.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - DiagnosticClientListByServiceOptions contains the optional parameters for the DiagnosticClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListDiagnostics.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewDiagnosticClient().NewListByServicePager("rg1", "apimService1", &armapimanagement.DiagnosticClientListByServiceOptions{Filter: nil,
	Top:  nil,
	Skip: 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.DiagnosticCollection = armapimanagement.DiagnosticCollection{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.DiagnosticContract{
	// 		{
	// 			Name: to.Ptr("applicationinsights"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/diagnostics"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/diagnostics/applicationinsights"),
	// 			Properties: &armapimanagement.DiagnosticContractProperties{
	// 				AlwaysLog: to.Ptr(armapimanagement.AlwaysLogAllErrors),
	// 				Backend: &armapimanagement.PipelineDiagnosticSettings{
	// 					Response: &armapimanagement.HTTPMessageDiagnostic{
	// 						Body: &armapimanagement.BodyDiagnosticSettings{
	// 							Bytes: to.Ptr[int32](0),
	// 						},
	// 						Headers: []*string{
	// 						},
	// 					},
	// 					Request: &armapimanagement.HTTPMessageDiagnostic{
	// 						Body: &armapimanagement.BodyDiagnosticSettings{
	// 							Bytes: to.Ptr[int32](0),
	// 						},
	// 						Headers: []*string{
	// 						},
	// 					},
	// 				},
	// 				Frontend: &armapimanagement.PipelineDiagnosticSettings{
	// 					Response: &armapimanagement.HTTPMessageDiagnostic{
	// 						Body: &armapimanagement.BodyDiagnosticSettings{
	// 							Bytes: to.Ptr[int32](0),
	// 						},
	// 						Headers: []*string{
	// 						},
	// 					},
	// 					Request: &armapimanagement.HTTPMessageDiagnostic{
	// 						Body: &armapimanagement.BodyDiagnosticSettings{
	// 							Bytes: to.Ptr[int32](0),
	// 						},
	// 						Headers: []*string{
	// 						},
	// 					},
	// 				},
	// 				HTTPCorrelationProtocol: to.Ptr(armapimanagement.HTTPCorrelationProtocolLegacy),
	// 				LogClientIP: to.Ptr(true),
	// 				LoggerID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/aisamplingtest"),
	// 				Sampling: &armapimanagement.SamplingSettings{
	// 					Percentage: to.Ptr[float64](100),
	// 					SamplingType: to.Ptr(armapimanagement.SamplingTypeFixed),
	// 				},
	// 				Verbosity: to.Ptr(armapimanagement.VerbosityInformation),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("azuremonitor"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/diagnostics"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/diagnostics/azuremonitor"),
	// 			Properties: &armapimanagement.DiagnosticContractProperties{
	// 				LogClientIP: to.Ptr(true),
	// 				LoggerID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/azuremonitor"),
	// 				Sampling: &armapimanagement.SamplingSettings{
	// 					Percentage: to.Ptr[float64](100),
	// 					SamplingType: to.Ptr(armapimanagement.SamplingTypeFixed),
	// 				},
	// 			},
	// 	}},
	// }
}
Output:

func (*DiagnosticClient) Update

func (client *DiagnosticClient) Update(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, ifMatch string, parameters DiagnosticContract, options *DiagnosticClientUpdateOptions) (DiagnosticClientUpdateResponse, error)

Update - Updates the details of the Diagnostic specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - Diagnostic Update parameters.
  • options - DiagnosticClientUpdateOptions contains the optional parameters for the DiagnosticClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateDiagnostic.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDiagnosticClient().Update(ctx, "rg1", "apimService1", "applicationinsights", "*", armapimanagement.DiagnosticContract{
	Properties: &armapimanagement.DiagnosticContractProperties{
		AlwaysLog: to.Ptr(armapimanagement.AlwaysLogAllErrors),
		Backend: &armapimanagement.PipelineDiagnosticSettings{
			Response: &armapimanagement.HTTPMessageDiagnostic{
				Body: &armapimanagement.BodyDiagnosticSettings{
					Bytes: to.Ptr[int32](512),
				},
				Headers: []*string{
					to.Ptr("Content-type")},
			},
			Request: &armapimanagement.HTTPMessageDiagnostic{
				Body: &armapimanagement.BodyDiagnosticSettings{
					Bytes: to.Ptr[int32](512),
				},
				Headers: []*string{
					to.Ptr("Content-type")},
			},
		},
		Frontend: &armapimanagement.PipelineDiagnosticSettings{
			Response: &armapimanagement.HTTPMessageDiagnostic{
				Body: &armapimanagement.BodyDiagnosticSettings{
					Bytes: to.Ptr[int32](512),
				},
				Headers: []*string{
					to.Ptr("Content-type")},
			},
			Request: &armapimanagement.HTTPMessageDiagnostic{
				Body: &armapimanagement.BodyDiagnosticSettings{
					Bytes: to.Ptr[int32](512),
				},
				Headers: []*string{
					to.Ptr("Content-type")},
			},
		},
		LoggerID: to.Ptr("/loggers/applicationinsights"),
		Sampling: &armapimanagement.SamplingSettings{
			Percentage:   to.Ptr[float64](50),
			SamplingType: to.Ptr(armapimanagement.SamplingTypeFixed),
		},
	},
}, 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.DiagnosticContract = armapimanagement.DiagnosticContract{
// 	Name: to.Ptr("applicationinsights"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/diagnostics"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/diagnostics/applicationinsights"),
// 	Properties: &armapimanagement.DiagnosticContractProperties{
// 		AlwaysLog: to.Ptr(armapimanagement.AlwaysLogAllErrors),
// 		Backend: &armapimanagement.PipelineDiagnosticSettings{
// 			Response: &armapimanagement.HTTPMessageDiagnostic{
// 				Body: &armapimanagement.BodyDiagnosticSettings{
// 					Bytes: to.Ptr[int32](512),
// 				},
// 				Headers: []*string{
// 					to.Ptr("Content-type")},
// 				},
// 				Request: &armapimanagement.HTTPMessageDiagnostic{
// 					Body: &armapimanagement.BodyDiagnosticSettings{
// 						Bytes: to.Ptr[int32](512),
// 					},
// 					Headers: []*string{
// 						to.Ptr("Content-type")},
// 					},
// 				},
// 				Frontend: &armapimanagement.PipelineDiagnosticSettings{
// 					Response: &armapimanagement.HTTPMessageDiagnostic{
// 						Body: &armapimanagement.BodyDiagnosticSettings{
// 							Bytes: to.Ptr[int32](512),
// 						},
// 						Headers: []*string{
// 							to.Ptr("Content-type")},
// 						},
// 						Request: &armapimanagement.HTTPMessageDiagnostic{
// 							Body: &armapimanagement.BodyDiagnosticSettings{
// 								Bytes: to.Ptr[int32](512),
// 							},
// 							Headers: []*string{
// 								to.Ptr("Content-type")},
// 							},
// 						},
// 						HTTPCorrelationProtocol: to.Ptr(armapimanagement.HTTPCorrelationProtocolLegacy),
// 						LogClientIP: to.Ptr(true),
// 						LoggerID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/aisamplingtest"),
// 						Sampling: &armapimanagement.SamplingSettings{
// 							Percentage: to.Ptr[float64](50),
// 							SamplingType: to.Ptr(armapimanagement.SamplingTypeFixed),
// 						},
// 					},
// 				}
Output:

type DiagnosticClientCreateOrUpdateOptions

type DiagnosticClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

DiagnosticClientCreateOrUpdateOptions contains the optional parameters for the DiagnosticClient.CreateOrUpdate method.

type DiagnosticClientCreateOrUpdateResponse

type DiagnosticClientCreateOrUpdateResponse struct {
	// Diagnostic details.
	DiagnosticContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

DiagnosticClientCreateOrUpdateResponse contains the response from method DiagnosticClient.CreateOrUpdate.

type DiagnosticClientDeleteOptions

type DiagnosticClientDeleteOptions struct {
}

DiagnosticClientDeleteOptions contains the optional parameters for the DiagnosticClient.Delete method.

type DiagnosticClientDeleteResponse

type DiagnosticClientDeleteResponse struct {
}

DiagnosticClientDeleteResponse contains the response from method DiagnosticClient.Delete.

type DiagnosticClientGetEntityTagOptions

type DiagnosticClientGetEntityTagOptions struct {
}

DiagnosticClientGetEntityTagOptions contains the optional parameters for the DiagnosticClient.GetEntityTag method.

type DiagnosticClientGetEntityTagResponse

type DiagnosticClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

DiagnosticClientGetEntityTagResponse contains the response from method DiagnosticClient.GetEntityTag.

type DiagnosticClientGetOptions

type DiagnosticClientGetOptions struct {
}

DiagnosticClientGetOptions contains the optional parameters for the DiagnosticClient.Get method.

type DiagnosticClientGetResponse

type DiagnosticClientGetResponse struct {
	// Diagnostic details.
	DiagnosticContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

DiagnosticClientGetResponse contains the response from method DiagnosticClient.Get.

type DiagnosticClientListByServiceOptions

type DiagnosticClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

DiagnosticClientListByServiceOptions contains the optional parameters for the DiagnosticClient.NewListByServicePager method.

type DiagnosticClientListByServiceResponse

type DiagnosticClientListByServiceResponse struct {
	// Paged Diagnostic list representation.
	DiagnosticCollection
}

DiagnosticClientListByServiceResponse contains the response from method DiagnosticClient.NewListByServicePager.

type DiagnosticClientUpdateOptions

type DiagnosticClientUpdateOptions struct {
}

DiagnosticClientUpdateOptions contains the optional parameters for the DiagnosticClient.Update method.

type DiagnosticClientUpdateResponse

type DiagnosticClientUpdateResponse struct {
	// Diagnostic details.
	DiagnosticContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

DiagnosticClientUpdateResponse contains the response from method DiagnosticClient.Update.

type DiagnosticCollection

type DiagnosticCollection struct {
	// Total record count number across all pages.
	Count *int64

	// Next page link if any.
	NextLink *string

	// Page values.
	Value []*DiagnosticContract
}

DiagnosticCollection - Paged Diagnostic list representation.

func (DiagnosticCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DiagnosticCollection.

func (*DiagnosticCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticCollection.

type DiagnosticContract

type DiagnosticContract struct {
	// Diagnostic entity contract properties.
	Properties *DiagnosticContractProperties

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

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

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

DiagnosticContract - Diagnostic details.

func (DiagnosticContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DiagnosticContract.

func (*DiagnosticContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticContract.

type DiagnosticContractProperties

type DiagnosticContractProperties struct {
	// REQUIRED; Resource Id of a target logger.
	LoggerID *string

	// Specifies for what type of messages sampling settings should not apply.
	AlwaysLog *AlwaysLog

	// Diagnostic settings for incoming/outgoing HTTP messages to the Backend
	Backend *PipelineDiagnosticSettings

	// Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.
	Frontend *PipelineDiagnosticSettings

	// Sets correlation protocol to use for Application Insights diagnostics.
	HTTPCorrelationProtocol *HTTPCorrelationProtocol

	// Log the ClientIP. Default is false.
	LogClientIP *bool

	// Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings.
	Metrics *bool

	// The format of the Operation Name for Application Insights telemetries. Default is Name.
	OperationNameFormat *OperationNameFormat

	// Sampling settings for Diagnostic.
	Sampling *SamplingSettings

	// The verbosity level applied to traces emitted by trace policies.
	Verbosity *Verbosity
}

DiagnosticContractProperties - Diagnostic Entity Properties

func (DiagnosticContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DiagnosticContractProperties.

func (*DiagnosticContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticContractProperties.

type DocumentationClient

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

DocumentationClient contains the methods for the Documentation group. Don't use this type directly, use NewDocumentationClient() instead.

func NewDocumentationClient

func NewDocumentationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DocumentationClient, error)

NewDocumentationClient creates a new instance of DocumentationClient 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 (*DocumentationClient) CreateOrUpdate

func (client *DocumentationClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, documentationID string, parameters DocumentationContract, options *DocumentationClientCreateOrUpdateOptions) (DocumentationClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates a new Documentation or updates an existing one. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • documentationID - Documentation identifier. Must be unique in the current API Management service instance.
  • parameters - Create parameters.
  • options - DocumentationClientCreateOrUpdateOptions contains the optional parameters for the DocumentationClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateDocumentation.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDocumentationClient().CreateOrUpdate(ctx, "rg1", "apimService1", "57d1f7558aa04f15146d9d8a", armapimanagement.DocumentationContract{
	Properties: &armapimanagement.DocumentationContractProperties{
		Content: to.Ptr("content"),
		Title:   to.Ptr("Title"),
	},
}, &armapimanagement.DocumentationClientCreateOrUpdateOptions{IfMatch: 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.DocumentationContract = armapimanagement.DocumentationContract{
// 	Name: to.Ptr("57d1f7558aa04f15146d9d8a"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/documentations"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/documentations/57d1f7558aa04f15146d9d8a"),
// 	Properties: &armapimanagement.DocumentationContractProperties{
// 		Content: to.Ptr("content"),
// 		Title: to.Ptr("Title"),
// 	},
// }
Output:

func (*DocumentationClient) Delete

func (client *DocumentationClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, documentationID string, ifMatch string, options *DocumentationClientDeleteOptions) (DocumentationClientDeleteResponse, error)

Delete - Deletes the specified Documentation from an API. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • documentationID - Documentation identifier. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - DocumentationClientDeleteOptions contains the optional parameters for the DocumentationClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteDocumentation.json

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

func (*DocumentationClient) Get

func (client *DocumentationClient) Get(ctx context.Context, resourceGroupName string, serviceName string, documentationID string, options *DocumentationClientGetOptions) (DocumentationClientGetResponse, error)

Get - Gets the details of the Documentation specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • documentationID - Documentation identifier. Must be unique in the current API Management service instance.
  • options - DocumentationClientGetOptions contains the optional parameters for the DocumentationClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDocumentation.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDocumentationClient().Get(ctx, "rg1", "apimService1", "57d1f7558aa04f15146d9d8a", 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.DocumentationContract = armapimanagement.DocumentationContract{
// 	Name: to.Ptr("57d1f7558aa04f15146d9d8a"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/documentations"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/documentations/57d1f7558aa04f15146d9d8a"),
// 	Properties: &armapimanagement.DocumentationContractProperties{
// 		Content: to.Ptr("content"),
// 		Title: to.Ptr("Title"),
// 	},
// }
Output:

func (*DocumentationClient) GetEntityTag

func (client *DocumentationClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, documentationID string, options *DocumentationClientGetEntityTagOptions) (DocumentationClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the Documentation by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • documentationID - Documentation identifier. Must be unique in the current API Management service instance.
  • options - DocumentationClientGetEntityTagOptions contains the optional parameters for the DocumentationClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadDocumentation.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewDocumentationClient().GetEntityTag(ctx, "rg1", "apimService1", "57d1f7558aa04f15146d9d8a", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*DocumentationClient) NewListByServicePager

func (client *DocumentationClient) NewListByServicePager(resourceGroupName string, serviceName string, options *DocumentationClientListByServiceOptions) *runtime.Pager[DocumentationClientListByServiceResponse]

NewListByServicePager - Lists all Documentations of the API Management service instance.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - DocumentationClientListByServiceOptions contains the optional parameters for the DocumentationClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListDocumentations.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewDocumentationClient().NewListByServicePager("rg1", "apimService1", &armapimanagement.DocumentationClientListByServiceOptions{Filter: nil,
	Top:  nil,
	Skip: 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.DocumentationCollection = armapimanagement.DocumentationCollection{
	// 	Value: []*armapimanagement.DocumentationContract{
	// 		{
	// 			Name: to.Ptr("test"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/documentations"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/documentations/test"),
	// 			Properties: &armapimanagement.DocumentationContractProperties{
	// 				Content: to.Ptr("Test content "),
	// 				Title: to.Ptr("test"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("test2"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/documentations"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/documentations/test2"),
	// 			Properties: &armapimanagement.DocumentationContractProperties{
	// 				Content: to.Ptr("Test content "),
	// 				Title: to.Ptr("test"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("test3"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/documentations"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/documentations/test3"),
	// 			Properties: &armapimanagement.DocumentationContractProperties{
	// 				Content: to.Ptr("Test content "),
	// 				Title: to.Ptr("test"),
	// 			},
	// 	}},
	// }
}
Output:

func (*DocumentationClient) Update

func (client *DocumentationClient) Update(ctx context.Context, resourceGroupName string, serviceName string, documentationID string, ifMatch string, parameters DocumentationUpdateContract, options *DocumentationClientUpdateOptions) (DocumentationClientUpdateResponse, error)

Update - Updates the details of the Documentation for an API specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • documentationID - Documentation identifier. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - Documentation Update parameters.
  • options - DocumentationClientUpdateOptions contains the optional parameters for the DocumentationClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateDocumentation.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDocumentationClient().Update(ctx, "rg1", "apimService1", "57d1f7558aa04f15146d9d8a", "<if-match>", armapimanagement.DocumentationUpdateContract{
	Properties: &armapimanagement.DocumentationContractProperties{
		Content: to.Ptr("content updated"),
		Title:   to.Ptr("Title updated"),
	},
}, 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.DocumentationContract = armapimanagement.DocumentationContract{
// 	Name: to.Ptr("57d1f7558aa04f15146d9d8a"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/documentations"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/documentations/57d1f7558aa04f15146d9d8a"),
// 	Properties: &armapimanagement.DocumentationContractProperties{
// 		Content: to.Ptr("content updated"),
// 		Title: to.Ptr("Title updated"),
// 	},
// }
Output:

type DocumentationClientCreateOrUpdateOptions

type DocumentationClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

DocumentationClientCreateOrUpdateOptions contains the optional parameters for the DocumentationClient.CreateOrUpdate method.

type DocumentationClientCreateOrUpdateResponse

type DocumentationClientCreateOrUpdateResponse struct {
	// Markdown documentation details.
	DocumentationContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

DocumentationClientCreateOrUpdateResponse contains the response from method DocumentationClient.CreateOrUpdate.

type DocumentationClientDeleteOptions

type DocumentationClientDeleteOptions struct {
}

DocumentationClientDeleteOptions contains the optional parameters for the DocumentationClient.Delete method.

type DocumentationClientDeleteResponse

type DocumentationClientDeleteResponse struct {
}

DocumentationClientDeleteResponse contains the response from method DocumentationClient.Delete.

type DocumentationClientGetEntityTagOptions

type DocumentationClientGetEntityTagOptions struct {
}

DocumentationClientGetEntityTagOptions contains the optional parameters for the DocumentationClient.GetEntityTag method.

type DocumentationClientGetEntityTagResponse

type DocumentationClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

DocumentationClientGetEntityTagResponse contains the response from method DocumentationClient.GetEntityTag.

type DocumentationClientGetOptions

type DocumentationClientGetOptions struct {
}

DocumentationClientGetOptions contains the optional parameters for the DocumentationClient.Get method.

type DocumentationClientGetResponse

type DocumentationClientGetResponse struct {
	// Markdown documentation details.
	DocumentationContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

DocumentationClientGetResponse contains the response from method DocumentationClient.Get.

type DocumentationClientListByServiceOptions

type DocumentationClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | eq | contains |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

DocumentationClientListByServiceOptions contains the optional parameters for the DocumentationClient.NewListByServicePager method.

type DocumentationClientListByServiceResponse

type DocumentationClientListByServiceResponse struct {
	// Paged Documentation list representation.
	DocumentationCollection
}

DocumentationClientListByServiceResponse contains the response from method DocumentationClient.NewListByServicePager.

type DocumentationClientUpdateOptions

type DocumentationClientUpdateOptions struct {
}

DocumentationClientUpdateOptions contains the optional parameters for the DocumentationClient.Update method.

type DocumentationClientUpdateResponse

type DocumentationClientUpdateResponse struct {
	// Markdown documentation details.
	DocumentationContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

DocumentationClientUpdateResponse contains the response from method DocumentationClient.Update.

type DocumentationCollection

type DocumentationCollection struct {
	// READ-ONLY; Next page link if any.
	NextLink *string

	// READ-ONLY; Page values.
	Value []*DocumentationContract
}

DocumentationCollection - Paged Documentation list representation.

func (DocumentationCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DocumentationCollection.

func (*DocumentationCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DocumentationCollection.

type DocumentationContract

type DocumentationContract struct {
	// Markdown Documentation details.
	Properties *DocumentationContractProperties

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

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

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

DocumentationContract - Markdown documentation details.

func (DocumentationContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DocumentationContract.

func (*DocumentationContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DocumentationContract.

type DocumentationContractProperties

type DocumentationContractProperties struct {
	// Markdown documentation content.
	Content *string

	// documentation title.
	Title *string
}

DocumentationContractProperties - Markdown documentation details.

func (DocumentationContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DocumentationContractProperties.

func (*DocumentationContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DocumentationContractProperties.

type DocumentationUpdateContract

type DocumentationUpdateContract struct {
	// Markdown Documentation details.
	Properties *DocumentationContractProperties
}

DocumentationUpdateContract - Documentation update contract details.

func (DocumentationUpdateContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DocumentationUpdateContract.

func (*DocumentationUpdateContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DocumentationUpdateContract.

type EmailTemplateClient

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

EmailTemplateClient contains the methods for the EmailTemplate group. Don't use this type directly, use NewEmailTemplateClient() instead.

func NewEmailTemplateClient

func NewEmailTemplateClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EmailTemplateClient, error)

NewEmailTemplateClient creates a new instance of EmailTemplateClient 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 (*EmailTemplateClient) CreateOrUpdate

func (client *EmailTemplateClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, parameters EmailTemplateUpdateParameters, options *EmailTemplateClientCreateOrUpdateOptions) (EmailTemplateClientCreateOrUpdateResponse, error)

CreateOrUpdate - Updates an Email Template. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • templateName - Email Template Name Identifier.
  • parameters - Email Template update parameters.
  • options - EmailTemplateClientCreateOrUpdateOptions contains the optional parameters for the EmailTemplateClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateTemplate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEmailTemplateClient().CreateOrUpdate(ctx, "rg1", "apimService1", armapimanagement.TemplateNameNewIssueNotificationMessage, armapimanagement.EmailTemplateUpdateParameters{
	Properties: &armapimanagement.EmailTemplateUpdateParameterProperties{
		Subject: to.Ptr("Your request for $IssueName was successfully received."),
	},
}, &armapimanagement.EmailTemplateClientCreateOrUpdateOptions{IfMatch: 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.EmailTemplateContract = armapimanagement.EmailTemplateContract{
// 	Name: to.Ptr("NewIssueNotificationMessage"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/templates"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/templates/NewIssueNotificationMessage"),
// 	Properties: &armapimanagement.EmailTemplateContractProperties{
// 		Description: to.Ptr("This email is sent to developers after they create a new topic on the Issues page of the developer portal."),
// 		Body: to.Ptr("<!DOCTYPE html >\r\n<html>\r\n  <head />\r\n  <body>\r\n    <p style=\"font-size:12pt;font-family:'Segoe UI'\">Dear $DevFirstName $DevLastName,</p>\r\n    <p style=\"font-size:12pt;font-family:'Segoe UI'\">Thank you for contacting us. Our API team will review your issue and get back to you soon.</p>\r\n    <p style=\"font-size:12pt;font-family:'Segoe UI'\">\r\n          Click this <a href=\"http://$DevPortalUrl/issues/$IssueId\">link</a> to view or edit your request.\r\n        </p>\r\n    <p style=\"font-size:12pt;font-family:'Segoe UI'\">Best,</p>\r\n    <p style=\"font-size:12pt;font-family:'Segoe UI'\">The $OrganizationName API Team</p>\r\n  </body>\r\n</html>"),
// 		IsDefault: to.Ptr(false),
// 		Parameters: []*armapimanagement.EmailTemplateParametersContractProperties{
// 			{
// 				Name: to.Ptr("DevFirstName"),
// 				Title: to.Ptr("Developer first name"),
// 			},
// 			{
// 				Name: to.Ptr("DevLastName"),
// 				Title: to.Ptr("Developer last name"),
// 			},
// 			{
// 				Name: to.Ptr("IssueId"),
// 				Title: to.Ptr("Issue id"),
// 			},
// 			{
// 				Name: to.Ptr("IssueName"),
// 				Title: to.Ptr("Issue name"),
// 			},
// 			{
// 				Name: to.Ptr("OrganizationName"),
// 				Title: to.Ptr("Organization name"),
// 			},
// 			{
// 				Name: to.Ptr("DevPortalUrl"),
// 				Title: to.Ptr("Developer portal URL"),
// 		}},
// 		Subject: to.Ptr("Your request for $IssueName was successfully received."),
// 		Title: to.Ptr("New issue received"),
// 	},
// }
Output:

func (*EmailTemplateClient) Delete

func (client *EmailTemplateClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, ifMatch string, options *EmailTemplateClientDeleteOptions) (EmailTemplateClientDeleteResponse, error)

Delete - Reset the Email Template to default template provided by the API Management service instance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • templateName - Email Template Name Identifier.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - EmailTemplateClientDeleteOptions contains the optional parameters for the EmailTemplateClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteTemplate.json

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

func (*EmailTemplateClient) Get

func (client *EmailTemplateClient) Get(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, options *EmailTemplateClientGetOptions) (EmailTemplateClientGetResponse, error)

Get - Gets the details of the email template specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • templateName - Email Template Name Identifier.
  • options - EmailTemplateClientGetOptions contains the optional parameters for the EmailTemplateClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTemplate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEmailTemplateClient().Get(ctx, "rg1", "apimService1", armapimanagement.TemplateNameNewIssueNotificationMessage, 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.EmailTemplateContract = armapimanagement.EmailTemplateContract{
// 	Name: to.Ptr("NewIssueNotificationMessage"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/templates"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/templates/NewIssueNotificationMessage"),
// 	Properties: &armapimanagement.EmailTemplateContractProperties{
// 		Description: to.Ptr("This email is sent to developers after they create a new topic on the Issues page of the developer portal."),
// 		Body: to.Ptr("<!DOCTYPE html >\r\n<html>\r\n  <head />\r\n  <body>\r\n    <p style=\"font-size:12pt;font-family:'Segoe UI'\">Dear $DevFirstName $DevLastName,</p>\r\n    <p style=\"font-size:12pt;font-family:'Segoe UI'\">Thank you for contacting us. Our API team will review your issue and get back to you soon.</p>\r\n    <p style=\"font-size:12pt;font-family:'Segoe UI'\">\r\n          Click this <a href=\"http://$DevPortalUrl/issues/$IssueId\">link</a> to view or edit your request.\r\n        </p>\r\n    <p style=\"font-size:12pt;font-family:'Segoe UI'\">Best,</p>\r\n    <p style=\"font-size:12pt;font-family:'Segoe UI'\">The $OrganizationName API Team</p>\r\n  </body>\r\n</html>"),
// 		IsDefault: to.Ptr(true),
// 		Parameters: []*armapimanagement.EmailTemplateParametersContractProperties{
// 			{
// 				Name: to.Ptr("DevFirstName"),
// 				Title: to.Ptr("Developer first name"),
// 			},
// 			{
// 				Name: to.Ptr("DevLastName"),
// 				Title: to.Ptr("Developer last name"),
// 			},
// 			{
// 				Name: to.Ptr("IssueId"),
// 				Title: to.Ptr("Issue id"),
// 			},
// 			{
// 				Name: to.Ptr("IssueName"),
// 				Title: to.Ptr("Issue name"),
// 			},
// 			{
// 				Name: to.Ptr("OrganizationName"),
// 				Title: to.Ptr("Organization name"),
// 			},
// 			{
// 				Name: to.Ptr("DevPortalUrl"),
// 				Title: to.Ptr("Developer portal URL"),
// 		}},
// 		Subject: to.Ptr("Your request $IssueName was received"),
// 		Title: to.Ptr("New issue received"),
// 	},
// }
Output:

func (*EmailTemplateClient) GetEntityTag

func (client *EmailTemplateClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, options *EmailTemplateClientGetEntityTagOptions) (EmailTemplateClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the email template specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • templateName - Email Template Name Identifier.
  • options - EmailTemplateClientGetEntityTagOptions contains the optional parameters for the EmailTemplateClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadEmailTemplate.json

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

func (*EmailTemplateClient) NewListByServicePager

func (client *EmailTemplateClient) NewListByServicePager(resourceGroupName string, serviceName string, options *EmailTemplateClientListByServiceOptions) *runtime.Pager[EmailTemplateClientListByServiceResponse]

NewListByServicePager - Gets all email templates

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - EmailTemplateClientListByServiceOptions contains the optional parameters for the EmailTemplateClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListTemplates.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewEmailTemplateClient().NewListByServicePager("rg1", "apimService1", &armapimanagement.EmailTemplateClientListByServiceOptions{Filter: nil,
	Top:  nil,
	Skip: 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.EmailTemplateCollection = armapimanagement.EmailTemplateCollection{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.EmailTemplateContract{
	// 		{
	// 			Name: to.Ptr("ApplicationApprovedNotificationMessage"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/templates"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/templates/ApplicationApprovedNotificationMessage"),
	// 			Properties: &armapimanagement.EmailTemplateContractProperties{
	// 				Description: to.Ptr("Developers who submitted their application for publication in the application gallery on the developer portal receive this email after their submission is approved."),
	// 				Body: to.Ptr("<!DOCTYPE html >\r\n<html>\r\n  <head />\r\n  <body>\r\n    <p style=\"font-size:12pt;font-family:'Segoe UI'\">Dear $DevFirstName $DevLastName,</p>\r\n    <p style=\"font-size:12pt;font-family:'Segoe UI'\">\r\n          We are happy to let you know that your request to publish the $AppName application in the application gallery has been approved. Your application has been published and can be viewed <a href=\"http://$DevPortalUrl/Applications/Details/$AppId\">here</a>.\r\n        </p>\r\n    <p style=\"font-size:12pt;font-family:'Segoe UI'\">Best,</p>\r\n    <p style=\"font-size:12pt;font-family:'Segoe UI'\">The $OrganizationName API Team</p>\r\n  </body>\r\n</html>"),
	// 				IsDefault: to.Ptr(true),
	// 				Parameters: []*armapimanagement.EmailTemplateParametersContractProperties{
	// 					{
	// 						Name: to.Ptr("AppId"),
	// 						Title: to.Ptr("Application id"),
	// 					},
	// 					{
	// 						Name: to.Ptr("AppName"),
	// 						Title: to.Ptr("Application name"),
	// 					},
	// 					{
	// 						Name: to.Ptr("DevFirstName"),
	// 						Title: to.Ptr("Developer first name"),
	// 					},
	// 					{
	// 						Name: to.Ptr("DevLastName"),
	// 						Title: to.Ptr("Developer last name"),
	// 					},
	// 					{
	// 						Name: to.Ptr("OrganizationName"),
	// 						Title: to.Ptr("Organization name"),
	// 					},
	// 					{
	// 						Name: to.Ptr("DevPortalUrl"),
	// 						Title: to.Ptr("Developer portal URL"),
	// 				}},
	// 				Subject: to.Ptr("Your application $AppName is published in the application gallery"),
	// 				Title: to.Ptr("Application gallery submission approved"),
	// 			},
	// 	}},
	// }
}
Output:

func (*EmailTemplateClient) Update

func (client *EmailTemplateClient) Update(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, ifMatch string, parameters EmailTemplateUpdateParameters, options *EmailTemplateClientUpdateOptions) (EmailTemplateClientUpdateResponse, error)

Update - Updates API Management email template If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • templateName - Email Template Name Identifier.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - Update parameters.
  • options - EmailTemplateClientUpdateOptions contains the optional parameters for the EmailTemplateClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateTemplate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEmailTemplateClient().Update(ctx, "rg1", "apimService1", armapimanagement.TemplateNameNewIssueNotificationMessage, "*", armapimanagement.EmailTemplateUpdateParameters{
	Properties: &armapimanagement.EmailTemplateUpdateParameterProperties{
		Body:    to.Ptr("<!DOCTYPE html >\r\n<html>\r\n  <head />\r\n  <body>\r\n    <p style=\"font-size:12pt;font-family:'Segoe UI'\">Dear $DevFirstName $DevLastName,</p>\r\n    <p style=\"font-size:12pt;font-family:'Segoe UI'\">\r\n          We are happy to let you know that your request to publish the $AppName application in the gallery has been approved. Your application has been published and can be viewed <a href=\"http://$DevPortalUrl/Applications/Details/$AppId\">here</a>.\r\n        </p>\r\n    <p style=\"font-size:12pt;font-family:'Segoe UI'\">Best,</p>\r\n    <p style=\"font-size:12pt;font-family:'Segoe UI'\">The $OrganizationName API Team</p>\r\n  </body>\r\n</html>"),
		Subject: to.Ptr("Your request $IssueName was received"),
	},
}, 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.EmailTemplateContract = armapimanagement.EmailTemplateContract{
// 	Name: to.Ptr("NewIssueNotificationMessage"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/templates"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/templates/NewIssueNotificationMessage"),
// 	Properties: &armapimanagement.EmailTemplateContractProperties{
// 		Description: to.Ptr("This email is sent to developers after they create a new topic on the Issues page of the developer portal."),
// 		Body: to.Ptr("<!DOCTYPE html >\r\n<html>\r\n  <head />\r\n  <body>\r\n    <p style=\"font-size:12pt;font-family:'Segoe UI'\">Dear $DevFirstName $DevLastName,</p>\r\n    <p style=\"font-size:12pt;font-family:'Segoe UI'\">Thank you for contacting us. Our API team will review your issue and get back to you soon.</p>\r\n    <p style=\"font-size:12pt;font-family:'Segoe UI'\">\r\n          Click this <a href=\"http://$DevPortalUrl/issues/$IssueId\">link</a> to view or edit your request.\r\n        </p>\r\n    <p style=\"font-size:12pt;font-family:'Segoe UI'\">Best,</p>\r\n    <p style=\"font-size:12pt;font-family:'Segoe UI'\">The $OrganizationName API Team</p>\r\n  </body>\r\n</html>"),
// 		IsDefault: to.Ptr(true),
// 		Parameters: []*armapimanagement.EmailTemplateParametersContractProperties{
// 			{
// 				Name: to.Ptr("DevFirstName"),
// 				Title: to.Ptr("Developer first name"),
// 			},
// 			{
// 				Name: to.Ptr("DevLastName"),
// 				Title: to.Ptr("Developer last name"),
// 			},
// 			{
// 				Name: to.Ptr("IssueId"),
// 				Title: to.Ptr("Issue id"),
// 			},
// 			{
// 				Name: to.Ptr("IssueName"),
// 				Title: to.Ptr("Issue name"),
// 			},
// 			{
// 				Name: to.Ptr("OrganizationName"),
// 				Title: to.Ptr("Organization name"),
// 			},
// 			{
// 				Name: to.Ptr("DevPortalUrl"),
// 				Title: to.Ptr("Developer portal URL"),
// 		}},
// 		Subject: to.Ptr("Your request $IssueName was received"),
// 		Title: to.Ptr("New issue received"),
// 	},
// }
Output:

type EmailTemplateClientCreateOrUpdateOptions

type EmailTemplateClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

EmailTemplateClientCreateOrUpdateOptions contains the optional parameters for the EmailTemplateClient.CreateOrUpdate method.

type EmailTemplateClientCreateOrUpdateResponse

type EmailTemplateClientCreateOrUpdateResponse struct {
	// Email Template details.
	EmailTemplateContract
}

EmailTemplateClientCreateOrUpdateResponse contains the response from method EmailTemplateClient.CreateOrUpdate.

type EmailTemplateClientDeleteOptions

type EmailTemplateClientDeleteOptions struct {
}

EmailTemplateClientDeleteOptions contains the optional parameters for the EmailTemplateClient.Delete method.

type EmailTemplateClientDeleteResponse

type EmailTemplateClientDeleteResponse struct {
}

EmailTemplateClientDeleteResponse contains the response from method EmailTemplateClient.Delete.

type EmailTemplateClientGetEntityTagOptions

type EmailTemplateClientGetEntityTagOptions struct {
}

EmailTemplateClientGetEntityTagOptions contains the optional parameters for the EmailTemplateClient.GetEntityTag method.

type EmailTemplateClientGetEntityTagResponse

type EmailTemplateClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

EmailTemplateClientGetEntityTagResponse contains the response from method EmailTemplateClient.GetEntityTag.

type EmailTemplateClientGetOptions

type EmailTemplateClientGetOptions struct {
}

EmailTemplateClientGetOptions contains the optional parameters for the EmailTemplateClient.Get method.

type EmailTemplateClientGetResponse

type EmailTemplateClientGetResponse struct {
	// Email Template details.
	EmailTemplateContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

EmailTemplateClientGetResponse contains the response from method EmailTemplateClient.Get.

type EmailTemplateClientListByServiceOptions

type EmailTemplateClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

EmailTemplateClientListByServiceOptions contains the optional parameters for the EmailTemplateClient.NewListByServicePager method.

type EmailTemplateClientListByServiceResponse

type EmailTemplateClientListByServiceResponse struct {
	// Paged email template list representation.
	EmailTemplateCollection
}

EmailTemplateClientListByServiceResponse contains the response from method EmailTemplateClient.NewListByServicePager.

type EmailTemplateClientUpdateOptions

type EmailTemplateClientUpdateOptions struct {
}

EmailTemplateClientUpdateOptions contains the optional parameters for the EmailTemplateClient.Update method.

type EmailTemplateClientUpdateResponse

type EmailTemplateClientUpdateResponse struct {
	// Email Template details.
	EmailTemplateContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

EmailTemplateClientUpdateResponse contains the response from method EmailTemplateClient.Update.

type EmailTemplateCollection

type EmailTemplateCollection struct {
	// Total record count number across all pages.
	Count *int64

	// Next page link if any.
	NextLink *string

	// Page values.
	Value []*EmailTemplateContract
}

EmailTemplateCollection - Paged email template list representation.

func (EmailTemplateCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EmailTemplateCollection.

func (*EmailTemplateCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EmailTemplateCollection.

type EmailTemplateContract

type EmailTemplateContract struct {
	// Email Template entity contract properties.
	Properties *EmailTemplateContractProperties

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

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

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

EmailTemplateContract - Email Template details.

func (EmailTemplateContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EmailTemplateContract.

func (*EmailTemplateContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EmailTemplateContract.

type EmailTemplateContractProperties

type EmailTemplateContractProperties struct {
	// REQUIRED; Email Template Body. This should be a valid XDocument
	Body *string

	// REQUIRED; Subject of the Template.
	Subject *string

	// Description of the Email Template.
	Description *string

	// Email Template Parameter values.
	Parameters []*EmailTemplateParametersContractProperties

	// Title of the Template.
	Title *string

	// READ-ONLY; Whether the template is the default template provided by API Management or has been edited.
	IsDefault *bool
}

EmailTemplateContractProperties - Email Template Contract properties.

func (EmailTemplateContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EmailTemplateContractProperties.

func (*EmailTemplateContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EmailTemplateContractProperties.

type EmailTemplateParametersContractProperties

type EmailTemplateParametersContractProperties struct {
	// Template parameter description.
	Description *string

	// Template parameter name.
	Name *string

	// Template parameter title.
	Title *string
}

EmailTemplateParametersContractProperties - Email Template Parameter contract.

func (EmailTemplateParametersContractProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type EmailTemplateParametersContractProperties.

func (*EmailTemplateParametersContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EmailTemplateParametersContractProperties.

type EmailTemplateUpdateParameterProperties

type EmailTemplateUpdateParameterProperties struct {
	// Email Template Body. This should be a valid XDocument
	Body *string

	// Description of the Email Template.
	Description *string

	// Email Template Parameter values.
	Parameters []*EmailTemplateParametersContractProperties

	// Subject of the Template.
	Subject *string

	// Title of the Template.
	Title *string
}

EmailTemplateUpdateParameterProperties - Email Template Update Contract properties.

func (EmailTemplateUpdateParameterProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EmailTemplateUpdateParameterProperties.

func (*EmailTemplateUpdateParameterProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EmailTemplateUpdateParameterProperties.

type EmailTemplateUpdateParameters

type EmailTemplateUpdateParameters struct {
	// Email Template Update contract properties.
	Properties *EmailTemplateUpdateParameterProperties
}

EmailTemplateUpdateParameters - Email Template update Parameters.

func (EmailTemplateUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EmailTemplateUpdateParameters.

func (*EmailTemplateUpdateParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EmailTemplateUpdateParameters.

type EndpointDependency

type EndpointDependency struct {
	// The domain name of the dependency.
	DomainName *string

	// The Ports used when connecting to DomainName.
	EndpointDetails []*EndpointDetail
}

EndpointDependency - A domain name that a service is reached at.

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 {
	// The port an endpoint is connected to.
	Port *int32

	// The region of the dependency.
	Region *string
}

EndpointDetail - Current TCP connectivity information from the Api Management Service to a single 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 ErrorFieldContract

type ErrorFieldContract struct {
	// Property level error code.
	Code *string

	// Human-readable representation of property-level error.
	Message *string

	// Property name.
	Target *string
}

ErrorFieldContract - Error Field contract.

func (ErrorFieldContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorFieldContract.

func (*ErrorFieldContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorFieldContract.

type ErrorResponse

type ErrorResponse struct {
	// Properties of the Error Response.
	Error *ErrorResponseBody
}

ErrorResponse - Error Response.

func (ErrorResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorResponse.

func (*ErrorResponse) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.

type ErrorResponseBody

type ErrorResponseBody struct {
	// Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
	Code *string

	// The list of invalid fields send in request, in case of validation error.
	Details []*ErrorFieldContract

	// Human-readable representation of the error.
	Message *string
}

ErrorResponseBody - Error Body contract.

func (ErrorResponseBody) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorResponseBody.

func (*ErrorResponseBody) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponseBody.

type ExportAPI

type ExportAPI string
const (
	ExportAPITrue ExportAPI = "true"
)

func PossibleExportAPIValues

func PossibleExportAPIValues() []ExportAPI

PossibleExportAPIValues returns the possible values for the ExportAPI const type.

type ExportFormat

type ExportFormat string
const (
	// ExportFormatOpenapi - Export the Api Definition in OpenAPI 3.0 Specification as YAML document to Storage Blob.
	ExportFormatOpenapi ExportFormat = "openapi-link"
	// ExportFormatOpenapiJSON - Export the Api Definition in OpenAPI 3.0 Specification as JSON document to Storage Blob.
	ExportFormatOpenapiJSON ExportFormat = "openapi+json-link"
	// ExportFormatSwagger - Export the Api Definition in OpenAPI 2.0 Specification as JSON document to the Storage Blob.
	ExportFormatSwagger ExportFormat = "swagger-link"
	// ExportFormatWadl - Export the Api Definition in WADL Schema to Storage Blob.
	ExportFormatWadl ExportFormat = "wadl-link"
	// ExportFormatWsdl - Export the Api Definition in WSDL Schema to Storage Blob. This is only supported for APIs of Type `soap`
	ExportFormatWsdl ExportFormat = "wsdl-link"
)

func PossibleExportFormatValues

func PossibleExportFormatValues() []ExportFormat

PossibleExportFormatValues returns the possible values for the ExportFormat const type.

type ExportResultFormat

type ExportResultFormat string

ExportResultFormat - Format in which the API Details are exported to the Storage Blob with Sas Key valid for 5 minutes.

const (
	// ExportResultFormatOpenAPI - Export the API Definition in OpenAPI Specification 3.0 to Storage Blob.
	ExportResultFormatOpenAPI ExportResultFormat = "openapi-link"
	// ExportResultFormatSwagger - The API Definition is exported in OpenAPI Specification 2.0 format to the Storage Blob.
	ExportResultFormatSwagger ExportResultFormat = "swagger-link-json"
	// ExportResultFormatWadl - Export the API Definition in WADL Schema to Storage Blob.
	ExportResultFormatWadl ExportResultFormat = "wadl-link-json"
	// ExportResultFormatWsdl - The API Definition is exported in WSDL Schema to Storage Blob. This is only supported for APIs
	// of Type `soap`
	ExportResultFormatWsdl ExportResultFormat = "wsdl-link+xml"
)

func PossibleExportResultFormatValues

func PossibleExportResultFormatValues() []ExportResultFormat

PossibleExportResultFormatValues returns the possible values for the ExportResultFormat const type.

type GatewayAPIClient

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

GatewayAPIClient contains the methods for the GatewayAPI group. Don't use this type directly, use NewGatewayAPIClient() instead.

func NewGatewayAPIClient

func NewGatewayAPIClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GatewayAPIClient, error)

NewGatewayAPIClient creates a new instance of GatewayAPIClient 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 (*GatewayAPIClient) CreateOrUpdate

func (client *GatewayAPIClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, apiID string, options *GatewayAPIClientCreateOrUpdateOptions) (GatewayAPIClientCreateOrUpdateResponse, error)

CreateOrUpdate - Adds an API to the specified Gateway. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • options - GatewayAPIClientCreateOrUpdateOptions contains the optional parameters for the GatewayAPIClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGatewayApi.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewGatewayAPIClient().CreateOrUpdate(ctx, "rg1", "apimService1", "gw1", "echo-api", &armapimanagement.GatewayAPIClientCreateOrUpdateOptions{Parameters: &armapimanagement.AssociationContract{
	Properties: &armapimanagement.AssociationContractProperties{
		ProvisioningState: to.Ptr("created"),
	},
},
})
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.APIContract = armapimanagement.APIContract{
// 	Name: to.Ptr("echo-api"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/gateways/apis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/apis/echo-api"),
// 	Properties: &armapimanagement.APIContractProperties{
// 		APIRevision: to.Ptr("1"),
// 		IsCurrent: to.Ptr(true),
// 		SubscriptionKeyParameterNames: &armapimanagement.SubscriptionKeyParameterNamesContract{
// 			Header: to.Ptr("Ocp-Apim-Subscription-Key"),
// 			Query: to.Ptr("subscription-key"),
// 		},
// 		Path: to.Ptr(""),
// 		DisplayName: to.Ptr("EchoApi"),
// 		Protocols: []*armapimanagement.Protocol{
// 			to.Ptr(armapimanagement.ProtocolHTTP),
// 			to.Ptr(armapimanagement.ProtocolHTTPS)},
// 			ServiceURL: to.Ptr("https://contoso.com/apis/echo"),
// 		},
// 	}
Output:

func (*GatewayAPIClient) Delete

func (client *GatewayAPIClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, apiID string, options *GatewayAPIClientDeleteOptions) (GatewayAPIClientDeleteResponse, error)

Delete - Deletes the specified API from the specified Gateway. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • options - GatewayAPIClientDeleteOptions contains the optional parameters for the GatewayAPIClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGatewayApi.json

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

func (*GatewayAPIClient) GetEntityTag

func (client *GatewayAPIClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, apiID string, options *GatewayAPIClientGetEntityTagOptions) (GatewayAPIClientGetEntityTagResponse, error)

GetEntityTag - Checks that API entity specified by identifier is associated with the Gateway entity.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'
  • apiID - API identifier. Must be unique in the current API Management service instance.
  • options - GatewayAPIClientGetEntityTagOptions contains the optional parameters for the GatewayAPIClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGatewayApi.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewGatewayAPIClient().GetEntityTag(ctx, "rg1", "apimService1", "gw1", "api1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*GatewayAPIClient) NewListByServicePager

func (client *GatewayAPIClient) NewListByServicePager(resourceGroupName string, serviceName string, gatewayID string, options *GatewayAPIClientListByServiceOptions) *runtime.Pager[GatewayAPIClientListByServiceResponse]

NewListByServicePager - Lists a collection of the APIs associated with a gateway.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'
  • options - GatewayAPIClientListByServiceOptions contains the optional parameters for the GatewayAPIClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGatewayApis.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewGatewayAPIClient().NewListByServicePager("rg1", "apimService1", "gw1", &armapimanagement.GatewayAPIClientListByServiceOptions{Filter: nil,
	Top:  nil,
	Skip: 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.APICollection = armapimanagement.APICollection{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.APIContract{
	// 		{
	// 			Name: to.Ptr("57681820a40f7eb6c49f6aca"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/gateways/apis"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/apis/57681820a40f7eb6c49f6aca"),
	// 			Properties: &armapimanagement.APIContractProperties{
	// 				Description: to.Ptr("description_57681820a40f7eb6c49f6acc"),
	// 				APIRevision: to.Ptr("1"),
	// 				IsCurrent: to.Ptr(true),
	// 				Path: to.Ptr("suffix_57681820a40f7eb6c49f6ace"),
	// 				DisplayName: to.Ptr("api_57681820a40f7eb6c49f6acb"),
	// 				Protocols: []*armapimanagement.Protocol{
	// 					to.Ptr(armapimanagement.ProtocolHTTPS)},
	// 					ServiceURL: to.Ptr("http://contoso/57681820a40f7eb6c49f6acd"),
	// 				},
	// 		}},
	// 	}
}
Output:

type GatewayAPIClientCreateOrUpdateOptions

type GatewayAPIClientCreateOrUpdateOptions struct {
	Parameters *AssociationContract
}

GatewayAPIClientCreateOrUpdateOptions contains the optional parameters for the GatewayAPIClient.CreateOrUpdate method.

type GatewayAPIClientCreateOrUpdateResponse

type GatewayAPIClientCreateOrUpdateResponse struct {
	// API details.
	APIContract
}

GatewayAPIClientCreateOrUpdateResponse contains the response from method GatewayAPIClient.CreateOrUpdate.

type GatewayAPIClientDeleteOptions

type GatewayAPIClientDeleteOptions struct {
}

GatewayAPIClientDeleteOptions contains the optional parameters for the GatewayAPIClient.Delete method.

type GatewayAPIClientDeleteResponse

type GatewayAPIClientDeleteResponse struct {
}

GatewayAPIClientDeleteResponse contains the response from method GatewayAPIClient.Delete.

type GatewayAPIClientGetEntityTagOptions

type GatewayAPIClientGetEntityTagOptions struct {
}

GatewayAPIClientGetEntityTagOptions contains the optional parameters for the GatewayAPIClient.GetEntityTag method.

type GatewayAPIClientGetEntityTagResponse

type GatewayAPIClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

GatewayAPIClientGetEntityTagResponse contains the response from method GatewayAPIClient.GetEntityTag.

type GatewayAPIClientListByServiceOptions

type GatewayAPIClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

GatewayAPIClientListByServiceOptions contains the optional parameters for the GatewayAPIClient.NewListByServicePager method.

type GatewayAPIClientListByServiceResponse

type GatewayAPIClientListByServiceResponse struct {
	// Paged API list representation.
	APICollection
}

GatewayAPIClientListByServiceResponse contains the response from method GatewayAPIClient.NewListByServicePager.

type GatewayCertificateAuthorityClient

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

GatewayCertificateAuthorityClient contains the methods for the GatewayCertificateAuthority group. Don't use this type directly, use NewGatewayCertificateAuthorityClient() instead.

func NewGatewayCertificateAuthorityClient

func NewGatewayCertificateAuthorityClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GatewayCertificateAuthorityClient, error)

NewGatewayCertificateAuthorityClient creates a new instance of GatewayCertificateAuthorityClient 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 (*GatewayCertificateAuthorityClient) CreateOrUpdate

CreateOrUpdate - Assign Certificate entity to Gateway entity as Certificate Authority. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'
  • certificateID - Identifier of the certificate entity. Must be unique in the current API Management service instance.
  • options - GatewayCertificateAuthorityClientCreateOrUpdateOptions contains the optional parameters for the GatewayCertificateAuthorityClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGatewayCertificateAuthority.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewGatewayCertificateAuthorityClient().CreateOrUpdate(ctx, "rg1", "apimService1", "gw1", "cert1", armapimanagement.GatewayCertificateAuthorityContract{
	Properties: &armapimanagement.GatewayCertificateAuthorityContractProperties{
		IsTrusted: to.Ptr(false),
	},
}, &armapimanagement.GatewayCertificateAuthorityClientCreateOrUpdateOptions{IfMatch: 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.GatewayCertificateAuthorityContract = armapimanagement.GatewayCertificateAuthorityContract{
// 	Name: to.Ptr("cert1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/gateways/certificateAuthorities"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/certificateAuthorities/cert1"),
// 	Properties: &armapimanagement.GatewayCertificateAuthorityContractProperties{
// 		IsTrusted: to.Ptr(false),
// 	},
// }
Output:

func (*GatewayCertificateAuthorityClient) Delete

func (client *GatewayCertificateAuthorityClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, certificateID string, ifMatch string, options *GatewayCertificateAuthorityClientDeleteOptions) (GatewayCertificateAuthorityClientDeleteResponse, error)

Delete - Remove relationship between Certificate Authority and Gateway entity. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'
  • certificateID - Identifier of the certificate entity. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - GatewayCertificateAuthorityClientDeleteOptions contains the optional parameters for the GatewayCertificateAuthorityClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGatewayCertificateAuthority.json

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

func (*GatewayCertificateAuthorityClient) Get

Get - Get assigned Gateway Certificate Authority details. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'
  • certificateID - Identifier of the certificate entity. Must be unique in the current API Management service instance.
  • options - GatewayCertificateAuthorityClientGetOptions contains the optional parameters for the GatewayCertificateAuthorityClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGatewayCertificateAuthority.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewGatewayCertificateAuthorityClient().Get(ctx, "rg1", "apimService1", "gw1", "cert1", 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.GatewayCertificateAuthorityContract = armapimanagement.GatewayCertificateAuthorityContract{
// 	Name: to.Ptr("cert1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/gateways/certificateAuthorities"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/certificateAuthorities/cert1"),
// 	Properties: &armapimanagement.GatewayCertificateAuthorityContractProperties{
// 		IsTrusted: to.Ptr(true),
// 	},
// }
Output:

func (*GatewayCertificateAuthorityClient) GetEntityTag

GetEntityTag - Checks if Certificate entity is assigned to Gateway entity as Certificate Authority.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'
  • certificateID - Identifier of the certificate entity. Must be unique in the current API Management service instance.
  • options - GatewayCertificateAuthorityClientGetEntityTagOptions contains the optional parameters for the GatewayCertificateAuthorityClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGatewayCertificateAuthority.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewGatewayCertificateAuthorityClient().GetEntityTag(ctx, "rg1", "apimService1", "gw1", "cert1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*GatewayCertificateAuthorityClient) NewListByServicePager

NewListByServicePager - Lists the collection of Certificate Authorities for the specified Gateway entity.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'
  • options - GatewayCertificateAuthorityClientListByServiceOptions contains the optional parameters for the GatewayCertificateAuthorityClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGatewayCertificateAuthorities.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewGatewayCertificateAuthorityClient().NewListByServicePager("rg1", "apimService1", "gw1", &armapimanagement.GatewayCertificateAuthorityClientListByServiceOptions{Filter: nil,
	Top:  nil,
	Skip: 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.GatewayCertificateAuthorityCollection = armapimanagement.GatewayCertificateAuthorityCollection{
	// 	Value: []*armapimanagement.GatewayCertificateAuthorityContract{
	// 		{
	// 			Name: to.Ptr("cert1"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/gateways/certificateAuthorities"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/certificateAuthorities/cert1"),
	// 			Properties: &armapimanagement.GatewayCertificateAuthorityContractProperties{
	// 				IsTrusted: to.Ptr(false),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("cert2"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/gateways/certificateAuthorities"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/certificateAuthorities/cert2"),
	// 			Properties: &armapimanagement.GatewayCertificateAuthorityContractProperties{
	// 				IsTrusted: to.Ptr(true),
	// 			},
	// 	}},
	// }
}
Output:

type GatewayCertificateAuthorityClientCreateOrUpdateOptions

type GatewayCertificateAuthorityClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

GatewayCertificateAuthorityClientCreateOrUpdateOptions contains the optional parameters for the GatewayCertificateAuthorityClient.CreateOrUpdate method.

type GatewayCertificateAuthorityClientCreateOrUpdateResponse

type GatewayCertificateAuthorityClientCreateOrUpdateResponse struct {
	// Gateway certificate authority details.
	GatewayCertificateAuthorityContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GatewayCertificateAuthorityClientCreateOrUpdateResponse contains the response from method GatewayCertificateAuthorityClient.CreateOrUpdate.

type GatewayCertificateAuthorityClientDeleteOptions

type GatewayCertificateAuthorityClientDeleteOptions struct {
}

GatewayCertificateAuthorityClientDeleteOptions contains the optional parameters for the GatewayCertificateAuthorityClient.Delete method.

type GatewayCertificateAuthorityClientDeleteResponse

type GatewayCertificateAuthorityClientDeleteResponse struct {
}

GatewayCertificateAuthorityClientDeleteResponse contains the response from method GatewayCertificateAuthorityClient.Delete.

type GatewayCertificateAuthorityClientGetEntityTagOptions

type GatewayCertificateAuthorityClientGetEntityTagOptions struct {
}

GatewayCertificateAuthorityClientGetEntityTagOptions contains the optional parameters for the GatewayCertificateAuthorityClient.GetEntityTag method.

type GatewayCertificateAuthorityClientGetEntityTagResponse

type GatewayCertificateAuthorityClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

GatewayCertificateAuthorityClientGetEntityTagResponse contains the response from method GatewayCertificateAuthorityClient.GetEntityTag.

type GatewayCertificateAuthorityClientGetOptions

type GatewayCertificateAuthorityClientGetOptions struct {
}

GatewayCertificateAuthorityClientGetOptions contains the optional parameters for the GatewayCertificateAuthorityClient.Get method.

type GatewayCertificateAuthorityClientGetResponse

type GatewayCertificateAuthorityClientGetResponse struct {
	// Gateway certificate authority details.
	GatewayCertificateAuthorityContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GatewayCertificateAuthorityClientGetResponse contains the response from method GatewayCertificateAuthorityClient.Get.

type GatewayCertificateAuthorityClientListByServiceOptions

type GatewayCertificateAuthorityClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | eq, ne | |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

GatewayCertificateAuthorityClientListByServiceOptions contains the optional parameters for the GatewayCertificateAuthorityClient.NewListByServicePager method.

type GatewayCertificateAuthorityClientListByServiceResponse

type GatewayCertificateAuthorityClientListByServiceResponse struct {
	// Paged Gateway certificate authority list representation.
	GatewayCertificateAuthorityCollection
}

GatewayCertificateAuthorityClientListByServiceResponse contains the response from method GatewayCertificateAuthorityClient.NewListByServicePager.

type GatewayCertificateAuthorityCollection

type GatewayCertificateAuthorityCollection struct {
	// READ-ONLY; Next page link if any.
	NextLink *string

	// READ-ONLY; Page values.
	Value []*GatewayCertificateAuthorityContract
}

GatewayCertificateAuthorityCollection - Paged Gateway certificate authority list representation.

func (GatewayCertificateAuthorityCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GatewayCertificateAuthorityCollection.

func (*GatewayCertificateAuthorityCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type GatewayCertificateAuthorityCollection.

type GatewayCertificateAuthorityContract

type GatewayCertificateAuthorityContract struct {
	// Gateway certificate authority details.
	Properties *GatewayCertificateAuthorityContractProperties

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

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

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

GatewayCertificateAuthorityContract - Gateway certificate authority details.

func (GatewayCertificateAuthorityContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GatewayCertificateAuthorityContract.

func (*GatewayCertificateAuthorityContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type GatewayCertificateAuthorityContract.

type GatewayCertificateAuthorityContractProperties

type GatewayCertificateAuthorityContractProperties struct {
	// Determines whether certificate authority is trusted.
	IsTrusted *bool
}

GatewayCertificateAuthorityContractProperties - Gateway certificate authority details.

func (GatewayCertificateAuthorityContractProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type GatewayCertificateAuthorityContractProperties.

func (*GatewayCertificateAuthorityContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type GatewayCertificateAuthorityContractProperties.

type GatewayClient

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

GatewayClient contains the methods for the Gateway group. Don't use this type directly, use NewGatewayClient() instead.

func NewGatewayClient

func NewGatewayClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GatewayClient, error)

NewGatewayClient creates a new instance of GatewayClient 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 (*GatewayClient) CreateOrUpdate

func (client *GatewayClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, parameters GatewayContract, options *GatewayClientCreateOrUpdateOptions) (GatewayClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates a Gateway to be used in Api Management instance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'
  • options - GatewayClientCreateOrUpdateOptions contains the optional parameters for the GatewayClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGateway.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewGatewayClient().CreateOrUpdate(ctx, "rg1", "apimService1", "gw1", armapimanagement.GatewayContract{
	Properties: &armapimanagement.GatewayContractProperties{
		Description: to.Ptr("my gateway 1"),
		LocationData: &armapimanagement.ResourceLocationDataContract{
			Name: to.Ptr("my location"),
		},
	},
}, &armapimanagement.GatewayClientCreateOrUpdateOptions{IfMatch: 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.GatewayContract = armapimanagement.GatewayContract{
// 	Name: to.Ptr("a1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/gateways"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1"),
// 	Properties: &armapimanagement.GatewayContractProperties{
// 		Description: to.Ptr("my gateway 1"),
// 		LocationData: &armapimanagement.ResourceLocationDataContract{
// 			Name: to.Ptr("my location"),
// 		},
// 	},
// }
Output:

func (*GatewayClient) Delete

func (client *GatewayClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, ifMatch string, options *GatewayClientDeleteOptions) (GatewayClientDeleteResponse, error)

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

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - GatewayClientDeleteOptions contains the optional parameters for the GatewayClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGateway.json

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

func (*GatewayClient) GenerateToken

func (client *GatewayClient) GenerateToken(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, parameters GatewayTokenRequestContract, options *GatewayClientGenerateTokenOptions) (GatewayClientGenerateTokenResponse, error)

GenerateToken - Gets the Shared Access Authorization Token for the gateway. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'
  • options - GatewayClientGenerateTokenOptions contains the optional parameters for the GatewayClient.GenerateToken method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGatewayGenerateToken.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewGatewayClient().GenerateToken(ctx, "rg1", "apimService1", "gw1", armapimanagement.GatewayTokenRequestContract{
	Expiry:  to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-21T00:44:24.284Z"); return t }()),
	KeyType: to.Ptr(armapimanagement.KeyTypePrimary),
}, 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.GatewayTokenContract = armapimanagement.GatewayTokenContract{
// 	Value: to.Ptr("gw1&201904210044&9A1GR1f5WIhFvFmzQG+xxxxxxxxxxx/kBeu87DWad3tkasUXuvPL+MgzlwUHyg=="),
// }
Output:

func (*GatewayClient) Get

func (client *GatewayClient) Get(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, options *GatewayClientGetOptions) (GatewayClientGetResponse, error)

Get - Gets the details of the Gateway specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'
  • options - GatewayClientGetOptions contains the optional parameters for the GatewayClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGateway.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewGatewayClient().Get(ctx, "rg1", "apimService1", "gw1", 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.GatewayContract = armapimanagement.GatewayContract{
// 	Name: to.Ptr("a1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/gateways"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1"),
// 	Properties: &armapimanagement.GatewayContractProperties{
// 		Description: to.Ptr("my gateway 1"),
// 		LocationData: &armapimanagement.ResourceLocationDataContract{
// 			Name: to.Ptr("my location"),
// 		},
// 	},
// }
Output:

func (*GatewayClient) GetEntityTag

func (client *GatewayClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, options *GatewayClientGetEntityTagOptions) (GatewayClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the Gateway specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'
  • options - GatewayClientGetEntityTagOptions contains the optional parameters for the GatewayClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGateway.json

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

func (*GatewayClient) ListKeys

func (client *GatewayClient) ListKeys(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, options *GatewayClientListKeysOptions) (GatewayClientListKeysResponse, error)

ListKeys - Retrieves gateway keys. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'
  • options - GatewayClientListKeysOptions contains the optional parameters for the GatewayClient.ListKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGatewayListKeys.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewGatewayClient().ListKeys(ctx, "rg1", "apimService1", "gw1", 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.GatewayKeysContract = armapimanagement.GatewayKeysContract{
// 	Primary: to.Ptr("primary_key_value"),
// 	Secondary: to.Ptr("secondary_key_value"),
// }
Output:

func (*GatewayClient) NewListByServicePager

func (client *GatewayClient) NewListByServicePager(resourceGroupName string, serviceName string, options *GatewayClientListByServiceOptions) *runtime.Pager[GatewayClientListByServiceResponse]

NewListByServicePager - Lists a collection of gateways registered with service instance.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - GatewayClientListByServiceOptions contains the optional parameters for the GatewayClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGateways.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewGatewayClient().NewListByServicePager("rg1", "apimService1", &armapimanagement.GatewayClientListByServiceOptions{Filter: nil,
	Top:  nil,
	Skip: 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.GatewayCollection = armapimanagement.GatewayCollection{
	// 	Count: to.Ptr[int64](2),
	// 	Value: []*armapimanagement.GatewayContract{
	// 		{
	// 			Name: to.Ptr("a1"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/gateways"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1"),
	// 			Properties: &armapimanagement.GatewayContractProperties{
	// 				Description: to.Ptr("my gateway 1"),
	// 				LocationData: &armapimanagement.ResourceLocationDataContract{
	// 					Name: to.Ptr("my location 1"),
	// 				},
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("5a73933b8f27f7cc82a2d533"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/gateways"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw2"),
	// 			Properties: &armapimanagement.GatewayContractProperties{
	// 				Description: to.Ptr("my gateway 2"),
	// 				LocationData: &armapimanagement.ResourceLocationDataContract{
	// 					Name: to.Ptr("my location 2"),
	// 				},
	// 			},
	// 	}},
	// }
}
Output:

func (*GatewayClient) RegenerateKey

func (client *GatewayClient) RegenerateKey(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, parameters GatewayKeyRegenerationRequestContract, options *GatewayClientRegenerateKeyOptions) (GatewayClientRegenerateKeyResponse, error)

RegenerateKey - Regenerates specified gateway key invalidating any tokens created with it. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'
  • options - GatewayClientRegenerateKeyOptions contains the optional parameters for the GatewayClient.RegenerateKey method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGatewayRegenerateKey.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewGatewayClient().RegenerateKey(ctx, "rg1", "apimService1", "gwId", armapimanagement.GatewayKeyRegenerationRequestContract{
	KeyType: to.Ptr(armapimanagement.KeyTypePrimary),
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*GatewayClient) Update

func (client *GatewayClient) Update(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, ifMatch string, parameters GatewayContract, options *GatewayClientUpdateOptions) (GatewayClientUpdateResponse, error)

Update - Updates the details of the gateway specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - GatewayClientUpdateOptions contains the optional parameters for the GatewayClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateGateway.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewGatewayClient().Update(ctx, "rg1", "apimService1", "gw1", "*", armapimanagement.GatewayContract{
	Properties: &armapimanagement.GatewayContractProperties{
		Description: to.Ptr("my gateway 1"),
		LocationData: &armapimanagement.ResourceLocationDataContract{
			Name: to.Ptr("my location"),
		},
	},
}, 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.GatewayContract = armapimanagement.GatewayContract{
// 	Name: to.Ptr("a1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/gateways"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1"),
// 	Properties: &armapimanagement.GatewayContractProperties{
// 		Description: to.Ptr("my gateway 1"),
// 		LocationData: &armapimanagement.ResourceLocationDataContract{
// 			Name: to.Ptr("my location"),
// 		},
// 	},
// }
Output:

type GatewayClientCreateOrUpdateOptions

type GatewayClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

GatewayClientCreateOrUpdateOptions contains the optional parameters for the GatewayClient.CreateOrUpdate method.

type GatewayClientCreateOrUpdateResponse

type GatewayClientCreateOrUpdateResponse struct {
	// Gateway details.
	GatewayContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GatewayClientCreateOrUpdateResponse contains the response from method GatewayClient.CreateOrUpdate.

type GatewayClientDeleteOptions

type GatewayClientDeleteOptions struct {
}

GatewayClientDeleteOptions contains the optional parameters for the GatewayClient.Delete method.

type GatewayClientDeleteResponse

type GatewayClientDeleteResponse struct {
}

GatewayClientDeleteResponse contains the response from method GatewayClient.Delete.

type GatewayClientGenerateTokenOptions

type GatewayClientGenerateTokenOptions struct {
}

GatewayClientGenerateTokenOptions contains the optional parameters for the GatewayClient.GenerateToken method.

type GatewayClientGenerateTokenResponse

type GatewayClientGenerateTokenResponse struct {
	// Gateway access token.
	GatewayTokenContract
}

GatewayClientGenerateTokenResponse contains the response from method GatewayClient.GenerateToken.

type GatewayClientGetEntityTagOptions

type GatewayClientGetEntityTagOptions struct {
}

GatewayClientGetEntityTagOptions contains the optional parameters for the GatewayClient.GetEntityTag method.

type GatewayClientGetEntityTagResponse

type GatewayClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

GatewayClientGetEntityTagResponse contains the response from method GatewayClient.GetEntityTag.

type GatewayClientGetOptions

type GatewayClientGetOptions struct {
}

GatewayClientGetOptions contains the optional parameters for the GatewayClient.Get method.

type GatewayClientGetResponse

type GatewayClientGetResponse struct {
	// Gateway details.
	GatewayContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GatewayClientGetResponse contains the response from method GatewayClient.Get.

type GatewayClientListByServiceOptions

type GatewayClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | region | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

GatewayClientListByServiceOptions contains the optional parameters for the GatewayClient.NewListByServicePager method.

type GatewayClientListByServiceResponse

type GatewayClientListByServiceResponse struct {
	// Paged Gateway list representation.
	GatewayCollection
}

GatewayClientListByServiceResponse contains the response from method GatewayClient.NewListByServicePager.

type GatewayClientListKeysOptions

type GatewayClientListKeysOptions struct {
}

GatewayClientListKeysOptions contains the optional parameters for the GatewayClient.ListKeys method.

type GatewayClientListKeysResponse

type GatewayClientListKeysResponse struct {
	// Gateway authentication keys.
	GatewayKeysContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GatewayClientListKeysResponse contains the response from method GatewayClient.ListKeys.

type GatewayClientRegenerateKeyOptions

type GatewayClientRegenerateKeyOptions struct {
}

GatewayClientRegenerateKeyOptions contains the optional parameters for the GatewayClient.RegenerateKey method.

type GatewayClientRegenerateKeyResponse

type GatewayClientRegenerateKeyResponse struct {
}

GatewayClientRegenerateKeyResponse contains the response from method GatewayClient.RegenerateKey.

type GatewayClientUpdateOptions

type GatewayClientUpdateOptions struct {
}

GatewayClientUpdateOptions contains the optional parameters for the GatewayClient.Update method.

type GatewayClientUpdateResponse

type GatewayClientUpdateResponse struct {
	// Gateway details.
	GatewayContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GatewayClientUpdateResponse contains the response from method GatewayClient.Update.

type GatewayCollection

type GatewayCollection struct {
	// Total record count number across all pages.
	Count *int64

	// READ-ONLY; Next page link if any.
	NextLink *string

	// READ-ONLY; Page values.
	Value []*GatewayContract
}

GatewayCollection - Paged Gateway list representation.

func (GatewayCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GatewayCollection.

func (*GatewayCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type GatewayCollection.

type GatewayContract

type GatewayContract struct {
	// Gateway details.
	Properties *GatewayContractProperties

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

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

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

GatewayContract - Gateway details.

func (GatewayContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GatewayContract.

func (*GatewayContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type GatewayContract.

type GatewayContractProperties

type GatewayContractProperties struct {
	// Gateway description
	Description *string

	// Gateway location.
	LocationData *ResourceLocationDataContract
}

GatewayContractProperties - Properties of the Gateway contract.

func (GatewayContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GatewayContractProperties.

func (*GatewayContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type GatewayContractProperties.

type GatewayHostnameConfigurationClient

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

GatewayHostnameConfigurationClient contains the methods for the GatewayHostnameConfiguration group. Don't use this type directly, use NewGatewayHostnameConfigurationClient() instead.

func NewGatewayHostnameConfigurationClient

func NewGatewayHostnameConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GatewayHostnameConfigurationClient, error)

NewGatewayHostnameConfigurationClient creates a new instance of GatewayHostnameConfigurationClient 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 (*GatewayHostnameConfigurationClient) CreateOrUpdate

CreateOrUpdate - Creates of updates hostname configuration for a Gateway. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'
  • hcID - Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity.
  • options - GatewayHostnameConfigurationClientCreateOrUpdateOptions contains the optional parameters for the GatewayHostnameConfigurationClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGatewayHostnameConfiguration.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewGatewayHostnameConfigurationClient().CreateOrUpdate(ctx, "rg1", "apimService1", "gw1", "default", armapimanagement.GatewayHostnameConfigurationContract{
	Properties: &armapimanagement.GatewayHostnameConfigurationContractProperties{
		CertificateID:              to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1"),
		Hostname:                   to.Ptr("*"),
		HTTP2Enabled:               to.Ptr(true),
		NegotiateClientCertificate: to.Ptr(false),
		Tls10Enabled:               to.Ptr(false),
		Tls11Enabled:               to.Ptr(false),
	},
}, &armapimanagement.GatewayHostnameConfigurationClientCreateOrUpdateOptions{IfMatch: 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.GatewayHostnameConfigurationContract = armapimanagement.GatewayHostnameConfigurationContract{
// 	Name: to.Ptr("default"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/gateways/hostnameConfigurations"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/hostnameConfigurations/default"),
// 	Properties: &armapimanagement.GatewayHostnameConfigurationContractProperties{
// 		CertificateID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1"),
// 		Hostname: to.Ptr("*"),
// 		HTTP2Enabled: to.Ptr(true),
// 		NegotiateClientCertificate: to.Ptr(false),
// 		Tls10Enabled: to.Ptr(false),
// 		Tls11Enabled: to.Ptr(false),
// 	},
// }
Output:

func (*GatewayHostnameConfigurationClient) Delete

Delete - Deletes the specified hostname configuration from the specified Gateway. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'
  • hcID - Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - GatewayHostnameConfigurationClientDeleteOptions contains the optional parameters for the GatewayHostnameConfigurationClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGatewayHostnameConfiguration.json

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

func (*GatewayHostnameConfigurationClient) Get

Get - Get details of a hostname configuration If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'
  • hcID - Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity.
  • options - GatewayHostnameConfigurationClientGetOptions contains the optional parameters for the GatewayHostnameConfigurationClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGatewayHostnameConfiguration.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewGatewayHostnameConfigurationClient().Get(ctx, "rg1", "apimService1", "gw1", "default", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.GatewayHostnameConfigurationContract = armapimanagement.GatewayHostnameConfigurationContract{
// 	Name: to.Ptr("default"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/gateways/hostnameConfigurations"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/hostnameConfigurations/default"),
// 	Properties: &armapimanagement.GatewayHostnameConfigurationContractProperties{
// 		CertificateID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1"),
// 		Hostname: to.Ptr("*"),
// 		NegotiateClientCertificate: to.Ptr(false),
// 	},
// }
Output:

func (*GatewayHostnameConfigurationClient) GetEntityTag

GetEntityTag - Checks that hostname configuration entity specified by identifier exists for specified Gateway entity.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'
  • hcID - Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity.
  • options - GatewayHostnameConfigurationClientGetEntityTagOptions contains the optional parameters for the GatewayHostnameConfigurationClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGatewayHostnameConfiguration.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewGatewayHostnameConfigurationClient().GetEntityTag(ctx, "rg1", "apimService1", "gw1", "default", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*GatewayHostnameConfigurationClient) NewListByServicePager

NewListByServicePager - Lists the collection of hostname configurations for the specified gateway.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'
  • options - GatewayHostnameConfigurationClientListByServiceOptions contains the optional parameters for the GatewayHostnameConfigurationClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGatewayHostnameConfigurations.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewGatewayHostnameConfigurationClient().NewListByServicePager("rg1", "apimService1", "gw1", &armapimanagement.GatewayHostnameConfigurationClientListByServiceOptions{Filter: nil,
	Top:  nil,
	Skip: 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.GatewayHostnameConfigurationCollection = armapimanagement.GatewayHostnameConfigurationCollection{
	// 	Value: []*armapimanagement.GatewayHostnameConfigurationContract{
	// 		{
	// 			Name: to.Ptr("default"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/gateways/hostnameConfigurations"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/hostnameConfigurations/default"),
	// 			Properties: &armapimanagement.GatewayHostnameConfigurationContractProperties{
	// 				CertificateID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1"),
	// 				Hostname: to.Ptr("*"),
	// 				NegotiateClientCertificate: to.Ptr(false),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("default"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/gateways/hostnameConfigurations"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/hostnameConfigurations/hostname1"),
	// 			Properties: &armapimanagement.GatewayHostnameConfigurationContractProperties{
	// 				CertificateID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert2"),
	// 				Hostname: to.Ptr("foo.bar.com"),
	// 				NegotiateClientCertificate: to.Ptr(true),
	// 			},
	// 	}},
	// }
}
Output:

type GatewayHostnameConfigurationClientCreateOrUpdateOptions

type GatewayHostnameConfigurationClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

GatewayHostnameConfigurationClientCreateOrUpdateOptions contains the optional parameters for the GatewayHostnameConfigurationClient.CreateOrUpdate method.

type GatewayHostnameConfigurationClientCreateOrUpdateResponse

type GatewayHostnameConfigurationClientCreateOrUpdateResponse struct {
	// Gateway hostname configuration details.
	GatewayHostnameConfigurationContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GatewayHostnameConfigurationClientCreateOrUpdateResponse contains the response from method GatewayHostnameConfigurationClient.CreateOrUpdate.

type GatewayHostnameConfigurationClientDeleteOptions

type GatewayHostnameConfigurationClientDeleteOptions struct {
}

GatewayHostnameConfigurationClientDeleteOptions contains the optional parameters for the GatewayHostnameConfigurationClient.Delete method.

type GatewayHostnameConfigurationClientDeleteResponse

type GatewayHostnameConfigurationClientDeleteResponse struct {
}

GatewayHostnameConfigurationClientDeleteResponse contains the response from method GatewayHostnameConfigurationClient.Delete.

type GatewayHostnameConfigurationClientGetEntityTagOptions

type GatewayHostnameConfigurationClientGetEntityTagOptions struct {
}

GatewayHostnameConfigurationClientGetEntityTagOptions contains the optional parameters for the GatewayHostnameConfigurationClient.GetEntityTag method.

type GatewayHostnameConfigurationClientGetEntityTagResponse

type GatewayHostnameConfigurationClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

GatewayHostnameConfigurationClientGetEntityTagResponse contains the response from method GatewayHostnameConfigurationClient.GetEntityTag.

type GatewayHostnameConfigurationClientGetOptions

type GatewayHostnameConfigurationClientGetOptions struct {
}

GatewayHostnameConfigurationClientGetOptions contains the optional parameters for the GatewayHostnameConfigurationClient.Get method.

type GatewayHostnameConfigurationClientGetResponse

type GatewayHostnameConfigurationClientGetResponse struct {
	// Gateway hostname configuration details.
	GatewayHostnameConfigurationContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GatewayHostnameConfigurationClientGetResponse contains the response from method GatewayHostnameConfigurationClient.Get.

type GatewayHostnameConfigurationClientListByServiceOptions

type GatewayHostnameConfigurationClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | hostname | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

GatewayHostnameConfigurationClientListByServiceOptions contains the optional parameters for the GatewayHostnameConfigurationClient.NewListByServicePager method.

type GatewayHostnameConfigurationClientListByServiceResponse

type GatewayHostnameConfigurationClientListByServiceResponse struct {
	// Paged Gateway hostname configuration list representation.
	GatewayHostnameConfigurationCollection
}

GatewayHostnameConfigurationClientListByServiceResponse contains the response from method GatewayHostnameConfigurationClient.NewListByServicePager.

type GatewayHostnameConfigurationCollection

type GatewayHostnameConfigurationCollection struct {
	// READ-ONLY; Next page link if any.
	NextLink *string

	// READ-ONLY; Page values.
	Value []*GatewayHostnameConfigurationContract
}

GatewayHostnameConfigurationCollection - Paged Gateway hostname configuration list representation.

func (GatewayHostnameConfigurationCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GatewayHostnameConfigurationCollection.

func (*GatewayHostnameConfigurationCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type GatewayHostnameConfigurationCollection.

type GatewayHostnameConfigurationContract

type GatewayHostnameConfigurationContract struct {
	// Gateway hostname configuration details.
	Properties *GatewayHostnameConfigurationContractProperties

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

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

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

GatewayHostnameConfigurationContract - Gateway hostname configuration details.

func (GatewayHostnameConfigurationContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GatewayHostnameConfigurationContract.

func (*GatewayHostnameConfigurationContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type GatewayHostnameConfigurationContract.

type GatewayHostnameConfigurationContractProperties

type GatewayHostnameConfigurationContractProperties struct {
	// Identifier of Certificate entity that will be used for TLS connection establishment
	CertificateID *string

	// Specifies if HTTP/2.0 is supported
	HTTP2Enabled *bool

	// Hostname value. Supports valid domain name, partial or full wildcard
	Hostname *string

	// Determines whether gateway requests client certificate
	NegotiateClientCertificate *bool

	// Specifies if TLS 1.0 is supported
	Tls10Enabled *bool

	// Specifies if TLS 1.1 is supported
	Tls11Enabled *bool
}

GatewayHostnameConfigurationContractProperties - Gateway hostname configuration details.

func (GatewayHostnameConfigurationContractProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type GatewayHostnameConfigurationContractProperties.

func (*GatewayHostnameConfigurationContractProperties) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type GatewayHostnameConfigurationContractProperties.

type GatewayKeyRegenerationRequestContract

type GatewayKeyRegenerationRequestContract struct {
	// REQUIRED; The Key being regenerated.
	KeyType *KeyType
}

GatewayKeyRegenerationRequestContract - Gateway key regeneration request contract properties.

func (GatewayKeyRegenerationRequestContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GatewayKeyRegenerationRequestContract.

func (*GatewayKeyRegenerationRequestContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type GatewayKeyRegenerationRequestContract.

type GatewayKeysContract

type GatewayKeysContract struct {
	// Primary gateway key.
	Primary *string

	// Secondary gateway key.
	Secondary *string
}

GatewayKeysContract - Gateway authentication keys.

func (GatewayKeysContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GatewayKeysContract.

func (*GatewayKeysContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type GatewayKeysContract.

type GatewayTokenContract

type GatewayTokenContract struct {
	// Shared Access Authentication token value for the Gateway.
	Value *string
}

GatewayTokenContract - Gateway access token.

func (GatewayTokenContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GatewayTokenContract.

func (*GatewayTokenContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type GatewayTokenContract.

type GatewayTokenRequestContract

type GatewayTokenRequestContract struct {
	// REQUIRED; The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following
	// format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
	Expiry *time.Time

	// REQUIRED; The Key to be used to generate gateway token.
	KeyType *KeyType
}

GatewayTokenRequestContract - Gateway token request contract properties.

func (GatewayTokenRequestContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GatewayTokenRequestContract.

func (*GatewayTokenRequestContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type GatewayTokenRequestContract.

type GenerateSsoURLResult

type GenerateSsoURLResult struct {
	// Redirect Url containing the SSO URL value.
	Value *string
}

GenerateSsoURLResult - Generate SSO Url operations response details.

func (GenerateSsoURLResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GenerateSsoURLResult.

func (*GenerateSsoURLResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type GenerateSsoURLResult.

type GlobalSchemaClient

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

GlobalSchemaClient contains the methods for the GlobalSchema group. Don't use this type directly, use NewGlobalSchemaClient() instead.

func NewGlobalSchemaClient

func NewGlobalSchemaClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GlobalSchemaClient, error)

NewGlobalSchemaClient creates a new instance of GlobalSchemaClient 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 (*GlobalSchemaClient) BeginCreateOrUpdate

func (client *GlobalSchemaClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, schemaID string, parameters GlobalSchemaContract, options *GlobalSchemaClientBeginCreateOrUpdateOptions) (*runtime.Poller[GlobalSchemaClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates new or updates existing specified Schema of the API Management service instance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • schemaID - Schema id identifier. Must be unique in the current API Management service instance.
  • parameters - Create or update parameters.
  • options - GlobalSchemaClientBeginCreateOrUpdateOptions contains the optional parameters for the GlobalSchemaClient.BeginCreateOrUpdate method.
Example (ApiManagementCreateSchema1)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGlobalSchema1.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewGlobalSchemaClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", "schema1", armapimanagement.GlobalSchemaContract{
	Properties: &armapimanagement.GlobalSchemaContractProperties{
		Description: to.Ptr("sample schema description"),
		SchemaType:  to.Ptr(armapimanagement.SchemaTypeXML),
		Value:       "<xsd:schema xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"\r\n           xmlns:tns=\"http://tempuri.org/PurchaseOrderSchema.xsd\"\r\n           targetNamespace=\"http://tempuri.org/PurchaseOrderSchema.xsd\"\r\n           elementFormDefault=\"qualified\">\r\n <xsd:element name=\"PurchaseOrder\" type=\"tns:PurchaseOrderType\"/>\r\n <xsd:complexType name=\"PurchaseOrderType\">\r\n  <xsd:sequence>\r\n   <xsd:element name=\"ShipTo\" type=\"tns:USAddress\" maxOccurs=\"2\"/>\r\n   <xsd:element name=\"BillTo\" type=\"tns:USAddress\"/>\r\n  </xsd:sequence>\r\n  <xsd:attribute name=\"OrderDate\" type=\"xsd:date\"/>\r\n </xsd:complexType>\r\n\r\n <xsd:complexType name=\"USAddress\">\r\n  <xsd:sequence>\r\n   <xsd:element name=\"name\"   type=\"xsd:string\"/>\r\n   <xsd:element name=\"street\" type=\"xsd:string\"/>\r\n   <xsd:element name=\"city\"   type=\"xsd:string\"/>\r\n   <xsd:element name=\"state\"  type=\"xsd:string\"/>\r\n   <xsd:element name=\"zip\"    type=\"xsd:integer\"/>\r\n  </xsd:sequence>\r\n  <xsd:attribute name=\"country\" type=\"xsd:NMTOKEN\" fixed=\"US\"/>\r\n </xsd:complexType>\r\n</xsd:schema>",
	},
}, &armapimanagement.GlobalSchemaClientBeginCreateOrUpdateOptions{IfMatch: 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.GlobalSchemaContract = armapimanagement.GlobalSchemaContract{
// 	Name: to.Ptr("schema1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/schemas"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1"),
// 	Properties: &armapimanagement.GlobalSchemaContractProperties{
// 		Description: to.Ptr("sample schema description"),
// 		SchemaType: to.Ptr(armapimanagement.SchemaTypeXML),
// 		Value: "<xsd:schema xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"\r\n           xmlns:tns=\"http://tempuri.org/PurchaseOrderSchema.xsd\"\r\n           targetNamespace=\"http://tempuri.org/PurchaseOrderSchema.xsd\"\r\n           elementFormDefault=\"qualified\">\r\n <xsd:element name=\"PurchaseOrder\" type=\"tns:PurchaseOrderType\"/>\r\n <xsd:complexType name=\"PurchaseOrderType\">\r\n  <xsd:sequence>\r\n   <xsd:element name=\"ShipTo\" type=\"tns:USAddress\" maxOccurs=\"2\"/>\r\n   <xsd:element name=\"BillTo\" type=\"tns:USAddress\"/>\r\n  </xsd:sequence>\r\n  <xsd:attribute name=\"OrderDate\" type=\"xsd:date\"/>\r\n </xsd:complexType>\r\n\r\n <xsd:complexType name=\"USAddress\">\r\n  <xsd:sequence>\r\n   <xsd:element name=\"name\"   type=\"xsd:string\"/>\r\n   <xsd:element name=\"street\" type=\"xsd:string\"/>\r\n   <xsd:element name=\"city\"   type=\"xsd:string\"/>\r\n   <xsd:element name=\"state\"  type=\"xsd:string\"/>\r\n   <xsd:element name=\"zip\"    type=\"xsd:integer\"/>\r\n  </xsd:sequence>\r\n  <xsd:attribute name=\"country\" type=\"xsd:NMTOKEN\" fixed=\"US\"/>\r\n </xsd:complexType>\r\n</xsd:schema>",
// 	},
// }
Output:

Example (ApiManagementCreateSchema2)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGlobalSchema2.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewGlobalSchemaClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", "schema1", armapimanagement.GlobalSchemaContract{
	Properties: &armapimanagement.GlobalSchemaContractProperties{
		Description: to.Ptr("sample schema description"),
		Document: map[string]any{
			"type":    "object",
			"$id":     "https://example.com/person.schema.json",
			"$schema": "https://json-schema.org/draft/2020-12/schema",
			"properties": map[string]any{
				"age": map[string]any{
					"type":        "integer",
					"description": "Age in years which must be equal to or greater than zero.",
					"minimum":     float64(0),
				},
				"firstName": map[string]any{
					"type":        "string",
					"description": "The person's first name.",
				},
				"lastName": map[string]any{
					"type":        "string",
					"description": "The person's last name.",
				},
			},
			"title": "Person",
		},
		SchemaType: to.Ptr(armapimanagement.SchemaTypeJSON),
	},
}, &armapimanagement.GlobalSchemaClientBeginCreateOrUpdateOptions{IfMatch: 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.GlobalSchemaContract = armapimanagement.GlobalSchemaContract{
// 	Name: to.Ptr("schema1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/schemas"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1"),
// 	Properties: &armapimanagement.GlobalSchemaContractProperties{
// 		Description: to.Ptr("sample schema description"),
// 		Document: map[string]any{
// 			"type": "object",
// 			"$id": "https://example.com/person.schema.json",
// 			"$schema": "https://json-schema.org/draft/2020-12/schema",
// 			"properties":map[string]any{
// 				"age":map[string]any{
// 					"type": "integer",
// 					"description": "Age in years which must be equal to or greater than zero.",
// 					"minimum": float64(0),
// 				},
// 				"firstName":map[string]any{
// 					"type": "string",
// 					"description": "The person's first name.",
// 				},
// 				"lastName":map[string]any{
// 					"type": "string",
// 					"description": "The person's last name.",
// 				},
// 			},
// 			"title": "Person",
// 		},
// 		SchemaType: to.Ptr(armapimanagement.SchemaTypeJSON),
// 	},
// }
Output:

func (*GlobalSchemaClient) Delete

func (client *GlobalSchemaClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, schemaID string, ifMatch string, options *GlobalSchemaClientDeleteOptions) (GlobalSchemaClientDeleteResponse, error)

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

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • schemaID - Schema id identifier. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - GlobalSchemaClientDeleteOptions contains the optional parameters for the GlobalSchemaClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGlobalSchema.json

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

func (*GlobalSchemaClient) Get

func (client *GlobalSchemaClient) Get(ctx context.Context, resourceGroupName string, serviceName string, schemaID string, options *GlobalSchemaClientGetOptions) (GlobalSchemaClientGetResponse, error)

Get - Gets the details of the Schema specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • schemaID - Schema id identifier. Must be unique in the current API Management service instance.
  • options - GlobalSchemaClientGetOptions contains the optional parameters for the GlobalSchemaClient.Get method.
Example (ApiManagementGetSchema1)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGlobalSchema1.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewGlobalSchemaClient().Get(ctx, "rg1", "apimService1", "schema1", 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.GlobalSchemaContract = armapimanagement.GlobalSchemaContract{
// 	Name: to.Ptr("schema1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/schemas"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1"),
// 	Properties: &armapimanagement.GlobalSchemaContractProperties{
// 		Description: to.Ptr("sample schema description"),
// 		SchemaType: to.Ptr(armapimanagement.SchemaTypeXML),
// 		Value: "<xsd:schema xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"\r\n           xmlns:tns=\"http://tempuri.org/PurchaseOrderSchema.xsd\"\r\n           targetNamespace=\"http://tempuri.org/PurchaseOrderSchema.xsd\"\r\n           elementFormDefault=\"qualified\">\r\n <xsd:element name=\"PurchaseOrder\" type=\"tns:PurchaseOrderType\"/>\r\n <xsd:complexType name=\"PurchaseOrderType\">\r\n  <xsd:sequence>\r\n   <xsd:element name=\"ShipTo\" type=\"tns:USAddress\" maxOccurs=\"2\"/>\r\n   <xsd:element name=\"BillTo\" type=\"tns:USAddress\"/>\r\n  </xsd:sequence>\r\n  <xsd:attribute name=\"OrderDate\" type=\"xsd:date\"/>\r\n </xsd:complexType>\r\n\r\n <xsd:complexType name=\"USAddress\">\r\n  <xsd:sequence>\r\n   <xsd:element name=\"name\"   type=\"xsd:string\"/>\r\n   <xsd:element name=\"street\" type=\"xsd:string\"/>\r\n   <xsd:element name=\"city\"   type=\"xsd:string\"/>\r\n   <xsd:element name=\"state\"  type=\"xsd:string\"/>\r\n   <xsd:element name=\"zip\"    type=\"xsd:integer\"/>\r\n  </xsd:sequence>\r\n  <xsd:attribute name=\"country\" type=\"xsd:NMTOKEN\" fixed=\"US\"/>\r\n </xsd:complexType>\r\n</xsd:schema>",
// 	},
// }
Output:

Example (ApiManagementGetSchema2)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGlobalSchema2.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewGlobalSchemaClient().Get(ctx, "rg1", "apimService1", "schema2", 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.GlobalSchemaContract = armapimanagement.GlobalSchemaContract{
// 	Name: to.Ptr("schema2"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/schemas"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema2"),
// 	Properties: &armapimanagement.GlobalSchemaContractProperties{
// 		Description: to.Ptr("sample schema description"),
// 		Document: map[string]any{
// 			"type": "object",
// 			"$id": "https://example.com/person.schema.json",
// 			"$schema": "https://json-schema.org/draft/2020-12/schema",
// 			"properties":map[string]any{
// 				"age":map[string]any{
// 					"type": "integer",
// 					"description": "Age in years which must be equal to or greater than zero.",
// 					"minimum": float64(0),
// 				},
// 				"firstName":map[string]any{
// 					"type": "string",
// 					"description": "The person's first name.",
// 				},
// 				"lastName":map[string]any{
// 					"type": "string",
// 					"description": "The person's last name.",
// 				},
// 			},
// 			"title": "Person",
// 		},
// 		SchemaType: to.Ptr(armapimanagement.SchemaTypeJSON),
// 	},
// }
Output:

func (*GlobalSchemaClient) GetEntityTag

func (client *GlobalSchemaClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, schemaID string, options *GlobalSchemaClientGetEntityTagOptions) (GlobalSchemaClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the Schema specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • schemaID - Schema id identifier. Must be unique in the current API Management service instance.
  • options - GlobalSchemaClientGetEntityTagOptions contains the optional parameters for the GlobalSchemaClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGlobalSchema.json

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

func (*GlobalSchemaClient) NewListByServicePager

func (client *GlobalSchemaClient) NewListByServicePager(resourceGroupName string, serviceName string, options *GlobalSchemaClientListByServiceOptions) *runtime.Pager[GlobalSchemaClientListByServiceResponse]

NewListByServicePager - Lists a collection of schemas registered with service instance.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - GlobalSchemaClientListByServiceOptions contains the optional parameters for the GlobalSchemaClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGlobalSchemas.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewGlobalSchemaClient().NewListByServicePager("rg1", "apimService1", &armapimanagement.GlobalSchemaClientListByServiceOptions{Filter: nil,
	Top:  nil,
	Skip: 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.GlobalSchemaCollection = armapimanagement.GlobalSchemaCollection{
	// 	Count: to.Ptr[int64](2),
	// 	Value: []*armapimanagement.GlobalSchemaContract{
	// 		{
	// 			Name: to.Ptr("schema1"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/schemas"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1"),
	// 			Properties: &armapimanagement.GlobalSchemaContractProperties{
	// 				Description: to.Ptr("sample schema description"),
	// 				SchemaType: to.Ptr(armapimanagement.SchemaTypeXML),
	// 				Value: "<xsd:schema xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"\r\n           xmlns:tns=\"http://tempuri.org/PurchaseOrderSchema.xsd\"\r\n           targetNamespace=\"http://tempuri.org/PurchaseOrderSchema.xsd\"\r\n           elementFormDefault=\"qualified\">\r\n <xsd:element name=\"PurchaseOrder\" type=\"tns:PurchaseOrderType\"/>\r\n <xsd:complexType name=\"PurchaseOrderType\">\r\n  <xsd:sequence>\r\n   <xsd:element name=\"ShipTo\" type=\"tns:USAddress\" maxOccurs=\"2\"/>\r\n   <xsd:element name=\"BillTo\" type=\"tns:USAddress\"/>\r\n  </xsd:sequence>\r\n  <xsd:attribute name=\"OrderDate\" type=\"xsd:date\"/>\r\n </xsd:complexType>\r\n\r\n <xsd:complexType name=\"USAddress\">\r\n  <xsd:sequence>\r\n   <xsd:element name=\"name\"   type=\"xsd:string\"/>\r\n   <xsd:element name=\"street\" type=\"xsd:string\"/>\r\n   <xsd:element name=\"city\"   type=\"xsd:string\"/>\r\n   <xsd:element name=\"state\"  type=\"xsd:string\"/>\r\n   <xsd:element name=\"zip\"    type=\"xsd:integer\"/>\r\n  </xsd:sequence>\r\n  <xsd:attribute name=\"country\" type=\"xsd:NMTOKEN\" fixed=\"US\"/>\r\n </xsd:complexType>\r\n</xsd:schema>",
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("schema2"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/schemas"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema2"),
	// 			Properties: &armapimanagement.GlobalSchemaContractProperties{
	// 				Description: to.Ptr("sample schema description"),
	// 				Document: map[string]any{
	// 					"type": "object",
	// 					"$id": "https://example.com/person.schema.json",
	// 					"$schema": "https://json-schema.org/draft/2020-12/schema",
	// 					"properties":map[string]any{
	// 						"age":map[string]any{
	// 							"type": "integer",
	// 							"description": "Age in years which must be equal to or greater than zero.",
	// 							"minimum": float64(0),
	// 						},
	// 						"firstName":map[string]any{
	// 							"type": "string",
	// 							"description": "The person's first name.",
	// 						},
	// 						"lastName":map[string]any{
	// 							"type": "string",
	// 							"description": "The person's last name.",
	// 						},
	// 					},
	// 					"title": "Person",
	// 				},
	// 				SchemaType: to.Ptr(armapimanagement.SchemaTypeJSON),
	// 			},
	// 	}},
	// }
}
Output:

type GlobalSchemaClientBeginCreateOrUpdateOptions

type GlobalSchemaClientBeginCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

GlobalSchemaClientBeginCreateOrUpdateOptions contains the optional parameters for the GlobalSchemaClient.BeginCreateOrUpdate method.

type GlobalSchemaClientCreateOrUpdateResponse

type GlobalSchemaClientCreateOrUpdateResponse struct {
	// Global Schema Contract details.
	GlobalSchemaContract
}

GlobalSchemaClientCreateOrUpdateResponse contains the response from method GlobalSchemaClient.BeginCreateOrUpdate.

type GlobalSchemaClientDeleteOptions

type GlobalSchemaClientDeleteOptions struct {
}

GlobalSchemaClientDeleteOptions contains the optional parameters for the GlobalSchemaClient.Delete method.

type GlobalSchemaClientDeleteResponse

type GlobalSchemaClientDeleteResponse struct {
}

GlobalSchemaClientDeleteResponse contains the response from method GlobalSchemaClient.Delete.

type GlobalSchemaClientGetEntityTagOptions

type GlobalSchemaClientGetEntityTagOptions struct {
}

GlobalSchemaClientGetEntityTagOptions contains the optional parameters for the GlobalSchemaClient.GetEntityTag method.

type GlobalSchemaClientGetEntityTagResponse

type GlobalSchemaClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

GlobalSchemaClientGetEntityTagResponse contains the response from method GlobalSchemaClient.GetEntityTag.

type GlobalSchemaClientGetOptions

type GlobalSchemaClientGetOptions struct {
}

GlobalSchemaClientGetOptions contains the optional parameters for the GlobalSchemaClient.Get method.

type GlobalSchemaClientGetResponse

type GlobalSchemaClientGetResponse struct {
	// Global Schema Contract details.
	GlobalSchemaContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GlobalSchemaClientGetResponse contains the response from method GlobalSchemaClient.Get.

type GlobalSchemaClientListByServiceOptions

type GlobalSchemaClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

GlobalSchemaClientListByServiceOptions contains the optional parameters for the GlobalSchemaClient.NewListByServicePager method.

type GlobalSchemaClientListByServiceResponse

type GlobalSchemaClientListByServiceResponse struct {
	// The response of the list schema operation.
	GlobalSchemaCollection
}

GlobalSchemaClientListByServiceResponse contains the response from method GlobalSchemaClient.NewListByServicePager.

type GlobalSchemaCollection

type GlobalSchemaCollection struct {
	// Total record count number.
	Count *int64

	// READ-ONLY; Next page link if any.
	NextLink *string

	// READ-ONLY; Global Schema Contract value.
	Value []*GlobalSchemaContract
}

GlobalSchemaCollection - The response of the list schema operation.

func (GlobalSchemaCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GlobalSchemaCollection.

func (*GlobalSchemaCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type GlobalSchemaCollection.

type GlobalSchemaContract

type GlobalSchemaContract struct {
	// Properties of the Global Schema.
	Properties *GlobalSchemaContractProperties

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

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

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

GlobalSchemaContract - Global Schema Contract details.

func (GlobalSchemaContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GlobalSchemaContract.

func (*GlobalSchemaContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type GlobalSchemaContract.

type GlobalSchemaContractProperties

type GlobalSchemaContractProperties struct {
	// REQUIRED; Schema Type. Immutable.
	SchemaType *SchemaType

	// Free-form schema entity description.
	Description *string

	// Global Schema document object for json-based schema formats(e.g. json schema).
	Document any

	// Json-encoded string for non json-based schema.
	Value any
}

GlobalSchemaContractProperties - Schema create or update contract Properties.

func (GlobalSchemaContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GlobalSchemaContractProperties.

func (*GlobalSchemaContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type GlobalSchemaContractProperties.

type GrantType

type GrantType string
const (
	// GrantTypeAuthorizationCode - Authorization Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.1.
	GrantTypeAuthorizationCode GrantType = "authorizationCode"
	// GrantTypeClientCredentials - Client Credentials Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.4.
	GrantTypeClientCredentials GrantType = "clientCredentials"
	// GrantTypeImplicit - Implicit Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.2.
	GrantTypeImplicit GrantType = "implicit"
	// GrantTypeResourceOwnerPassword - Resource Owner Password Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.3.
	GrantTypeResourceOwnerPassword GrantType = "resourceOwnerPassword"
)

func PossibleGrantTypeValues

func PossibleGrantTypeValues() []GrantType

PossibleGrantTypeValues returns the possible values for the GrantType const type.

type GraphQLAPIResolverClient

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

GraphQLAPIResolverClient contains the methods for the GraphQLAPIResolver group. Don't use this type directly, use NewGraphQLAPIResolverClient() instead.

func NewGraphQLAPIResolverClient

func NewGraphQLAPIResolverClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GraphQLAPIResolverClient, error)

NewGraphQLAPIResolverClient creates a new instance of GraphQLAPIResolverClient 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 (*GraphQLAPIResolverClient) CreateOrUpdate

func (client *GraphQLAPIResolverClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, resolverID string, parameters ResolverContract, options *GraphQLAPIResolverClientCreateOrUpdateOptions) (GraphQLAPIResolverClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates a new resolver in the GraphQL API or updates an existing one. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • resolverID - Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance.
  • parameters - Create parameters.
  • options - GraphQLAPIResolverClientCreateOrUpdateOptions contains the optional parameters for the GraphQLAPIResolverClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGraphQLApiResolver.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewGraphQLAPIResolverClient().CreateOrUpdate(ctx, "rg1", "apimService1", "someAPI", "newResolver", armapimanagement.ResolverContract{
	Properties: &armapimanagement.ResolverEntityBaseContract{
		Path:        to.Ptr("Query/users"),
		Description: to.Ptr("A GraphQL Resolver example"),
		DisplayName: to.Ptr("Query Users"),
	},
}, &armapimanagement.GraphQLAPIResolverClientCreateOrUpdateOptions{IfMatch: 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.ResolverContract = armapimanagement.ResolverContract{
// 	Name: to.Ptr("newResolver"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/resolvers"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/someAPI/resolvers/newResolver"),
// 	Properties: &armapimanagement.ResolverEntityBaseContract{
// 		Path: to.Ptr("Query/users"),
// 		Description: to.Ptr("A GraphQL Resolver example"),
// 		DisplayName: to.Ptr("Query Users"),
// 	},
// }
Output:

func (*GraphQLAPIResolverClient) Delete

func (client *GraphQLAPIResolverClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, resolverID string, ifMatch string, options *GraphQLAPIResolverClientDeleteOptions) (GraphQLAPIResolverClientDeleteResponse, error)

Delete - Deletes the specified resolver in the GraphQL API. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • resolverID - Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - GraphQLAPIResolverClientDeleteOptions contains the optional parameters for the GraphQLAPIResolverClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGraphQLApiResolver.json

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

func (*GraphQLAPIResolverClient) Get

func (client *GraphQLAPIResolverClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, resolverID string, options *GraphQLAPIResolverClientGetOptions) (GraphQLAPIResolverClientGetResponse, error)

Get - Gets the details of the GraphQL API Resolver specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • resolverID - Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance.
  • options - GraphQLAPIResolverClientGetOptions contains the optional parameters for the GraphQLAPIResolverClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGraphQLApiResolver.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewGraphQLAPIResolverClient().Get(ctx, "rg1", "apimService1", "57d2ef278aa04f0888cba3f3", "57d2ef278aa04f0ad01d6cdc", 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.ResolverContract = armapimanagement.ResolverContract{
// 	Name: to.Ptr("57d2ef278aa04f0ad01d6cdc"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/resolvers"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/resolvers/57d2ef278aa04f0ad01d6cdc"),
// 	Properties: &armapimanagement.ResolverEntityBaseContract{
// 		Path: to.Ptr("Query/users"),
// 		Description: to.Ptr("A GraphQL Resolver example"),
// 		DisplayName: to.Ptr("Query Users"),
// 	},
// }
Output:

func (*GraphQLAPIResolverClient) GetEntityTag

func (client *GraphQLAPIResolverClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiID string, resolverID string, options *GraphQLAPIResolverClientGetEntityTagOptions) (GraphQLAPIResolverClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • resolverID - Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance.
  • options - GraphQLAPIResolverClientGetEntityTagOptions contains the optional parameters for the GraphQLAPIResolverClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGraphQLApiResolver.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewGraphQLAPIResolverClient().GetEntityTag(ctx, "rg1", "apimService1", "57d2ef278aa04f0888cba3f3", "57d2ef278aa04f0ad01d6cdc", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*GraphQLAPIResolverClient) NewListByAPIPager

func (client *GraphQLAPIResolverClient) NewListByAPIPager(resourceGroupName string, serviceName string, apiID string, options *GraphQLAPIResolverClientListByAPIOptions) *runtime.Pager[GraphQLAPIResolverClientListByAPIResponse]

NewListByAPIPager - Lists a collection of the resolvers for the specified GraphQL API.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • options - GraphQLAPIResolverClientListByAPIOptions contains the optional parameters for the GraphQLAPIResolverClient.NewListByAPIPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGraphQLApiResolvers.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewGraphQLAPIResolverClient().NewListByAPIPager("rg1", "apimService1", "57d2ef278aa04f0888cba3f3", &armapimanagement.GraphQLAPIResolverClientListByAPIOptions{Filter: nil,
	Top:  nil,
	Skip: 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.ResolverCollection = armapimanagement.ResolverCollection{
	// 	Count: to.Ptr[int64](3),
	// 	Value: []*armapimanagement.ResolverContract{
	// 		{
	// 			Name: to.Ptr("57d2ef278aa04f0ad01d6cdc"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/apis/resolvers"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/resolvers/57d2ef278aa04f0ad01d6cdc"),
	// 			Properties: &armapimanagement.ResolverEntityBaseContract{
	// 				Path: to.Ptr("Query/users"),
	// 				Description: to.Ptr("A GraphQL Resolver example"),
	// 				DisplayName: to.Ptr("Query Users"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("57d2ef278aa04f0ad01d6cda"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/apis/resolvers"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/resolvers/57d2ef278aa04f0ad01d6cda"),
	// 			Properties: &armapimanagement.ResolverEntityBaseContract{
	// 				Path: to.Ptr("Mutation/makeUser"),
	// 				Description: to.Ptr("A GraphQL Resolver example"),
	// 				DisplayName: to.Ptr("Mutation makeUser"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("57d2ef278aa04f0ad01d6cd9"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/apis/resolvers"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/resolvers/57d2ef278aa04f0ad01d6cd9"),
	// 			Properties: &armapimanagement.ResolverEntityBaseContract{
	// 				Path: to.Ptr("User/id"),
	// 				Description: to.Ptr("A GraphQL Resolver example"),
	// 				DisplayName: to.Ptr("Query for User Id field"),
	// 			},
	// 	}},
	// }
}
Output:

func (*GraphQLAPIResolverClient) Update

func (client *GraphQLAPIResolverClient) Update(ctx context.Context, resourceGroupName string, serviceName string, apiID string, resolverID string, ifMatch string, parameters ResolverUpdateContract, options *GraphQLAPIResolverClientUpdateOptions) (GraphQLAPIResolverClientUpdateResponse, error)

Update - Updates the details of the resolver in the GraphQL API specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • resolverID - Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - GraphQL API Resolver Update parameters.
  • options - GraphQLAPIResolverClientUpdateOptions contains the optional parameters for the GraphQLAPIResolverClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateGraphQLApiResolver.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewGraphQLAPIResolverClient().Update(ctx, "rg1", "apimService1", "echo-api", "resolverId", "*", armapimanagement.ResolverUpdateContract{
	Properties: &armapimanagement.ResolverUpdateContractProperties{
		Path:        to.Ptr("Query/adminUsers"),
		Description: to.Ptr("A GraphQL Resolver example"),
		DisplayName: to.Ptr("Query AdminUsers"),
	},
}, 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.ResolverContract = armapimanagement.ResolverContract{
// 	Name: to.Ptr("57d2ef278aa04f0ad01d6cdc"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/resolvers"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/resolvers/57d2ef278aa04f0ad01d6cdc"),
// 	Properties: &armapimanagement.ResolverEntityBaseContract{
// 		Path: to.Ptr("Query/adminUsers"),
// 		Description: to.Ptr("A GraphQL Resolver example"),
// 		DisplayName: to.Ptr("Query AdminUsers"),
// 	},
// }
Output:

type GraphQLAPIResolverClientCreateOrUpdateOptions

type GraphQLAPIResolverClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

GraphQLAPIResolverClientCreateOrUpdateOptions contains the optional parameters for the GraphQLAPIResolverClient.CreateOrUpdate method.

type GraphQLAPIResolverClientCreateOrUpdateResponse

type GraphQLAPIResolverClientCreateOrUpdateResponse struct {
	// GraphQL API Resolver details.
	ResolverContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GraphQLAPIResolverClientCreateOrUpdateResponse contains the response from method GraphQLAPIResolverClient.CreateOrUpdate.

type GraphQLAPIResolverClientDeleteOptions

type GraphQLAPIResolverClientDeleteOptions struct {
}

GraphQLAPIResolverClientDeleteOptions contains the optional parameters for the GraphQLAPIResolverClient.Delete method.

type GraphQLAPIResolverClientDeleteResponse

type GraphQLAPIResolverClientDeleteResponse struct {
}

GraphQLAPIResolverClientDeleteResponse contains the response from method GraphQLAPIResolverClient.Delete.

type GraphQLAPIResolverClientGetEntityTagOptions

type GraphQLAPIResolverClientGetEntityTagOptions struct {
}

GraphQLAPIResolverClientGetEntityTagOptions contains the optional parameters for the GraphQLAPIResolverClient.GetEntityTag method.

type GraphQLAPIResolverClientGetEntityTagResponse

type GraphQLAPIResolverClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

GraphQLAPIResolverClientGetEntityTagResponse contains the response from method GraphQLAPIResolverClient.GetEntityTag.

type GraphQLAPIResolverClientGetOptions

type GraphQLAPIResolverClientGetOptions struct {
}

GraphQLAPIResolverClientGetOptions contains the optional parameters for the GraphQLAPIResolverClient.Get method.

type GraphQLAPIResolverClientGetResponse

type GraphQLAPIResolverClientGetResponse struct {
	// GraphQL API Resolver details.
	ResolverContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GraphQLAPIResolverClientGetResponse contains the response from method GraphQLAPIResolverClient.Get.

type GraphQLAPIResolverClientListByAPIOptions

type GraphQLAPIResolverClientListByAPIOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

GraphQLAPIResolverClientListByAPIOptions contains the optional parameters for the GraphQLAPIResolverClient.NewListByAPIPager method.

type GraphQLAPIResolverClientListByAPIResponse

type GraphQLAPIResolverClientListByAPIResponse struct {
	// Paged Resolver list representation.
	ResolverCollection
}

GraphQLAPIResolverClientListByAPIResponse contains the response from method GraphQLAPIResolverClient.NewListByAPIPager.

type GraphQLAPIResolverClientUpdateOptions

type GraphQLAPIResolverClientUpdateOptions struct {
}

GraphQLAPIResolverClientUpdateOptions contains the optional parameters for the GraphQLAPIResolverClient.Update method.

type GraphQLAPIResolverClientUpdateResponse

type GraphQLAPIResolverClientUpdateResponse struct {
	// GraphQL API Resolver details.
	ResolverContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GraphQLAPIResolverClientUpdateResponse contains the response from method GraphQLAPIResolverClient.Update.

type GraphQLAPIResolverPolicyClient

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

GraphQLAPIResolverPolicyClient contains the methods for the GraphQLAPIResolverPolicy group. Don't use this type directly, use NewGraphQLAPIResolverPolicyClient() instead.

func NewGraphQLAPIResolverPolicyClient

func NewGraphQLAPIResolverPolicyClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GraphQLAPIResolverPolicyClient, error)

NewGraphQLAPIResolverPolicyClient creates a new instance of GraphQLAPIResolverPolicyClient 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 (*GraphQLAPIResolverPolicyClient) CreateOrUpdate

CreateOrUpdate - Creates or updates policy configuration for the GraphQL API Resolver level. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • resolverID - Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance.
  • policyID - The identifier of the Policy.
  • parameters - The policy contents to apply.
  • options - GraphQLAPIResolverPolicyClientCreateOrUpdateOptions contains the optional parameters for the GraphQLAPIResolverPolicyClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGraphQLApiResolverPolicy.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewGraphQLAPIResolverPolicyClient().CreateOrUpdate(ctx, "rg1", "apimService1", "5600b57e7e8880006a040001", "5600b57e7e8880006a080001", armapimanagement.PolicyIDNamePolicy, armapimanagement.PolicyContract{
	Properties: &armapimanagement.PolicyContractProperties{
		Format: to.Ptr(armapimanagement.PolicyContentFormatXML),
		Value:  to.Ptr("<http-data-source><http-request><set-method>GET</set-method><set-backend-service base-url=\"https://some.service.com\" /><set-url>/api/users</set-url></http-request></http-data-source>"),
	},
}, &armapimanagement.GraphQLAPIResolverPolicyClientCreateOrUpdateOptions{IfMatch: to.Ptr("*")})
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.PolicyContract = armapimanagement.PolicyContract{
// 	Name: to.Ptr("policy"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/resolvers/policies"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5600b57e7e8880006a040001/resolvers/5600b57e7e8880006a080001/policies/policy"),
// 	Properties: &armapimanagement.PolicyContractProperties{
// 		Value: to.Ptr("<http-data-source>\r\n  <http-request>\r\n   <set-method>GET</set-method>\r\n<set-backend-service base-url=\"https://some.service.com\" />\r\n<set-url>/api/users</set-url>\r\n</http-request>\r\n</http-data-source>"),
// 	},
// }
Output:

func (*GraphQLAPIResolverPolicyClient) Delete

func (client *GraphQLAPIResolverPolicyClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, resolverID string, policyID PolicyIDName, ifMatch string, options *GraphQLAPIResolverPolicyClientDeleteOptions) (GraphQLAPIResolverPolicyClientDeleteResponse, error)

Delete - Deletes the policy configuration at the GraphQL Api Resolver. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • resolverID - Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance.
  • policyID - The identifier of the Policy.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - GraphQLAPIResolverPolicyClientDeleteOptions contains the optional parameters for the GraphQLAPIResolverPolicyClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGraphQLApiResolverPolicy.json

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

func (*GraphQLAPIResolverPolicyClient) Get

Get - Get the policy configuration at the GraphQL API Resolver level. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • resolverID - Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance.
  • policyID - The identifier of the Policy.
  • options - GraphQLAPIResolverPolicyClientGetOptions contains the optional parameters for the GraphQLAPIResolverPolicyClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGraphQLApiResolverPolicy.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewGraphQLAPIResolverPolicyClient().Get(ctx, "rg1", "apimService1", "5600b539c53f5b0062040001", "5600b53ac53f5b0062080006", armapimanagement.PolicyIDNamePolicy, &armapimanagement.GraphQLAPIResolverPolicyClientGetOptions{Format: 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.PolicyContract = armapimanagement.PolicyContract{
// 	Name: to.Ptr("policy"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis/resolvers/policies"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5600b539c53f5b0062040001/resolvers/5600b53ac53f5b0062080006/policies/policy"),
// 	Properties: &armapimanagement.PolicyContractProperties{
// 		Value: to.Ptr("<http-data-source>\r\n  <http-request>\r\n   <set-method>GET</set-method>\r\n<set-backend-service base-url=\"https://some.service.com\" />\r\n<set-url>/api/users</set-url>\r\n</http-request>\r\n</http-data-source>"),
// 	},
// }
Output:

func (*GraphQLAPIResolverPolicyClient) GetEntityTag

GetEntityTag - Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • resolverID - Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance.
  • policyID - The identifier of the Policy.
  • options - GraphQLAPIResolverPolicyClientGetEntityTagOptions contains the optional parameters for the GraphQLAPIResolverPolicyClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGraphQLApiResolverPolicy.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewGraphQLAPIResolverPolicyClient().GetEntityTag(ctx, "rg1", "apimService1", "5600b539c53f5b0062040001", "5600b53ac53f5b0062080006", armapimanagement.PolicyIDNamePolicy, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*GraphQLAPIResolverPolicyClient) NewListByResolverPager

NewListByResolverPager - Get the list of policy configuration at the GraphQL API Resolver level.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • resolverID - Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance.
  • options - GraphQLAPIResolverPolicyClientListByResolverOptions contains the optional parameters for the GraphQLAPIResolverPolicyClient.NewListByResolverPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGraphQLApiResolverPolicies.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewGraphQLAPIResolverPolicyClient().NewListByResolverPager("rg1", "apimService1", "599e2953193c3c0bd0b3e2fa", "599e29ab193c3c0bd0b3e2fb", 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.PolicyCollection = armapimanagement.PolicyCollection{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.PolicyContract{
	// 		{
	// 			Name: to.Ptr("policy"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/apis/resolvers/policies"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/599e2953193c3c0bd0b3e2fa/resolvers/599e29ab193c3c0bd0b3e2fb/policies/policy"),
	// 			Properties: &armapimanagement.PolicyContractProperties{
	// 				Value: to.Ptr("<!--\r\n    IMPORTANT:\r\n    - Resolver elements can appear only within the <http-request>, <http-response>, <backend> section elements.\r\n    - Only the <forward-request> policy element can appear within the <backend> section element.\r\n    - To apply a policy to the query request (before it is forwarded to the backend service), place a corresponding policy element within the <http-request> section element.\r\n    - To apply a policy to the resolver response (before it is sent back to the document executor), place a corresponding policy element within the <http-response> section element.\r\n    - To add a policy position the cursor at the desired insertion point and click on the round button associated with the policy.\r\n    - To remove a policy, delete the corresponding policy statement from the policy document.\r\n  - Policies are applied in the order of their appearance, from the top down.\r\n-->\r\n<http-data-source>\r\n  <http-request>\r\n    <set-method>GET</set-method>\r\n<set-backend-service base-url=\"https://some.service.com\" />\r\n<set-url>/api/users</set-url>  </http-request>\r\n  <backend>\r\n    <forward-request />\r\n  </backend>\r\n  <http-response>\r\n    <set-body template=\"liquid\">\r\n { \"id\": \"{{body.id}}\" }  </http-response>\r\n</http-data-source>"),
	// 			},
	// 	}},
	// }
}
Output:

type GraphQLAPIResolverPolicyClientCreateOrUpdateOptions

type GraphQLAPIResolverPolicyClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

GraphQLAPIResolverPolicyClientCreateOrUpdateOptions contains the optional parameters for the GraphQLAPIResolverPolicyClient.CreateOrUpdate method.

type GraphQLAPIResolverPolicyClientCreateOrUpdateResponse

type GraphQLAPIResolverPolicyClientCreateOrUpdateResponse struct {
	// Policy Contract details.
	PolicyContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GraphQLAPIResolverPolicyClientCreateOrUpdateResponse contains the response from method GraphQLAPIResolverPolicyClient.CreateOrUpdate.

type GraphQLAPIResolverPolicyClientDeleteOptions

type GraphQLAPIResolverPolicyClientDeleteOptions struct {
}

GraphQLAPIResolverPolicyClientDeleteOptions contains the optional parameters for the GraphQLAPIResolverPolicyClient.Delete method.

type GraphQLAPIResolverPolicyClientDeleteResponse

type GraphQLAPIResolverPolicyClientDeleteResponse struct {
}

GraphQLAPIResolverPolicyClientDeleteResponse contains the response from method GraphQLAPIResolverPolicyClient.Delete.

type GraphQLAPIResolverPolicyClientGetEntityTagOptions

type GraphQLAPIResolverPolicyClientGetEntityTagOptions struct {
}

GraphQLAPIResolverPolicyClientGetEntityTagOptions contains the optional parameters for the GraphQLAPIResolverPolicyClient.GetEntityTag method.

type GraphQLAPIResolverPolicyClientGetEntityTagResponse

type GraphQLAPIResolverPolicyClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

GraphQLAPIResolverPolicyClientGetEntityTagResponse contains the response from method GraphQLAPIResolverPolicyClient.GetEntityTag.

type GraphQLAPIResolverPolicyClientGetOptions

type GraphQLAPIResolverPolicyClientGetOptions struct {
	// Policy Export Format.
	Format *PolicyExportFormat
}

GraphQLAPIResolverPolicyClientGetOptions contains the optional parameters for the GraphQLAPIResolverPolicyClient.Get method.

type GraphQLAPIResolverPolicyClientGetResponse

type GraphQLAPIResolverPolicyClientGetResponse struct {
	// Policy Contract details.
	PolicyContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GraphQLAPIResolverPolicyClientGetResponse contains the response from method GraphQLAPIResolverPolicyClient.Get.

type GraphQLAPIResolverPolicyClientListByResolverOptions

type GraphQLAPIResolverPolicyClientListByResolverOptions struct {
}

GraphQLAPIResolverPolicyClientListByResolverOptions contains the optional parameters for the GraphQLAPIResolverPolicyClient.NewListByResolverPager method.

type GraphQLAPIResolverPolicyClientListByResolverResponse

type GraphQLAPIResolverPolicyClientListByResolverResponse struct {
	// The response of the list policy operation.
	PolicyCollection
}

GraphQLAPIResolverPolicyClientListByResolverResponse contains the response from method GraphQLAPIResolverPolicyClient.NewListByResolverPager.

type GroupClient

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

GroupClient contains the methods for the Group group. Don't use this type directly, use NewGroupClient() instead.

func NewGroupClient

func NewGroupClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GroupClient, error)

NewGroupClient creates a new instance of GroupClient 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 (*GroupClient) CreateOrUpdate

func (client *GroupClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, groupID string, parameters GroupCreateParameters, options *GroupClientCreateOrUpdateOptions) (GroupClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or Updates a group. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • groupID - Group identifier. Must be unique in the current API Management service instance.
  • parameters - Create parameters.
  • options - GroupClientCreateOrUpdateOptions contains the optional parameters for the GroupClient.CreateOrUpdate method.
Example (ApiManagementCreateGroup)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGroup.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewGroupClient().CreateOrUpdate(ctx, "rg1", "apimService1", "tempgroup", armapimanagement.GroupCreateParameters{
	Properties: &armapimanagement.GroupCreateParametersProperties{
		DisplayName: to.Ptr("temp group"),
	},
}, &armapimanagement.GroupClientCreateOrUpdateOptions{IfMatch: 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.GroupContract = armapimanagement.GroupContract{
// 	Name: to.Ptr("tempgroup"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/groups"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/tempgroup"),
// 	Properties: &armapimanagement.GroupContractProperties{
// 		Type: to.Ptr(armapimanagement.GroupTypeCustom),
// 		DisplayName: to.Ptr("temp group"),
// 	},
// }
Output:

Example (ApiManagementCreateGroupExternal)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGroupExternal.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewGroupClient().CreateOrUpdate(ctx, "rg1", "apimService1", "aadGroup", armapimanagement.GroupCreateParameters{
	Properties: &armapimanagement.GroupCreateParametersProperties{
		Type:        to.Ptr(armapimanagement.GroupTypeExternal),
		Description: to.Ptr("new group to test"),
		DisplayName: to.Ptr("NewGroup (samiraad.onmicrosoft.com)"),
		ExternalID:  to.Ptr("aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d"),
	},
}, &armapimanagement.GroupClientCreateOrUpdateOptions{IfMatch: 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.GroupContract = armapimanagement.GroupContract{
// 	Name: to.Ptr("aadGroup"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/groups"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/aadGroup"),
// 	Properties: &armapimanagement.GroupContractProperties{
// 		Type: to.Ptr(armapimanagement.GroupTypeExternal),
// 		Description: to.Ptr("new group to test"),
// 		DisplayName: to.Ptr("NewGroup (samiraad.onmicrosoft.com)"),
// 		ExternalID: to.Ptr("aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d"),
// 	},
// }
Output:

func (*GroupClient) Delete

func (client *GroupClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, groupID string, ifMatch string, options *GroupClientDeleteOptions) (GroupClientDeleteResponse, error)

Delete - Deletes specific group of the API Management service instance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • groupID - Group identifier. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - GroupClientDeleteOptions contains the optional parameters for the GroupClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGroup.json

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

func (*GroupClient) Get

func (client *GroupClient) Get(ctx context.Context, resourceGroupName string, serviceName string, groupID string, options *GroupClientGetOptions) (GroupClientGetResponse, error)

Get - Gets the details of the group specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • groupID - Group identifier. Must be unique in the current API Management service instance.
  • options - GroupClientGetOptions contains the optional parameters for the GroupClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGroup.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewGroupClient().Get(ctx, "rg1", "apimService1", "59306a29e4bbd510dc24e5f9", 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.GroupContract = armapimanagement.GroupContract{
// 	Name: to.Ptr("59306a29e4bbd510dc24e5f9"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/groups"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/59306a29e4bbd510dc24e5f9"),
// 	Properties: &armapimanagement.GroupContractProperties{
// 		Type: to.Ptr(armapimanagement.GroupTypeExternal),
// 		Description: to.Ptr("awesome group of people"),
// 		BuiltIn: to.Ptr(false),
// 		DisplayName: to.Ptr("AwesomeGroup (samiraad.onmicrosoft.com)"),
// 		ExternalID: to.Ptr("aad://samiraad.onmicrosoft.com/groups/3773adf4-032e-4d25-9988-eaff9ca72eca"),
// 	},
// }
Output:

func (*GroupClient) GetEntityTag

func (client *GroupClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, groupID string, options *GroupClientGetEntityTagOptions) (GroupClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the group specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • groupID - Group identifier. Must be unique in the current API Management service instance.
  • options - GroupClientGetEntityTagOptions contains the optional parameters for the GroupClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGroup.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewGroupClient().GetEntityTag(ctx, "rg1", "apimService1", "59306a29e4bbd510dc24e5f9", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*GroupClient) NewListByServicePager

func (client *GroupClient) NewListByServicePager(resourceGroupName string, serviceName string, options *GroupClientListByServiceOptions) *runtime.Pager[GroupClientListByServiceResponse]

NewListByServicePager - Lists a collection of groups defined within a service instance.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - GroupClientListByServiceOptions contains the optional parameters for the GroupClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGroups.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewGroupClient().NewListByServicePager("rg1", "apimService1", &armapimanagement.GroupClientListByServiceOptions{Filter: nil,
	Top:  nil,
	Skip: 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.GroupCollection = armapimanagement.GroupCollection{
	// 	Count: to.Ptr[int64](4),
	// 	Value: []*armapimanagement.GroupContract{
	// 		{
	// 			Name: to.Ptr("5600b59375ff190048020001"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/groups"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/5600b59375ff190048020001"),
	// 			Properties: &armapimanagement.GroupContractProperties{
	// 				Type: to.Ptr(armapimanagement.GroupTypeSystem),
	// 				Description: to.Ptr("Administrators is a built-in group. Its membership is managed by the system. Microsoft Azure subscription administrators fall into this group."),
	// 				BuiltIn: to.Ptr(true),
	// 				DisplayName: to.Ptr("Administrators"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("59306a29e4bbd510dc24e5f9"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/groups"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/59306a29e4bbd510dc24e5f9"),
	// 			Properties: &armapimanagement.GroupContractProperties{
	// 				Type: to.Ptr(armapimanagement.GroupTypeExternal),
	// 				Description: to.Ptr("awesome group of people"),
	// 				BuiltIn: to.Ptr(false),
	// 				DisplayName: to.Ptr("AwesomeGroup (samiraad.onmicrosoft.com)"),
	// 				ExternalID: to.Ptr("aad://samiraad.onmicrosoft.com/groups/3773adf4-032e-4d25-9988-eaff9ca72eca"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("5600b59375ff190048020002"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/groups"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/5600b59375ff190048020002"),
	// 			Properties: &armapimanagement.GroupContractProperties{
	// 				Type: to.Ptr(armapimanagement.GroupTypeSystem),
	// 				Description: to.Ptr("Developers is a built-in group. Its membership is managed by the system. Signed-in users fall into this group."),
	// 				BuiltIn: to.Ptr(true),
	// 				DisplayName: to.Ptr("Developers"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("5600b59375ff190048020003"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/groups"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/5600b59375ff190048020003"),
	// 			Properties: &armapimanagement.GroupContractProperties{
	// 				Type: to.Ptr(armapimanagement.GroupTypeSystem),
	// 				Description: to.Ptr("Guests is a built-in group. Its membership is managed by the system. Unauthenticated users visiting the developer portal fall into this group."),
	// 				BuiltIn: to.Ptr(true),
	// 				DisplayName: to.Ptr("Guests"),
	// 			},
	// 	}},
	// }
}
Output:

func (*GroupClient) Update

func (client *GroupClient) Update(ctx context.Context, resourceGroupName string, serviceName string, groupID string, ifMatch string, parameters GroupUpdateParameters, options *GroupClientUpdateOptions) (GroupClientUpdateResponse, error)

Update - Updates the details of the group specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • groupID - Group identifier. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - Update parameters.
  • options - GroupClientUpdateOptions contains the optional parameters for the GroupClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateGroup.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewGroupClient().Update(ctx, "rg1", "apimService1", "tempgroup", "*", armapimanagement.GroupUpdateParameters{
	Properties: &armapimanagement.GroupUpdateParametersProperties{
		DisplayName: to.Ptr("temp group"),
	},
}, 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.GroupContract = armapimanagement.GroupContract{
// 	Name: to.Ptr("tempgroup"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/groups"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/tempgroup"),
// 	Properties: &armapimanagement.GroupContractProperties{
// 		Type: to.Ptr(armapimanagement.GroupTypeExternal),
// 		Description: to.Ptr("awesome group of people"),
// 		BuiltIn: to.Ptr(false),
// 		DisplayName: to.Ptr("tempgroup"),
// 		ExternalID: to.Ptr("aad://samiraad.onmicrosoft.com/groups/3773adf4-032e-4d25-9988-eaff9ca72eca"),
// 	},
// }
Output:

type GroupClientCreateOrUpdateOptions

type GroupClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

GroupClientCreateOrUpdateOptions contains the optional parameters for the GroupClient.CreateOrUpdate method.

type GroupClientCreateOrUpdateResponse

type GroupClientCreateOrUpdateResponse struct {
	// Contract details.
	GroupContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GroupClientCreateOrUpdateResponse contains the response from method GroupClient.CreateOrUpdate.

type GroupClientDeleteOptions

type GroupClientDeleteOptions struct {
}

GroupClientDeleteOptions contains the optional parameters for the GroupClient.Delete method.

type GroupClientDeleteResponse

type GroupClientDeleteResponse struct {
}

GroupClientDeleteResponse contains the response from method GroupClient.Delete.

type GroupClientGetEntityTagOptions

type GroupClientGetEntityTagOptions struct {
}

GroupClientGetEntityTagOptions contains the optional parameters for the GroupClient.GetEntityTag method.

type GroupClientGetEntityTagResponse

type GroupClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

GroupClientGetEntityTagResponse contains the response from method GroupClient.GetEntityTag.

type GroupClientGetOptions

type GroupClientGetOptions struct {
}

GroupClientGetOptions contains the optional parameters for the GroupClient.Get method.

type GroupClientGetResponse

type GroupClientGetResponse struct {
	// Contract details.
	GroupContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GroupClientGetResponse contains the response from method GroupClient.Get.

type GroupClientListByServiceOptions

type GroupClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | externalId | filter | eq | |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

GroupClientListByServiceOptions contains the optional parameters for the GroupClient.NewListByServicePager method.

type GroupClientListByServiceResponse

type GroupClientListByServiceResponse struct {
	// Paged Group list representation.
	GroupCollection
}

GroupClientListByServiceResponse contains the response from method GroupClient.NewListByServicePager.

type GroupClientUpdateOptions

type GroupClientUpdateOptions struct {
}

GroupClientUpdateOptions contains the optional parameters for the GroupClient.Update method.

type GroupClientUpdateResponse

type GroupClientUpdateResponse struct {
	// Contract details.
	GroupContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GroupClientUpdateResponse contains the response from method GroupClient.Update.

type GroupCollection

type GroupCollection struct {
	// Total record count number across all pages.
	Count *int64

	// Next page link if any.
	NextLink *string

	// Page values.
	Value []*GroupContract
}

GroupCollection - Paged Group list representation.

func (GroupCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GroupCollection.

func (*GroupCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type GroupCollection.

type GroupContract

type GroupContract struct {
	// Group entity contract properties.
	Properties *GroupContractProperties

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

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

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

GroupContract - Contract details.

func (GroupContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GroupContract.

func (*GroupContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type GroupContract.

type GroupContractProperties

type GroupContractProperties struct {
	// REQUIRED; Group name.
	DisplayName *string

	// Group description. Can contain HTML formatting tags.
	Description *string

	// For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active
	// Directory aad://<tenant>.onmicrosoft.com/groups/<group object id>; otherwise
	// the value is null.
	ExternalID *string

	// Group type.
	Type *GroupType

	// READ-ONLY; true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false.
	BuiltIn *bool
}

GroupContractProperties - Group contract Properties.

func (GroupContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GroupContractProperties.

func (*GroupContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type GroupContractProperties.

type GroupCreateParameters

type GroupCreateParameters struct {
	// Properties supplied to Create Group operation.
	Properties *GroupCreateParametersProperties
}

GroupCreateParameters - Parameters supplied to the Create Group operation.

func (GroupCreateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GroupCreateParameters.

func (*GroupCreateParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type GroupCreateParameters.

type GroupCreateParametersProperties

type GroupCreateParametersProperties struct {
	// REQUIRED; Group name.
	DisplayName *string

	// Group description.
	Description *string

	// Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g.
	// for Azure Active Directory aad://<tenant>.onmicrosoft.com/groups/<group object
	// id>; otherwise the value is null.
	ExternalID *string

	// Group type.
	Type *GroupType
}

GroupCreateParametersProperties - Parameters supplied to the Create Group operation.

func (GroupCreateParametersProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GroupCreateParametersProperties.

func (*GroupCreateParametersProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type GroupCreateParametersProperties.

type GroupType

type GroupType string

GroupType - Group type.

const (
	GroupTypeCustom   GroupType = "custom"
	GroupTypeExternal GroupType = "external"
	GroupTypeSystem   GroupType = "system"
)

func PossibleGroupTypeValues

func PossibleGroupTypeValues() []GroupType

PossibleGroupTypeValues returns the possible values for the GroupType const type.

type GroupUpdateParameters

type GroupUpdateParameters struct {
	// Group entity update contract properties.
	Properties *GroupUpdateParametersProperties
}

GroupUpdateParameters - Parameters supplied to the Update Group operation.

func (GroupUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GroupUpdateParameters.

func (*GroupUpdateParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type GroupUpdateParameters.

type GroupUpdateParametersProperties

type GroupUpdateParametersProperties struct {
	// Group description.
	Description *string

	// Group name.
	DisplayName *string

	// Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g.
	// for Azure Active Directory aad://<tenant>.onmicrosoft.com/groups/<group object
	// id>; otherwise the value is null.
	ExternalID *string

	// Group type.
	Type *GroupType
}

GroupUpdateParametersProperties - Parameters supplied to the Update Group operation.

func (GroupUpdateParametersProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GroupUpdateParametersProperties.

func (*GroupUpdateParametersProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type GroupUpdateParametersProperties.

type GroupUserClient

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

GroupUserClient contains the methods for the GroupUser group. Don't use this type directly, use NewGroupUserClient() instead.

func NewGroupUserClient

func NewGroupUserClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GroupUserClient, error)

NewGroupUserClient creates a new instance of GroupUserClient 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 (*GroupUserClient) CheckEntityExists

func (client *GroupUserClient) CheckEntityExists(ctx context.Context, resourceGroupName string, serviceName string, groupID string, userID string, options *GroupUserClientCheckEntityExistsOptions) (GroupUserClientCheckEntityExistsResponse, error)

CheckEntityExists - Checks that user entity specified by identifier is associated with the group entity.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • groupID - Group identifier. Must be unique in the current API Management service instance.
  • userID - User identifier. Must be unique in the current API Management service instance.
  • options - GroupUserClientCheckEntityExistsOptions contains the optional parameters for the GroupUserClient.CheckEntityExists method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGroupUser.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewGroupUserClient().CheckEntityExists(ctx, "rg1", "apimService1", "59306a29e4bbd510dc24e5f9", "5931a75ae4bbd512a88c680b", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*GroupUserClient) Create

func (client *GroupUserClient) Create(ctx context.Context, resourceGroupName string, serviceName string, groupID string, userID string, options *GroupUserClientCreateOptions) (GroupUserClientCreateResponse, error)

Create - Add existing user to existing group If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • groupID - Group identifier. Must be unique in the current API Management service instance.
  • userID - User identifier. Must be unique in the current API Management service instance.
  • options - GroupUserClientCreateOptions contains the optional parameters for the GroupUserClient.Create method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGroupUser.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewGroupUserClient().Create(ctx, "rg1", "apimService1", "tempgroup", "59307d350af58404d8a26300", 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.UserContract = armapimanagement.UserContract{
// 	Name: to.Ptr("59307d350af58404d8a26300"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/groups/users"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/59307d350af58404d8a26300"),
// 	Properties: &armapimanagement.UserContractProperties{
// 		Identities: []*armapimanagement.UserIdentityContract{
// 		},
// 		State: to.Ptr(armapimanagement.UserStateActive),
// 		Email: to.Ptr("testuser1@live.com"),
// 		FirstName: to.Ptr("test"),
// 		Groups: []*armapimanagement.GroupContractProperties{
// 		},
// 		LastName: to.Ptr("user"),
// 		RegistrationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T20:46:45.437Z"); return t}()),
// 	},
// }
Output:

func (*GroupUserClient) Delete

func (client *GroupUserClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, groupID string, userID string, options *GroupUserClientDeleteOptions) (GroupUserClientDeleteResponse, error)

Delete - Remove existing user from existing group. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • groupID - Group identifier. Must be unique in the current API Management service instance.
  • userID - User identifier. Must be unique in the current API Management service instance.
  • options - GroupUserClientDeleteOptions contains the optional parameters for the GroupUserClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGroupUser.json

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

func (*GroupUserClient) NewListPager

func (client *GroupUserClient) NewListPager(resourceGroupName string, serviceName string, groupID string, options *GroupUserClientListOptions) *runtime.Pager[GroupUserClientListResponse]

NewListPager - Lists a collection of user entities associated with the group.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • groupID - Group identifier. Must be unique in the current API Management service instance.
  • options - GroupUserClientListOptions contains the optional parameters for the GroupUserClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGroupUsers.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewGroupUserClient().NewListPager("rg1", "apimService1", "57d2ef278aa04f0888cba3f3", &armapimanagement.GroupUserClientListOptions{Filter: nil,
	Top:  nil,
	Skip: 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.UserCollection = armapimanagement.UserCollection{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.UserContract{
	// 		{
	// 			Name: to.Ptr("armTemplateUser1"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/groups/users"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/kjoshiarmTemplateUser1"),
	// 			Properties: &armapimanagement.UserContractProperties{
	// 				Identities: []*armapimanagement.UserIdentityContract{
	// 					{
	// 						ID: to.Ptr("user1@live.com"),
	// 						Provider: to.Ptr("Basic"),
	// 				}},
	// 				Note: to.Ptr("note for user 1"),
	// 				State: to.Ptr(armapimanagement.UserStateActive),
	// 				Email: to.Ptr("user1@live.com"),
	// 				FirstName: to.Ptr("user1"),
	// 				LastName: to.Ptr("lastname1"),
	// 				RegistrationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-31T18:54:41.447Z"); return t}()),
	// 			},
	// 	}},
	// }
}
Output:

type GroupUserClientCheckEntityExistsOptions

type GroupUserClientCheckEntityExistsOptions struct {
}

GroupUserClientCheckEntityExistsOptions contains the optional parameters for the GroupUserClient.CheckEntityExists method.

type GroupUserClientCheckEntityExistsResponse

type GroupUserClientCheckEntityExistsResponse struct {
	// Success indicates if the operation succeeded or failed.
	Success bool
}

GroupUserClientCheckEntityExistsResponse contains the response from method GroupUserClient.CheckEntityExists.

type GroupUserClientCreateOptions

type GroupUserClientCreateOptions struct {
}

GroupUserClientCreateOptions contains the optional parameters for the GroupUserClient.Create method.

type GroupUserClientCreateResponse

type GroupUserClientCreateResponse struct {
	// User details.
	UserContract
}

GroupUserClientCreateResponse contains the response from method GroupUserClient.Create.

type GroupUserClientDeleteOptions

type GroupUserClientDeleteOptions struct {
}

GroupUserClientDeleteOptions contains the optional parameters for the GroupUserClient.Delete method.

type GroupUserClientDeleteResponse

type GroupUserClientDeleteResponse struct {
}

GroupUserClientDeleteResponse contains the response from method GroupUserClient.Delete.

type GroupUserClientListOptions

type GroupUserClientListOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | registrationDate | filter | ge, le, eq, ne, gt, lt | |
	// | note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

GroupUserClientListOptions contains the optional parameters for the GroupUserClient.NewListPager method.

type GroupUserClientListResponse

type GroupUserClientListResponse struct {
	// Paged Users list representation.
	UserCollection
}

GroupUserClientListResponse contains the response from method GroupUserClient.NewListPager.

type HTTPCorrelationProtocol

type HTTPCorrelationProtocol string

HTTPCorrelationProtocol - Sets correlation protocol to use for Application Insights diagnostics.

const (
	// HTTPCorrelationProtocolLegacy - Inject Request-Id and Request-Context headers with request correlation data. See https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md.
	HTTPCorrelationProtocolLegacy HTTPCorrelationProtocol = "Legacy"
	// HTTPCorrelationProtocolNone - Do not read and inject correlation headers.
	HTTPCorrelationProtocolNone HTTPCorrelationProtocol = "None"
	// HTTPCorrelationProtocolW3C - Inject Trace Context headers. See https://w3c.github.io/trace-context.
	HTTPCorrelationProtocolW3C HTTPCorrelationProtocol = "W3C"
)

func PossibleHTTPCorrelationProtocolValues

func PossibleHTTPCorrelationProtocolValues() []HTTPCorrelationProtocol

PossibleHTTPCorrelationProtocolValues returns the possible values for the HTTPCorrelationProtocol const type.

type HTTPHeader

type HTTPHeader struct {
	// REQUIRED; Header name.
	Name *string

	// REQUIRED; Header value.
	Value *string
}

HTTPHeader - HTTP header and it's value.

func (HTTPHeader) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type HTTPHeader.

func (*HTTPHeader) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type HTTPHeader.

type HTTPMessageDiagnostic

type HTTPMessageDiagnostic struct {
	// Body logging settings.
	Body *BodyDiagnosticSettings

	// Data masking settings.
	DataMasking *DataMasking

	// Array of HTTP Headers to log.
	Headers []*string
}

HTTPMessageDiagnostic - Http message diagnostic settings.

func (HTTPMessageDiagnostic) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type HTTPMessageDiagnostic.

func (*HTTPMessageDiagnostic) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type HTTPMessageDiagnostic.

type HostnameConfiguration

type HostnameConfiguration struct {
	// REQUIRED; Hostname to configure on the Api Management service.
	HostName *string

	// REQUIRED; Hostname type.
	Type *HostnameType

	// Certificate information.
	Certificate *CertificateInformation

	// Certificate Password.
	CertificatePassword *string

	// Certificate Source.
	CertificateSource *CertificateSource

	// Certificate Status.
	CertificateStatus *CertificateStatus

	// Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate. If a client does not
	// send the SNI header, then this will be the certificate that will be challenged.
	// The property is useful if a service has multiple custom hostname enabled and it needs to decide on the default ssl certificate.
	// The setting only applied to gateway Hostname Type.
	DefaultSSLBinding *bool

	// Base64 Encoded certificate.
	EncodedCertificate *string

	// System or User Assigned Managed identity clientId as generated by Azure AD, which has GET access to the keyVault containing
	// the SSL certificate.
	IdentityClientID *string

	// Url to the KeyVault Secret containing the Ssl Certificate. If absolute Url containing version is provided, auto-update
	// of ssl certificate will not work. This requires Api Management service to be
	// configured with aka.ms/apimmsi. The secret should be of type application/x-pkcs12
	KeyVaultID *string

	// Specify true to always negotiate client certificate on the hostname. Default Value is false.
	NegotiateClientCertificate *bool
}

HostnameConfiguration - Custom hostname configuration.

func (HostnameConfiguration) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type HostnameConfiguration.

func (*HostnameConfiguration) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type HostnameConfiguration.

type HostnameType

type HostnameType string

HostnameType - Hostname type.

const (
	HostnameTypeDeveloperPortal HostnameType = "DeveloperPortal"
	HostnameTypeManagement      HostnameType = "Management"
	HostnameTypePortal          HostnameType = "Portal"
	HostnameTypeProxy           HostnameType = "Proxy"
	HostnameTypeScm             HostnameType = "Scm"
)

func PossibleHostnameTypeValues

func PossibleHostnameTypeValues() []HostnameType

PossibleHostnameTypeValues returns the possible values for the HostnameType const type.

type IdentityProviderBaseParameters

type IdentityProviderBaseParameters struct {
	// List of Allowed Tenants when configuring Azure Active Directory login.
	AllowedTenants []*string

	// OpenID Connect discovery endpoint hostname for AAD or AAD B2C.
	Authority *string

	// The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider.
	ClientLibrary *string

	// Password Reset Policy Name. Only applies to AAD B2C Identity Provider.
	PasswordResetPolicyName *string

	// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider.
	ProfileEditingPolicyName *string

	// Signin Policy Name. Only applies to AAD B2C Identity Provider.
	SigninPolicyName *string

	// The TenantId to use instead of Common when logging into Active Directory
	SigninTenant *string

	// Signup Policy Name. Only applies to AAD B2C Identity Provider.
	SignupPolicyName *string

	// Identity Provider Type identifier.
	Type *IdentityProviderType
}

IdentityProviderBaseParameters - Identity Provider Base Parameter Properties.

func (IdentityProviderBaseParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type IdentityProviderBaseParameters.

func (*IdentityProviderBaseParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviderBaseParameters.

type IdentityProviderClient

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

IdentityProviderClient contains the methods for the IdentityProvider group. Don't use this type directly, use NewIdentityProviderClient() instead.

func NewIdentityProviderClient

func NewIdentityProviderClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IdentityProviderClient, error)

NewIdentityProviderClient creates a new instance of IdentityProviderClient 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 (*IdentityProviderClient) CreateOrUpdate

CreateOrUpdate - Creates or Updates the IdentityProvider configuration. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • identityProviderName - Identity Provider Type identifier.
  • parameters - Create parameters.
  • options - IdentityProviderClientCreateOrUpdateOptions contains the optional parameters for the IdentityProviderClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateIdentityProvider.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewIdentityProviderClient().CreateOrUpdate(ctx, "rg1", "apimService1", armapimanagement.IdentityProviderTypeFacebook, armapimanagement.IdentityProviderCreateContract{
	Properties: &armapimanagement.IdentityProviderCreateContractProperties{
		ClientID:     to.Ptr("facebookid"),
		ClientSecret: to.Ptr("facebookapplicationsecret"),
	},
}, &armapimanagement.IdentityProviderClientCreateOrUpdateOptions{IfMatch: 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.IdentityProviderContract = armapimanagement.IdentityProviderContract{
// 	Name: to.Ptr("Facebook"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/identityProviders"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/identityProviders/Facebook"),
// 	Properties: &armapimanagement.IdentityProviderContractProperties{
// 		Type: to.Ptr(armapimanagement.IdentityProviderTypeFacebook),
// 		ClientID: to.Ptr("facebookid"),
// 	},
// }
Output:

func (*IdentityProviderClient) Delete

func (client *IdentityProviderClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, ifMatch string, options *IdentityProviderClientDeleteOptions) (IdentityProviderClientDeleteResponse, error)

Delete - Deletes the specified identity provider configuration. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • identityProviderName - Identity Provider Type identifier.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - IdentityProviderClientDeleteOptions contains the optional parameters for the IdentityProviderClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteIdentityProvider.json

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

func (*IdentityProviderClient) Get

func (client *IdentityProviderClient) Get(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, options *IdentityProviderClientGetOptions) (IdentityProviderClientGetResponse, error)

Get - Gets the configuration details of the identity Provider configured in specified service instance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • identityProviderName - Identity Provider Type identifier.
  • options - IdentityProviderClientGetOptions contains the optional parameters for the IdentityProviderClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetIdentityProvider.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewIdentityProviderClient().Get(ctx, "rg1", "apimService1", armapimanagement.IdentityProviderTypeAADB2C, 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.IdentityProviderContract = armapimanagement.IdentityProviderContract{
// 	Name: to.Ptr("AadB2C"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/identityProviders"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/identityProviders/AadB2C"),
// 	Properties: &armapimanagement.IdentityProviderContractProperties{
// 		Type: to.Ptr(armapimanagement.IdentityProviderTypeAADB2C),
// 		AllowedTenants: []*string{
// 			to.Ptr("contosoaadb2c.onmicrosoft.com"),
// 			to.Ptr("contoso2aadb2c.onmicrosoft.com")},
// 			Authority: to.Ptr("login.microsoftonline.com"),
// 			SigninPolicyName: to.Ptr("B2C_1_policy-signin"),
// 			SigninTenant: to.Ptr("contosoaadb2c.onmicrosoft.com"),
// 			SignupPolicyName: to.Ptr("B2C_1_policy-signup"),
// 			ClientID: to.Ptr("f02dafe2-b8b8-48ec-a38e-27e5c16c51e5"),
// 		},
// 	}
Output:

func (*IdentityProviderClient) GetEntityTag

func (client *IdentityProviderClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, options *IdentityProviderClientGetEntityTagOptions) (IdentityProviderClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the identityProvider specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • identityProviderName - Identity Provider Type identifier.
  • options - IdentityProviderClientGetEntityTagOptions contains the optional parameters for the IdentityProviderClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadIdentityProvider.json

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

func (*IdentityProviderClient) ListSecrets

func (client *IdentityProviderClient) ListSecrets(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, options *IdentityProviderClientListSecretsOptions) (IdentityProviderClientListSecretsResponse, error)

ListSecrets - Gets the client secret details of the Identity Provider. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • identityProviderName - Identity Provider Type identifier.
  • options - IdentityProviderClientListSecretsOptions contains the optional parameters for the IdentityProviderClient.ListSecrets method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementIdentityProviderListSecrets.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewIdentityProviderClient().ListSecrets(ctx, "rg1", "apimService1", armapimanagement.IdentityProviderTypeAADB2C, 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.ClientSecretContract = armapimanagement.ClientSecretContract{
// 	ClientSecret: to.Ptr("XXXXXXX"),
// }
Output:

func (*IdentityProviderClient) NewListByServicePager

func (client *IdentityProviderClient) NewListByServicePager(resourceGroupName string, serviceName string, options *IdentityProviderClientListByServiceOptions) *runtime.Pager[IdentityProviderClientListByServiceResponse]

NewListByServicePager - Lists a collection of Identity Provider configured in the specified service instance.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - IdentityProviderClientListByServiceOptions contains the optional parameters for the IdentityProviderClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListIdentityProviders.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewIdentityProviderClient().NewListByServicePager("rg1", "apimService1", 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.IdentityProviderList = armapimanagement.IdentityProviderList{
	// 	Count: to.Ptr[int64](3),
	// 	Value: []*armapimanagement.IdentityProviderContract{
	// 		{
	// 			Name: to.Ptr("Google"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/identityProviders"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/identityProviders/Google"),
	// 			Properties: &armapimanagement.IdentityProviderContractProperties{
	// 				Type: to.Ptr(armapimanagement.IdentityProviderTypeGoogle),
	// 				ClientID: to.Ptr("googleId"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Aad"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/identityProviders"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/identityProviders/Aad"),
	// 			Properties: &armapimanagement.IdentityProviderContractProperties{
	// 				Type: to.Ptr(armapimanagement.IdentityProviderTypeAAD),
	// 				AllowedTenants: []*string{
	// 					to.Ptr("samiraad.onmicrosoft.com")},
	// 					ClientID: to.Ptr("aadapplicationid"),
	// 				},
	// 			},
	// 			{
	// 				Name: to.Ptr("AadB2C"),
	// 				Type: to.Ptr("Microsoft.ApiManagement/service/identityProviders"),
	// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/identityProviders/AadB2C"),
	// 				Properties: &armapimanagement.IdentityProviderContractProperties{
	// 					Type: to.Ptr(armapimanagement.IdentityProviderTypeAADB2C),
	// 					AllowedTenants: []*string{
	// 						to.Ptr("samirtestbc.onmicrosoft.com")},
	// 						SigninPolicyName: to.Ptr("B2C_1_Signin_Default"),
	// 						SignupPolicyName: to.Ptr("B2C_1_Signup_Default"),
	// 						ClientID: to.Ptr("aadb2clientId"),
	// 					},
	// 			}},
	// 		}
}
Output:

func (*IdentityProviderClient) Update

func (client *IdentityProviderClient) Update(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, ifMatch string, parameters IdentityProviderUpdateParameters, options *IdentityProviderClientUpdateOptions) (IdentityProviderClientUpdateResponse, error)

Update - Updates an existing IdentityProvider configuration. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • identityProviderName - Identity Provider Type identifier.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - Update parameters.
  • options - IdentityProviderClientUpdateOptions contains the optional parameters for the IdentityProviderClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateIdentityProvider.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewIdentityProviderClient().Update(ctx, "rg1", "apimService1", armapimanagement.IdentityProviderTypeFacebook, "*", armapimanagement.IdentityProviderUpdateParameters{
	Properties: &armapimanagement.IdentityProviderUpdateProperties{
		ClientID:     to.Ptr("updatedfacebookid"),
		ClientSecret: to.Ptr("updatedfacebooksecret"),
	},
}, 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.IdentityProviderContract = armapimanagement.IdentityProviderContract{
// 	Name: to.Ptr("AadB2C"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/identityProviders"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/identityProviders/AadB2C"),
// 	Properties: &armapimanagement.IdentityProviderContractProperties{
// 		Type: to.Ptr(armapimanagement.IdentityProviderTypeAADB2C),
// 		AllowedTenants: []*string{
// 			to.Ptr("contosoaadb2c.onmicrosoft.com"),
// 			to.Ptr("contoso2aadb2c.onmicrosoft.com")},
// 			Authority: to.Ptr("login.microsoftonline.com"),
// 			SigninPolicyName: to.Ptr("B2C_1_policy-signin"),
// 			SigninTenant: to.Ptr("contosoaadb2c.onmicrosoft.com"),
// 			SignupPolicyName: to.Ptr("B2C_1_policy-signup"),
// 			ClientID: to.Ptr("f02dafe2-b8b8-48ec-a38e-27e5c16c51e5"),
// 		},
// 	}
Output:

type IdentityProviderClientCreateOrUpdateOptions

type IdentityProviderClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

IdentityProviderClientCreateOrUpdateOptions contains the optional parameters for the IdentityProviderClient.CreateOrUpdate method.

type IdentityProviderClientCreateOrUpdateResponse

type IdentityProviderClientCreateOrUpdateResponse struct {
	// Identity Provider details.
	IdentityProviderContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

IdentityProviderClientCreateOrUpdateResponse contains the response from method IdentityProviderClient.CreateOrUpdate.

type IdentityProviderClientDeleteOptions

type IdentityProviderClientDeleteOptions struct {
}

IdentityProviderClientDeleteOptions contains the optional parameters for the IdentityProviderClient.Delete method.

type IdentityProviderClientDeleteResponse

type IdentityProviderClientDeleteResponse struct {
}

IdentityProviderClientDeleteResponse contains the response from method IdentityProviderClient.Delete.

type IdentityProviderClientGetEntityTagOptions

type IdentityProviderClientGetEntityTagOptions struct {
}

IdentityProviderClientGetEntityTagOptions contains the optional parameters for the IdentityProviderClient.GetEntityTag method.

type IdentityProviderClientGetEntityTagResponse

type IdentityProviderClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

IdentityProviderClientGetEntityTagResponse contains the response from method IdentityProviderClient.GetEntityTag.

type IdentityProviderClientGetOptions

type IdentityProviderClientGetOptions struct {
}

IdentityProviderClientGetOptions contains the optional parameters for the IdentityProviderClient.Get method.

type IdentityProviderClientGetResponse

type IdentityProviderClientGetResponse struct {
	// Identity Provider details.
	IdentityProviderContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

IdentityProviderClientGetResponse contains the response from method IdentityProviderClient.Get.

type IdentityProviderClientListByServiceOptions

type IdentityProviderClientListByServiceOptions struct {
}

IdentityProviderClientListByServiceOptions contains the optional parameters for the IdentityProviderClient.NewListByServicePager method.

type IdentityProviderClientListByServiceResponse

type IdentityProviderClientListByServiceResponse struct {
	// List of all the Identity Providers configured on the service instance.
	IdentityProviderList
}

IdentityProviderClientListByServiceResponse contains the response from method IdentityProviderClient.NewListByServicePager.

type IdentityProviderClientListSecretsOptions

type IdentityProviderClientListSecretsOptions struct {
}

IdentityProviderClientListSecretsOptions contains the optional parameters for the IdentityProviderClient.ListSecrets method.

type IdentityProviderClientListSecretsResponse

type IdentityProviderClientListSecretsResponse struct {
	// Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.
	ClientSecretContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

IdentityProviderClientListSecretsResponse contains the response from method IdentityProviderClient.ListSecrets.

type IdentityProviderClientUpdateOptions

type IdentityProviderClientUpdateOptions struct {
}

IdentityProviderClientUpdateOptions contains the optional parameters for the IdentityProviderClient.Update method.

type IdentityProviderClientUpdateResponse

type IdentityProviderClientUpdateResponse struct {
	// Identity Provider details.
	IdentityProviderContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

IdentityProviderClientUpdateResponse contains the response from method IdentityProviderClient.Update.

type IdentityProviderContract

type IdentityProviderContract struct {
	// Identity Provider contract properties.
	Properties *IdentityProviderContractProperties

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

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

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

IdentityProviderContract - Identity Provider details.

func (IdentityProviderContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type IdentityProviderContract.

func (*IdentityProviderContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviderContract.

type IdentityProviderContractProperties

type IdentityProviderContractProperties struct {
	// REQUIRED; Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for
	// Google login, App ID for Microsoft.
	ClientID *string

	// List of Allowed Tenants when configuring Azure Active Directory login.
	AllowedTenants []*string

	// OpenID Connect discovery endpoint hostname for AAD or AAD B2C.
	Authority *string

	// The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider.
	ClientLibrary *string

	// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is
	// App Secret for Facebook login, API Key for Google login, Public Key for
	// Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.
	ClientSecret *string

	// Password Reset Policy Name. Only applies to AAD B2C Identity Provider.
	PasswordResetPolicyName *string

	// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider.
	ProfileEditingPolicyName *string

	// Signin Policy Name. Only applies to AAD B2C Identity Provider.
	SigninPolicyName *string

	// The TenantId to use instead of Common when logging into Active Directory
	SigninTenant *string

	// Signup Policy Name. Only applies to AAD B2C Identity Provider.
	SignupPolicyName *string

	// Identity Provider Type identifier.
	Type *IdentityProviderType
}

IdentityProviderContractProperties - The external Identity Providers like Facebook, Google, Microsoft, Twitter or Azure Active Directory which can be used to enable access to the API Management service developer portal for all users.

func (IdentityProviderContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type IdentityProviderContractProperties.

func (*IdentityProviderContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviderContractProperties.

type IdentityProviderCreateContract

type IdentityProviderCreateContract struct {
	// Identity Provider contract properties.
	Properties *IdentityProviderCreateContractProperties

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

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

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

IdentityProviderCreateContract - Identity Provider details.

func (IdentityProviderCreateContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type IdentityProviderCreateContract.

func (*IdentityProviderCreateContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviderCreateContract.

type IdentityProviderCreateContractProperties

type IdentityProviderCreateContractProperties struct {
	// REQUIRED; Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for
	// Google login, App ID for Microsoft.
	ClientID *string

	// REQUIRED; Client secret of the Application in external Identity Provider, used to authenticate login request. For example,
	// it is App Secret for Facebook login, API Key for Google login, Public Key for
	// Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.
	ClientSecret *string

	// List of Allowed Tenants when configuring Azure Active Directory login.
	AllowedTenants []*string

	// OpenID Connect discovery endpoint hostname for AAD or AAD B2C.
	Authority *string

	// The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider.
	ClientLibrary *string

	// Password Reset Policy Name. Only applies to AAD B2C Identity Provider.
	PasswordResetPolicyName *string

	// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider.
	ProfileEditingPolicyName *string

	// Signin Policy Name. Only applies to AAD B2C Identity Provider.
	SigninPolicyName *string

	// The TenantId to use instead of Common when logging into Active Directory
	SigninTenant *string

	// Signup Policy Name. Only applies to AAD B2C Identity Provider.
	SignupPolicyName *string

	// Identity Provider Type identifier.
	Type *IdentityProviderType
}

IdentityProviderCreateContractProperties - The external Identity Providers like Facebook, Google, Microsoft, Twitter or Azure Active Directory which can be used to enable access to the API Management service developer portal for all users.

func (IdentityProviderCreateContractProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type IdentityProviderCreateContractProperties.

func (*IdentityProviderCreateContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviderCreateContractProperties.

type IdentityProviderList

type IdentityProviderList struct {
	// Total record count number across all pages.
	Count *int64

	// Next page link if any.
	NextLink *string

	// Identity Provider configuration values.
	Value []*IdentityProviderContract
}

IdentityProviderList - List of all the Identity Providers configured on the service instance.

func (IdentityProviderList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type IdentityProviderList.

func (*IdentityProviderList) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviderList.

type IdentityProviderType

type IdentityProviderType string
const (
	// IdentityProviderTypeAAD - Azure Active Directory as Identity provider.
	IdentityProviderTypeAAD IdentityProviderType = "aad"
	// IdentityProviderTypeAADB2C - Azure Active Directory B2C as Identity provider.
	IdentityProviderTypeAADB2C IdentityProviderType = "aadB2C"
	// IdentityProviderTypeFacebook - Facebook as Identity provider.
	IdentityProviderTypeFacebook IdentityProviderType = "facebook"
	// IdentityProviderTypeGoogle - Google as Identity provider.
	IdentityProviderTypeGoogle IdentityProviderType = "google"
	// IdentityProviderTypeMicrosoft - Microsoft Live as Identity provider.
	IdentityProviderTypeMicrosoft IdentityProviderType = "microsoft"
	// IdentityProviderTypeTwitter - Twitter as Identity provider.
	IdentityProviderTypeTwitter IdentityProviderType = "twitter"
)

func PossibleIdentityProviderTypeValues

func PossibleIdentityProviderTypeValues() []IdentityProviderType

PossibleIdentityProviderTypeValues returns the possible values for the IdentityProviderType const type.

type IdentityProviderUpdateParameters

type IdentityProviderUpdateParameters struct {
	// Identity Provider update properties.
	Properties *IdentityProviderUpdateProperties
}

IdentityProviderUpdateParameters - Parameters supplied to update Identity Provider

func (IdentityProviderUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type IdentityProviderUpdateParameters.

func (*IdentityProviderUpdateParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviderUpdateParameters.

type IdentityProviderUpdateProperties

type IdentityProviderUpdateProperties struct {
	// List of Allowed Tenants when configuring Azure Active Directory login.
	AllowedTenants []*string

	// OpenID Connect discovery endpoint hostname for AAD or AAD B2C.
	Authority *string

	// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login,
	// App ID for Microsoft.
	ClientID *string

	// The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider.
	ClientLibrary *string

	// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is
	// App Secret for Facebook login, API Key for Google login, Public Key for
	// Microsoft.
	ClientSecret *string

	// Password Reset Policy Name. Only applies to AAD B2C Identity Provider.
	PasswordResetPolicyName *string

	// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider.
	ProfileEditingPolicyName *string

	// Signin Policy Name. Only applies to AAD B2C Identity Provider.
	SigninPolicyName *string

	// The TenantId to use instead of Common when logging into Active Directory
	SigninTenant *string

	// Signup Policy Name. Only applies to AAD B2C Identity Provider.
	SignupPolicyName *string

	// Identity Provider Type identifier.
	Type *IdentityProviderType
}

IdentityProviderUpdateProperties - Parameters supplied to the Update Identity Provider operation.

func (IdentityProviderUpdateProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type IdentityProviderUpdateProperties.

func (*IdentityProviderUpdateProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviderUpdateProperties.

type IssueAttachmentCollection

type IssueAttachmentCollection struct {
	// Total record count number across all pages.
	Count *int64

	// READ-ONLY; Next page link if any.
	NextLink *string

	// READ-ONLY; Issue Attachment values.
	Value []*IssueAttachmentContract
}

IssueAttachmentCollection - Paged Issue Attachment list representation.

func (IssueAttachmentCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type IssueAttachmentCollection.

func (*IssueAttachmentCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type IssueAttachmentCollection.

type IssueAttachmentContract

type IssueAttachmentContract struct {
	// Properties of the Issue Attachment.
	Properties *IssueAttachmentContractProperties

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

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

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

IssueAttachmentContract - Issue Attachment Contract details.

func (IssueAttachmentContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type IssueAttachmentContract.

func (*IssueAttachmentContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type IssueAttachmentContract.

type IssueAttachmentContractProperties

type IssueAttachmentContractProperties struct {
	// REQUIRED; An HTTP link or Base64-encoded binary data.
	Content *string

	// REQUIRED; Either 'link' if content is provided via an HTTP link or the MIME type of the Base64-encoded binary data provided
	// in the 'content' property.
	ContentFormat *string

	// REQUIRED; Filename by which the binary data will be saved.
	Title *string
}

IssueAttachmentContractProperties - Issue Attachment contract Properties.

func (IssueAttachmentContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type IssueAttachmentContractProperties.

func (*IssueAttachmentContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type IssueAttachmentContractProperties.

type IssueClient

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

IssueClient contains the methods for the Issue group. Don't use this type directly, use NewIssueClient() instead.

func NewIssueClient

func NewIssueClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IssueClient, error)

NewIssueClient creates a new instance of IssueClient 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 (*IssueClient) Get

func (client *IssueClient) Get(ctx context.Context, resourceGroupName string, serviceName string, issueID string, options *IssueClientGetOptions) (IssueClientGetResponse, error)

Get - Gets API Management issue details If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • issueID - Issue identifier. Must be unique in the current API Management service instance.
  • options - IssueClientGetOptions contains the optional parameters for the IssueClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetIssue.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewIssueClient().Get(ctx, "rg1", "apimService1", "57d2ef278aa04f0ad01d6cdc", 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.IssueContract = armapimanagement.IssueContract{
// 	Name: to.Ptr("57d2ef278aa04f0ad01d6cdc"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/issues"),
// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/issues/57d2ef278aa04f0ad01d6cdc"),
// 	Properties: &armapimanagement.IssueContractProperties{
// 		APIID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a"),
// 		CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-01T22:21:20.467Z"); return t}()),
// 		State: to.Ptr(armapimanagement.StateOpen),
// 		Description: to.Ptr("New API issue description"),
// 		Title: to.Ptr("New API issue"),
// 		UserID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1"),
// 	},
// }
Output:

func (*IssueClient) NewListByServicePager

func (client *IssueClient) NewListByServicePager(resourceGroupName string, serviceName string, options *IssueClientListByServiceOptions) *runtime.Pager[IssueClientListByServiceResponse]

NewListByServicePager - Lists a collection of issues in the specified service instance.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - IssueClientListByServiceOptions contains the optional parameters for the IssueClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListIssues.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewIssueClient().NewListByServicePager("rg1", "apimService1", &armapimanagement.IssueClientListByServiceOptions{Filter: nil,
	Top:  nil,
	Skip: 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.IssueCollection = armapimanagement.IssueCollection{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.IssueContract{
	// 		{
	// 			Name: to.Ptr("57d2ef278aa04f0ad01d6cdc"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/issues"),
	// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/issues/57d2ef278aa04f0ad01d6cdc"),
	// 			Properties: &armapimanagement.IssueContractProperties{
	// 				APIID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a"),
	// 				CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-01T22:21:20.467Z"); return t}()),
	// 				State: to.Ptr(armapimanagement.StateOpen),
	// 				Description: to.Ptr("New API issue description"),
	// 				Title: to.Ptr("New API issue"),
	// 				UserID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1"),
	// 			},
	// 	}},
	// }
}
Output:

type IssueClientGetOptions

type IssueClientGetOptions struct {
}

IssueClientGetOptions contains the optional parameters for the IssueClient.Get method.

type IssueClientGetResponse

type IssueClientGetResponse struct {
	// Issue Contract details.
	IssueContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

IssueClientGetResponse contains the response from method IssueClient.Get.

type IssueClientListByServiceOptions

type IssueClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | state | filter | eq | |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

IssueClientListByServiceOptions contains the optional parameters for the IssueClient.NewListByServicePager method.

type IssueClientListByServiceResponse

type IssueClientListByServiceResponse struct {
	// Paged Issue list representation.
	IssueCollection
}

IssueClientListByServiceResponse contains the response from method IssueClient.NewListByServicePager.

type IssueCollection

type IssueCollection struct {
	// Total record count number across all pages.
	Count *int64

	// READ-ONLY; Next page link if any.
	NextLink *string

	// READ-ONLY; Issue values.
	Value []*IssueContract
}

IssueCollection - Paged Issue list representation.

func (IssueCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type IssueCollection.

func (*IssueCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type IssueCollection.

type IssueCommentCollection

type IssueCommentCollection struct {
	// Total record count number across all pages.
	Count *int64

	// READ-ONLY; Next page link if any.
	NextLink *string

	// READ-ONLY; Issue Comment values.
	Value []*IssueCommentContract
}

IssueCommentCollection - Paged Issue Comment list representation.

func (IssueCommentCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type IssueCommentCollection.

func (*IssueCommentCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type IssueCommentCollection.

type IssueCommentContract

type IssueCommentContract struct {
	// Properties of the Issue Comment.
	Properties *IssueCommentContractProperties

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

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

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

IssueCommentContract - Issue Comment Contract details.

func (IssueCommentContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type IssueCommentContract.

func (*IssueCommentContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type IssueCommentContract.

type IssueCommentContractProperties

type IssueCommentContractProperties struct {
	// REQUIRED; Comment text.
	Text *string

	// REQUIRED; A resource identifier for the user who left the comment.
	UserID *string

	// Date and time when the comment was created.
	CreatedDate *time.Time
}

IssueCommentContractProperties - Issue Comment contract Properties.

func (IssueCommentContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type IssueCommentContractProperties.

func (*IssueCommentContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type IssueCommentContractProperties.

type IssueContract

type IssueContract struct {
	// Properties of the Issue.
	Properties *IssueContractProperties

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

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

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

IssueContract - Issue Contract details.

func (IssueContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type IssueContract.

func (*IssueContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type IssueContract.

type IssueContractBaseProperties

type IssueContractBaseProperties struct {
	// A resource identifier for the API the issue was created for.
	APIID *string

	// Date and time when the issue was created.
	CreatedDate *time.Time

	// Status of the issue.
	State *State
}

IssueContractBaseProperties - Issue contract Base Properties.

func (IssueContractBaseProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type IssueContractBaseProperties.

func (*IssueContractBaseProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type IssueContractBaseProperties.

type IssueContractProperties

type IssueContractProperties struct {
	// REQUIRED; Text describing the issue.
	Description *string

	// REQUIRED; The issue title.
	Title *string

	// REQUIRED; A resource identifier for the user created the issue.
	UserID *string

	// A resource identifier for the API the issue was created for.
	APIID *string

	// Date and time when the issue was created.
	CreatedDate *time.Time

	// Status of the issue.
	State *State
}

IssueContractProperties - Issue contract Properties.

func (IssueContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type IssueContractProperties.

func (*IssueContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type IssueContractProperties.

type IssueType

type IssueType string

IssueType - The type of issue.

const (
	IssueTypeAgentStopped        IssueType = "AgentStopped"
	IssueTypeDNSResolution       IssueType = "DnsResolution"
	IssueTypeGuestFirewall       IssueType = "GuestFirewall"
	IssueTypeNetworkSecurityRule IssueType = "NetworkSecurityRule"
	IssueTypePlatform            IssueType = "Platform"
	IssueTypePortThrottled       IssueType = "PortThrottled"
	IssueTypeSocketBind          IssueType = "SocketBind"
	IssueTypeUnknown             IssueType = "Unknown"
	IssueTypeUserDefinedRoute    IssueType = "UserDefinedRoute"
)

func PossibleIssueTypeValues

func PossibleIssueTypeValues() []IssueType

PossibleIssueTypeValues returns the possible values for the IssueType const type.

type IssueUpdateContract

type IssueUpdateContract struct {
	// Issue entity Update contract properties.
	Properties *IssueUpdateContractProperties
}

IssueUpdateContract - Issue update Parameters.

func (IssueUpdateContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type IssueUpdateContract.

func (*IssueUpdateContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type IssueUpdateContract.

type IssueUpdateContractProperties

type IssueUpdateContractProperties struct {
	// A resource identifier for the API the issue was created for.
	APIID *string

	// Date and time when the issue was created.
	CreatedDate *time.Time

	// Text describing the issue.
	Description *string

	// Status of the issue.
	State *State

	// The issue title.
	Title *string

	// A resource identifier for the user created the issue.
	UserID *string
}

IssueUpdateContractProperties - Issue contract Update Properties.

func (IssueUpdateContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type IssueUpdateContractProperties.

func (*IssueUpdateContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type IssueUpdateContractProperties.

type KeyType

type KeyType string

KeyType - The Key to be used to generate token for user.

const (
	KeyTypePrimary   KeyType = "primary"
	KeyTypeSecondary KeyType = "secondary"
)

func PossibleKeyTypeValues

func PossibleKeyTypeValues() []KeyType

PossibleKeyTypeValues returns the possible values for the KeyType const type.

type KeyVaultContractCreateProperties

type KeyVaultContractCreateProperties struct {
	// Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret.
	IdentityClientID *string

	// Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires
	// API Management service to be configured with aka.ms/apimmsi
	SecretIdentifier *string
}

KeyVaultContractCreateProperties - Create keyVault contract details.

func (KeyVaultContractCreateProperties) MarshalJSON

func (k KeyVaultContractCreateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type KeyVaultContractCreateProperties.

func (*KeyVaultContractCreateProperties) UnmarshalJSON

func (k *KeyVaultContractCreateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultContractCreateProperties.

type KeyVaultContractProperties

type KeyVaultContractProperties struct {
	// Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret.
	IdentityClientID *string

	// Last time sync and refresh status of secret from key vault.
	LastStatus *KeyVaultLastAccessStatusContractProperties

	// Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires
	// API Management service to be configured with aka.ms/apimmsi
	SecretIdentifier *string
}

KeyVaultContractProperties - KeyVault contract details.

func (KeyVaultContractProperties) MarshalJSON

func (k KeyVaultContractProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type KeyVaultContractProperties.

func (*KeyVaultContractProperties) UnmarshalJSON

func (k *KeyVaultContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultContractProperties.

type KeyVaultLastAccessStatusContractProperties

type KeyVaultLastAccessStatusContractProperties struct {
	// Last status code for sync and refresh of secret from key vault.
	Code *string

	// Details of the error else empty.
	Message *string

	// Last time secret was accessed. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO
	// 8601 standard.
	TimeStampUTC *time.Time
}

KeyVaultLastAccessStatusContractProperties - Issue contract Update Properties.

func (KeyVaultLastAccessStatusContractProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type KeyVaultLastAccessStatusContractProperties.

func (*KeyVaultLastAccessStatusContractProperties) UnmarshalJSON

func (k *KeyVaultLastAccessStatusContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultLastAccessStatusContractProperties.

type LoggerClient

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

LoggerClient contains the methods for the Logger group. Don't use this type directly, use NewLoggerClient() instead.

func NewLoggerClient

func NewLoggerClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoggerClient, error)

NewLoggerClient creates a new instance of LoggerClient 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 (*LoggerClient) CreateOrUpdate

func (client *LoggerClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, parameters LoggerContract, options *LoggerClientCreateOrUpdateOptions) (LoggerClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or Updates a logger. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • loggerID - Logger identifier. Must be unique in the API Management service instance.
  • parameters - Create parameters.
  • options - LoggerClientCreateOrUpdateOptions contains the optional parameters for the LoggerClient.CreateOrUpdate method.
Example (ApiManagementCreateAiLogger)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAILogger.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewLoggerClient().CreateOrUpdate(ctx, "rg1", "apimService1", "loggerId", armapimanagement.LoggerContract{
	Properties: &armapimanagement.LoggerContractProperties{
		Description: to.Ptr("adding a new logger"),
		Credentials: map[string]*string{
			"instrumentationKey": to.Ptr("11................a1"),
		},
		LoggerType: to.Ptr(armapimanagement.LoggerTypeApplicationInsights),
	},
}, &armapimanagement.LoggerClientCreateOrUpdateOptions{IfMatch: 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.LoggerContract = armapimanagement.LoggerContract{
// 	Name: to.Ptr("loggerId"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/loggers"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/loggerId"),
// 	Properties: &armapimanagement.LoggerContractProperties{
// 		Credentials: map[string]*string{
// 			"instrumentationKey": to.Ptr("{{5a.......2a}}"),
// 		},
// 		IsBuffered: to.Ptr(false),
// 		LoggerType: to.Ptr(armapimanagement.LoggerTypeApplicationInsights),
// 	},
// }
Output:

Example (ApiManagementCreateEhLogger)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateEHLogger.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewLoggerClient().CreateOrUpdate(ctx, "rg1", "apimService1", "eh1", armapimanagement.LoggerContract{
	Properties: &armapimanagement.LoggerContractProperties{
		Description: to.Ptr("adding a new logger"),
		Credentials: map[string]*string{
			"name":             to.Ptr("hydraeventhub"),
			"connectionString": to.Ptr("Endpoint=sb://hydraeventhub-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=********="),
		},
		LoggerType: to.Ptr(armapimanagement.LoggerTypeAzureEventHub),
	},
}, &armapimanagement.LoggerClientCreateOrUpdateOptions{IfMatch: 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.LoggerContract = armapimanagement.LoggerContract{
// 	Name: to.Ptr("eh1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/loggers"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/eh1"),
// 	Properties: &armapimanagement.LoggerContractProperties{
// 		Description: to.Ptr("adding a new logger"),
// 		Credentials: map[string]*string{
// 			"connectionString": to.Ptr("{{Logger-Credentials-5f28745bbebeeb13cc3f7301}}"),
// 		},
// 		IsBuffered: to.Ptr(true),
// 		LoggerType: to.Ptr(armapimanagement.LoggerTypeAzureEventHub),
// 	},
// }
Output:

func (*LoggerClient) Delete

func (client *LoggerClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, ifMatch string, options *LoggerClientDeleteOptions) (LoggerClientDeleteResponse, error)

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

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • loggerID - Logger identifier. Must be unique in the API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - LoggerClientDeleteOptions contains the optional parameters for the LoggerClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteLogger.json

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

func (*LoggerClient) Get

func (client *LoggerClient) Get(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, options *LoggerClientGetOptions) (LoggerClientGetResponse, error)

Get - Gets the details of the logger specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • loggerID - Logger identifier. Must be unique in the API Management service instance.
  • options - LoggerClientGetOptions contains the optional parameters for the LoggerClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetLogger.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewLoggerClient().Get(ctx, "rg1", "apimService1", "templateLogger", 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.LoggerContract = armapimanagement.LoggerContract{
// 	Name: to.Ptr("kloudapilogger1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/loggers"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/kloudapilogger1"),
// 	Properties: &armapimanagement.LoggerContractProperties{
// 		Description: to.Ptr("testeventhub3again"),
// 		Credentials: map[string]*string{
// 			"name": to.Ptr("testeventhub4"),
// 			"connectionString": to.Ptr("Endpoint=sb://eventhubapim.servicebus.windows.net/;SharedAccessKeyName=Sender;SharedAccessKey=************"),
// 		},
// 		IsBuffered: to.Ptr(true),
// 		LoggerType: to.Ptr(armapimanagement.LoggerTypeAzureEventHub),
// 		ResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.EventHub/namespaces/eventhubapim"),
// 	},
// }
Output:

func (*LoggerClient) GetEntityTag

func (client *LoggerClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, options *LoggerClientGetEntityTagOptions) (LoggerClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the logger specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • loggerID - Logger identifier. Must be unique in the API Management service instance.
  • options - LoggerClientGetEntityTagOptions contains the optional parameters for the LoggerClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadLogger.json

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

func (*LoggerClient) NewListByServicePager

func (client *LoggerClient) NewListByServicePager(resourceGroupName string, serviceName string, options *LoggerClientListByServiceOptions) *runtime.Pager[LoggerClientListByServiceResponse]

NewListByServicePager - Lists a collection of loggers in the specified service instance.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - LoggerClientListByServiceOptions contains the optional parameters for the LoggerClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListLoggers.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewLoggerClient().NewListByServicePager("rg1", "apimService1", &armapimanagement.LoggerClientListByServiceOptions{Filter: nil,
	Top:  nil,
	Skip: 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.LoggerCollection = armapimanagement.LoggerCollection{
	// 	Count: to.Ptr[int64](3),
	// 	Value: []*armapimanagement.LoggerContract{
	// 		{
	// 			Name: to.Ptr("azuremonitor"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/loggers"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/azuremonitor"),
	// 			Properties: &armapimanagement.LoggerContractProperties{
	// 				IsBuffered: to.Ptr(true),
	// 				LoggerType: to.Ptr(armapimanagement.LoggerTypeAzureMonitor),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("vvktest"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/loggers"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/vvktest"),
	// 			Properties: &armapimanagement.LoggerContractProperties{
	// 				Credentials: map[string]*string{
	// 					"instrumentationKey": to.Ptr("{{Logger-Credentials-5b1a17ef2b3f91153004b10d}}"),
	// 				},
	// 				IsBuffered: to.Ptr(true),
	// 				LoggerType: to.Ptr(armapimanagement.LoggerTypeApplicationInsights),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("applicationinsights"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/loggers"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/applicationinsights"),
	// 			Properties: &armapimanagement.LoggerContractProperties{
	// 				Description: to.Ptr("miaoappinsight"),
	// 				Credentials: map[string]*string{
	// 					"instrumentationKey": to.Ptr("{{Logger-Credentials-5b2056062b3f911ae84a3069}}"),
	// 				},
	// 				IsBuffered: to.Ptr(true),
	// 				LoggerType: to.Ptr(armapimanagement.LoggerTypeApplicationInsights),
	// 			},
	// 	}},
	// }
}
Output:

func (*LoggerClient) Update

func (client *LoggerClient) Update(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, ifMatch string, parameters LoggerUpdateContract, options *LoggerClientUpdateOptions) (LoggerClientUpdateResponse, error)

Update - Updates an existing logger. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • loggerID - Logger identifier. Must be unique in the API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - Update parameters.
  • options - LoggerClientUpdateOptions contains the optional parameters for the LoggerClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateLogger.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewLoggerClient().Update(ctx, "rg1", "apimService1", "eh1", "*", armapimanagement.LoggerUpdateContract{
	Properties: &armapimanagement.LoggerUpdateParameters{
		Description: to.Ptr("updating description"),
		LoggerType:  to.Ptr(armapimanagement.LoggerTypeAzureEventHub),
	},
}, 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.LoggerContract = armapimanagement.LoggerContract{
// 	Name: to.Ptr("eh1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/loggers"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/eh1"),
// 	Properties: &armapimanagement.LoggerContractProperties{
// 		Description: to.Ptr("updating description"),
// 		Credentials: map[string]*string{
// 			"connectionString": to.Ptr("{{Logger-Credentials-5f28745bbebeeb13cc3f7301}}"),
// 		},
// 		IsBuffered: to.Ptr(true),
// 		LoggerType: to.Ptr(armapimanagement.LoggerTypeAzureEventHub),
// 	},
// }
Output:

type LoggerClientCreateOrUpdateOptions

type LoggerClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

LoggerClientCreateOrUpdateOptions contains the optional parameters for the LoggerClient.CreateOrUpdate method.

type LoggerClientCreateOrUpdateResponse

type LoggerClientCreateOrUpdateResponse struct {
	// Logger details.
	LoggerContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

LoggerClientCreateOrUpdateResponse contains the response from method LoggerClient.CreateOrUpdate.

type LoggerClientDeleteOptions

type LoggerClientDeleteOptions struct {
}

LoggerClientDeleteOptions contains the optional parameters for the LoggerClient.Delete method.

type LoggerClientDeleteResponse

type LoggerClientDeleteResponse struct {
}

LoggerClientDeleteResponse contains the response from method LoggerClient.Delete.

type LoggerClientGetEntityTagOptions

type LoggerClientGetEntityTagOptions struct {
}

LoggerClientGetEntityTagOptions contains the optional parameters for the LoggerClient.GetEntityTag method.

type LoggerClientGetEntityTagResponse

type LoggerClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

LoggerClientGetEntityTagResponse contains the response from method LoggerClient.GetEntityTag.

type LoggerClientGetOptions

type LoggerClientGetOptions struct {
}

LoggerClientGetOptions contains the optional parameters for the LoggerClient.Get method.

type LoggerClientGetResponse

type LoggerClientGetResponse struct {
	// Logger details.
	LoggerContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

LoggerClientGetResponse contains the response from method LoggerClient.Get.

type LoggerClientListByServiceOptions

type LoggerClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | loggerType | filter | eq | |
	// | resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

LoggerClientListByServiceOptions contains the optional parameters for the LoggerClient.NewListByServicePager method.

type LoggerClientListByServiceResponse

type LoggerClientListByServiceResponse struct {
	// Paged Logger list representation.
	LoggerCollection
}

LoggerClientListByServiceResponse contains the response from method LoggerClient.NewListByServicePager.

type LoggerClientUpdateOptions

type LoggerClientUpdateOptions struct {
}

LoggerClientUpdateOptions contains the optional parameters for the LoggerClient.Update method.

type LoggerClientUpdateResponse

type LoggerClientUpdateResponse struct {
	// Logger details.
	LoggerContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

LoggerClientUpdateResponse contains the response from method LoggerClient.Update.

type LoggerCollection

type LoggerCollection struct {
	// Total record count number across all pages.
	Count *int64

	// Next page link if any.
	NextLink *string

	// Logger values.
	Value []*LoggerContract
}

LoggerCollection - Paged Logger list representation.

func (LoggerCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type LoggerCollection.

func (*LoggerCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type LoggerCollection.

type LoggerContract

type LoggerContract struct {
	// Logger entity contract properties.
	Properties *LoggerContractProperties

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

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

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

LoggerContract - Logger details.

func (LoggerContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type LoggerContract.

func (*LoggerContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type LoggerContract.

type LoggerContractProperties

type LoggerContractProperties struct {
	// REQUIRED; Logger type.
	LoggerType *LoggerType

	// The name and SendRule connection string of the event hub for azureEventHub logger. Instrumentation key for applicationInsights
	// logger.
	Credentials map[string]*string

	// Logger description.
	Description *string

	// Whether records are buffered in the logger before publishing. Default is assumed to be true.
	IsBuffered *bool

	// Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource).
	ResourceID *string
}

LoggerContractProperties - The Logger entity in API Management represents an event sink that you can use to log API Management events. Currently the Logger entity supports logging API Management events to Azure Event Hubs.

func (LoggerContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type LoggerContractProperties.

func (*LoggerContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type LoggerContractProperties.

type LoggerType

type LoggerType string

LoggerType - Logger type.

const (
	// LoggerTypeApplicationInsights - Azure Application Insights as log destination.
	LoggerTypeApplicationInsights LoggerType = "applicationInsights"
	// LoggerTypeAzureEventHub - Azure Event Hub as log destination.
	LoggerTypeAzureEventHub LoggerType = "azureEventHub"
	// LoggerTypeAzureMonitor - Azure Monitor
	LoggerTypeAzureMonitor LoggerType = "azureMonitor"
)

func PossibleLoggerTypeValues

func PossibleLoggerTypeValues() []LoggerType

PossibleLoggerTypeValues returns the possible values for the LoggerType const type.

type LoggerUpdateContract

type LoggerUpdateContract struct {
	// Logger entity update contract properties.
	Properties *LoggerUpdateParameters
}

LoggerUpdateContract - Logger update contract.

func (LoggerUpdateContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type LoggerUpdateContract.

func (*LoggerUpdateContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type LoggerUpdateContract.

type LoggerUpdateParameters

type LoggerUpdateParameters struct {
	// Logger credentials.
	Credentials map[string]*string

	// Logger description.
	Description *string

	// Whether records are buffered in the logger before publishing. Default is assumed to be true.
	IsBuffered *bool

	// Logger type.
	LoggerType *LoggerType
}

LoggerUpdateParameters - Parameters supplied to the Update Logger operation.

func (LoggerUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type LoggerUpdateParameters.

func (*LoggerUpdateParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type LoggerUpdateParameters.

type Method

type Method string

Method - The HTTP method to be used.

const (
	MethodGET  Method = "GET"
	MethodPOST Method = "POST"
)

func PossibleMethodValues

func PossibleMethodValues() []Method

PossibleMethodValues returns the possible values for the Method const type.

type NameAvailabilityReason

type NameAvailabilityReason string

NameAvailabilityReason - Invalid indicates the name provided does not match the resource provider’s naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable.

const (
	NameAvailabilityReasonAlreadyExists NameAvailabilityReason = "AlreadyExists"
	NameAvailabilityReasonInvalid       NameAvailabilityReason = "Invalid"
	NameAvailabilityReasonValid         NameAvailabilityReason = "Valid"
)

func PossibleNameAvailabilityReasonValues

func PossibleNameAvailabilityReasonValues() []NameAvailabilityReason

PossibleNameAvailabilityReasonValues returns the possible values for the NameAvailabilityReason const type.

type NamedValueClient

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

NamedValueClient contains the methods for the NamedValue group. Don't use this type directly, use NewNamedValueClient() instead.

func NewNamedValueClient

func NewNamedValueClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NamedValueClient, error)

NewNamedValueClient creates a new instance of NamedValueClient 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 (*NamedValueClient) BeginCreateOrUpdate

func (client *NamedValueClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, parameters NamedValueCreateContract, options *NamedValueClientBeginCreateOrUpdateOptions) (*runtime.Poller[NamedValueClientCreateOrUpdateResponse], error)

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

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • namedValueID - Identifier of the NamedValue.
  • parameters - Create parameters.
  • options - NamedValueClientBeginCreateOrUpdateOptions contains the optional parameters for the NamedValueClient.BeginCreateOrUpdate method.
Example (ApiManagementCreateNamedValue)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateNamedValue.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewNamedValueClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", "testprop2", armapimanagement.NamedValueCreateContract{
	Properties: &armapimanagement.NamedValueCreateContractProperties{
		Secret: to.Ptr(false),
		Tags: []*string{
			to.Ptr("foo"),
			to.Ptr("bar")},
		DisplayName: to.Ptr("prop3name"),
		Value:       to.Ptr("propValue"),
	},
}, &armapimanagement.NamedValueClientBeginCreateOrUpdateOptions{IfMatch: 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.NamedValueContract = armapimanagement.NamedValueContract{
// 	Name: to.Ptr("testprop2"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/namedValues"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop2"),
// 	Properties: &armapimanagement.NamedValueContractProperties{
// 		Secret: to.Ptr(false),
// 		Tags: []*string{
// 			to.Ptr("foo"),
// 			to.Ptr("bar")},
// 			DisplayName: to.Ptr("prop3name"),
// 			Value: to.Ptr("propValue"),
// 		},
// 	}
Output:

Example (ApiManagementCreateNamedValueWithKeyVault)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateNamedValueWithKeyVault.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewNamedValueClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", "testprop6", armapimanagement.NamedValueCreateContract{
	Properties: &armapimanagement.NamedValueCreateContractProperties{
		Secret: to.Ptr(true),
		Tags: []*string{
			to.Ptr("foo"),
			to.Ptr("bar")},
		DisplayName: to.Ptr("prop6namekv"),
		KeyVault: &armapimanagement.KeyVaultContractCreateProperties{
			IdentityClientID: to.Ptr("ceaa6b06-c00f-43ef-99ac-f53d1fe876a0"),
			SecretIdentifier: to.Ptr("https://contoso.vault.azure.net/secrets/aadSecret"),
		},
	},
}, &armapimanagement.NamedValueClientBeginCreateOrUpdateOptions{IfMatch: 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.NamedValueContract = armapimanagement.NamedValueContract{
// 	Name: to.Ptr("testprop6"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/namedValues"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6"),
// 	Properties: &armapimanagement.NamedValueContractProperties{
// 		Secret: to.Ptr(true),
// 		Tags: []*string{
// 			to.Ptr("foo"),
// 			to.Ptr("bar")},
// 			DisplayName: to.Ptr("prop6namekv"),
// 			KeyVault: &armapimanagement.KeyVaultContractProperties{
// 				IdentityClientID: to.Ptr("ceaa6b06-c00f-43ef-99ac-f53d1fe876a0"),
// 				SecretIdentifier: to.Ptr("https://contoso.vault.azure.net/secrets/aadSecret"),
// 				LastStatus: &armapimanagement.KeyVaultLastAccessStatusContractProperties{
// 					Code: to.Ptr("Success"),
// 					TimeStampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-11T00:54:31.802Z"); return t}()),
// 				},
// 			},
// 		},
// 	}
Output:

func (*NamedValueClient) BeginRefreshSecret

func (client *NamedValueClient) BeginRefreshSecret(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, options *NamedValueClientBeginRefreshSecretOptions) (*runtime.Poller[NamedValueClientRefreshSecretResponse], error)

BeginRefreshSecret - Refresh the secret of the named value specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • namedValueID - Identifier of the NamedValue.
  • options - NamedValueClientBeginRefreshSecretOptions contains the optional parameters for the NamedValueClient.BeginRefreshSecret method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementRefreshNamedValue.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewNamedValueClient().BeginRefreshSecret(ctx, "rg1", "apimService1", "testprop2", 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.NamedValueContract = armapimanagement.NamedValueContract{
// 	Name: to.Ptr("testprop6"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/namedValues"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6"),
// 	Properties: &armapimanagement.NamedValueContractProperties{
// 		Secret: to.Ptr(true),
// 		Tags: []*string{
// 			to.Ptr("foo"),
// 			to.Ptr("bar")},
// 			DisplayName: to.Ptr("prop6namekv"),
// 			KeyVault: &armapimanagement.KeyVaultContractProperties{
// 				IdentityClientID: to.Ptr("2d2df842-44d8-4885-8dec-77cc1a984a31"),
// 				SecretIdentifier: to.Ptr("https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert"),
// 				LastStatus: &armapimanagement.KeyVaultLastAccessStatusContractProperties{
// 					Code: to.Ptr("Success"),
// 					TimeStampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-11T00:54:31.802Z"); return t}()),
// 				},
// 			},
// 		},
// 	}
Output:

func (*NamedValueClient) BeginUpdate

func (client *NamedValueClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, ifMatch string, parameters NamedValueUpdateParameters, options *NamedValueClientBeginUpdateOptions) (*runtime.Poller[NamedValueClientUpdateResponse], error)

BeginUpdate - Updates the specific named value. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • namedValueID - Identifier of the NamedValue.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - Update parameters.
  • options - NamedValueClientBeginUpdateOptions contains the optional parameters for the NamedValueClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateNamedValue.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewNamedValueClient().BeginUpdate(ctx, "rg1", "apimService1", "testprop2", "*", armapimanagement.NamedValueUpdateParameters{
	Properties: &armapimanagement.NamedValueUpdateParameterProperties{
		Secret: to.Ptr(false),
		Tags: []*string{
			to.Ptr("foo"),
			to.Ptr("bar2")},
		DisplayName: to.Ptr("prop3name"),
		Value:       to.Ptr("propValue"),
	},
}, 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.NamedValueContract = armapimanagement.NamedValueContract{
// 	Type: to.Ptr("Microsoft.ApiManagement/service/namedValues"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop2"),
// 	Properties: &armapimanagement.NamedValueContractProperties{
// 		Secret: to.Ptr(false),
// 		Tags: []*string{
// 			to.Ptr("foo"),
// 			to.Ptr("bar2")},
// 			DisplayName: to.Ptr("prop3name"),
// 			Value: to.Ptr("propValue"),
// 		},
// 	}
Output:

func (*NamedValueClient) Delete

func (client *NamedValueClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, ifMatch string, options *NamedValueClientDeleteOptions) (NamedValueClientDeleteResponse, error)

Delete - Deletes specific named value from the API Management service instance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • namedValueID - Identifier of the NamedValue.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - NamedValueClientDeleteOptions contains the optional parameters for the NamedValueClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteNamedValue.json

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

func (*NamedValueClient) Get

func (client *NamedValueClient) Get(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, options *NamedValueClientGetOptions) (NamedValueClientGetResponse, error)

Get - Gets the details of the named value specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • namedValueID - Identifier of the NamedValue.
  • options - NamedValueClientGetOptions contains the optional parameters for the NamedValueClient.Get method.
Example (ApiManagementGetNamedValue)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNamedValue.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewNamedValueClient().Get(ctx, "rg1", "apimService1", "testarmTemplateproperties2", 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.NamedValueContract = armapimanagement.NamedValueContract{
// 	Name: to.Ptr("testarmTemplateproperties2"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/namedValues"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testarmTemplateproperties2"),
// 	Properties: &armapimanagement.NamedValueContractProperties{
// 		Secret: to.Ptr(false),
// 		Tags: []*string{
// 			to.Ptr("foo"),
// 			to.Ptr("bar")},
// 			DisplayName: to.Ptr("propName"),
// 			Value: to.Ptr("propValue"),
// 		},
// 	}
Output:

Example (ApiManagementGetNamedValueWithKeyVault)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNamedValueWithKeyVault.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewNamedValueClient().Get(ctx, "rg1", "apimService1", "testprop6", 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.NamedValueContract = armapimanagement.NamedValueContract{
// 	Name: to.Ptr("testprop6"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/namedValues"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6"),
// 	Properties: &armapimanagement.NamedValueContractProperties{
// 		Secret: to.Ptr(true),
// 		Tags: []*string{
// 			to.Ptr("foo"),
// 			to.Ptr("bar")},
// 			DisplayName: to.Ptr("prop6namekv"),
// 			KeyVault: &armapimanagement.KeyVaultContractProperties{
// 				IdentityClientID: to.Ptr("2d2df842-44d8-4885-8dec-77cc1a984a31"),
// 				SecretIdentifier: to.Ptr("https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert"),
// 				LastStatus: &armapimanagement.KeyVaultLastAccessStatusContractProperties{
// 					Code: to.Ptr("Success"),
// 					TimeStampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-11T00:54:31.802Z"); return t}()),
// 				},
// 			},
// 		},
// 	}
Output:

func (*NamedValueClient) GetEntityTag

func (client *NamedValueClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, options *NamedValueClientGetEntityTagOptions) (NamedValueClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the named value specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • namedValueID - Identifier of the NamedValue.
  • options - NamedValueClientGetEntityTagOptions contains the optional parameters for the NamedValueClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadNamedValue.json

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

func (*NamedValueClient) ListValue

func (client *NamedValueClient) ListValue(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, options *NamedValueClientListValueOptions) (NamedValueClientListValueResponse, error)

ListValue - Gets the secret of the named value specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • namedValueID - Identifier of the NamedValue.
  • options - NamedValueClientListValueOptions contains the optional parameters for the NamedValueClient.ListValue method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementNamedValueListValue.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewNamedValueClient().ListValue(ctx, "rg1", "apimService1", "testarmTemplateproperties2", 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.NamedValueSecretContract = armapimanagement.NamedValueSecretContract{
// 	Value: to.Ptr("propValue"),
// }
Output:

func (*NamedValueClient) NewListByServicePager

func (client *NamedValueClient) NewListByServicePager(resourceGroupName string, serviceName string, options *NamedValueClientListByServiceOptions) *runtime.Pager[NamedValueClientListByServiceResponse]

NewListByServicePager - Lists a collection of named values defined within a service instance.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - NamedValueClientListByServiceOptions contains the optional parameters for the NamedValueClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListNamedValues.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewNamedValueClient().NewListByServicePager("rg1", "apimService1", &armapimanagement.NamedValueClientListByServiceOptions{Filter: nil,
	Top:                     nil,
	Skip:                    nil,
	IsKeyVaultRefreshFailed: 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.NamedValueCollection = armapimanagement.NamedValueCollection{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.NamedValueContract{
	// 		{
	// 			Name: to.Ptr("592f1174cc83890dc4f32686"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/namedValues"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/592f1174cc83890dc4f32686"),
	// 			Properties: &armapimanagement.NamedValueContractProperties{
	// 				Secret: to.Ptr(false),
	// 				DisplayName: to.Ptr("Logger-Credentials-592f1174cc83890dc4f32687"),
	// 				Value: to.Ptr("propValue"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("testprop6"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/namedValues"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6"),
	// 			Properties: &armapimanagement.NamedValueContractProperties{
	// 				Secret: to.Ptr(true),
	// 				Tags: []*string{
	// 					to.Ptr("foo"),
	// 					to.Ptr("bar")},
	// 					DisplayName: to.Ptr("prop6namekv"),
	// 					KeyVault: &armapimanagement.KeyVaultContractProperties{
	// 						IdentityClientID: to.Ptr("2d2df842-44d8-4885-8dec-77cc1a984a31"),
	// 						SecretIdentifier: to.Ptr("https://contoso.vault.azure.net/secrets/aadSecret"),
	// 						LastStatus: &armapimanagement.KeyVaultLastAccessStatusContractProperties{
	// 							Code: to.Ptr("Success"),
	// 							TimeStampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-11T00:54:31.802Z"); return t}()),
	// 						},
	// 					},
	// 				},
	// 		}},
	// 	}
}
Output:

type NamedValueClientBeginCreateOrUpdateOptions

type NamedValueClientBeginCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

NamedValueClientBeginCreateOrUpdateOptions contains the optional parameters for the NamedValueClient.BeginCreateOrUpdate method.

type NamedValueClientBeginRefreshSecretOptions

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

NamedValueClientBeginRefreshSecretOptions contains the optional parameters for the NamedValueClient.BeginRefreshSecret method.

type NamedValueClientBeginUpdateOptions

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

NamedValueClientBeginUpdateOptions contains the optional parameters for the NamedValueClient.BeginUpdate method.

type NamedValueClientCreateOrUpdateResponse

type NamedValueClientCreateOrUpdateResponse struct {
	// NamedValue details.
	NamedValueContract
}

NamedValueClientCreateOrUpdateResponse contains the response from method NamedValueClient.BeginCreateOrUpdate.

type NamedValueClientDeleteOptions

type NamedValueClientDeleteOptions struct {
}

NamedValueClientDeleteOptions contains the optional parameters for the NamedValueClient.Delete method.

type NamedValueClientDeleteResponse

type NamedValueClientDeleteResponse struct {
}

NamedValueClientDeleteResponse contains the response from method NamedValueClient.Delete.

type NamedValueClientGetEntityTagOptions

type NamedValueClientGetEntityTagOptions struct {
}

NamedValueClientGetEntityTagOptions contains the optional parameters for the NamedValueClient.GetEntityTag method.

type NamedValueClientGetEntityTagResponse

type NamedValueClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

NamedValueClientGetEntityTagResponse contains the response from method NamedValueClient.GetEntityTag.

type NamedValueClientGetOptions

type NamedValueClientGetOptions struct {
}

NamedValueClientGetOptions contains the optional parameters for the NamedValueClient.Get method.

type NamedValueClientGetResponse

type NamedValueClientGetResponse struct {
	// NamedValue details.
	NamedValueContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

NamedValueClientGetResponse contains the response from method NamedValueClient.Get.

type NamedValueClientListByServiceOptions

type NamedValueClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// When set to true, the response contains only named value entities which failed refresh.
	IsKeyVaultRefreshFailed *bool

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

NamedValueClientListByServiceOptions contains the optional parameters for the NamedValueClient.NewListByServicePager method.

type NamedValueClientListByServiceResponse

type NamedValueClientListByServiceResponse struct {
	// Paged NamedValue list representation.
	NamedValueCollection
}

NamedValueClientListByServiceResponse contains the response from method NamedValueClient.NewListByServicePager.

type NamedValueClientListValueOptions

type NamedValueClientListValueOptions struct {
}

NamedValueClientListValueOptions contains the optional parameters for the NamedValueClient.ListValue method.

type NamedValueClientListValueResponse

type NamedValueClientListValueResponse struct {
	// Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.
	NamedValueSecretContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

NamedValueClientListValueResponse contains the response from method NamedValueClient.ListValue.

type NamedValueClientRefreshSecretResponse

type NamedValueClientRefreshSecretResponse struct {
	// NamedValue details.
	NamedValueContract
}

NamedValueClientRefreshSecretResponse contains the response from method NamedValueClient.BeginRefreshSecret.

type NamedValueClientUpdateResponse

type NamedValueClientUpdateResponse struct {
	// NamedValue details.
	NamedValueContract
}

NamedValueClientUpdateResponse contains the response from method NamedValueClient.BeginUpdate.

type NamedValueCollection

type NamedValueCollection struct {
	// Total record count number across all pages.
	Count *int64

	// Next page link if any.
	NextLink *string

	// Page values.
	Value []*NamedValueContract
}

NamedValueCollection - Paged NamedValue list representation.

func (NamedValueCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NamedValueCollection.

func (*NamedValueCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type NamedValueCollection.

type NamedValueContract

type NamedValueContract struct {
	// NamedValue entity contract properties.
	Properties *NamedValueContractProperties

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

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

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

NamedValueContract - NamedValue details.

func (NamedValueContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NamedValueContract.

func (*NamedValueContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type NamedValueContract.

type NamedValueContractProperties

type NamedValueContractProperties struct {
	// REQUIRED; Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters.
	DisplayName *string

	// KeyVault location details of the namedValue.
	KeyVault *KeyVaultContractProperties

	// Determines whether the value is a secret and should be encrypted or not. Default value is false.
	Secret *bool

	// Optional tags that when provided can be used to filter the NamedValue list.
	Tags []*string

	// Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property
	// will not be filled on 'GET' operations! Use '/listSecrets' POST request to get
	// the value.
	Value *string
}

NamedValueContractProperties - NamedValue Contract properties.

func (NamedValueContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NamedValueContractProperties.

func (*NamedValueContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type NamedValueContractProperties.

type NamedValueCreateContract

type NamedValueCreateContract struct {
	// NamedValue entity contract properties for PUT operation.
	Properties *NamedValueCreateContractProperties

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

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

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

NamedValueCreateContract - NamedValue details.

func (NamedValueCreateContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NamedValueCreateContract.

func (*NamedValueCreateContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type NamedValueCreateContract.

type NamedValueCreateContractProperties

type NamedValueCreateContractProperties struct {
	// REQUIRED; Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters.
	DisplayName *string

	// KeyVault location details of the namedValue.
	KeyVault *KeyVaultContractCreateProperties

	// Determines whether the value is a secret and should be encrypted or not. Default value is false.
	Secret *bool

	// Optional tags that when provided can be used to filter the NamedValue list.
	Tags []*string

	// Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property
	// will not be filled on 'GET' operations! Use '/listSecrets' POST request to get
	// the value.
	Value *string
}

NamedValueCreateContractProperties - NamedValue Contract properties.

func (NamedValueCreateContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NamedValueCreateContractProperties.

func (*NamedValueCreateContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type NamedValueCreateContractProperties.

type NamedValueEntityBaseParameters

type NamedValueEntityBaseParameters struct {
	// Determines whether the value is a secret and should be encrypted or not. Default value is false.
	Secret *bool

	// Optional tags that when provided can be used to filter the NamedValue list.
	Tags []*string
}

NamedValueEntityBaseParameters - NamedValue Entity Base Parameters set.

func (NamedValueEntityBaseParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NamedValueEntityBaseParameters.

func (*NamedValueEntityBaseParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type NamedValueEntityBaseParameters.

type NamedValueSecretContract

type NamedValueSecretContract struct {
	// This is secret value of the NamedValue entity.
	Value *string
}

NamedValueSecretContract - Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.

func (NamedValueSecretContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NamedValueSecretContract.

func (*NamedValueSecretContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type NamedValueSecretContract.

type NamedValueUpdateParameterProperties

type NamedValueUpdateParameterProperties struct {
	// Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters.
	DisplayName *string

	// KeyVault location details of the namedValue.
	KeyVault *KeyVaultContractCreateProperties

	// Determines whether the value is a secret and should be encrypted or not. Default value is false.
	Secret *bool

	// Optional tags that when provided can be used to filter the NamedValue list.
	Tags []*string

	// Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace.
	Value *string
}

NamedValueUpdateParameterProperties - NamedValue Contract properties.

func (NamedValueUpdateParameterProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NamedValueUpdateParameterProperties.

func (*NamedValueUpdateParameterProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type NamedValueUpdateParameterProperties.

type NamedValueUpdateParameters

type NamedValueUpdateParameters struct {
	// NamedValue entity Update contract properties.
	Properties *NamedValueUpdateParameterProperties
}

NamedValueUpdateParameters - NamedValue update Parameters.

func (NamedValueUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NamedValueUpdateParameters.

func (*NamedValueUpdateParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type NamedValueUpdateParameters.

type NatGatewayState

type NatGatewayState string

NatGatewayState - Property can be used to enable NAT Gateway for this API Management service.

const (
	// NatGatewayStateDisabled - Nat Gateway is disabled for the service.
	NatGatewayStateDisabled NatGatewayState = "Disabled"
	// NatGatewayStateEnabled - Nat Gateway is enabled for the service.
	NatGatewayStateEnabled NatGatewayState = "Enabled"
)

func PossibleNatGatewayStateValues

func PossibleNatGatewayStateValues() []NatGatewayState

PossibleNatGatewayStateValues returns the possible values for the NatGatewayState const type.

type NetworkStatusClient

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

NetworkStatusClient contains the methods for the NetworkStatus group. Don't use this type directly, use NewNetworkStatusClient() instead.

func NewNetworkStatusClient

func NewNetworkStatusClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NetworkStatusClient, error)

NewNetworkStatusClient creates a new instance of NetworkStatusClient 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 (*NetworkStatusClient) ListByLocation

func (client *NetworkStatusClient) ListByLocation(ctx context.Context, resourceGroupName string, serviceName string, locationName string, options *NetworkStatusClientListByLocationOptions) (NetworkStatusClientListByLocationResponse, error)

ListByLocation - Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • locationName - Location in which the API Management service is deployed. This is one of the Azure Regions like West US, East US, South Central US.
  • options - NetworkStatusClientListByLocationOptions contains the optional parameters for the NetworkStatusClient.ListByLocation method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetNetworkStatusByLocation.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewNetworkStatusClient().ListByLocation(ctx, "rg1", "apimService1", "North Central US", 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.NetworkStatusContract = armapimanagement.NetworkStatusContract{
// 	ConnectivityStatus: []*armapimanagement.ConnectivityStatusContract{
// 		{
// 			Name: to.Ptr("apimgmtst6tnxxxxxxxxxxx.blob.core.windows.net"),
// 			Error: to.Ptr(""),
// 			IsOptional: to.Ptr(false),
// 			LastStatusChange: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-20T07:54:55.936Z"); return t}()),
// 			LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-24T22:55:14.703Z"); return t}()),
// 			ResourceType: to.Ptr("BlobStorage"),
// 			Status: to.Ptr(armapimanagement.ConnectivityStatusTypeSuccess),
// 		},
// 		{
// 			Name: to.Ptr("apimgmtst6tnxxxxxxxxxxx.file.core.windows.net"),
// 			Error: to.Ptr(""),
// 			IsOptional: to.Ptr(true),
// 			LastStatusChange: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-20T07:54:55.926Z"); return t}()),
// 			LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-24T22:55:41.532Z"); return t}()),
// 			ResourceType: to.Ptr("FileStorage"),
// 			Status: to.Ptr(armapimanagement.ConnectivityStatusTypeSuccess),
// 		},
// 		{
// 			Name: to.Ptr("apimgmtst6tnxxxxxxxxxxx.queue.core.windows.net"),
// 			Error: to.Ptr(""),
// 			IsOptional: to.Ptr(true),
// 			LastStatusChange: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-20T07:54:55.841Z"); return t}()),
// 			LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-24T22:55:30.645Z"); return t}()),
// 			ResourceType: to.Ptr("Queue"),
// 			Status: to.Ptr(armapimanagement.ConnectivityStatusTypeSuccess),
// 		},
// 		{
// 			Name: to.Ptr("apimgmtst6tnxxxxxxxxxxx.table.core.windows.net"),
// 			Error: to.Ptr(""),
// 			IsOptional: to.Ptr(false),
// 			LastStatusChange: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-20T07:54:55.936Z"); return t}()),
// 			LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-24T22:55:23.878Z"); return t}()),
// 			ResourceType: to.Ptr("TableStorage"),
// 			Status: to.Ptr(armapimanagement.ConnectivityStatusTypeSuccess),
// 		},
// 		{
// 			Name: to.Ptr("gcs.prod.monitoring.core.windows.net"),
// 			Error: to.Ptr(""),
// 			IsOptional: to.Ptr(true),
// 			LastStatusChange: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-20T08:07:37.548Z"); return t}()),
// 			LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-24T22:57:34.866Z"); return t}()),
// 			ResourceType: to.Ptr("Monitoring"),
// 			Status: to.Ptr(armapimanagement.ConnectivityStatusTypeSuccess),
// 		},
// 		{
// 			Name: to.Ptr("https://gcs.ppe.warm.ingestion.monitoring.azure.com"),
// 			Error: to.Ptr(""),
// 			IsOptional: to.Ptr(true),
// 			LastStatusChange: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-20T07:54:56.106Z"); return t}()),
// 			LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-24T22:56:26.187Z"); return t}()),
// 			ResourceType: to.Ptr("Monitoring"),
// 			Status: to.Ptr(armapimanagement.ConnectivityStatusTypeSuccess),
// 		},
// 		{
// 			Name: to.Ptr("https://global.metrics.nsatc.net/"),
// 			Error: to.Ptr(""),
// 			IsOptional: to.Ptr(true),
// 			LastStatusChange: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-20T07:54:56.051Z"); return t}()),
// 			LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-24T22:56:35.962Z"); return t}()),
// 			ResourceType: to.Ptr("Monitoring"),
// 			Status: to.Ptr(armapimanagement.ConnectivityStatusTypeSuccess),
// 		},
// 		{
// 			Name: to.Ptr("https://login.windows.net"),
// 			Error: to.Ptr(""),
// 			IsOptional: to.Ptr(true),
// 			LastStatusChange: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-20T07:54:56.106Z"); return t}()),
// 			LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-24T22:56:30.804Z"); return t}()),
// 			ResourceType: to.Ptr("AzureActiveDirectory"),
// 			Status: to.Ptr(armapimanagement.ConnectivityStatusTypeSuccess),
// 		},
// 		{
// 			Name: to.Ptr("https://prod2.metrics.nsatc.net:1886/RecoveryService"),
// 			Error: to.Ptr(""),
// 			IsOptional: to.Ptr(true),
// 			LastStatusChange: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-20T07:54:56.279Z"); return t}()),
// 			LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-24T22:56:45.209Z"); return t}()),
// 			ResourceType: to.Ptr("Metrics"),
// 			Status: to.Ptr(armapimanagement.ConnectivityStatusTypeSuccess),
// 		},
// 		{
// 			Name: to.Ptr("LocalGatewayRedis"),
// 			Error: to.Ptr(""),
// 			IsOptional: to.Ptr(true),
// 			LastStatusChange: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-20T07:54:55.936Z"); return t}()),
// 			LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-24T22:55:15.134Z"); return t}()),
// 			ResourceType: to.Ptr("InternalCache"),
// 			Status: to.Ptr(armapimanagement.ConnectivityStatusTypeSuccess),
// 		},
// 		{
// 			Name: to.Ptr("prod.warmpath.msftcloudes.com"),
// 			Error: to.Ptr(""),
// 			IsOptional: to.Ptr(false),
// 			LastStatusChange: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-20T07:54:55.841Z"); return t}()),
// 			LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-24T22:55:57.899Z"); return t}()),
// 			ResourceType: to.Ptr("Monitoring"),
// 			Status: to.Ptr(armapimanagement.ConnectivityStatusTypeSuccess),
// 		},
// 		{
// 			Name: to.Ptr("Scm"),
// 			Error: to.Ptr(""),
// 			IsOptional: to.Ptr(true),
// 			LastStatusChange: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-20T07:54:57.325Z"); return t}()),
// 			LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-24T23:03:57.618Z"); return t}()),
// 			ResourceType: to.Ptr("SourceControl"),
// 			Status: to.Ptr(armapimanagement.ConnectivityStatusTypeSuccess),
// 		},
// 		{
// 			Name: to.Ptr("smtpi-xxx.msn.com:25028"),
// 			Error: to.Ptr(""),
// 			IsOptional: to.Ptr(true),
// 			LastStatusChange: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-20T07:54:56.351Z"); return t}()),
// 			LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-24T22:58:22.243Z"); return t}()),
// 			ResourceType: to.Ptr("Email"),
// 			Status: to.Ptr(armapimanagement.ConnectivityStatusTypeSuccess),
// 		},
// 		{
// 			Name: to.Ptr("zwcvuxxxx.database.windows.net"),
// 			Error: to.Ptr(""),
// 			IsOptional: to.Ptr(false),
// 			LastStatusChange: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-20T07:54:56.041Z"); return t}()),
// 			LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-24T22:55:44.358Z"); return t}()),
// 			ResourceType: to.Ptr("SQLDatabase"),
// 			Status: to.Ptr(armapimanagement.ConnectivityStatusTypeSuccess),
// 	}},
// 	DNSServers: []*string{
// 		to.Ptr("10.82.98.10")},
// 	}
Output:

func (*NetworkStatusClient) ListByService

func (client *NetworkStatusClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, options *NetworkStatusClientListByServiceOptions) (NetworkStatusClientListByServiceResponse, error)

ListByService - Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - NetworkStatusClientListByServiceOptions contains the optional parameters for the NetworkStatusClient.ListByService method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetNetworkStatus.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewNetworkStatusClient().ListByService(ctx, "rg1", "apimService1", 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.NetworkStatusContractByLocationArray = []*armapimanagement.NetworkStatusContractByLocation{
// 	{
// 		Location: to.Ptr("West US"),
// 		NetworkStatus: &armapimanagement.NetworkStatusContract{
// 			ConnectivityStatus: []*armapimanagement.ConnectivityStatusContract{
// 				{
// 					Name: to.Ptr("apimgmtst6xxxxxxxxxxx.blob.core.windows.net"),
// 					Error: to.Ptr(""),
// 					IsOptional: to.Ptr(false),
// 					LastStatusChange: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-20T07:54:55.936Z"); return t}()),
// 					LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-24T22:55:14.703Z"); return t}()),
// 					ResourceType: to.Ptr("BlobStorage"),
// 					Status: to.Ptr(armapimanagement.ConnectivityStatusTypeSuccess),
// 				},
// 				{
// 					Name: to.Ptr("apimgmtst6xxxxxxxxxxx.file.core.windows.net"),
// 					Error: to.Ptr(""),
// 					IsOptional: to.Ptr(true),
// 					LastStatusChange: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-20T07:54:55.926Z"); return t}()),
// 					LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-24T22:55:41.532Z"); return t}()),
// 					ResourceType: to.Ptr("FileStorage"),
// 					Status: to.Ptr(armapimanagement.ConnectivityStatusTypeSuccess),
// 				},
// 				{
// 					Name: to.Ptr("apimgmtst6xxxxxxxxxxx.queue.core.windows.net"),
// 					Error: to.Ptr(""),
// 					IsOptional: to.Ptr(true),
// 					LastStatusChange: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-20T07:54:55.841Z"); return t}()),
// 					LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-24T22:55:30.645Z"); return t}()),
// 					ResourceType: to.Ptr("Queue"),
// 					Status: to.Ptr(armapimanagement.ConnectivityStatusTypeSuccess),
// 				},
// 				{
// 					Name: to.Ptr("apimgmtst6xxxxxxxxxxx.table.core.windows.net"),
// 					Error: to.Ptr(""),
// 					IsOptional: to.Ptr(false),
// 					LastStatusChange: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-20T07:54:55.936Z"); return t}()),
// 					LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-24T22:55:23.878Z"); return t}()),
// 					ResourceType: to.Ptr("TableStorage"),
// 					Status: to.Ptr(armapimanagement.ConnectivityStatusTypeSuccess),
// 				},
// 				{
// 					Name: to.Ptr("gcs.prod.monitoring.core.windows.net"),
// 					Error: to.Ptr(""),
// 					IsOptional: to.Ptr(true),
// 					LastStatusChange: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-20T08:07:37.548Z"); return t}()),
// 					LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-24T22:57:34.866Z"); return t}()),
// 					ResourceType: to.Ptr("Monitoring"),
// 					Status: to.Ptr(armapimanagement.ConnectivityStatusTypeSuccess),
// 				},
// 				{
// 					Name: to.Ptr("https://gcs.ppe.warm.ingestion.monitoring.azure.com"),
// 					Error: to.Ptr(""),
// 					IsOptional: to.Ptr(true),
// 					LastStatusChange: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-20T07:54:56.106Z"); return t}()),
// 					LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-24T22:56:26.187Z"); return t}()),
// 					ResourceType: to.Ptr("Monitoring"),
// 					Status: to.Ptr(armapimanagement.ConnectivityStatusTypeSuccess),
// 				},
// 				{
// 					Name: to.Ptr("https://global.metrics.nsatc.net/"),
// 					Error: to.Ptr(""),
// 					IsOptional: to.Ptr(true),
// 					LastStatusChange: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-20T07:54:56.051Z"); return t}()),
// 					LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-24T22:56:35.962Z"); return t}()),
// 					ResourceType: to.Ptr("Monitoring"),
// 					Status: to.Ptr(armapimanagement.ConnectivityStatusTypeSuccess),
// 				},
// 				{
// 					Name: to.Ptr("https://login.windows.net"),
// 					Error: to.Ptr(""),
// 					IsOptional: to.Ptr(true),
// 					LastStatusChange: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-20T07:54:56.106Z"); return t}()),
// 					LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-24T22:56:30.804Z"); return t}()),
// 					ResourceType: to.Ptr("AzureActiveDirectory"),
// 					Status: to.Ptr(armapimanagement.ConnectivityStatusTypeSuccess),
// 				},
// 				{
// 					Name: to.Ptr("https://prod2.metrics.nsatc.net:1886/RecoveryService"),
// 					Error: to.Ptr(""),
// 					IsOptional: to.Ptr(true),
// 					LastStatusChange: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-20T07:54:56.279Z"); return t}()),
// 					LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-24T22:56:45.209Z"); return t}()),
// 					ResourceType: to.Ptr("Metrics"),
// 					Status: to.Ptr(armapimanagement.ConnectivityStatusTypeSuccess),
// 				},
// 				{
// 					Name: to.Ptr("LocalGatewayRedis"),
// 					Error: to.Ptr(""),
// 					IsOptional: to.Ptr(true),
// 					LastStatusChange: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-20T07:54:55.936Z"); return t}()),
// 					LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-24T22:55:15.134Z"); return t}()),
// 					ResourceType: to.Ptr("InternalCache"),
// 					Status: to.Ptr(armapimanagement.ConnectivityStatusTypeSuccess),
// 				},
// 				{
// 					Name: to.Ptr("prod.warmpath.msftcloudes.com"),
// 					Error: to.Ptr(""),
// 					IsOptional: to.Ptr(false),
// 					LastStatusChange: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-20T07:54:55.841Z"); return t}()),
// 					LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-24T22:55:57.899Z"); return t}()),
// 					ResourceType: to.Ptr("Monitoring"),
// 					Status: to.Ptr(armapimanagement.ConnectivityStatusTypeSuccess),
// 				},
// 				{
// 					Name: to.Ptr("Scm"),
// 					Error: to.Ptr(""),
// 					IsOptional: to.Ptr(true),
// 					LastStatusChange: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-20T02:25:48.706Z"); return t}()),
// 					LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-24T23:01:24.055Z"); return t}()),
// 					ResourceType: to.Ptr("SourceControl"),
// 					Status: to.Ptr(armapimanagement.ConnectivityStatusTypeSuccess),
// 				},
// 				{
// 					Name: to.Ptr("smtpi-ch1.msn.com:25028"),
// 					Error: to.Ptr(""),
// 					IsOptional: to.Ptr(true),
// 					LastStatusChange: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-20T07:54:56.351Z"); return t}()),
// 					LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-24T22:58:22.243Z"); return t}()),
// 					ResourceType: to.Ptr("Email"),
// 					Status: to.Ptr(armapimanagement.ConnectivityStatusTypeSuccess),
// 				},
// 				{
// 					Name: to.Ptr("zwcvuxxxx.database.windows.net"),
// 					Error: to.Ptr(""),
// 					IsOptional: to.Ptr(false),
// 					LastStatusChange: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-20T07:54:56.041Z"); return t}()),
// 					LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-24T22:55:44.358Z"); return t}()),
// 					ResourceType: to.Ptr("SQLDatabase"),
// 					Status: to.Ptr(armapimanagement.ConnectivityStatusTypeSuccess),
// 			}},
// 			DNSServers: []*string{
// 				to.Ptr("10.82.98.10")},
// 			},
// 	}}
Output:

type NetworkStatusClientListByLocationOptions

type NetworkStatusClientListByLocationOptions struct {
}

NetworkStatusClientListByLocationOptions contains the optional parameters for the NetworkStatusClient.ListByLocation method.

type NetworkStatusClientListByLocationResponse

type NetworkStatusClientListByLocationResponse struct {
	// Network Status details.
	NetworkStatusContract
}

NetworkStatusClientListByLocationResponse contains the response from method NetworkStatusClient.ListByLocation.

type NetworkStatusClientListByServiceOptions

type NetworkStatusClientListByServiceOptions struct {
}

NetworkStatusClientListByServiceOptions contains the optional parameters for the NetworkStatusClient.ListByService method.

type NetworkStatusClientListByServiceResponse

type NetworkStatusClientListByServiceResponse struct {
	// List of Network Status values.
	NetworkStatusContractByLocationArray []*NetworkStatusContractByLocation
}

NetworkStatusClientListByServiceResponse contains the response from method NetworkStatusClient.ListByService.

type NetworkStatusContract

type NetworkStatusContract struct {
	// REQUIRED; Gets the list of Connectivity Status to the Resources on which the service depends upon.
	ConnectivityStatus []*ConnectivityStatusContract

	// REQUIRED; Gets the list of DNS servers IPV4 addresses.
	DNSServers []*string
}

NetworkStatusContract - Network Status details.

func (NetworkStatusContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NetworkStatusContract.

func (*NetworkStatusContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkStatusContract.

type NetworkStatusContractByLocation

type NetworkStatusContractByLocation struct {
	// Location of service
	Location *string

	// Network status in Location
	NetworkStatus *NetworkStatusContract
}

NetworkStatusContractByLocation - Network Status in the Location

func (NetworkStatusContractByLocation) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NetworkStatusContractByLocation.

func (*NetworkStatusContractByLocation) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkStatusContractByLocation.

type NotificationClient

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

NotificationClient contains the methods for the Notification group. Don't use this type directly, use NewNotificationClient() instead.

func NewNotificationClient

func NewNotificationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NotificationClient, error)

NewNotificationClient creates a new instance of NotificationClient 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 (*NotificationClient) CreateOrUpdate

func (client *NotificationClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, options *NotificationClientCreateOrUpdateOptions) (NotificationClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create or Update API Management publisher notification. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • notificationName - Notification Name Identifier.
  • options - NotificationClientCreateOrUpdateOptions contains the optional parameters for the NotificationClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateNotification.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewNotificationClient().CreateOrUpdate(ctx, "rg1", "apimService1", armapimanagement.NotificationNameRequestPublisherNotificationMessage, &armapimanagement.NotificationClientCreateOrUpdateOptions{IfMatch: 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.NotificationContract = armapimanagement.NotificationContract{
// 	Name: to.Ptr("RequestPublisherNotificationMessage"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/notifications"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage"),
// 	Properties: &armapimanagement.NotificationContractProperties{
// 		Description: to.Ptr("The following email recipients and users will receive email notifications about subscription requests for API products requiring approval."),
// 		Recipients: &armapimanagement.RecipientsContractProperties{
// 			Emails: []*string{
// 				to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/recipientEmails/contoso@live.com"),
// 				to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/recipientEmails/foobar!live"),
// 				to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/recipientEmails/foobar@live.com")},
// 				Users: []*string{
// 					to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/576823d0a40f7e74ec07d642")},
// 				},
// 				Title: to.Ptr("Subscription requests (requiring approval)"),
// 			},
// 		}
Output:

func (*NotificationClient) Get

func (client *NotificationClient) Get(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, options *NotificationClientGetOptions) (NotificationClientGetResponse, error)

Get - Gets the details of the Notification specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • notificationName - Notification Name Identifier.
  • options - NotificationClientGetOptions contains the optional parameters for the NotificationClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNotification.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewNotificationClient().Get(ctx, "rg1", "apimService1", armapimanagement.NotificationNameRequestPublisherNotificationMessage, 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.NotificationContract = armapimanagement.NotificationContract{
// 	Name: to.Ptr("RequestPublisherNotificationMessage"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/notifications"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage"),
// 	Properties: &armapimanagement.NotificationContractProperties{
// 		Description: to.Ptr("The following email recipients and users will receive email notifications about subscription requests for API products requiring approval."),
// 		Recipients: &armapimanagement.RecipientsContractProperties{
// 			Emails: []*string{
// 				to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/recipientEmails/contoso@live.com"),
// 				to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/recipientEmails/foobar!live"),
// 				to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/recipientEmails/foobar@live.com")},
// 				Users: []*string{
// 					to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/576823d0a40f7e74ec07d642")},
// 				},
// 				Title: to.Ptr("Subscription requests (requiring approval)"),
// 			},
// 		}
Output:

func (*NotificationClient) NewListByServicePager

func (client *NotificationClient) NewListByServicePager(resourceGroupName string, serviceName string, options *NotificationClientListByServiceOptions) *runtime.Pager[NotificationClientListByServiceResponse]

NewListByServicePager - Lists a collection of properties defined within a service instance.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - NotificationClientListByServiceOptions contains the optional parameters for the NotificationClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListNotifications.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewNotificationClient().NewListByServicePager("rg1", "apimService1", &armapimanagement.NotificationClientListByServiceOptions{Top: nil,
	Skip: 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.NotificationCollection = armapimanagement.NotificationCollection{
	// 	Count: to.Ptr[int64](7),
	// 	Value: []*armapimanagement.NotificationContract{
	// 		{
	// 			Name: to.Ptr("RequestPublisherNotificationMessage"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/notifications"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage"),
	// 			Properties: &armapimanagement.NotificationContractProperties{
	// 				Description: to.Ptr("The following email recipients and users will receive email notifications about subscription requests for API products requiring approval."),
	// 				Recipients: &armapimanagement.RecipientsContractProperties{
	// 					Emails: []*string{
	// 						to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientEmails/contoso@live.com"),
	// 						to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientEmails/foobar!live"),
	// 						to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientEmails/foobar@live.com")},
	// 						Users: []*string{
	// 							to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/576823d0a40f7e74ec07d642")},
	// 						},
	// 						Title: to.Ptr("Subscription requests (requiring approval)"),
	// 					},
	// 				},
	// 				{
	// 					Name: to.Ptr("PurchasePublisherNotificationMessage"),
	// 					Type: to.Ptr("Microsoft.ApiManagement/service/notifications"),
	// 					ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/PurchasePublisherNotificationMessage"),
	// 					Properties: &armapimanagement.NotificationContractProperties{
	// 						Description: to.Ptr("The following email recipients and users will receive email notifications about new API product subscriptions."),
	// 						Recipients: &armapimanagement.RecipientsContractProperties{
	// 							Emails: []*string{
	// 								to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientEmails/contoso@live.com")},
	// 								Users: []*string{
	// 									to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1")},
	// 								},
	// 								Title: to.Ptr("New subscriptions"),
	// 							},
	// 						},
	// 						{
	// 							Name: to.Ptr("NewApplicationNotificationMessage"),
	// 							Type: to.Ptr("Microsoft.ApiManagement/service/notifications"),
	// 							ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/NewApplicationNotificationMessage"),
	// 							Properties: &armapimanagement.NotificationContractProperties{
	// 								Description: to.Ptr("The following email recipients and users will receive email notifications when new applications are submitted to the application gallery."),
	// 								Recipients: &armapimanagement.RecipientsContractProperties{
	// 									Emails: []*string{
	// 										to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientEmails/contoso@live.com")},
	// 										Users: []*string{
	// 										},
	// 									},
	// 									Title: to.Ptr("Application gallery requests"),
	// 								},
	// 							},
	// 							{
	// 								Name: to.Ptr("BCC"),
	// 								Type: to.Ptr("Microsoft.ApiManagement/service/notifications"),
	// 								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/BCC"),
	// 								Properties: &armapimanagement.NotificationContractProperties{
	// 									Description: to.Ptr("The following recipients will receive blind carbon copies of all emails sent to developers."),
	// 									Recipients: &armapimanagement.RecipientsContractProperties{
	// 										Emails: []*string{
	// 										},
	// 										Users: []*string{
	// 										},
	// 									},
	// 									Title: to.Ptr("BCC"),
	// 								},
	// 							},
	// 							{
	// 								Name: to.Ptr("NewIssuePublisherNotificationMessage"),
	// 								Type: to.Ptr("Microsoft.ApiManagement/service/notifications"),
	// 								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/NewIssuePublisherNotificationMessage"),
	// 								Properties: &armapimanagement.NotificationContractProperties{
	// 									Description: to.Ptr("The following email recipients and users will receive email notifications when a new issue or comment is submitted on the developer portal."),
	// 									Recipients: &armapimanagement.RecipientsContractProperties{
	// 										Emails: []*string{
	// 										},
	// 										Users: []*string{
	// 											to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1")},
	// 										},
	// 										Title: to.Ptr("New issue or comment"),
	// 									},
	// 								},
	// 								{
	// 									Name: to.Ptr("AccountClosedPublisher"),
	// 									Type: to.Ptr("Microsoft.ApiManagement/service/notifications"),
	// 									ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/AccountClosedPublisher"),
	// 									Properties: &armapimanagement.NotificationContractProperties{
	// 										Description: to.Ptr("The following email recipients and users will receive email notifications when developer closes his account"),
	// 										Recipients: &armapimanagement.RecipientsContractProperties{
	// 											Emails: []*string{
	// 												to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientEmails/contoso@live.com")},
	// 												Users: []*string{
	// 												},
	// 											},
	// 											Title: to.Ptr("Close account message"),
	// 										},
	// 									},
	// 									{
	// 										Name: to.Ptr("QuotaLimitApproachingPublisherNotificationMessage"),
	// 										Type: to.Ptr("Microsoft.ApiManagement/service/notifications"),
	// 										ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/QuotaLimitApproachingPublisherNotificationMessage"),
	// 										Properties: &armapimanagement.NotificationContractProperties{
	// 											Description: to.Ptr("The following email recipients and users will receive email notifications when subscription usage gets close to usage quota."),
	// 											Recipients: &armapimanagement.RecipientsContractProperties{
	// 												Emails: []*string{
	// 												},
	// 												Users: []*string{
	// 													to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1")},
	// 												},
	// 												Title: to.Ptr("Approaching subscription quota limit"),
	// 											},
	// 									}},
	// 								}
}
Output:

type NotificationClientCreateOrUpdateOptions

type NotificationClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

NotificationClientCreateOrUpdateOptions contains the optional parameters for the NotificationClient.CreateOrUpdate method.

type NotificationClientCreateOrUpdateResponse

type NotificationClientCreateOrUpdateResponse struct {
	// Notification details.
	NotificationContract
}

NotificationClientCreateOrUpdateResponse contains the response from method NotificationClient.CreateOrUpdate.

type NotificationClientGetOptions

type NotificationClientGetOptions struct {
}

NotificationClientGetOptions contains the optional parameters for the NotificationClient.Get method.

type NotificationClientGetResponse

type NotificationClientGetResponse struct {
	// Notification details.
	NotificationContract
}

NotificationClientGetResponse contains the response from method NotificationClient.Get.

type NotificationClientListByServiceOptions

type NotificationClientListByServiceOptions struct {
	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

NotificationClientListByServiceOptions contains the optional parameters for the NotificationClient.NewListByServicePager method.

type NotificationClientListByServiceResponse

type NotificationClientListByServiceResponse struct {
	// Paged Notification list representation.
	NotificationCollection
}

NotificationClientListByServiceResponse contains the response from method NotificationClient.NewListByServicePager.

type NotificationCollection

type NotificationCollection struct {
	// Total record count number across all pages.
	Count *int64

	// Next page link if any.
	NextLink *string

	// Page values.
	Value []*NotificationContract
}

NotificationCollection - Paged Notification list representation.

func (NotificationCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NotificationCollection.

func (*NotificationCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type NotificationCollection.

type NotificationContract

type NotificationContract struct {
	// Notification entity contract properties.
	Properties *NotificationContractProperties

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

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

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

NotificationContract - Notification details.

func (NotificationContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NotificationContract.

func (*NotificationContract) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type NotificationContract.

type NotificationContractProperties

type NotificationContractProperties struct {
	// REQUIRED; Title of the Notification.
	Title *string

	// Description of the Notification.
	Description *string

	// Recipient Parameter values.
	Recipients *RecipientsContractProperties
}

NotificationContractProperties - Notification Contract properties.

func (NotificationContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NotificationContractProperties.

func (*NotificationContractProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type NotificationContractProperties.

type NotificationName

type NotificationName string
const (
	// NotificationNameAccountClosedPublisher - The following email recipients and users will receive email notifications when
	// developer closes his account.
	NotificationNameAccountClosedPublisher NotificationName = "AccountClosedPublisher"
	// NotificationNameBCC - The following recipients will receive blind carbon copies of all emails sent to developers.
	NotificationNameBCC NotificationName = "BCC"
	// NotificationNameNewApplicationNotificationMessage - The following email recipients and users will receive email notifications
	// when new applications are submitted to the application gallery.
	NotificationNameNewApplicationNotificationMessage NotificationName = "NewApplicationNotificationMessage"
	// NotificationNameNewIssuePublisherNotificationMessage - The following email recipients and users will receive email notifications
	// when a new issue or comment is submitted on the developer portal.
	NotificationNameNewIssuePublisherNotificationMessage NotificationName = "NewIssuePublisherNotificationMessage"
	// NotificationNamePurchasePublisherNotificationMessage - The following email recipients and users will receive email notifications
	// about new API product subscriptions.
	NotificationNamePurchasePublisherNotificationMessage NotificationName = "PurchasePublisherNotificationMessage"
	// NotificationNameQuotaLimitApproachingPublisherNotificationMessage - The following email recipients and users will receive
	// email notifications when subscription usage gets close to usage quota.
	NotificationNameQuotaLimitApproachingPublisherNotificationMessage NotificationName = "QuotaLimitApproachingPublisherNotificationMessage"
	// NotificationNameRequestPublisherNotificationMessage - The following email recipients and users will receive email notifications
	// about subscription requests for API products requiring approval.
	NotificationNameRequestPublisherNotificationMessage NotificationName = "RequestPublisherNotificationMessage"
)

func PossibleNotificationNameValues

func PossibleNotificationNameValues() []NotificationName

PossibleNotificationNameValues returns the possible values for the NotificationName const type.

type NotificationRecipientEmailClient

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

NotificationRecipientEmailClient contains the methods for the NotificationRecipientEmail group. Don't use this type directly, use NewNotificationRecipientEmailClient() instead.

func NewNotificationRecipientEmailClient

func NewNotificationRecipientEmailClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NotificationRecipientEmailClient, error)

NewNotificationRecipientEmailClient creates a new instance of NotificationRecipientEmailClient 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 (*NotificationRecipientEmailClient) CheckEntityExists

CheckEntityExists - Determine if Notification Recipient Email subscribed to the notification.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • notificationName - Notification Name Identifier.
  • email - Email identifier.
  • options - NotificationRecipientEmailClientCheckEntityExistsOptions contains the optional parameters for the NotificationRecipientEmailClient.CheckEntityExists method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadNotificationRecipientEmail.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewNotificationRecipientEmailClient().CheckEntityExists(ctx, "rg1", "apimService1", armapimanagement.NotificationNameRequestPublisherNotificationMessage, "contoso@live.com", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*NotificationRecipientEmailClient) CreateOrUpdate

CreateOrUpdate - Adds the Email address to the list of Recipients for the Notification. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • notificationName - Notification Name Identifier.
  • email - Email identifier.
  • options - NotificationRecipientEmailClientCreateOrUpdateOptions contains the optional parameters for the NotificationRecipientEmailClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateNotificationRecipientEmail.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewNotificationRecipientEmailClient().CreateOrUpdate(ctx, "rg1", "apimService1", armapimanagement.NotificationNameRequestPublisherNotificationMessage, "foobar@live.com", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.RecipientEmailContract = armapimanagement.RecipientEmailContract{
// 	Name: to.Ptr("foobar@live.com"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/notifications/recipientEmails"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientEmails/foobar@live.com"),
// 	Properties: &armapimanagement.RecipientEmailContractProperties{
// 		Email: to.Ptr("foobar@live.com"),
// 	},
// }
Output:

func (*NotificationRecipientEmailClient) Delete

Delete - Removes the email from the list of Notification. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • notificationName - Notification Name Identifier.
  • email - Email identifier.
  • options - NotificationRecipientEmailClientDeleteOptions contains the optional parameters for the NotificationRecipientEmailClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteNotificationRecipientEmail.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewNotificationRecipientEmailClient().Delete(ctx, "rg1", "apimService1", armapimanagement.NotificationNameRequestPublisherNotificationMessage, "contoso@live.com", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*NotificationRecipientEmailClient) ListByNotification

ListByNotification - Gets the list of the Notification Recipient Emails subscribed to a notification. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • notificationName - Notification Name Identifier.
  • options - NotificationRecipientEmailClientListByNotificationOptions contains the optional parameters for the NotificationRecipientEmailClient.ListByNotification method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListNotificationRecipientEmails.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewNotificationRecipientEmailClient().ListByNotification(ctx, "rg1", "apimService1", armapimanagement.NotificationNameRequestPublisherNotificationMessage, 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.RecipientEmailCollection = armapimanagement.RecipientEmailCollection{
// 	Count: to.Ptr[int64](3),
// 	Value: []*armapimanagement.RecipientEmailContract{
// 		{
// 			Name: to.Ptr("contoso@live.com"),
// 			Type: to.Ptr("Microsoft.ApiManagement/service/notifications/recipientEmails"),
// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientEmails/contoso@live.com"),
// 			Properties: &armapimanagement.RecipientEmailContractProperties{
// 				Email: to.Ptr("contoso@live.com"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("foobar!live"),
// 			Type: to.Ptr("Microsoft.ApiManagement/service/notifications/recipientEmails"),
// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientEmails/foobar!live"),
// 			Properties: &armapimanagement.RecipientEmailContractProperties{
// 				Email: to.Ptr("foobar!live"),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("foobar@live.com"),
// 			Type: to.Ptr("Microsoft.ApiManagement/service/notifications/recipientEmails"),
// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientEmails/foobar@live.com"),
// 			Properties: &armapimanagement.RecipientEmailContractProperties{
// 				Email: to.Ptr("foobar@live.com"),
// 			},
// 	}},
// }
Output:

type NotificationRecipientEmailClientCheckEntityExistsOptions

type NotificationRecipientEmailClientCheckEntityExistsOptions struct {
}

NotificationRecipientEmailClientCheckEntityExistsOptions contains the optional parameters for the NotificationRecipientEmailClient.CheckEntityExists method.

type NotificationRecipientEmailClientCheckEntityExistsResponse

type NotificationRecipientEmailClientCheckEntityExistsResponse struct {
	// Success indicates if the operation succeeded or failed.
	Success bool
}

NotificationRecipientEmailClientCheckEntityExistsResponse contains the response from method NotificationRecipientEmailClient.CheckEntityExists.

type NotificationRecipientEmailClientCreateOrUpdateOptions

type NotificationRecipientEmailClientCreateOrUpdateOptions struct {
}

NotificationRecipientEmailClientCreateOrUpdateOptions contains the optional parameters for the NotificationRecipientEmailClient.CreateOrUpdate method.

type NotificationRecipientEmailClientCreateOrUpdateResponse

type NotificationRecipientEmailClientCreateOrUpdateResponse struct {
	// Recipient Email details.
	RecipientEmailContract
}

NotificationRecipientEmailClientCreateOrUpdateResponse contains the response from method NotificationRecipientEmailClient.CreateOrUpdate.

type NotificationRecipientEmailClientDeleteOptions

type NotificationRecipientEmailClientDeleteOptions struct {
}

NotificationRecipientEmailClientDeleteOptions contains the optional parameters for the NotificationRecipientEmailClient.Delete method.

type NotificationRecipientEmailClientDeleteResponse

type NotificationRecipientEmailClientDeleteResponse struct {
}

NotificationRecipientEmailClientDeleteResponse contains the response from method NotificationRecipientEmailClient.Delete.

type NotificationRecipientEmailClientListByNotificationOptions

type NotificationRecipientEmailClientListByNotificationOptions struct {
}

NotificationRecipientEmailClientListByNotificationOptions contains the optional parameters for the NotificationRecipientEmailClient.ListByNotification method.

type NotificationRecipientEmailClientListByNotificationResponse

type NotificationRecipientEmailClientListByNotificationResponse struct {
	// Paged Recipient User list representation.
	RecipientEmailCollection
}

NotificationRecipientEmailClientListByNotificationResponse contains the response from method NotificationRecipientEmailClient.ListByNotification.

type NotificationRecipientUserClient

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

NotificationRecipientUserClient contains the methods for the NotificationRecipientUser group. Don't use this type directly, use NewNotificationRecipientUserClient() instead.

func NewNotificationRecipientUserClient

func NewNotificationRecipientUserClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NotificationRecipientUserClient, error)

NewNotificationRecipientUserClient creates a new instance of NotificationRecipientUserClient 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 (*NotificationRecipientUserClient) CheckEntityExists

CheckEntityExists - Determine if the Notification Recipient User is subscribed to the notification.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • notificationName - Notification Name Identifier.
  • userID - User identifier. Must be unique in the current API Management service instance.
  • options - NotificationRecipientUserClientCheckEntityExistsOptions contains the optional parameters for the NotificationRecipientUserClient.CheckEntityExists method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadNotificationRecipientUser.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewNotificationRecipientUserClient().CheckEntityExists(ctx, "rg1", "apimService1", armapimanagement.NotificationNameRequestPublisherNotificationMessage, "576823d0a40f7e74ec07d642", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*NotificationRecipientUserClient) CreateOrUpdate

CreateOrUpdate - Adds the API Management User to the list of Recipients for the Notification. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • notificationName - Notification Name Identifier.
  • userID - User identifier. Must be unique in the current API Management service instance.
  • options - NotificationRecipientUserClientCreateOrUpdateOptions contains the optional parameters for the NotificationRecipientUserClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateNotificationRecipientUser.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewNotificationRecipientUserClient().CreateOrUpdate(ctx, "rg1", "apimService1", armapimanagement.NotificationNameRequestPublisherNotificationMessage, "576823d0a40f7e74ec07d642", 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.RecipientUserContract = armapimanagement.RecipientUserContract{
// 	Name: to.Ptr("576823d0a40f7e74ec07d642"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/notifications/recipientUsers"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientUsers/576823d0a40f7e74ec07d642"),
// 	Properties: &armapimanagement.RecipientUsersContractProperties{
// 		UserID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/576823d0a40f7e74ec07d642"),
// 	},
// }
Output:

func (*NotificationRecipientUserClient) Delete

Delete - Removes the API Management user from the list of Notification. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • notificationName - Notification Name Identifier.
  • userID - User identifier. Must be unique in the current API Management service instance.
  • options - NotificationRecipientUserClientDeleteOptions contains the optional parameters for the NotificationRecipientUserClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteNotificationRecipientUser.json

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

func (*NotificationRecipientUserClient) ListByNotification

ListByNotification - Gets the list of the Notification Recipient User subscribed to the notification. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • notificationName - Notification Name Identifier.
  • options - NotificationRecipientUserClientListByNotificationOptions contains the optional parameters for the NotificationRecipientUserClient.ListByNotification method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListNotificationRecipientUsers.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewNotificationRecipientUserClient().ListByNotification(ctx, "rg1", "apimService1", armapimanagement.NotificationNameRequestPublisherNotificationMessage, 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.RecipientUserCollection = armapimanagement.RecipientUserCollection{
// 	Count: to.Ptr[int64](1),
// 	Value: []*armapimanagement.RecipientUserContract{
// 		{
// 			Name: to.Ptr("576823d0a40f7e74ec07d642"),
// 			Type: to.Ptr("Microsoft.ApiManagement/service/notifications/recipientUsers"),
// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientUsers/576823d0a40f7e74ec07d642"),
// 			Properties: &armapimanagement.RecipientUsersContractProperties{
// 				UserID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/576823d0a40f7e74ec07d642"),
// 			},
// 	}},
// }
Output:

type NotificationRecipientUserClientCheckEntityExistsOptions

type NotificationRecipientUserClientCheckEntityExistsOptions struct {
}

NotificationRecipientUserClientCheckEntityExistsOptions contains the optional parameters for the NotificationRecipientUserClient.CheckEntityExists method.

type NotificationRecipientUserClientCheckEntityExistsResponse

type NotificationRecipientUserClientCheckEntityExistsResponse struct {
	// Success indicates if the operation succeeded or failed.
	Success bool
}

NotificationRecipientUserClientCheckEntityExistsResponse contains the response from method NotificationRecipientUserClient.CheckEntityExists.

type NotificationRecipientUserClientCreateOrUpdateOptions

type NotificationRecipientUserClientCreateOrUpdateOptions struct {
}

NotificationRecipientUserClientCreateOrUpdateOptions contains the optional parameters for the NotificationRecipientUserClient.CreateOrUpdate method.

type NotificationRecipientUserClientCreateOrUpdateResponse

type NotificationRecipientUserClientCreateOrUpdateResponse struct {
	// Recipient User details.
	RecipientUserContract
}

NotificationRecipientUserClientCreateOrUpdateResponse contains the response from method NotificationRecipientUserClient.CreateOrUpdate.

type NotificationRecipientUserClientDeleteOptions

type NotificationRecipientUserClientDeleteOptions struct {
}

NotificationRecipientUserClientDeleteOptions contains the optional parameters for the NotificationRecipientUserClient.Delete method.

type NotificationRecipientUserClientDeleteResponse

type NotificationRecipientUserClientDeleteResponse struct {
}

NotificationRecipientUserClientDeleteResponse contains the response from method NotificationRecipientUserClient.Delete.

type NotificationRecipientUserClientListByNotificationOptions

type NotificationRecipientUserClientListByNotificationOptions struct {
}

NotificationRecipientUserClientListByNotificationOptions contains the optional parameters for the NotificationRecipientUserClient.ListByNotification method.

type NotificationRecipientUserClientListByNotificationResponse

type NotificationRecipientUserClientListByNotificationResponse struct {
	// Paged Recipient User list representation.
	RecipientUserCollection
}

NotificationRecipientUserClientListByNotificationResponse contains the response from method NotificationRecipientUserClient.ListByNotification.

type OAuth2AuthenticationSettingsContract

type OAuth2AuthenticationSettingsContract struct {
	// OAuth authorization server identifier.
	AuthorizationServerID *string

	// operations scope.
	Scope *string
}

OAuth2AuthenticationSettingsContract - API OAuth2 Authentication settings details.

func (OAuth2AuthenticationSettingsContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OAuth2AuthenticationSettingsContract.

func (*OAuth2AuthenticationSettingsContract) UnmarshalJSON

func (o *OAuth2AuthenticationSettingsContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OAuth2AuthenticationSettingsContract.

type OAuth2GrantType

type OAuth2GrantType string

OAuth2GrantType - OAuth2 grant type options

const (
	// OAuth2GrantTypeAuthorizationCode - Authorization Code grant
	OAuth2GrantTypeAuthorizationCode OAuth2GrantType = "AuthorizationCode"
	// OAuth2GrantTypeClientCredentials - Client Credential grant
	OAuth2GrantTypeClientCredentials OAuth2GrantType = "ClientCredentials"
)

func PossibleOAuth2GrantTypeValues

func PossibleOAuth2GrantTypeValues() []OAuth2GrantType

PossibleOAuth2GrantTypeValues returns the possible values for the OAuth2GrantType const type.

type OpenIDAuthenticationSettingsContract

type OpenIDAuthenticationSettingsContract struct {
	// How to send token to the server.
	BearerTokenSendingMethods []*BearerTokenSendingMethods

	// OAuth authorization server identifier.
	OpenidProviderID *string
}

OpenIDAuthenticationSettingsContract - API OAuth2 Authentication settings details.

func (OpenIDAuthenticationSettingsContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OpenIDAuthenticationSettingsContract.

func (*OpenIDAuthenticationSettingsContract) UnmarshalJSON

func (o *OpenIDAuthenticationSettingsContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OpenIDAuthenticationSettingsContract.

type OpenIDConnectProviderClient

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

OpenIDConnectProviderClient contains the methods for the OpenIDConnectProvider group. Don't use this type directly, use NewOpenIDConnectProviderClient() instead.

func NewOpenIDConnectProviderClient

func NewOpenIDConnectProviderClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OpenIDConnectProviderClient, error)

NewOpenIDConnectProviderClient creates a new instance of OpenIDConnectProviderClient 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 (*OpenIDConnectProviderClient) CreateOrUpdate

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

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • opid - Identifier of the OpenID Connect Provider.
  • parameters - Create parameters.
  • options - OpenIDConnectProviderClientCreateOrUpdateOptions contains the optional parameters for the OpenIDConnectProviderClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateOpenIdConnectProvider.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewOpenIDConnectProviderClient().CreateOrUpdate(ctx, "rg1", "apimService1", "templateOpenIdConnect3", armapimanagement.OpenidConnectProviderContract{
	Properties: &armapimanagement.OpenidConnectProviderContractProperties{
		ClientID:              to.Ptr("oidprovidertemplate3"),
		ClientSecret:          to.Ptr("x"),
		DisplayName:           to.Ptr("templateoidprovider3"),
		MetadataEndpoint:      to.Ptr("https://oidprovider-template3.net"),
		UseInAPIDocumentation: to.Ptr(true),
		UseInTestConsole:      to.Ptr(false),
	},
}, &armapimanagement.OpenIDConnectProviderClientCreateOrUpdateOptions{IfMatch: 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.OpenidConnectProviderContract = armapimanagement.OpenidConnectProviderContract{
// 	Name: to.Ptr("templateOpenIdConnect3"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/openidconnectproviders"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/openidConnectProviders/templateOpenIdConnect3"),
// 	Properties: &armapimanagement.OpenidConnectProviderContractProperties{
// 		ClientID: to.Ptr("oidprovidertemplate3"),
// 		DisplayName: to.Ptr("templateoidprovider3"),
// 		MetadataEndpoint: to.Ptr("https://oidprovider-template3.net"),
// 		UseInAPIDocumentation: to.Ptr(true),
// 		UseInTestConsole: to.Ptr(false),
// 	},
// }
Output:

func (*OpenIDConnectProviderClient) Delete

Delete - Deletes specific OpenID Connect Provider of the API Management service instance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • opid - Identifier of the OpenID Connect Provider.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - OpenIDConnectProviderClientDeleteOptions contains the optional parameters for the OpenIDConnectProviderClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteOpenIdConnectProvider.json

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

func (*OpenIDConnectProviderClient) Get

Get - Gets specific OpenID Connect Provider without secrets. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • opid - Identifier of the OpenID Connect Provider.
  • options - OpenIDConnectProviderClientGetOptions contains the optional parameters for the OpenIDConnectProviderClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetOpenIdConnectProvider.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewOpenIDConnectProviderClient().Get(ctx, "rg1", "apimService1", "templateOpenIdConnect2", 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.OpenidConnectProviderContract = armapimanagement.OpenidConnectProviderContract{
// 	Name: to.Ptr("templateOpenIdConnect2"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/openidconnectproviders"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/openidConnectProviders/templateOpenIdConnect2"),
// 	Properties: &armapimanagement.OpenidConnectProviderContractProperties{
// 		Description: to.Ptr("open id provider template2"),
// 		ClientID: to.Ptr("oidprovidertemplate2"),
// 		DisplayName: to.Ptr("templateoidprovider2"),
// 		MetadataEndpoint: to.Ptr("https://oidprovider-template2.net"),
// 		UseInAPIDocumentation: to.Ptr(true),
// 		UseInTestConsole: to.Ptr(false),
// 	},
// }
Output:

func (*OpenIDConnectProviderClient) GetEntityTag

GetEntityTag - Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • opid - Identifier of the OpenID Connect Provider.
  • options - OpenIDConnectProviderClientGetEntityTagOptions contains the optional parameters for the OpenIDConnectProviderClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadOpenIdConnectProvider.json

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

func (*OpenIDConnectProviderClient) ListSecrets

ListSecrets - Gets the client secret details of the OpenID Connect Provider. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • opid - Identifier of the OpenID Connect Provider.
  • options - OpenIDConnectProviderClientListSecretsOptions contains the optional parameters for the OpenIDConnectProviderClient.ListSecrets method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementOpenidConnectProviderListSecrets.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewOpenIDConnectProviderClient().ListSecrets(ctx, "rg1", "apimService1", "templateOpenIdConnect2", 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.ClientSecretContract = armapimanagement.ClientSecretContract{
// 	ClientSecret: to.Ptr("oidsecretproviderTemplate2"),
// }
Output:

func (*OpenIDConnectProviderClient) NewListByServicePager

NewListByServicePager - Lists of all the OpenId Connect Providers.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - OpenIDConnectProviderClientListByServiceOptions contains the optional parameters for the OpenIDConnectProviderClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListOpenIdConnectProviders.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewOpenIDConnectProviderClient().NewListByServicePager("rg1", "apimService1", &armapimanagement.OpenIDConnectProviderClientListByServiceOptions{Filter: nil,
	Top:  nil,
	Skip: 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.OpenIDConnectProviderCollection = armapimanagement.OpenIDConnectProviderCollection{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.OpenidConnectProviderContract{
	// 		{
	// 			Name: to.Ptr("templateOpenIdConnect2"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/openidconnectproviders"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/openidConnectProviders/templateOpenIdConnect2"),
	// 			Properties: &armapimanagement.OpenidConnectProviderContractProperties{
	// 				Description: to.Ptr("open id provider template2"),
	// 				ClientID: to.Ptr("oidprovidertemplate2"),
	// 				DisplayName: to.Ptr("templateoidprovider2"),
	// 				MetadataEndpoint: to.Ptr("https://oidprovider-template2.net"),
	// 				UseInAPIDocumentation: to.Ptr(true),
	// 				UseInTestConsole: to.Ptr(false),
	// 			},
	// 	}},
	// }
}
Output:

func (*OpenIDConnectProviderClient) Update

Update - Updates the specific OpenID Connect Provider. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • opid - Identifier of the OpenID Connect Provider.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - Update parameters.
  • options - OpenIDConnectProviderClientUpdateOptions contains the optional parameters for the OpenIDConnectProviderClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateOpenIdConnectProvider.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewOpenIDConnectProviderClient().Update(ctx, "rg1", "apimService1", "templateOpenIdConnect2", "*", armapimanagement.OpenidConnectProviderUpdateContract{
	Properties: &armapimanagement.OpenidConnectProviderUpdateContractProperties{
		ClientSecret:          to.Ptr("updatedsecret"),
		UseInAPIDocumentation: to.Ptr(true),
		UseInTestConsole:      to.Ptr(false),
	},
}, 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.OpenidConnectProviderContract = armapimanagement.OpenidConnectProviderContract{
// 	Name: to.Ptr("templateOpenIdConnect2"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/openidconnectproviders"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/openidConnectProviders/templateOpenIdConnect2"),
// 	Properties: &armapimanagement.OpenidConnectProviderContractProperties{
// 		Description: to.Ptr("open id provider template2"),
// 		ClientID: to.Ptr("oidprovidertemplate2"),
// 		DisplayName: to.Ptr("templateoidprovider2"),
// 		MetadataEndpoint: to.Ptr("https://oidprovider-template2.net"),
// 		UseInAPIDocumentation: to.Ptr(true),
// 		UseInTestConsole: to.Ptr(false),
// 	},
// }
Output:

type OpenIDConnectProviderClientCreateOrUpdateOptions

type OpenIDConnectProviderClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

OpenIDConnectProviderClientCreateOrUpdateOptions contains the optional parameters for the OpenIDConnectProviderClient.CreateOrUpdate method.

type OpenIDConnectProviderClientCreateOrUpdateResponse

type OpenIDConnectProviderClientCreateOrUpdateResponse struct {
	// OpenId Connect Provider details.
	OpenidConnectProviderContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

OpenIDConnectProviderClientCreateOrUpdateResponse contains the response from method OpenIDConnectProviderClient.CreateOrUpdate.

type OpenIDConnectProviderClientDeleteOptions

type OpenIDConnectProviderClientDeleteOptions struct {
}

OpenIDConnectProviderClientDeleteOptions contains the optional parameters for the OpenIDConnectProviderClient.Delete method.

type OpenIDConnectProviderClientDeleteResponse

type OpenIDConnectProviderClientDeleteResponse struct {
}

OpenIDConnectProviderClientDeleteResponse contains the response from method OpenIDConnectProviderClient.Delete.

type OpenIDConnectProviderClientGetEntityTagOptions

type OpenIDConnectProviderClientGetEntityTagOptions struct {
}

OpenIDConnectProviderClientGetEntityTagOptions contains the optional parameters for the OpenIDConnectProviderClient.GetEntityTag method.

type OpenIDConnectProviderClientGetEntityTagResponse

type OpenIDConnectProviderClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

OpenIDConnectProviderClientGetEntityTagResponse contains the response from method OpenIDConnectProviderClient.GetEntityTag.

type OpenIDConnectProviderClientGetOptions

type OpenIDConnectProviderClientGetOptions struct {
}

OpenIDConnectProviderClientGetOptions contains the optional parameters for the OpenIDConnectProviderClient.Get method.

type OpenIDConnectProviderClientGetResponse

type OpenIDConnectProviderClientGetResponse struct {
	// OpenId Connect Provider details.
	OpenidConnectProviderContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

OpenIDConnectProviderClientGetResponse contains the response from method OpenIDConnectProviderClient.Get.

type OpenIDConnectProviderClientListByServiceOptions

type OpenIDConnectProviderClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

OpenIDConnectProviderClientListByServiceOptions contains the optional parameters for the OpenIDConnectProviderClient.NewListByServicePager method.

type OpenIDConnectProviderClientListByServiceResponse

type OpenIDConnectProviderClientListByServiceResponse struct {
	// Paged OpenIdProviders list representation.
	OpenIDConnectProviderCollection
}

OpenIDConnectProviderClientListByServiceResponse contains the response from method OpenIDConnectProviderClient.NewListByServicePager.

type OpenIDConnectProviderClientListSecretsOptions

type OpenIDConnectProviderClientListSecretsOptions struct {
}

OpenIDConnectProviderClientListSecretsOptions contains the optional parameters for the OpenIDConnectProviderClient.ListSecrets method.

type OpenIDConnectProviderClientListSecretsResponse

type OpenIDConnectProviderClientListSecretsResponse struct {
	// Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.
	ClientSecretContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

OpenIDConnectProviderClientListSecretsResponse contains the response from method OpenIDConnectProviderClient.ListSecrets.

type OpenIDConnectProviderClientUpdateOptions

type OpenIDConnectProviderClientUpdateOptions struct {
}

OpenIDConnectProviderClientUpdateOptions contains the optional parameters for the OpenIDConnectProviderClient.Update method.

type OpenIDConnectProviderClientUpdateResponse

type OpenIDConnectProviderClientUpdateResponse struct {
	// OpenId Connect Provider details.
	OpenidConnectProviderContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

OpenIDConnectProviderClientUpdateResponse contains the response from method OpenIDConnectProviderClient.Update.

type OpenIDConnectProviderCollection

type OpenIDConnectProviderCollection struct {
	// Total record count number across all pages.
	Count *int64

	// Next page link if any.
	NextLink *string

	// Page values.
	Value []*OpenidConnectProviderContract
}

OpenIDConnectProviderCollection - Paged OpenIdProviders list representation.

func (OpenIDConnectProviderCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OpenIDConnectProviderCollection.

func (*OpenIDConnectProviderCollection) UnmarshalJSON

func (o *OpenIDConnectProviderCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OpenIDConnectProviderCollection.

type OpenidConnectProviderContract

type OpenidConnectProviderContract struct {
	// OpenId Connect Provider contract properties.
	Properties *OpenidConnectProviderContractProperties

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

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

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

OpenidConnectProviderContract - OpenId Connect Provider details.

func (OpenidConnectProviderContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OpenidConnectProviderContract.

func (*OpenidConnectProviderContract) UnmarshalJSON

func (o *OpenidConnectProviderContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OpenidConnectProviderContract.

type OpenidConnectProviderContractProperties

type OpenidConnectProviderContractProperties struct {
	// REQUIRED; Client ID of developer console which is the client application.
	ClientID *string

	// REQUIRED; User-friendly OpenID Connect Provider name.
	DisplayName *string

	// REQUIRED; Metadata endpoint URI.
	MetadataEndpoint *string

	// Client Secret of developer console which is the client application.
	ClientSecret *string

	// User-friendly description of OpenID Connect Provider.
	Description *string

	// If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if
	// no value is provided.
	UseInAPIDocumentation *bool

	// If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is
	// provided.
	UseInTestConsole *bool
}

OpenidConnectProviderContractProperties - OpenID Connect Providers Contract.

func (OpenidConnectProviderContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OpenidConnectProviderContractProperties.

func (*OpenidConnectProviderContractProperties) UnmarshalJSON

func (o *OpenidConnectProviderContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OpenidConnectProviderContractProperties.

type OpenidConnectProviderUpdateContract

type OpenidConnectProviderUpdateContract struct {
	// OpenId Connect Provider Update contract properties.
	Properties *OpenidConnectProviderUpdateContractProperties
}

OpenidConnectProviderUpdateContract - Parameters supplied to the Update OpenID Connect Provider operation.

func (OpenidConnectProviderUpdateContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OpenidConnectProviderUpdateContract.

func (*OpenidConnectProviderUpdateContract) UnmarshalJSON

func (o *OpenidConnectProviderUpdateContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OpenidConnectProviderUpdateContract.

type OpenidConnectProviderUpdateContractProperties

type OpenidConnectProviderUpdateContractProperties struct {
	// Client ID of developer console which is the client application.
	ClientID *string

	// Client Secret of developer console which is the client application.
	ClientSecret *string

	// User-friendly description of OpenID Connect Provider.
	Description *string

	// User-friendly OpenID Connect Provider name.
	DisplayName *string

	// Metadata endpoint URI.
	MetadataEndpoint *string

	// If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if
	// no value is provided.
	UseInAPIDocumentation *bool

	// If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is
	// provided.
	UseInTestConsole *bool
}

OpenidConnectProviderUpdateContractProperties - Parameters supplied to the Update OpenID Connect Provider operation.

func (OpenidConnectProviderUpdateContractProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type OpenidConnectProviderUpdateContractProperties.

func (*OpenidConnectProviderUpdateContractProperties) UnmarshalJSON

func (o *OpenidConnectProviderUpdateContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OpenidConnectProviderUpdateContractProperties.

type Operation

type Operation struct {
	// The object that describes the operation.
	Display *OperationDisplay

	// Operation name: {provider}/{resource}/{operation}
	Name *string

	// The operation origin.
	Origin *string

	// The operation properties.
	Properties any
}

Operation - REST API operation

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 OperationClient

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

OperationClient contains the methods for the Operation group. Don't use this type directly, use NewOperationClient() instead.

func NewOperationClient

func NewOperationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationClient, error)

NewOperationClient creates a new instance of OperationClient 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 (*OperationClient) NewListByTagsPager

func (client *OperationClient) NewListByTagsPager(resourceGroupName string, serviceName string, apiID string, options *OperationClientListByTagsOptions) *runtime.Pager[OperationClientListByTagsResponse]

NewListByTagsPager - Lists a collection of operations associated with tags.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • options - OperationClientListByTagsOptions contains the optional parameters for the OperationClient.NewListByTagsPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiOperationsByTags.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewOperationClient().NewListByTagsPager("rg1", "apimService1", "a1", &armapimanagement.OperationClientListByTagsOptions{Filter: nil,
	Top:                        nil,
	Skip:                       nil,
	IncludeNotTaggedOperations: 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.TagResourceCollection = armapimanagement.TagResourceCollection{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.TagResourceContract{
	// 		{
	// 			Operation: &armapimanagement.OperationTagResourceContractProperties{
	// 				Name: to.Ptr("Create resource"),
	// 				Method: to.Ptr("POST"),
	// 				Description: to.Ptr("A demonstration of a POST call based on the echo backend above. The request body is expected to contain JSON-formatted data (see example below). A policy is used to automatically transform any request sent in JSON directly to XML. In a real-world scenario this could be used to enable modern clients to speak to a legacy backend."),
	// 				APIName: to.Ptr("Echo API"),
	// 				APIRevision: to.Ptr("1"),
	// 				ID: to.Ptr("/apis/echo-api/operations/create-resource"),
	// 				URLTemplate: to.Ptr("/resource"),
	// 			},
	// 			Tag: &armapimanagement.TagResourceContractProperties{
	// 				Name: to.Ptr("awesomeTag"),
	// 				ID: to.Ptr("/tags/apitag123"),
	// 			},
	// 	}},
	// }
}
Output:

type OperationClientListByTagsOptions

type OperationClientListByTagsOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Include not tagged Operations.
	IncludeNotTaggedOperations *bool

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

OperationClientListByTagsOptions contains the optional parameters for the OperationClient.NewListByTagsPager method.

type OperationClientListByTagsResponse

type OperationClientListByTagsResponse struct {
	// Paged Tag list representation.
	TagResourceCollection
}

OperationClientListByTagsResponse contains the response from method OperationClient.NewListByTagsPager.

type OperationCollection

type OperationCollection struct {
	// Total record count number across all pages.
	Count *int64

	// READ-ONLY; Next page link if any.
	NextLink *string

	// READ-ONLY; Page values.
	Value []*OperationContract
}

OperationCollection - Paged Operation list representation.

func (OperationCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationCollection.

func (*OperationCollection) UnmarshalJSON

func (o *OperationCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationCollection.

type OperationContract

type OperationContract struct {
	// Properties of the Operation Contract.
	Properties *OperationContractProperties

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

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

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

OperationContract - API Operation details.

func (OperationContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationContract.

func (*OperationContract) UnmarshalJSON

func (o *OperationContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationContract.

type OperationContractProperties

type OperationContractProperties struct {
	// REQUIRED; Operation Name.
	DisplayName *string

	// REQUIRED; A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them.
	Method *string

	// REQUIRED; Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}
	URLTemplate *string

	// Description of the operation. May include HTML formatting tags.
	Description *string

	// Operation Policies
	Policies *string

	// An entity containing request details.
	Request *RequestContract

	// Array of Operation responses.
	Responses []*ResponseContract

	// Collection of URL template parameters.
	TemplateParameters []*ParameterContract
}

OperationContractProperties - Operation Contract Properties

func (OperationContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationContractProperties.

func (*OperationContractProperties) UnmarshalJSON

func (o *OperationContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationContractProperties.

type OperationDisplay

type OperationDisplay struct {
	// Friendly name of the operation
	Description *string

	// Operation type: read, write, delete, listKeys/action, etc.
	Operation *string

	// Friendly name of the resource provider
	Provider *string

	// Resource type on which the operation is performed.
	Resource *string
}

OperationDisplay - The object that describes the 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 OperationEntityBaseContract

type OperationEntityBaseContract struct {
	// Description of the operation. May include HTML formatting tags.
	Description *string

	// Operation Policies
	Policies *string

	// An entity containing request details.
	Request *RequestContract

	// Array of Operation responses.
	Responses []*ResponseContract

	// Collection of URL template parameters.
	TemplateParameters []*ParameterContract
}

OperationEntityBaseContract - API Operation Entity Base Contract details.

func (OperationEntityBaseContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationEntityBaseContract.

func (*OperationEntityBaseContract) UnmarshalJSON

func (o *OperationEntityBaseContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationEntityBaseContract.

type OperationListResult

type OperationListResult struct {
	// URL to get the next set of operation list results if there are any.
	NextLink *string

	// List of operations supported by the resource provider.
	Value []*Operation
}

OperationListResult - Result of the request to list REST API operations. It contains a list of operations and a URL nextLink 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 OperationNameFormat

type OperationNameFormat string

OperationNameFormat - The format of the Operation Name for Application Insights telemetries. Default is Name.

const (
	// OperationNameFormatName - API_NAME;rev=API_REVISION - OPERATION_NAME
	OperationNameFormatName OperationNameFormat = "Name"
	// OperationNameFormatURL - HTTP_VERB URL
	OperationNameFormatURL OperationNameFormat = "Url"
)

func PossibleOperationNameFormatValues

func PossibleOperationNameFormatValues() []OperationNameFormat

PossibleOperationNameFormatValues returns the possible values for the OperationNameFormat const type.

type OperationResultContract

type OperationResultContract struct {
	// Properties of the Operation Contract.
	Properties *OperationResultContractProperties

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

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

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

OperationResultContract - Long Running Git Operation Results.

func (OperationResultContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationResultContract.

func (*OperationResultContract) UnmarshalJSON

func (o *OperationResultContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationResultContract.

type OperationResultContractProperties

type OperationResultContractProperties struct {
	// Error Body Contract
	Error *ErrorResponseBody

	// Operation result identifier.
	ID *string

	// Optional result info.
	ResultInfo *string

	// Start time of an async operation. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO
	// 8601 standard.
	Started *time.Time

	// Status of an async operation.
	Status *AsyncOperationStatus

	// Last update time of an async operation. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by
	// the ISO 8601 standard.
	Updated *time.Time

	// READ-ONLY; This property if only provided as part of the TenantConfigurationValidate operation. It contains the log the
	// entities which will be updated/created/deleted as part of the TenantConfigurationDeploy
	// operation.
	ActionLog []*OperationResultLogItemContract
}

OperationResultContractProperties - Operation Result.

func (OperationResultContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationResultContractProperties.

func (*OperationResultContractProperties) UnmarshalJSON

func (o *OperationResultContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationResultContractProperties.

type OperationResultLogItemContract

type OperationResultLogItemContract struct {
	// Action like create/update/delete.
	Action *string

	// Identifier of the entity being created/updated/deleted.
	ObjectKey *string

	// The type of entity contract.
	ObjectType *string
}

OperationResultLogItemContract - Log of the entity being created, updated or deleted.

func (OperationResultLogItemContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationResultLogItemContract.

func (*OperationResultLogItemContract) UnmarshalJSON

func (o *OperationResultLogItemContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationResultLogItemContract.

type OperationTagResourceContractProperties

type OperationTagResourceContractProperties struct {
	// Identifier of the operation in form /operations/{operationId}.
	ID *string

	// READ-ONLY; API Name.
	APIName *string

	// READ-ONLY; API Revision.
	APIRevision *string

	// READ-ONLY; API Version.
	APIVersion *string

	// READ-ONLY; Operation Description.
	Description *string

	// READ-ONLY; A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them.
	Method *string

	// READ-ONLY; Operation name.
	Name *string

	// READ-ONLY; Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}
	URLTemplate *string
}

OperationTagResourceContractProperties - Operation Entity contract Properties.

func (OperationTagResourceContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationTagResourceContractProperties.

func (*OperationTagResourceContractProperties) UnmarshalJSON

func (o *OperationTagResourceContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationTagResourceContractProperties.

type OperationUpdateContract

type OperationUpdateContract struct {
	// Properties of the API Operation entity that can be updated.
	Properties *OperationUpdateContractProperties
}

OperationUpdateContract - API Operation Update Contract details.

func (OperationUpdateContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationUpdateContract.

func (*OperationUpdateContract) UnmarshalJSON

func (o *OperationUpdateContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationUpdateContract.

type OperationUpdateContractProperties

type OperationUpdateContractProperties struct {
	// Description of the operation. May include HTML formatting tags.
	Description *string

	// Operation Name.
	DisplayName *string

	// A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them.
	Method *string

	// Operation Policies
	Policies *string

	// An entity containing request details.
	Request *RequestContract

	// Array of Operation responses.
	Responses []*ResponseContract

	// Collection of URL template parameters.
	TemplateParameters []*ParameterContract

	// Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}
	URLTemplate *string
}

OperationUpdateContractProperties - Operation Update Contract Properties.

func (OperationUpdateContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationUpdateContractProperties.

func (*OperationUpdateContractProperties) UnmarshalJSON

func (o *OperationUpdateContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationUpdateContractProperties.

type OperationsClient

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

OperationsClient contains the methods for the APIManagementOperations 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 REST API operations of the Microsoft.ApiManagement provider.

Generated from API version 2022-08-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/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListOperations.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.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 = armapimanagement.OperationListResult{
	// 	Value: []*armapimanagement.Operation{
	// 		{
	// 			Name: to.Ptr("Microsoft.ApiManagement/service/write"),
	// 			Display: &armapimanagement.OperationDisplay{
	// 				Description: to.Ptr("Create a new instance of API Management Service"),
	// 				Operation: to.Ptr("Create a new instance of API Management Service"),
	// 				Provider: to.Ptr("Microsoft API Management"),
	// 				Resource: to.Ptr("Service"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.ApiManagement/service/read"),
	// 			Display: &armapimanagement.OperationDisplay{
	// 				Description: to.Ptr("Read metadata for an API Management Service instance"),
	// 				Operation: to.Ptr("Read metadata for an API Management Service instance"),
	// 				Provider: to.Ptr("Microsoft API Management"),
	// 				Resource: to.Ptr("Service"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.ApiManagement/service/delete"),
	// 			Display: &armapimanagement.OperationDisplay{
	// 				Description: to.Ptr("Delete API Management Service instance"),
	// 				Operation: to.Ptr("Delete API Management Service instance"),
	// 				Provider: to.Ptr("Microsoft API Management"),
	// 				Resource: to.Ptr("Service"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.ApiManagement/service/providers/Microsoft.Insights/diagnosticSettings/write"),
	// 			Display: &armapimanagement.OperationDisplay{
	// 				Description: to.Ptr("Creates or updates the diagnostic setting for API Management service"),
	// 				Operation: to.Ptr("Write diagnostic setting"),
	// 				Provider: to.Ptr("Microsoft API Management"),
	// 				Resource: to.Ptr("Service"),
	// 			},
	// 			Origin: to.Ptr("system"),
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.ApiManagement/service/tenant/operationResults/read"),
	// 			Display: &armapimanagement.OperationDisplay{
	// 				Description: to.Ptr("Get list of operation results or Get result of a specific operation"),
	// 				Operation: to.Ptr("Get operation results or Get operation result"),
	// 				Provider: to.Ptr("Microsoft API Management"),
	// 				Resource: to.Ptr("Results of async operations"),
	// 			},
	// 	}},
	// }
}
Output:

type OperationsClientListOptions

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse

type OperationsClientListResponse struct {
	// Result of the request to list REST API operations. It contains a list of operations and a URL nextLink to get the next
	// set of results.
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type Origin

type Origin string

Origin - The origin of the issue.

const (
	OriginInbound  Origin = "Inbound"
	OriginLocal    Origin = "Local"
	OriginOutbound Origin = "Outbound"
)

func PossibleOriginValues

func PossibleOriginValues() []Origin

PossibleOriginValues returns the possible values for the Origin const type.

type OutboundEnvironmentEndpoint

type OutboundEnvironmentEndpoint struct {
	// The type of service accessed by the Api Management Service, e.g., Azure Storage, Azure SQL Database, and Azure Active Directory.
	Category *string

	// The endpoints that the Api Management Service reaches the service at.
	Endpoints []*EndpointDependency
}

OutboundEnvironmentEndpoint - Endpoints accessed for a common purpose that the Api Management Service requires outbound network access to.

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 OutboundEnvironmentEndpointList

type OutboundEnvironmentEndpointList struct {
	// REQUIRED; Collection of resources.
	Value []*OutboundEnvironmentEndpoint

	// READ-ONLY; Link to next page of resources.
	NextLink *string
}

OutboundEnvironmentEndpointList - Collection of Outbound Environment Endpoints

func (OutboundEnvironmentEndpointList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OutboundEnvironmentEndpointList.

func (*OutboundEnvironmentEndpointList) UnmarshalJSON

func (o *OutboundEnvironmentEndpointList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OutboundEnvironmentEndpointList.

type OutboundNetworkDependenciesEndpointsClient

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

OutboundNetworkDependenciesEndpointsClient contains the methods for the OutboundNetworkDependenciesEndpoints group. Don't use this type directly, use NewOutboundNetworkDependenciesEndpointsClient() instead.

func NewOutboundNetworkDependenciesEndpointsClient

func NewOutboundNetworkDependenciesEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OutboundNetworkDependenciesEndpointsClient, error)

NewOutboundNetworkDependenciesEndpointsClient creates a new instance of OutboundNetworkDependenciesEndpointsClient 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 (*OutboundNetworkDependenciesEndpointsClient) ListByService

ListByService - Gets the network endpoints of all outbound dependencies of a ApiManagement service. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - OutboundNetworkDependenciesEndpointsClientListByServiceOptions contains the optional parameters for the OutboundNetworkDependenciesEndpointsClient.ListByService method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetOutboundNetworkDependenciesEndpoints.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewOutboundNetworkDependenciesEndpointsClient().ListByService(ctx, "rg1", "apimService1", 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.OutboundEnvironmentEndpointList = armapimanagement.OutboundEnvironmentEndpointList{
// 	Value: []*armapimanagement.OutboundEnvironmentEndpoint{
// 		{
// 			Category: to.Ptr("Azure SMTP"),
// 			Endpoints: []*armapimanagement.EndpointDependency{
// 				{
// 					DomainName: to.Ptr("smtpi-ch1.msn.com"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](25028),
// 							Region: to.Ptr("West US"),
// 					}},
// 			}},
// 		},
// 		{
// 			Category: to.Ptr("Azure SQL"),
// 			Endpoints: []*armapimanagement.EndpointDependency{
// 				{
// 					DomainName: to.Ptr("xxxx1345234.database.windows.net"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](1433),
// 							Region: to.Ptr("West US"),
// 					}},
// 			}},
// 		},
// 		{
// 			Category: to.Ptr("Azure Storage"),
// 			Endpoints: []*armapimanagement.EndpointDependency{
// 				{
// 					DomainName: to.Ptr("xxxx32storagedgfbay.blob.core.windows.net"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("West US"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("xxxx1362629927xt.blob.core.windows.net"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("West US"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("xxxx1362629927xt.table.core.windows.net"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("West US"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("xxxx141483183xt.blob.core.windows.net"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("West US"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("xxxx141483183xt.table.core.windows.net"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("West US"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("xxxx1949864718xt.blob.core.windows.net"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("West US"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("xxxx1949864718xt.table.core.windows.net"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("West US"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("xxxx3292114122xt.blob.core.windows.net"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("West US"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("xxxx3292114122xt.table.core.windows.net"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("West US"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("xxxx32tst4oto8t0mlesawmm.blob.core.windows.net"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("West US"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("xxxx32tst4oto8t0mlesawmm.file.core.windows.net"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](445),
// 							Region: to.Ptr("West US"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("xxxx32tst4oto8t0mlesawmm.queue.core.windows.net"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("West US"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("xxxx32tst4oto8t0mlesawmm.table.core.windows.net"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("West US"),
// 					}},
// 			}},
// 		},
// 		{
// 			Category: to.Ptr("Azure Event Hub"),
// 			Endpoints: []*armapimanagement.EndpointDependency{
// 				{
// 					DomainName: to.Ptr("xxxx1362629927eh.servicebus.windows.net"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("West US"),
// 						},
// 						{
// 							Port: to.Ptr[int32](5671),
// 							Region: to.Ptr("West US"),
// 						},
// 						{
// 							Port: to.Ptr[int32](5672),
// 							Region: to.Ptr("West US"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("xxxx1949864718eh.servicebus.windows.net"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("West US"),
// 						},
// 						{
// 							Port: to.Ptr[int32](5671),
// 							Region: to.Ptr("West US"),
// 						},
// 						{
// 							Port: to.Ptr[int32](5672),
// 							Region: to.Ptr("West US"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("xxxx3292114122eh.servicebus.windows.net"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("West US"),
// 						},
// 						{
// 							Port: to.Ptr[int32](5671),
// 							Region: to.Ptr("West US"),
// 						},
// 						{
// 							Port: to.Ptr[int32](5672),
// 							Region: to.Ptr("West US"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("xxxx141483183eh.servicebus.windows.net"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("West US"),
// 						},
// 						{
// 							Port: to.Ptr[int32](5671),
// 							Region: to.Ptr("West US"),
// 						},
// 						{
// 							Port: to.Ptr[int32](5672),
// 							Region: to.Ptr("West US"),
// 					}},
// 			}},
// 		},
// 		{
// 			Category: to.Ptr("SSL Certificate Verification"),
// 			Endpoints: []*armapimanagement.EndpointDependency{
// 				{
// 					DomainName: to.Ptr("ocsp.msocsp.com"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](80),
// 							Region: to.Ptr("Global"),
// 						},
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("Global"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("mscrl.microsoft.com"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](80),
// 							Region: to.Ptr("Global"),
// 						},
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("Global"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("crl.microsoft.com"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](80),
// 							Region: to.Ptr("Global"),
// 						},
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("Global"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("crl3.digicert.com"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](80),
// 							Region: to.Ptr("Global"),
// 						},
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("Global"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("ocsp.digicert.com"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](80),
// 							Region: to.Ptr("Global"),
// 						},
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("Global"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("cacerts.digicert.com"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](80),
// 							Region: to.Ptr("Global"),
// 						},
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("Global"),
// 					}},
// 			}},
// 		},
// 		{
// 			Category: to.Ptr("Azure Monitor"),
// 			Endpoints: []*armapimanagement.EndpointDependency{
// 				{
// 					DomainName: to.Ptr("gcs.ppe.monitoring.core.windows.net"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("Global"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("global.prod.microsoftmetrics.com"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("Global"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("xxx3.prod.microsoftmetrics.com"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](1886),
// 							Region: to.Ptr("Global"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("xxx3-red.prod.microsoftmetrics.com"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](1886),
// 							Region: to.Ptr("Global"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("xxx3-black.prod.microsoftmetrics.com"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](1886),
// 							Region: to.Ptr("Global"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("gcs.ppe.warm.ingestion.monitoring.azure.com"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("Global"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("metrichost23.prod.microsoftmetrics.com"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("Global"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("metrichost23-red.prod.microsoftmetrics.com"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("Global"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("metrichost23-black.prod.microsoftmetrics.com"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("Global"),
// 					}},
// 			}},
// 		},
// 		{
// 			Category: to.Ptr("Portal Captcha"),
// 			Endpoints: []*armapimanagement.EndpointDependency{
// 				{
// 					DomainName: to.Ptr("client.xxx.live.com"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("Global"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("partner.xxx.live.com"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("Global"),
// 					}},
// 			}},
// 		},
// 		{
// 			Category: to.Ptr("Azure Active Directory"),
// 			Endpoints: []*armapimanagement.EndpointDependency{
// 				{
// 					DomainName: to.Ptr("login.windows.net"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("Global"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("graph.windows.net"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("Global"),
// 					}},
// 				},
// 				{
// 					DomainName: to.Ptr("login.microsoftonline.com"),
// 					EndpointDetails: []*armapimanagement.EndpointDetail{
// 						{
// 							Port: to.Ptr[int32](443),
// 							Region: to.Ptr("Global"),
// 					}},
// 			}},
// 	}},
// }
Output:

type OutboundNetworkDependenciesEndpointsClientListByServiceOptions

type OutboundNetworkDependenciesEndpointsClientListByServiceOptions struct {
}

OutboundNetworkDependenciesEndpointsClientListByServiceOptions contains the optional parameters for the OutboundNetworkDependenciesEndpointsClient.ListByService method.

type OutboundNetworkDependenciesEndpointsClientListByServiceResponse

type OutboundNetworkDependenciesEndpointsClientListByServiceResponse struct {
	// Collection of Outbound Environment Endpoints
	OutboundEnvironmentEndpointList
}

OutboundNetworkDependenciesEndpointsClientListByServiceResponse contains the response from method OutboundNetworkDependenciesEndpointsClient.ListByService.

type ParameterContract

type ParameterContract struct {
	// REQUIRED; Parameter name.
	Name *string

	// REQUIRED; Parameter type.
	Type *string

	// Default parameter value.
	DefaultValue *string

	// Parameter description.
	Description *string

	// Exampled defined for the parameter.
	Examples map[string]*ParameterExampleContract

	// Specifies whether parameter is required or not.
	Required *bool

	// Schema identifier.
	SchemaID *string

	// Type name defined by the schema.
	TypeName *string

	// Parameter values.
	Values []*string
}

ParameterContract - Operation parameters details.

func (ParameterContract) MarshalJSON

func (p ParameterContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ParameterContract.

func (*ParameterContract) UnmarshalJSON

func (p *ParameterContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ParameterContract.

type ParameterExampleContract

type ParameterExampleContract struct {
	// Long description for the example
	Description *string

	// A URL that points to the literal example
	ExternalValue *string

	// Short description for the example
	Summary *string

	// Example value. May be a primitive value, or an object.
	Value any
}

ParameterExampleContract - Parameter example.

func (ParameterExampleContract) MarshalJSON

func (p ParameterExampleContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ParameterExampleContract.

func (*ParameterExampleContract) UnmarshalJSON

func (p *ParameterExampleContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ParameterExampleContract.

type PipelineDiagnosticSettings

type PipelineDiagnosticSettings struct {
	// Diagnostic settings for request.
	Request *HTTPMessageDiagnostic

	// Diagnostic settings for response.
	Response *HTTPMessageDiagnostic
}

PipelineDiagnosticSettings - Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.

func (PipelineDiagnosticSettings) MarshalJSON

func (p PipelineDiagnosticSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PipelineDiagnosticSettings.

func (*PipelineDiagnosticSettings) UnmarshalJSON

func (p *PipelineDiagnosticSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PipelineDiagnosticSettings.

type PlatformVersion

type PlatformVersion string

PlatformVersion - Compute Platform Version running the service.

const (
	// PlatformVersionMtv1 - Platform running the service on Multi Tenant V1 platform.
	PlatformVersionMtv1 PlatformVersion = "mtv1"
	// PlatformVersionStv1 - Platform running the service on Single Tenant V1 platform.
	PlatformVersionStv1 PlatformVersion = "stv1"
	// PlatformVersionStv2 - Platform running the service on Single Tenant V2 platform.
	PlatformVersionStv2 PlatformVersion = "stv2"
	// PlatformVersionUndetermined - Platform version cannot be determined, as compute platform is not deployed.
	PlatformVersionUndetermined PlatformVersion = "undetermined"
)

func PossiblePlatformVersionValues

func PossiblePlatformVersionValues() []PlatformVersion

PossiblePlatformVersionValues returns the possible values for the PlatformVersion const type.

type PolicyClient

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

PolicyClient contains the methods for the Policy group. Don't use this type directly, use NewPolicyClient() instead.

func NewPolicyClient

func NewPolicyClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PolicyClient, error)

NewPolicyClient creates a new instance of PolicyClient 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 (*PolicyClient) CreateOrUpdate

func (client *PolicyClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, policyID PolicyIDName, parameters PolicyContract, options *PolicyClientCreateOrUpdateOptions) (PolicyClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates the global policy configuration of the Api Management service. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • policyID - The identifier of the Policy.
  • parameters - The policy contents to apply.
  • options - PolicyClientCreateOrUpdateOptions contains the optional parameters for the PolicyClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreatePolicy.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPolicyClient().CreateOrUpdate(ctx, "rg1", "apimService1", armapimanagement.PolicyIDNamePolicy, armapimanagement.PolicyContract{
	Properties: &armapimanagement.PolicyContractProperties{
		Format: to.Ptr(armapimanagement.PolicyContentFormatXML),
		Value:  to.Ptr("<policies>\r\n  <inbound />\r\n  <backend>\r\n    <forward-request />\r\n  </backend>\r\n  <outbound />\r\n</policies>"),
	},
}, &armapimanagement.PolicyClientCreateOrUpdateOptions{IfMatch: 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.PolicyContract = armapimanagement.PolicyContract{
// 	Name: to.Ptr("policy"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/policies"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policies/policy"),
// 	Properties: &armapimanagement.PolicyContractProperties{
// 		Value: to.Ptr("<policies>\r\n  <inbound />\r\n  <backend>\r\n    <forward-request />\r\n  </backend>\r\n  <outbound />\r\n</policies>"),
// 	},
// }
Output:

func (*PolicyClient) Delete

func (client *PolicyClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, policyID PolicyIDName, ifMatch string, options *PolicyClientDeleteOptions) (PolicyClientDeleteResponse, error)

Delete - Deletes the global policy configuration of the Api Management Service. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • policyID - The identifier of the Policy.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - PolicyClientDeleteOptions contains the optional parameters for the PolicyClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeletePolicy.json

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

func (*PolicyClient) Get

func (client *PolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, policyID PolicyIDName, options *PolicyClientGetOptions) (PolicyClientGetResponse, error)

Get - Get the Global policy definition of the Api Management service. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • policyID - The identifier of the Policy.
  • options - PolicyClientGetOptions contains the optional parameters for the PolicyClient.Get method.
Example (ApiManagementGetPolicy)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicy.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPolicyClient().Get(ctx, "rg1", "apimService1", armapimanagement.PolicyIDNamePolicy, &armapimanagement.PolicyClientGetOptions{Format: 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.PolicyContract = armapimanagement.PolicyContract{
// 	Name: to.Ptr("policy"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/policies"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policies/policy"),
// 	Properties: &armapimanagement.PolicyContractProperties{
// 		Value: to.Ptr("<!--\r\n    IMPORTANT:\r\n    - Policy elements can appear only within the <inbound>, <outbound>, <backend> section elements.\r\n    - Only the <forward-request> policy element can appear within the <backend> section element.\r\n    - To apply a policy to the incoming request (before it is forwarded to the backend service), place a corresponding policy element within the <inbound> section element.\r\n    - To apply a policy to the outgoing response (before it is sent back to the caller), place a corresponding policy element within the <outbound> section element.\r\n    - To add a policy position the cursor at the desired insertion point and click on the round button associated with the policy.\r\n    - To remove a policy, delete the corresponding policy statement from the policy document.\r\n    - Policies are applied in the order of their appearance, from the top down.\r\n-->\r\n<policies>\r\n  <inbound />\r\n  <backend>\r\n    <forward-request />\r\n  </backend>\r\n  <outbound />\r\n</policies>"),
// 	},
// }
Output:

Example (ApiManagementGetPolicyFormat)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFormat.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPolicyClient().Get(ctx, "rg1", "apimService1", armapimanagement.PolicyIDNamePolicy, &armapimanagement.PolicyClientGetOptions{Format: to.Ptr(armapimanagement.PolicyExportFormatRawxml)})
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.PolicyContract = armapimanagement.PolicyContract{
// 	Name: to.Ptr("policy"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/policies"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policies/policy"),
// 	Properties: &armapimanagement.PolicyContractProperties{
// 		Format: to.Ptr(armapimanagement.PolicyContentFormatRawxml),
// 		Value: to.Ptr("<!--\n    IMPORTANT:\n    - Policy elements can appear only within the <inbound>, <outbound>, <backend> section elements.\n    - Only the <forward-request> policy element can appear within the <backend> section element.\n    - To apply a policy to the incoming request (before it is forwarded to the backend service), place a corresponding policy element within the <inbound> section element.\n    - To apply a policy to the outgoing response (before it is sent back to the caller), place a corresponding policy element within the <outbound> section element.\n    - To add a policy position the cursor at the desired insertion point and click on the round button associated with the policy.\n    - To remove a policy, delete the corresponding policy statement from the policy document.\n    - Policies are applied in the order of their appearance, from the top down.\n-->\r\n<policies>\r\n	<inbound>\r\n		<set-header name=\"correlationid\" exists-action=\"skip\">\r\n			<value>@{\n                var guidBinary = new byte[16];\n                Array.Copy(Guid.NewGuid().ToByteArray(), 0, guidBinary, 0, 10);\n                long time = DateTime.Now.Ticks;\n                byte[] bytes = new byte[6];\n                unchecked\n                {\n                       bytes[5] = (byte)(time >> 40);\n                       bytes[4] = (byte)(time >> 32);\n                       bytes[3] = (byte)(time >> 24);\n                       bytes[2] = (byte)(time >> 16);\n                       bytes[1] = (byte)(time >> 8);\n                       bytes[0] = (byte)(time);\n                }\n                Array.Copy(bytes, 0, guidBinary, 10, 6);\n                return new Guid(guidBinary).ToString();\n            }\n            </value>\r\n		</set-header>\r\n	</inbound>\r\n	<backend>\r\n		<forward-request />\r\n	</backend>\r\n	<outbound />\r\n	<on-error />\r\n</policies>"),
// 	},
// }
Output:

func (*PolicyClient) GetEntityTag

func (client *PolicyClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, policyID PolicyIDName, options *PolicyClientGetEntityTagOptions) (PolicyClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the Global policy definition in the Api Management service.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • policyID - The identifier of the Policy.
  • options - PolicyClientGetEntityTagOptions contains the optional parameters for the PolicyClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadPolicy.json

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

func (*PolicyClient) ListByService

func (client *PolicyClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, options *PolicyClientListByServiceOptions) (PolicyClientListByServiceResponse, error)

ListByService - Lists all the Global Policy definitions of the Api Management service. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - PolicyClientListByServiceOptions contains the optional parameters for the PolicyClient.ListByService method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPolicies.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPolicyClient().ListByService(ctx, "rg1", "apimService1", 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.PolicyCollection = armapimanagement.PolicyCollection{
// 	Count: to.Ptr[int64](1),
// 	Value: []*armapimanagement.PolicyContract{
// 		{
// 			Name: to.Ptr("policy"),
// 			Type: to.Ptr("Microsoft.ApiManagement/service/policies"),
// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policies/policy"),
// 			Properties: &armapimanagement.PolicyContractProperties{
// 				Value: to.Ptr("<!--\r\n    IMPORTANT:\r\n    - Policy elements can appear only within the <inbound>, <outbound>, <backend> section elements.\r\n    - Only the <forward-request> policy element can appear within the <backend> section element.\r\n    - To apply a policy to the incoming request (before it is forwarded to the backend service), place a corresponding policy element within the <inbound> section element.\r\n    - To apply a policy to the outgoing response (before it is sent back to the caller), place a corresponding policy element within the <outbound> section element.\r\n    - To add a policy position the cursor at the desired insertion point and click on the round button associated with the policy.\r\n    - To remove a policy, delete the corresponding policy statement from the policy document.\r\n    - Policies are applied in the order of their appearance, from the top down.\r\n-->\r\n<policies>\r\n  <inbound />\r\n  <backend>\r\n    <forward-request />\r\n  </backend>\r\n  <outbound />\r\n</policies>"),
// 			},
// 	}},
// }
Output:

type PolicyClientCreateOrUpdateOptions

type PolicyClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

PolicyClientCreateOrUpdateOptions contains the optional parameters for the PolicyClient.CreateOrUpdate method.

type PolicyClientCreateOrUpdateResponse

type PolicyClientCreateOrUpdateResponse struct {
	// Policy Contract details.
	PolicyContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

PolicyClientCreateOrUpdateResponse contains the response from method PolicyClient.CreateOrUpdate.

type PolicyClientDeleteOptions

type PolicyClientDeleteOptions struct {
}

PolicyClientDeleteOptions contains the optional parameters for the PolicyClient.Delete method.

type PolicyClientDeleteResponse

type PolicyClientDeleteResponse struct {
}

PolicyClientDeleteResponse contains the response from method PolicyClient.Delete.

type PolicyClientGetEntityTagOptions

type PolicyClientGetEntityTagOptions struct {
}

PolicyClientGetEntityTagOptions contains the optional parameters for the PolicyClient.GetEntityTag method.

type PolicyClientGetEntityTagResponse

type PolicyClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

PolicyClientGetEntityTagResponse contains the response from method PolicyClient.GetEntityTag.

type PolicyClientGetOptions

type PolicyClientGetOptions struct {
	// Policy Export Format.
	Format *PolicyExportFormat
}

PolicyClientGetOptions contains the optional parameters for the PolicyClient.Get method.

type PolicyClientGetResponse

type PolicyClientGetResponse struct {
	// Policy Contract details.
	PolicyContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

PolicyClientGetResponse contains the response from method PolicyClient.Get.

type PolicyClientListByServiceOptions

type PolicyClientListByServiceOptions struct {
}

PolicyClientListByServiceOptions contains the optional parameters for the PolicyClient.ListByService method.

type PolicyClientListByServiceResponse

type PolicyClientListByServiceResponse struct {
	// The response of the list policy operation.
	PolicyCollection
}

PolicyClientListByServiceResponse contains the response from method PolicyClient.ListByService.

type PolicyCollection

type PolicyCollection struct {
	// Total record count number.
	Count *int64

	// Next page link if any.
	NextLink *string

	// Policy Contract value.
	Value []*PolicyContract
}

PolicyCollection - The response of the list policy operation.

func (PolicyCollection) MarshalJSON

func (p PolicyCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PolicyCollection.

func (*PolicyCollection) UnmarshalJSON

func (p *PolicyCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PolicyCollection.

type PolicyContentFormat

type PolicyContentFormat string

PolicyContentFormat - Format of the policyContent.

const (
	// PolicyContentFormatRawxml - The contents are inline and Content type is a non XML encoded policy document.
	PolicyContentFormatRawxml PolicyContentFormat = "rawxml"
	// PolicyContentFormatRawxmlLink - The policy document is not XML encoded and is hosted on a HTTP endpoint accessible from
	// the API Management service.
	PolicyContentFormatRawxmlLink PolicyContentFormat = "rawxml-link"
	// PolicyContentFormatXML - The contents are inline and Content type is an XML document.
	PolicyContentFormatXML PolicyContentFormat = "xml"
	// PolicyContentFormatXMLLink - The policy XML document is hosted on a HTTP endpoint accessible from the API Management service.
	PolicyContentFormatXMLLink PolicyContentFormat = "xml-link"
)

func PossiblePolicyContentFormatValues

func PossiblePolicyContentFormatValues() []PolicyContentFormat

PossiblePolicyContentFormatValues returns the possible values for the PolicyContentFormat const type.

type PolicyContract

type PolicyContract struct {
	// Properties of the Policy.
	Properties *PolicyContractProperties

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

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

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

PolicyContract - Policy Contract details.

func (PolicyContract) MarshalJSON

func (p PolicyContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PolicyContract.

func (*PolicyContract) UnmarshalJSON

func (p *PolicyContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PolicyContract.

type PolicyContractProperties

type PolicyContractProperties struct {
	// REQUIRED; Contents of the Policy as defined by the format.
	Value *string

	// Format of the policyContent.
	Format *PolicyContentFormat
}

PolicyContractProperties - Policy contract Properties.

func (PolicyContractProperties) MarshalJSON

func (p PolicyContractProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PolicyContractProperties.

func (*PolicyContractProperties) UnmarshalJSON

func (p *PolicyContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PolicyContractProperties.

type PolicyDescriptionClient

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

PolicyDescriptionClient contains the methods for the PolicyDescription group. Don't use this type directly, use NewPolicyDescriptionClient() instead.

func NewPolicyDescriptionClient

func NewPolicyDescriptionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PolicyDescriptionClient, error)

NewPolicyDescriptionClient creates a new instance of PolicyDescriptionClient 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 (*PolicyDescriptionClient) ListByService

ListByService - Lists all policy descriptions. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - PolicyDescriptionClientListByServiceOptions contains the optional parameters for the PolicyDescriptionClient.ListByService method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPolicyDescriptions.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPolicyDescriptionClient().ListByService(ctx, "rg1", "apimService1", &armapimanagement.PolicyDescriptionClientListByServiceOptions{Scope: to.Ptr(armapimanagement.PolicyScopeContractAPI)})
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.PolicyDescriptionCollection = armapimanagement.PolicyDescriptionCollection{
// 	Count: to.Ptr[int64](2),
// 	Value: []*armapimanagement.PolicyDescriptionContract{
// 		{
// 			Name: to.Ptr("authentication-basic"),
// 			Type: to.Ptr("Microsoft.ApiManagement/service/policyDescriptions"),
// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policyDescriptions/authentication-basic"),
// 			Properties: &armapimanagement.PolicyDescriptionContractProperties{
// 				Description: to.Ptr("Authenticate with the backend service using Basic authentication. Use in the inbound section at API scope."),
// 				Scope: to.Ptr[int64](268435471),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("authentication-certificate"),
// 			Type: to.Ptr("Microsoft.ApiManagement/service/policyDescriptions"),
// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policyDescriptions/authentication-certificate"),
// 			Properties: &armapimanagement.PolicyDescriptionContractProperties{
// 				Description: to.Ptr("Authenticate with the backend service using a client certificate. Use in the inbound section at API scope."),
// 				Scope: to.Ptr[int64](268435471),
// 			},
// 	}},
// }
Output:

type PolicyDescriptionClientListByServiceOptions

type PolicyDescriptionClientListByServiceOptions struct {
	// Policy scope.
	Scope *PolicyScopeContract
}

PolicyDescriptionClientListByServiceOptions contains the optional parameters for the PolicyDescriptionClient.ListByService method.

type PolicyDescriptionClientListByServiceResponse

type PolicyDescriptionClientListByServiceResponse struct {
	// Descriptions of API Management policies.
	PolicyDescriptionCollection
}

PolicyDescriptionClientListByServiceResponse contains the response from method PolicyDescriptionClient.ListByService.

type PolicyDescriptionCollection

type PolicyDescriptionCollection struct {
	// Total record count number.
	Count *int64

	// Descriptions of API Management policies.
	Value []*PolicyDescriptionContract
}

PolicyDescriptionCollection - Descriptions of API Management policies.

func (PolicyDescriptionCollection) MarshalJSON

func (p PolicyDescriptionCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PolicyDescriptionCollection.

func (*PolicyDescriptionCollection) UnmarshalJSON

func (p *PolicyDescriptionCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PolicyDescriptionCollection.

type PolicyDescriptionContract

type PolicyDescriptionContract struct {
	// Policy description contract properties.
	Properties *PolicyDescriptionContractProperties

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

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

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

PolicyDescriptionContract - Policy description details.

func (PolicyDescriptionContract) MarshalJSON

func (p PolicyDescriptionContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PolicyDescriptionContract.

func (*PolicyDescriptionContract) UnmarshalJSON

func (p *PolicyDescriptionContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PolicyDescriptionContract.

type PolicyDescriptionContractProperties

type PolicyDescriptionContractProperties struct {
	// READ-ONLY; Policy description.
	Description *string

	// READ-ONLY; Binary OR value of the Snippet scope.
	Scope *int64
}

PolicyDescriptionContractProperties - Policy description properties.

func (PolicyDescriptionContractProperties) MarshalJSON

func (p PolicyDescriptionContractProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PolicyDescriptionContractProperties.

func (*PolicyDescriptionContractProperties) UnmarshalJSON

func (p *PolicyDescriptionContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PolicyDescriptionContractProperties.

type PolicyExportFormat

type PolicyExportFormat string
const (
	// PolicyExportFormatRawxml - The contents are inline and Content type is a non XML encoded policy document.
	PolicyExportFormatRawxml PolicyExportFormat = "rawxml"
	// PolicyExportFormatXML - The contents are inline and Content type is an XML document.
	PolicyExportFormatXML PolicyExportFormat = "xml"
)

func PossiblePolicyExportFormatValues

func PossiblePolicyExportFormatValues() []PolicyExportFormat

PossiblePolicyExportFormatValues returns the possible values for the PolicyExportFormat const type.

type PolicyFragmentClient

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

PolicyFragmentClient contains the methods for the PolicyFragment group. Don't use this type directly, use NewPolicyFragmentClient() instead.

func NewPolicyFragmentClient

func NewPolicyFragmentClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PolicyFragmentClient, error)

NewPolicyFragmentClient creates a new instance of PolicyFragmentClient 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 (*PolicyFragmentClient) BeginCreateOrUpdate

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

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • id - A resource identifier.
  • parameters - The policy fragment contents to apply.
  • options - PolicyFragmentClientBeginCreateOrUpdateOptions contains the optional parameters for the PolicyFragmentClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreatePolicyFragment.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewPolicyFragmentClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", "policyFragment1", armapimanagement.PolicyFragmentContract{
	Properties: &armapimanagement.PolicyFragmentContractProperties{
		Format:      to.Ptr(armapimanagement.PolicyFragmentContentFormatXML),
		Description: to.Ptr("A policy fragment example"),
		Value:       to.Ptr("<fragment><json-to-xml apply=\"always\" consider-accept-header=\"false\" /></fragment>"),
	},
}, &armapimanagement.PolicyFragmentClientBeginCreateOrUpdateOptions{IfMatch: 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.PolicyFragmentContract = armapimanagement.PolicyFragmentContract{
// 	Name: to.Ptr("policyFragment1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/policyFragments"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policyFragments/policyFragment1"),
// 	Properties: &armapimanagement.PolicyFragmentContractProperties{
// 		Format: to.Ptr(armapimanagement.PolicyFragmentContentFormatXML),
// 		Description: to.Ptr("A policy fragment example"),
// 		Value: to.Ptr("<json-to-xml apply=\"always\" consider-accept-header=\"false\" />"),
// 	},
// }
Output:

func (*PolicyFragmentClient) Delete

func (client *PolicyFragmentClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, id string, ifMatch string, options *PolicyFragmentClientDeleteOptions) (PolicyFragmentClientDeleteResponse, error)

Delete - Deletes a policy fragment. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • id - A resource identifier.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - PolicyFragmentClientDeleteOptions contains the optional parameters for the PolicyFragmentClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeletePolicyFragment.json

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

func (*PolicyFragmentClient) Get

func (client *PolicyFragmentClient) Get(ctx context.Context, resourceGroupName string, serviceName string, id string, options *PolicyFragmentClientGetOptions) (PolicyFragmentClientGetResponse, error)

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

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • id - A resource identifier.
  • options - PolicyFragmentClientGetOptions contains the optional parameters for the PolicyFragmentClient.Get method.
Example (ApiManagementGetPolicyFragment)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFragment.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPolicyFragmentClient().Get(ctx, "rg1", "apimService1", "policyFragment1", &armapimanagement.PolicyFragmentClientGetOptions{Format: 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.PolicyFragmentContract = armapimanagement.PolicyFragmentContract{
// 	Name: to.Ptr("policyFragment1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/policyFragments"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policyFragments/policyFragment1"),
// 	Properties: &armapimanagement.PolicyFragmentContractProperties{
// 		Format: to.Ptr(armapimanagement.PolicyFragmentContentFormatXML),
// 		Description: to.Ptr("A policy fragment example"),
// 		Value: to.Ptr("<fragment><json-to-xml apply=\"always\" consider-accept-header=\"false\" /></fragment>"),
// 	},
// }
Output:

Example (ApiManagementGetPolicyFragmentFormat)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFragmentFormat.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPolicyFragmentClient().Get(ctx, "rg1", "apimService1", "policyFragment1", &armapimanagement.PolicyFragmentClientGetOptions{Format: to.Ptr(armapimanagement.PolicyFragmentContentFormatRawxml)})
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.PolicyFragmentContract = armapimanagement.PolicyFragmentContract{
// 	Name: to.Ptr("policyFragment1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/policyFragments"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policyFragments/policyFragment1"),
// 	Properties: &armapimanagement.PolicyFragmentContractProperties{
// 		Format: to.Ptr(armapimanagement.PolicyFragmentContentFormatRawxml),
// 		Description: to.Ptr("A policy fragment example"),
// 		Value: to.Ptr("<fragment><set-header name=\"correlationid\" exists-action=\"skip\">\r\n			<value>@{\n                var guidBinary = new byte[16];\n                Array.Copy(Guid.NewGuid().ToByteArray(), 0, guidBinary, 0, 10);\n                long time = DateTime.Now.Ticks;\n                byte[] bytes = new byte[6];\n                unchecked\n                {\n                       bytes[5] = (byte)(time >> 40);\n                       bytes[4] = (byte)(time >> 32);\n                       bytes[3] = (byte)(time >> 24);\n                       bytes[2] = (byte)(time >> 16);\n                       bytes[1] = (byte)(time >> 8);\n                       bytes[0] = (byte)(time);\n                }\n                Array.Copy(bytes, 0, guidBinary, 10, 6);\n                return new Guid(guidBinary).ToString();\n            }\n            </value>\r\n		</set-header></fragment>"),
// 	},
// }
Output:

func (*PolicyFragmentClient) GetEntityTag

func (client *PolicyFragmentClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, id string, options *PolicyFragmentClientGetEntityTagOptions) (PolicyFragmentClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of a policy fragment.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • id - A resource identifier.
  • options - PolicyFragmentClientGetEntityTagOptions contains the optional parameters for the PolicyFragmentClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadPolicyFragment.json

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

func (*PolicyFragmentClient) ListByService

func (client *PolicyFragmentClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, options *PolicyFragmentClientListByServiceOptions) (PolicyFragmentClientListByServiceResponse, error)

ListByService - Gets all policy fragments. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - PolicyFragmentClientListByServiceOptions contains the optional parameters for the PolicyFragmentClient.ListByService method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPolicyFragments.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPolicyFragmentClient().ListByService(ctx, "rg1", "apimService1", &armapimanagement.PolicyFragmentClientListByServiceOptions{Filter: nil,
	Orderby: nil,
	Top:     nil,
	Skip:    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.PolicyFragmentCollection = armapimanagement.PolicyFragmentCollection{
// 	Count: to.Ptr[int64](1),
// 	Value: []*armapimanagement.PolicyFragmentContract{
// 		{
// 			Name: to.Ptr("policyFragment1"),
// 			Type: to.Ptr("Microsoft.ApiManagement/service/policyFragments"),
// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policyFragments/policyFragment1"),
// 			Properties: &armapimanagement.PolicyFragmentContractProperties{
// 				Format: to.Ptr(armapimanagement.PolicyFragmentContentFormatXML),
// 				Description: to.Ptr("A policy fragment example"),
// 				Value: to.Ptr("<fragment><json-to-xml apply=\"always\" consider-accept-header=\"false\" /></fragment>"),
// 			},
// 	}},
// }
Output:

func (*PolicyFragmentClient) ListReferences

func (client *PolicyFragmentClient) ListReferences(ctx context.Context, resourceGroupName string, serviceName string, id string, options *PolicyFragmentClientListReferencesOptions) (PolicyFragmentClientListReferencesResponse, error)

ListReferences - Lists policy resources that reference the policy fragment. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • id - A resource identifier.
  • options - PolicyFragmentClientListReferencesOptions contains the optional parameters for the PolicyFragmentClient.ListReferences method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPolicyFragmentReferences.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPolicyFragmentClient().ListReferences(ctx, "rg1", "apimService1", "policyFragment1", &armapimanagement.PolicyFragmentClientListReferencesOptions{Top: nil,
	Skip: 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.ResourceCollection = armapimanagement.ResourceCollection{
// 	Count: to.Ptr[int64](1),
// 	Value: []*armapimanagement.ResourceCollectionValueItem{
// 		{
// 			Name: to.Ptr("policy"),
// 			Type: to.Ptr("Microsoft.ApiManagement/service/policies"),
// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policies/policy"),
// 	}},
// }
Output:

type PolicyFragmentClientBeginCreateOrUpdateOptions

type PolicyFragmentClientBeginCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

PolicyFragmentClientBeginCreateOrUpdateOptions contains the optional parameters for the PolicyFragmentClient.BeginCreateOrUpdate method.

type PolicyFragmentClientCreateOrUpdateResponse

type PolicyFragmentClientCreateOrUpdateResponse struct {
	// Policy fragment contract details.
	PolicyFragmentContract
}

PolicyFragmentClientCreateOrUpdateResponse contains the response from method PolicyFragmentClient.BeginCreateOrUpdate.

type PolicyFragmentClientDeleteOptions

type PolicyFragmentClientDeleteOptions struct {
}

PolicyFragmentClientDeleteOptions contains the optional parameters for the PolicyFragmentClient.Delete method.

type PolicyFragmentClientDeleteResponse

type PolicyFragmentClientDeleteResponse struct {
}

PolicyFragmentClientDeleteResponse contains the response from method PolicyFragmentClient.Delete.

type PolicyFragmentClientGetEntityTagOptions

type PolicyFragmentClientGetEntityTagOptions struct {
}

PolicyFragmentClientGetEntityTagOptions contains the optional parameters for the PolicyFragmentClient.GetEntityTag method.

type PolicyFragmentClientGetEntityTagResponse

type PolicyFragmentClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

PolicyFragmentClientGetEntityTagResponse contains the response from method PolicyFragmentClient.GetEntityTag.

type PolicyFragmentClientGetOptions

type PolicyFragmentClientGetOptions struct {
	// Policy fragment content format.
	Format *PolicyFragmentContentFormat
}

PolicyFragmentClientGetOptions contains the optional parameters for the PolicyFragmentClient.Get method.

type PolicyFragmentClientGetResponse

type PolicyFragmentClientGetResponse struct {
	// Policy fragment contract details.
	PolicyFragmentContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

PolicyFragmentClientGetResponse contains the response from method PolicyFragmentClient.Get.

type PolicyFragmentClientListByServiceOptions

type PolicyFragmentClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// OData order by query option.
	Orderby *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

PolicyFragmentClientListByServiceOptions contains the optional parameters for the PolicyFragmentClient.ListByService method.

type PolicyFragmentClientListByServiceResponse

type PolicyFragmentClientListByServiceResponse struct {
	// The response of the get policy fragments operation.
	PolicyFragmentCollection
}

PolicyFragmentClientListByServiceResponse contains the response from method PolicyFragmentClient.ListByService.

type PolicyFragmentClientListReferencesOptions

type PolicyFragmentClientListReferencesOptions struct {
	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

PolicyFragmentClientListReferencesOptions contains the optional parameters for the PolicyFragmentClient.ListReferences method.

type PolicyFragmentClientListReferencesResponse

type PolicyFragmentClientListReferencesResponse struct {
	// A collection of resources.
	ResourceCollection
}

PolicyFragmentClientListReferencesResponse contains the response from method PolicyFragmentClient.ListReferences.

type PolicyFragmentCollection

type PolicyFragmentCollection struct {
	// Total record count number.
	Count *int64

	// Next page link if any.
	NextLink *string

	// Policy fragment contract value.
	Value []*PolicyFragmentContract
}

PolicyFragmentCollection - The response of the get policy fragments operation.

func (PolicyFragmentCollection) MarshalJSON

func (p PolicyFragmentCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PolicyFragmentCollection.

func (*PolicyFragmentCollection) UnmarshalJSON

func (p *PolicyFragmentCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PolicyFragmentCollection.

type PolicyFragmentContentFormat

type PolicyFragmentContentFormat string
const (
	// PolicyFragmentContentFormatRawxml - The contents are inline and Content type is a non XML encoded policy document.
	PolicyFragmentContentFormatRawxml PolicyFragmentContentFormat = "rawxml"
	// PolicyFragmentContentFormatXML - The contents are inline and Content type is an XML document.
	PolicyFragmentContentFormatXML PolicyFragmentContentFormat = "xml"
)

func PossiblePolicyFragmentContentFormatValues

func PossiblePolicyFragmentContentFormatValues() []PolicyFragmentContentFormat

PossiblePolicyFragmentContentFormatValues returns the possible values for the PolicyFragmentContentFormat const type.

type PolicyFragmentContract

type PolicyFragmentContract struct {
	// Properties of the Policy Fragment.
	Properties *PolicyFragmentContractProperties

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

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

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

PolicyFragmentContract - Policy fragment contract details.

func (PolicyFragmentContract) MarshalJSON

func (p PolicyFragmentContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PolicyFragmentContract.

func (*PolicyFragmentContract) UnmarshalJSON

func (p *PolicyFragmentContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PolicyFragmentContract.

type PolicyFragmentContractProperties

type PolicyFragmentContractProperties struct {
	// REQUIRED; Contents of the policy fragment.
	Value *string

	// Policy fragment description.
	Description *string

	// Format of the policy fragment content.
	Format *PolicyFragmentContentFormat
}

PolicyFragmentContractProperties - Policy fragment contract properties.

func (PolicyFragmentContractProperties) MarshalJSON

func (p PolicyFragmentContractProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PolicyFragmentContractProperties.

func (*PolicyFragmentContractProperties) UnmarshalJSON

func (p *PolicyFragmentContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PolicyFragmentContractProperties.

type PolicyIDName

type PolicyIDName string
const (
	PolicyIDNamePolicy PolicyIDName = "policy"
)

func PossiblePolicyIDNameValues

func PossiblePolicyIDNameValues() []PolicyIDName

PossiblePolicyIDNameValues returns the possible values for the PolicyIDName const type.

type PolicyScopeContract

type PolicyScopeContract string
const (
	PolicyScopeContractAPI       PolicyScopeContract = "Api"
	PolicyScopeContractAll       PolicyScopeContract = "All"
	PolicyScopeContractOperation PolicyScopeContract = "Operation"
	PolicyScopeContractProduct   PolicyScopeContract = "Product"
	PolicyScopeContractTenant    PolicyScopeContract = "Tenant"
)

func PossiblePolicyScopeContractValues

func PossiblePolicyScopeContractValues() []PolicyScopeContract

PossiblePolicyScopeContractValues returns the possible values for the PolicyScopeContract const type.

type PortalConfigClient

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

PortalConfigClient contains the methods for the PortalConfig group. Don't use this type directly, use NewPortalConfigClient() instead.

func NewPortalConfigClient

func NewPortalConfigClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PortalConfigClient, error)

NewPortalConfigClient creates a new instance of PortalConfigClient 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 (*PortalConfigClient) CreateOrUpdate

func (client *PortalConfigClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, portalConfigID string, ifMatch string, parameters PortalConfigContract, options *PortalConfigClientCreateOrUpdateOptions) (PortalConfigClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create or update the developer portal configuration. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • portalConfigID - Portal configuration identifier.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - Update the developer portal configuration.
  • options - PortalConfigClientCreateOrUpdateOptions contains the optional parameters for the PortalConfigClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreatePortalConfig.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPortalConfigClient().CreateOrUpdate(ctx, "rg1", "apimService1", "default", "*", armapimanagement.PortalConfigContract{
	Properties: &armapimanagement.PortalConfigProperties{
		Cors: &armapimanagement.PortalConfigCorsProperties{
			AllowedOrigins: []*string{
				to.Ptr("https://contoso.com")},
		},
		Csp: &armapimanagement.PortalConfigCspProperties{
			AllowedSources: []*string{
				to.Ptr("*.contoso.com")},
			Mode: to.Ptr(armapimanagement.PortalSettingsCspModeReportOnly),
			ReportURI: []*string{
				to.Ptr("https://report.contoso.com")},
		},
		Delegation: &armapimanagement.PortalConfigDelegationProperties{
			DelegateRegistration: to.Ptr(false),
			DelegateSubscription: to.Ptr(false),
		},
		EnableBasicAuth: to.Ptr(true),
		Signin: &armapimanagement.PortalConfigPropertiesSignin{
			Require: to.Ptr(false),
		},
		Signup: &armapimanagement.PortalConfigPropertiesSignup{
			TermsOfService: &armapimanagement.PortalConfigTermsOfServiceProperties{
				RequireConsent: to.Ptr(false),
				Text:           to.Ptr("I agree to the service terms and conditions."),
			},
		},
	},
}, 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.PortalConfigContract = armapimanagement.PortalConfigContract{
// 	Name: to.Ptr("default"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/portalconfigs"),
// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalconfigs/default"),
// 	Properties: &armapimanagement.PortalConfigProperties{
// 		Cors: &armapimanagement.PortalConfigCorsProperties{
// 			AllowedOrigins: []*string{
// 				to.Ptr("https://contoso.com")},
// 			},
// 			Csp: &armapimanagement.PortalConfigCspProperties{
// 				AllowedSources: []*string{
// 					to.Ptr("*.contoso.com")},
// 					Mode: to.Ptr(armapimanagement.PortalSettingsCspModeReportOnly),
// 					ReportURI: []*string{
// 						to.Ptr("https://report.contoso.com")},
// 					},
// 					Delegation: &armapimanagement.PortalConfigDelegationProperties{
// 						DelegateRegistration: to.Ptr(false),
// 						DelegateSubscription: to.Ptr(false),
// 					},
// 					EnableBasicAuth: to.Ptr(true),
// 					Signin: &armapimanagement.PortalConfigPropertiesSignin{
// 						Require: to.Ptr(false),
// 					},
// 					Signup: &armapimanagement.PortalConfigPropertiesSignup{
// 						TermsOfService: &armapimanagement.PortalConfigTermsOfServiceProperties{
// 							RequireConsent: to.Ptr(false),
// 							Text: to.Ptr("I agree to the service terms and conditions."),
// 						},
// 					},
// 				},
// 			}
Output:

func (*PortalConfigClient) Get

func (client *PortalConfigClient) Get(ctx context.Context, resourceGroupName string, serviceName string, portalConfigID string, options *PortalConfigClientGetOptions) (PortalConfigClientGetResponse, error)

Get - Get the developer portal configuration. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • portalConfigID - Portal configuration identifier.
  • options - PortalConfigClientGetOptions contains the optional parameters for the PortalConfigClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalConfig.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPortalConfigClient().Get(ctx, "rg1", "apimService1", "default", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.PortalConfigContract = armapimanagement.PortalConfigContract{
// 	Name: to.Ptr("default"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/portalconfigs"),
// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalconfigs/default"),
// 	Properties: &armapimanagement.PortalConfigProperties{
// 		Cors: &armapimanagement.PortalConfigCorsProperties{
// 			AllowedOrigins: []*string{
// 				to.Ptr("https://contoso.com")},
// 			},
// 			Csp: &armapimanagement.PortalConfigCspProperties{
// 				AllowedSources: []*string{
// 					to.Ptr("*.contoso.com")},
// 					Mode: to.Ptr(armapimanagement.PortalSettingsCspModeReportOnly),
// 					ReportURI: []*string{
// 						to.Ptr("https://report.contoso.com")},
// 					},
// 					Delegation: &armapimanagement.PortalConfigDelegationProperties{
// 						DelegateRegistration: to.Ptr(false),
// 						DelegateSubscription: to.Ptr(false),
// 					},
// 					EnableBasicAuth: to.Ptr(true),
// 					Signin: &armapimanagement.PortalConfigPropertiesSignin{
// 						Require: to.Ptr(false),
// 					},
// 					Signup: &armapimanagement.PortalConfigPropertiesSignup{
// 						TermsOfService: &armapimanagement.PortalConfigTermsOfServiceProperties{
// 							RequireConsent: to.Ptr(false),
// 							Text: to.Ptr("I agree to the service terms and conditions."),
// 						},
// 					},
// 				},
// 			}
Output:

func (*PortalConfigClient) GetEntityTag

func (client *PortalConfigClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, portalConfigID string, options *PortalConfigClientGetEntityTagOptions) (PortalConfigClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the developer portal configuration.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • portalConfigID - Portal configuration identifier.
  • options - PortalConfigClientGetEntityTagOptions contains the optional parameters for the PortalConfigClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadPortalConfig.json

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

func (*PortalConfigClient) ListByService

func (client *PortalConfigClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, options *PortalConfigClientListByServiceOptions) (PortalConfigClientListByServiceResponse, error)

ListByService - Lists the developer portal configurations. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - PortalConfigClientListByServiceOptions contains the optional parameters for the PortalConfigClient.ListByService method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPortalConfig.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPortalConfigClient().ListByService(ctx, "rg1", "apimService1", 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.PortalConfigCollection = armapimanagement.PortalConfigCollection{
// 	Value: []*armapimanagement.PortalConfigContract{
// 		{
// 			Name: to.Ptr("default"),
// 			Type: to.Ptr("Microsoft.ApiManagement/service/portalconfigs"),
// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalconfigs/default"),
// 			Properties: &armapimanagement.PortalConfigProperties{
// 				Cors: &armapimanagement.PortalConfigCorsProperties{
// 					AllowedOrigins: []*string{
// 						to.Ptr("https://contoso.com")},
// 					},
// 					Csp: &armapimanagement.PortalConfigCspProperties{
// 						AllowedSources: []*string{
// 							to.Ptr("*.contoso.com")},
// 							Mode: to.Ptr(armapimanagement.PortalSettingsCspModeReportOnly),
// 							ReportURI: []*string{
// 								to.Ptr("https://report.contoso.com")},
// 							},
// 							Delegation: &armapimanagement.PortalConfigDelegationProperties{
// 								DelegateRegistration: to.Ptr(false),
// 								DelegateSubscription: to.Ptr(false),
// 							},
// 							EnableBasicAuth: to.Ptr(true),
// 							Signin: &armapimanagement.PortalConfigPropertiesSignin{
// 								Require: to.Ptr(false),
// 							},
// 							Signup: &armapimanagement.PortalConfigPropertiesSignup{
// 								TermsOfService: &armapimanagement.PortalConfigTermsOfServiceProperties{
// 									RequireConsent: to.Ptr(false),
// 									Text: to.Ptr("I agree to the service terms and conditions."),
// 								},
// 							},
// 						},
// 				}},
// 			}
Output:

func (*PortalConfigClient) Update

func (client *PortalConfigClient) Update(ctx context.Context, resourceGroupName string, serviceName string, portalConfigID string, ifMatch string, parameters PortalConfigContract, options *PortalConfigClientUpdateOptions) (PortalConfigClientUpdateResponse, error)

Update - Update the developer portal configuration. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • portalConfigID - Portal configuration identifier.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - Update the developer portal configuration.
  • options - PortalConfigClientUpdateOptions contains the optional parameters for the PortalConfigClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdatePortalConfig.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPortalConfigClient().Update(ctx, "rg1", "apimService1", "default", "*", armapimanagement.PortalConfigContract{
	Properties: &armapimanagement.PortalConfigProperties{
		Cors: &armapimanagement.PortalConfigCorsProperties{
			AllowedOrigins: []*string{
				to.Ptr("https://contoso.com")},
		},
		Csp: &armapimanagement.PortalConfigCspProperties{
			AllowedSources: []*string{
				to.Ptr("*.contoso.com")},
			Mode: to.Ptr(armapimanagement.PortalSettingsCspModeReportOnly),
			ReportURI: []*string{
				to.Ptr("https://report.contoso.com")},
		},
		Delegation: &armapimanagement.PortalConfigDelegationProperties{
			DelegateRegistration: to.Ptr(false),
			DelegateSubscription: to.Ptr(false),
		},
		EnableBasicAuth: to.Ptr(true),
		Signin: &armapimanagement.PortalConfigPropertiesSignin{
			Require: to.Ptr(false),
		},
		Signup: &armapimanagement.PortalConfigPropertiesSignup{
			TermsOfService: &armapimanagement.PortalConfigTermsOfServiceProperties{
				RequireConsent: to.Ptr(false),
				Text:           to.Ptr("I agree to the service terms and conditions."),
			},
		},
	},
}, 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.PortalConfigContract = armapimanagement.PortalConfigContract{
// 	Name: to.Ptr("default"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/portalconfigs"),
// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalconfigs/default"),
// 	Properties: &armapimanagement.PortalConfigProperties{
// 		Cors: &armapimanagement.PortalConfigCorsProperties{
// 			AllowedOrigins: []*string{
// 				to.Ptr("https://contoso.com")},
// 			},
// 			Csp: &armapimanagement.PortalConfigCspProperties{
// 				AllowedSources: []*string{
// 					to.Ptr("*.contoso.com")},
// 					Mode: to.Ptr(armapimanagement.PortalSettingsCspModeReportOnly),
// 					ReportURI: []*string{
// 						to.Ptr("https://report.contoso.com")},
// 					},
// 					Delegation: &armapimanagement.PortalConfigDelegationProperties{
// 						DelegateRegistration: to.Ptr(false),
// 						DelegateSubscription: to.Ptr(false),
// 					},
// 					EnableBasicAuth: to.Ptr(true),
// 					Signin: &armapimanagement.PortalConfigPropertiesSignin{
// 						Require: to.Ptr(false),
// 					},
// 					Signup: &armapimanagement.PortalConfigPropertiesSignup{
// 						TermsOfService: &armapimanagement.PortalConfigTermsOfServiceProperties{
// 							RequireConsent: to.Ptr(false),
// 							Text: to.Ptr("I agree to the service terms and conditions."),
// 						},
// 					},
// 				},
// 			}
Output:

type PortalConfigClientCreateOrUpdateOptions

type PortalConfigClientCreateOrUpdateOptions struct {
}

PortalConfigClientCreateOrUpdateOptions contains the optional parameters for the PortalConfigClient.CreateOrUpdate method.

type PortalConfigClientCreateOrUpdateResponse

type PortalConfigClientCreateOrUpdateResponse struct {
	// The developer portal configuration contract.
	PortalConfigContract
}

PortalConfigClientCreateOrUpdateResponse contains the response from method PortalConfigClient.CreateOrUpdate.

type PortalConfigClientGetEntityTagOptions

type PortalConfigClientGetEntityTagOptions struct {
}

PortalConfigClientGetEntityTagOptions contains the optional parameters for the PortalConfigClient.GetEntityTag method.

type PortalConfigClientGetEntityTagResponse

type PortalConfigClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

PortalConfigClientGetEntityTagResponse contains the response from method PortalConfigClient.GetEntityTag.

type PortalConfigClientGetOptions

type PortalConfigClientGetOptions struct {
}

PortalConfigClientGetOptions contains the optional parameters for the PortalConfigClient.Get method.

type PortalConfigClientGetResponse

type PortalConfigClientGetResponse struct {
	// The developer portal configuration contract.
	PortalConfigContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

PortalConfigClientGetResponse contains the response from method PortalConfigClient.Get.

type PortalConfigClientListByServiceOptions

type PortalConfigClientListByServiceOptions struct {
}

PortalConfigClientListByServiceOptions contains the optional parameters for the PortalConfigClient.ListByService method.

type PortalConfigClientListByServiceResponse

type PortalConfigClientListByServiceResponse struct {
	// The collection of the developer portal configurations.
	PortalConfigCollection
}

PortalConfigClientListByServiceResponse contains the response from method PortalConfigClient.ListByService.

type PortalConfigClientUpdateOptions

type PortalConfigClientUpdateOptions struct {
}

PortalConfigClientUpdateOptions contains the optional parameters for the PortalConfigClient.Update method.

type PortalConfigClientUpdateResponse

type PortalConfigClientUpdateResponse struct {
	// The developer portal configuration contract.
	PortalConfigContract
}

PortalConfigClientUpdateResponse contains the response from method PortalConfigClient.Update.

type PortalConfigCollection

type PortalConfigCollection struct {
	// The developer portal configurations.
	Value []*PortalConfigContract

	// READ-ONLY; Next page link if any.
	NextLink *string
}

PortalConfigCollection - The collection of the developer portal configurations.

func (PortalConfigCollection) MarshalJSON

func (p PortalConfigCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PortalConfigCollection.

func (*PortalConfigCollection) UnmarshalJSON

func (p *PortalConfigCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PortalConfigCollection.

type PortalConfigContract

type PortalConfigContract struct {
	// The developer portal configuration contract properties.
	Properties *PortalConfigProperties

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

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

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

PortalConfigContract - The developer portal configuration contract.

func (PortalConfigContract) MarshalJSON

func (p PortalConfigContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PortalConfigContract.

func (*PortalConfigContract) UnmarshalJSON

func (p *PortalConfigContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PortalConfigContract.

type PortalConfigCorsProperties

type PortalConfigCorsProperties struct {
	// Allowed origins, e.g. https://trusted.com.
	AllowedOrigins []*string
}

PortalConfigCorsProperties - The developer portal Cross-Origin Resource Sharing (CORS) settings.

func (PortalConfigCorsProperties) MarshalJSON

func (p PortalConfigCorsProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PortalConfigCorsProperties.

func (*PortalConfigCorsProperties) UnmarshalJSON

func (p *PortalConfigCorsProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PortalConfigCorsProperties.

type PortalConfigCspProperties

type PortalConfigCspProperties struct {
	// Allowed sources, e.g. *.trusted.com, trusted.com, https://.
	AllowedSources []*string

	// The mode of the developer portal Content Security Policy (CSP).
	Mode *PortalSettingsCspMode

	// The URLs used by the browser to report CSP violations.
	ReportURI []*string
}

PortalConfigCspProperties - The developer portal Content Security Policy (CSP) settings.

func (PortalConfigCspProperties) MarshalJSON

func (p PortalConfigCspProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PortalConfigCspProperties.

func (*PortalConfigCspProperties) UnmarshalJSON

func (p *PortalConfigCspProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PortalConfigCspProperties.

type PortalConfigDelegationProperties

type PortalConfigDelegationProperties struct {
	// Enable or disable delegation for user registration.
	DelegateRegistration *bool

	// Enable or disable delegation for product subscriptions.
	DelegateSubscription *bool

	// A delegation endpoint URL.
	DelegationURL *string

	// A base64-encoded validation key to ensure requests originate from Azure API Management service.
	ValidationKey *string
}

func (PortalConfigDelegationProperties) MarshalJSON

func (p PortalConfigDelegationProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PortalConfigDelegationProperties.

func (*PortalConfigDelegationProperties) UnmarshalJSON

func (p *PortalConfigDelegationProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PortalConfigDelegationProperties.

type PortalConfigProperties

type PortalConfigProperties struct {
	// The developer portal Cross-Origin Resource Sharing (CORS) settings.
	Cors *PortalConfigCorsProperties

	// The developer portal Content Security Policy (CSP) settings.
	Csp *PortalConfigCspProperties

	// The developer portal delegation settings.
	Delegation *PortalConfigDelegationProperties

	// Enable or disable Basic authentication method.
	EnableBasicAuth *bool
	Signin          *PortalConfigPropertiesSignin
	Signup          *PortalConfigPropertiesSignup
}

PortalConfigProperties - The developer portal configuration contract properties.

func (PortalConfigProperties) MarshalJSON

func (p PortalConfigProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PortalConfigProperties.

func (*PortalConfigProperties) UnmarshalJSON

func (p *PortalConfigProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PortalConfigProperties.

type PortalConfigPropertiesSignin

type PortalConfigPropertiesSignin struct {
	// Redirect anonymous users to the sign-in page.
	Require *bool
}

func (PortalConfigPropertiesSignin) MarshalJSON

func (p PortalConfigPropertiesSignin) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PortalConfigPropertiesSignin.

func (*PortalConfigPropertiesSignin) UnmarshalJSON

func (p *PortalConfigPropertiesSignin) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PortalConfigPropertiesSignin.

type PortalConfigPropertiesSignup

type PortalConfigPropertiesSignup struct {
	// Terms of service settings.
	TermsOfService *PortalConfigTermsOfServiceProperties
}

func (PortalConfigPropertiesSignup) MarshalJSON

func (p PortalConfigPropertiesSignup) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PortalConfigPropertiesSignup.

func (*PortalConfigPropertiesSignup) UnmarshalJSON

func (p *PortalConfigPropertiesSignup) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PortalConfigPropertiesSignup.

type PortalConfigTermsOfServiceProperties

type PortalConfigTermsOfServiceProperties struct {
	// Ask user for consent to the terms of service.
	RequireConsent *bool

	// A terms of service text.
	Text *string
}

PortalConfigTermsOfServiceProperties - Terms of service contract properties.

func (PortalConfigTermsOfServiceProperties) MarshalJSON

func (p PortalConfigTermsOfServiceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PortalConfigTermsOfServiceProperties.

func (*PortalConfigTermsOfServiceProperties) UnmarshalJSON

func (p *PortalConfigTermsOfServiceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PortalConfigTermsOfServiceProperties.

type PortalDelegationSettings

type PortalDelegationSettings struct {
	// Delegation settings contract properties.
	Properties *PortalDelegationSettingsProperties

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

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

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

PortalDelegationSettings - Delegation settings for a developer portal.

func (PortalDelegationSettings) MarshalJSON

func (p PortalDelegationSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PortalDelegationSettings.

func (*PortalDelegationSettings) UnmarshalJSON

func (p *PortalDelegationSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PortalDelegationSettings.

type PortalDelegationSettingsProperties

type PortalDelegationSettingsProperties struct {
	// Subscriptions delegation settings.
	Subscriptions *SubscriptionsDelegationSettingsProperties

	// A delegation Url.
	URL *string

	// User registration delegation settings.
	UserRegistration *RegistrationDelegationSettingsProperties

	// A base64-encoded validation key to validate, that a request is coming from Azure API Management.
	ValidationKey *string
}

PortalDelegationSettingsProperties - Delegation settings contract properties.

func (PortalDelegationSettingsProperties) MarshalJSON

func (p PortalDelegationSettingsProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PortalDelegationSettingsProperties.

func (*PortalDelegationSettingsProperties) UnmarshalJSON

func (p *PortalDelegationSettingsProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PortalDelegationSettingsProperties.

type PortalRevisionClient

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

PortalRevisionClient contains the methods for the PortalRevision group. Don't use this type directly, use NewPortalRevisionClient() instead.

func NewPortalRevisionClient

func NewPortalRevisionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PortalRevisionClient, error)

NewPortalRevisionClient creates a new instance of PortalRevisionClient 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 (*PortalRevisionClient) BeginCreateOrUpdate

func (client *PortalRevisionClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, portalRevisionID string, parameters PortalRevisionContract, options *PortalRevisionClientBeginCreateOrUpdateOptions) (*runtime.Poller[PortalRevisionClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates a new developer portal's revision by running the portal's publishing. The isCurrent property indicates if the revision is publicly accessible. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • portalRevisionID - Portal revision identifier. Must be unique in the current API Management service instance.
  • options - PortalRevisionClientBeginCreateOrUpdateOptions contains the optional parameters for the PortalRevisionClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreatePortalRevision.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewPortalRevisionClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", "20201112101010", armapimanagement.PortalRevisionContract{
	Properties: &armapimanagement.PortalRevisionContractProperties{
		Description: to.Ptr("portal revision 1"),
		IsCurrent:   to.Ptr(true),
	},
}, 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 (*PortalRevisionClient) BeginUpdate

func (client *PortalRevisionClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, portalRevisionID string, ifMatch string, parameters PortalRevisionContract, options *PortalRevisionClientBeginUpdateOptions) (*runtime.Poller[PortalRevisionClientUpdateResponse], error)

BeginUpdate - Updates the description of specified portal revision or makes it current. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • portalRevisionID - Portal revision identifier. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - PortalRevisionClientBeginUpdateOptions contains the optional parameters for the PortalRevisionClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdatePortalRevision.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewPortalRevisionClient().BeginUpdate(ctx, "rg1", "apimService1", "20201112101010", "*", armapimanagement.PortalRevisionContract{
	Properties: &armapimanagement.PortalRevisionContractProperties{
		Description: to.Ptr("portal revision update"),
		IsCurrent:   to.Ptr(true),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.PortalRevisionContract = armapimanagement.PortalRevisionContract{
// 	Name: to.Ptr("20201112101010"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/portalRevisions"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop2"),
// 	Properties: &armapimanagement.PortalRevisionContractProperties{
// 		Description: to.Ptr("portal revision update"),
// 		CreatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-13T22:47:13.397Z"); return t}()),
// 		IsCurrent: to.Ptr(true),
// 		Status: to.Ptr(armapimanagement.PortalRevisionStatusCompleted),
// 		UpdatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-13T23:29:25.340Z"); return t}()),
// 	},
// }
Output:

func (*PortalRevisionClient) Get

func (client *PortalRevisionClient) Get(ctx context.Context, resourceGroupName string, serviceName string, portalRevisionID string, options *PortalRevisionClientGetOptions) (PortalRevisionClientGetResponse, error)

Get - Gets the developer portal's revision specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • portalRevisionID - Portal revision identifier. Must be unique in the current API Management service instance.
  • options - PortalRevisionClientGetOptions contains the optional parameters for the PortalRevisionClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPortalRevision.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPortalRevisionClient().Get(ctx, "rg1", "apimService1", "20201112101010", 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.PortalRevisionContract = armapimanagement.PortalRevisionContract{
// 	Name: to.Ptr("20201112101010"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/portalRevisions"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalRevisions/20201112101010"),
// 	Properties: &armapimanagement.PortalRevisionContractProperties{
// 		Description: to.Ptr("portal revision 1"),
// 		CreatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-12T22:51:36.470Z"); return t}()),
// 		IsCurrent: to.Ptr(true),
// 		Status: to.Ptr(armapimanagement.PortalRevisionStatusCompleted),
// 		UpdatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-12T22:52:00.097Z"); return t}()),
// 	},
// }
Output:

func (*PortalRevisionClient) GetEntityTag

func (client *PortalRevisionClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, portalRevisionID string, options *PortalRevisionClientGetEntityTagOptions) (PortalRevisionClientGetEntityTagResponse, error)

GetEntityTag - Gets the developer portal revision specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • portalRevisionID - Portal revision identifier. Must be unique in the current API Management service instance.
  • options - PortalRevisionClientGetEntityTagOptions contains the optional parameters for the PortalRevisionClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadPortalRevision.json

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

func (*PortalRevisionClient) NewListByServicePager

func (client *PortalRevisionClient) NewListByServicePager(resourceGroupName string, serviceName string, options *PortalRevisionClientListByServiceOptions) *runtime.Pager[PortalRevisionClientListByServiceResponse]

NewListByServicePager - Lists developer portal's revisions.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - PortalRevisionClientListByServiceOptions contains the optional parameters for the PortalRevisionClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPortalRevisions.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewPortalRevisionClient().NewListByServicePager("rg1", "apimService1", &armapimanagement.PortalRevisionClientListByServiceOptions{Filter: nil,
	Top:  nil,
	Skip: 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.PortalRevisionCollection = armapimanagement.PortalRevisionCollection{
	// 	Value: []*armapimanagement.PortalRevisionContract{
	// 		{
	// 			Name: to.Ptr("20201112000000"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/portalRevisions"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalRevisions/20201112000000"),
	// 			Properties: &armapimanagement.PortalRevisionContractProperties{
	// 				Description: to.Ptr("portal revision"),
	// 				CreatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-12T22:10:09.673Z"); return t}()),
	// 				IsCurrent: to.Ptr(false),
	// 				Status: to.Ptr(armapimanagement.PortalRevisionStatusCompleted),
	// 				UpdatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-12T22:12:41.460Z"); return t}()),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("20201112101010"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/portalRevisions"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalRevisions/20201112101010"),
	// 			Properties: &armapimanagement.PortalRevisionContractProperties{
	// 				Description: to.Ptr("portal revision 1"),
	// 				CreatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-12T22:51:36.470Z"); return t}()),
	// 				IsCurrent: to.Ptr(true),
	// 				Status: to.Ptr(armapimanagement.PortalRevisionStatusCompleted),
	// 				UpdatedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-12T22:52:00.097Z"); return t}()),
	// 			},
	// 	}},
	// }
}
Output:

type PortalRevisionClientBeginCreateOrUpdateOptions

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

PortalRevisionClientBeginCreateOrUpdateOptions contains the optional parameters for the PortalRevisionClient.BeginCreateOrUpdate method.

type PortalRevisionClientBeginUpdateOptions

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

PortalRevisionClientBeginUpdateOptions contains the optional parameters for the PortalRevisionClient.BeginUpdate method.

type PortalRevisionClientCreateOrUpdateResponse

type PortalRevisionClientCreateOrUpdateResponse struct {
	// Portal Revision's contract details.
	PortalRevisionContract
}

PortalRevisionClientCreateOrUpdateResponse contains the response from method PortalRevisionClient.BeginCreateOrUpdate.

type PortalRevisionClientGetEntityTagOptions

type PortalRevisionClientGetEntityTagOptions struct {
}

PortalRevisionClientGetEntityTagOptions contains the optional parameters for the PortalRevisionClient.GetEntityTag method.

type PortalRevisionClientGetEntityTagResponse

type PortalRevisionClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

PortalRevisionClientGetEntityTagResponse contains the response from method PortalRevisionClient.GetEntityTag.

type PortalRevisionClientGetOptions

type PortalRevisionClientGetOptions struct {
}

PortalRevisionClientGetOptions contains the optional parameters for the PortalRevisionClient.Get method.

type PortalRevisionClientGetResponse

type PortalRevisionClientGetResponse struct {
	// Portal Revision's contract details.
	PortalRevisionContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

PortalRevisionClientGetResponse contains the response from method PortalRevisionClient.Get.

type PortalRevisionClientListByServiceOptions

type PortalRevisionClientListByServiceOptions struct {
	// FIELD SUPPORTED OPERATORS SUPPORTED FUNCTIONS
	// |name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| |description | ge, le, eq, ne, gt, lt | substringof,
	// contains, startswith, endswith| |isCurrent | eq, ne | |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

PortalRevisionClientListByServiceOptions contains the optional parameters for the PortalRevisionClient.NewListByServicePager method.

type PortalRevisionClientListByServiceResponse

type PortalRevisionClientListByServiceResponse struct {
	// Paged list of portal revisions.
	PortalRevisionCollection
}

PortalRevisionClientListByServiceResponse contains the response from method PortalRevisionClient.NewListByServicePager.

type PortalRevisionClientUpdateResponse

type PortalRevisionClientUpdateResponse struct {
	// Portal Revision's contract details.
	PortalRevisionContract
}

PortalRevisionClientUpdateResponse contains the response from method PortalRevisionClient.BeginUpdate.

type PortalRevisionCollection

type PortalRevisionCollection struct {
	// READ-ONLY; Next page link, if any.
	NextLink *string

	// READ-ONLY; Collection of portal revisions.
	Value []*PortalRevisionContract
}

PortalRevisionCollection - Paged list of portal revisions.

func (PortalRevisionCollection) MarshalJSON

func (p PortalRevisionCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PortalRevisionCollection.

func (*PortalRevisionCollection) UnmarshalJSON

func (p *PortalRevisionCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PortalRevisionCollection.

type PortalRevisionContract

type PortalRevisionContract struct {
	// Properties of the portal revisions.
	Properties *PortalRevisionContractProperties

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

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

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

PortalRevisionContract - Portal Revision's contract details.

func (PortalRevisionContract) MarshalJSON

func (p PortalRevisionContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PortalRevisionContract.

func (*PortalRevisionContract) UnmarshalJSON

func (p *PortalRevisionContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PortalRevisionContract.

type PortalRevisionContractProperties

type PortalRevisionContractProperties struct {
	// Portal revision description.
	Description *string

	// Indicates if the portal's revision is public.
	IsCurrent *bool

	// READ-ONLY; Portal's revision creation date and time.
	CreatedDateTime *time.Time

	// READ-ONLY; Status of the portal's revision.
	Status *PortalRevisionStatus

	// READ-ONLY; Portal revision publishing status details.
	StatusDetails *string

	// READ-ONLY; Last updated date and time.
	UpdatedDateTime *time.Time
}

func (PortalRevisionContractProperties) MarshalJSON

func (p PortalRevisionContractProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PortalRevisionContractProperties.

func (*PortalRevisionContractProperties) UnmarshalJSON

func (p *PortalRevisionContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PortalRevisionContractProperties.

type PortalRevisionStatus

type PortalRevisionStatus string

PortalRevisionStatus - Status of the portal's revision.

const (
	// PortalRevisionStatusCompleted - Portal's revision publishing completed.
	PortalRevisionStatusCompleted PortalRevisionStatus = "completed"
	// PortalRevisionStatusFailed - Portal's revision publishing failed.
	PortalRevisionStatusFailed PortalRevisionStatus = "failed"
	// PortalRevisionStatusPending - Portal's revision has been queued.
	PortalRevisionStatusPending PortalRevisionStatus = "pending"
	// PortalRevisionStatusPublishing - Portal's revision is being published.
	PortalRevisionStatusPublishing PortalRevisionStatus = "publishing"
)

func PossiblePortalRevisionStatusValues

func PossiblePortalRevisionStatusValues() []PortalRevisionStatus

PossiblePortalRevisionStatusValues returns the possible values for the PortalRevisionStatus const type.

type PortalSettingValidationKeyContract

type PortalSettingValidationKeyContract struct {
	// This is secret value of the validation key in portal settings.
	ValidationKey *string
}

PortalSettingValidationKeyContract - Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.

func (PortalSettingValidationKeyContract) MarshalJSON

func (p PortalSettingValidationKeyContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PortalSettingValidationKeyContract.

func (*PortalSettingValidationKeyContract) UnmarshalJSON

func (p *PortalSettingValidationKeyContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PortalSettingValidationKeyContract.

type PortalSettingsClient

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

PortalSettingsClient contains the methods for the PortalSettings group. Don't use this type directly, use NewPortalSettingsClient() instead.

func NewPortalSettingsClient

func NewPortalSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PortalSettingsClient, error)

NewPortalSettingsClient creates a new instance of PortalSettingsClient 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 (*PortalSettingsClient) ListByService

func (client *PortalSettingsClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, options *PortalSettingsClientListByServiceOptions) (PortalSettingsClientListByServiceResponse, error)

ListByService - Lists a collection of portalsettings defined within a service instance.. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - PortalSettingsClientListByServiceOptions contains the optional parameters for the PortalSettingsClient.ListByService method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPortalSettings.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPortalSettingsClient().ListByService(ctx, "rg1", "apimService1", 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.PortalSettingsCollection = armapimanagement.PortalSettingsCollection{
// 	Count: to.Ptr[int64](3),
// 	Value: []*armapimanagement.PortalSettingsContract{
// 		{
// 			Name: to.Ptr("delegation"),
// 			Type: to.Ptr("Microsoft.ApiManagement/service/portalsettings"),
// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/delegation"),
// 			Properties: &armapimanagement.PortalSettingsContractProperties{
// 				Enabled: to.Ptr(false),
// 				Subscriptions: &armapimanagement.SubscriptionsDelegationSettingsProperties{
// 					Enabled: to.Ptr(false),
// 				},
// 				UserRegistration: &armapimanagement.RegistrationDelegationSettingsProperties{
// 					Enabled: to.Ptr(false),
// 				},
// 			},
// 		},
// 		{
// 			Name: to.Ptr("signin"),
// 			Type: to.Ptr("Microsoft.ApiManagement/service/portalsettings"),
// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/signin"),
// 			Properties: &armapimanagement.PortalSettingsContractProperties{
// 				Enabled: to.Ptr(false),
// 			},
// 		},
// 		{
// 			Name: to.Ptr("signup"),
// 			Type: to.Ptr("Microsoft.ApiManagement/service/portalsettings"),
// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/signup"),
// 			Properties: &armapimanagement.PortalSettingsContractProperties{
// 				Enabled: to.Ptr(true),
// 				TermsOfService: &armapimanagement.TermsOfServiceProperties{
// 					ConsentRequired: to.Ptr(false),
// 					Enabled: to.Ptr(false),
// 					Text: to.Ptr("Terms of service"),
// 				},
// 			},
// 	}},
// }
Output:

type PortalSettingsClientListByServiceOptions

type PortalSettingsClientListByServiceOptions struct {
}

PortalSettingsClientListByServiceOptions contains the optional parameters for the PortalSettingsClient.ListByService method.

type PortalSettingsClientListByServiceResponse

type PortalSettingsClientListByServiceResponse struct {
	// Descriptions of API Management policies.
	PortalSettingsCollection
}

PortalSettingsClientListByServiceResponse contains the response from method PortalSettingsClient.ListByService.

type PortalSettingsCollection

type PortalSettingsCollection struct {
	// Total record count number.
	Count *int64

	// Descriptions of API Management policies.
	Value []*PortalSettingsContract
}

PortalSettingsCollection - Descriptions of API Management policies.

func (PortalSettingsCollection) MarshalJSON

func (p PortalSettingsCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PortalSettingsCollection.

func (*PortalSettingsCollection) UnmarshalJSON

func (p *PortalSettingsCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PortalSettingsCollection.

type PortalSettingsContract

type PortalSettingsContract struct {
	// Portal Settings contract properties.
	Properties *PortalSettingsContractProperties

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

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

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

PortalSettingsContract - Portal Settings for the Developer Portal.

func (PortalSettingsContract) MarshalJSON

func (p PortalSettingsContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PortalSettingsContract.

func (*PortalSettingsContract) UnmarshalJSON

func (p *PortalSettingsContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PortalSettingsContract.

type PortalSettingsContractProperties

type PortalSettingsContractProperties struct {
	// Redirect Anonymous users to the Sign-In page.
	Enabled *bool

	// Subscriptions delegation settings.
	Subscriptions *SubscriptionsDelegationSettingsProperties

	// Terms of service contract properties.
	TermsOfService *TermsOfServiceProperties

	// A delegation Url.
	URL *string

	// User registration delegation settings.
	UserRegistration *RegistrationDelegationSettingsProperties

	// A base64-encoded validation key to validate, that a request is coming from Azure API Management.
	ValidationKey *string
}

PortalSettingsContractProperties - Sign-in settings contract properties.

func (PortalSettingsContractProperties) MarshalJSON

func (p PortalSettingsContractProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PortalSettingsContractProperties.

func (*PortalSettingsContractProperties) UnmarshalJSON

func (p *PortalSettingsContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PortalSettingsContractProperties.

type PortalSettingsCspMode

type PortalSettingsCspMode string

PortalSettingsCspMode - The mode of the developer portal Content Security Policy (CSP).

const (
	// PortalSettingsCspModeDisabled - The browser will not apply the origin restrictions.
	PortalSettingsCspModeDisabled PortalSettingsCspMode = "disabled"
	// PortalSettingsCspModeEnabled - The browser will block requests not matching allowed origins.
	PortalSettingsCspModeEnabled PortalSettingsCspMode = "enabled"
	// PortalSettingsCspModeReportOnly - The browser will report requests not matching allowed origins without blocking them.
	PortalSettingsCspModeReportOnly PortalSettingsCspMode = "reportOnly"
)

func PossiblePortalSettingsCspModeValues

func PossiblePortalSettingsCspModeValues() []PortalSettingsCspMode

PossiblePortalSettingsCspModeValues returns the possible values for the PortalSettingsCspMode const type.

type PortalSigninSettingProperties

type PortalSigninSettingProperties struct {
	// Redirect Anonymous users to the Sign-In page.
	Enabled *bool
}

PortalSigninSettingProperties - Sign-in settings contract properties.

func (PortalSigninSettingProperties) MarshalJSON

func (p PortalSigninSettingProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PortalSigninSettingProperties.

func (*PortalSigninSettingProperties) UnmarshalJSON

func (p *PortalSigninSettingProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PortalSigninSettingProperties.

type PortalSigninSettings

type PortalSigninSettings struct {
	// Sign-in settings contract properties.
	Properties *PortalSigninSettingProperties

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

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

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

PortalSigninSettings - Sign-In settings for the Developer Portal.

func (PortalSigninSettings) MarshalJSON

func (p PortalSigninSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PortalSigninSettings.

func (*PortalSigninSettings) UnmarshalJSON

func (p *PortalSigninSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PortalSigninSettings.

type PortalSignupSettings

type PortalSignupSettings struct {
	// Sign-up settings contract properties.
	Properties *PortalSignupSettingsProperties

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

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

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

PortalSignupSettings - Sign-Up settings for a developer portal.

func (PortalSignupSettings) MarshalJSON

func (p PortalSignupSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PortalSignupSettings.

func (*PortalSignupSettings) UnmarshalJSON

func (p *PortalSignupSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PortalSignupSettings.

type PortalSignupSettingsProperties

type PortalSignupSettingsProperties struct {
	// Allow users to sign up on a developer portal.
	Enabled *bool

	// Terms of service contract properties.
	TermsOfService *TermsOfServiceProperties
}

PortalSignupSettingsProperties - Sign-up settings contract properties.

func (PortalSignupSettingsProperties) MarshalJSON

func (p PortalSignupSettingsProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PortalSignupSettingsProperties.

func (*PortalSignupSettingsProperties) UnmarshalJSON

func (p *PortalSignupSettingsProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PortalSignupSettingsProperties.

type PreferredIPVersion

type PreferredIPVersion string

PreferredIPVersion - The IP version to be used. Only IPv4 is supported for now.

const (
	PreferredIPVersionIPv4 PreferredIPVersion = "IPv4"
)

func PossiblePreferredIPVersionValues

func PossiblePreferredIPVersionValues() []PreferredIPVersion

PossiblePreferredIPVersionValues returns the possible values for the PreferredIPVersion const type.

type PrivateEndpoint

type PrivateEndpoint struct {
	// READ-ONLY; The ARM identifier for Private Endpoint
	ID *string
}

PrivateEndpoint - The Private Endpoint resource.

func (PrivateEndpoint) MarshalJSON

func (p PrivateEndpoint) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint.

func (*PrivateEndpoint) UnmarshalJSON

func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint.

type PrivateEndpointConnection

type PrivateEndpointConnection struct {
	// Resource properties.
	Properties *PrivateEndpointConnectionProperties

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

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

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

PrivateEndpointConnection - The Private Endpoint Connection resource.

func (PrivateEndpointConnection) MarshalJSON

func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection.

func (*PrivateEndpointConnection) UnmarshalJSON

func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection.

type PrivateEndpointConnectionClient

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

PrivateEndpointConnectionClient contains the methods for the PrivateEndpointConnection group. Don't use this type directly, use NewPrivateEndpointConnectionClient() instead.

func NewPrivateEndpointConnectionClient

func NewPrivateEndpointConnectionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionClient, error)

NewPrivateEndpointConnectionClient creates a new instance of PrivateEndpointConnectionClient 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 (*PrivateEndpointConnectionClient) BeginCreateOrUpdate

func (client *PrivateEndpointConnectionClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, privateEndpointConnectionName string, privateEndpointConnectionRequest PrivateEndpointConnectionRequest, options *PrivateEndpointConnectionClientBeginCreateOrUpdateOptions) (*runtime.Poller[PrivateEndpointConnectionClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates a new Private Endpoint Connection or updates an existing one. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • privateEndpointConnectionName - Name of the private endpoint connection.
  • options - PrivateEndpointConnectionClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementApproveOrRejectPrivateEndpointConnection.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewPrivateEndpointConnectionClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", "privateEndpointConnectionName", armapimanagement.PrivateEndpointConnectionRequest{
	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/connectionName"),
	Properties: &armapimanagement.PrivateEndpointConnectionRequestProperties{
		PrivateLinkServiceConnectionState: &armapimanagement.PrivateLinkServiceConnectionState{
			Description: to.Ptr("The Private Endpoint Connection is approved."),
			Status:      to.Ptr(armapimanagement.PrivateEndpointServiceConnectionStatusApproved),
		},
	},
}, 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.PrivateEndpointConnection = armapimanagement.PrivateEndpointConnection{
// 	Name: to.Ptr("privateEndpointConnectionName"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/privateEndpointConnections"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/privateEndpointConnectionName"),
// 	Properties: &armapimanagement.PrivateEndpointConnectionProperties{
// 		PrivateEndpoint: &armapimanagement.PrivateEndpoint{
// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/privateEndpointName"),
// 		},
// 		PrivateLinkServiceConnectionState: &armapimanagement.PrivateLinkServiceConnectionState{
// 			Description: to.Ptr("The request has been approved."),
// 			Status: to.Ptr(armapimanagement.PrivateEndpointServiceConnectionStatus("Succeeded")),
// 		},
// 		ProvisioningState: to.Ptr(armapimanagement.PrivateEndpointConnectionProvisioningStateSucceeded),
// 	},
// }
Output:

func (*PrivateEndpointConnectionClient) BeginDelete

func (client *PrivateEndpointConnectionClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionClientDeleteResponse], error)

BeginDelete - Deletes the specified Private Endpoint Connection. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • privateEndpointConnectionName - Name of the private endpoint connection.
  • options - PrivateEndpointConnectionClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeletePrivateEndpointConnection.json

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

func (client *PrivateEndpointConnectionClient) GetByName(ctx context.Context, resourceGroupName string, serviceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionClientGetByNameOptions) (PrivateEndpointConnectionClientGetByNameResponse, error)

GetByName - Gets the details of the Private Endpoint Connection specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • privateEndpointConnectionName - Name of the private endpoint connection.
  • options - PrivateEndpointConnectionClientGetByNameOptions contains the optional parameters for the PrivateEndpointConnectionClient.GetByName method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPrivateEndpointConnection.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPrivateEndpointConnectionClient().GetByName(ctx, "rg1", "apimService1", "privateEndpointConnectionName", 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.PrivateEndpointConnection = armapimanagement.PrivateEndpointConnection{
// 	Name: to.Ptr("privateEndpointProxyName"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/privateEndpointConnections"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/privateEndpointConnectionName"),
// 	Properties: &armapimanagement.PrivateEndpointConnectionProperties{
// 		PrivateEndpoint: &armapimanagement.PrivateEndpoint{
// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/privateEndpointName"),
// 		},
// 		PrivateLinkServiceConnectionState: &armapimanagement.PrivateLinkServiceConnectionState{
// 			Description: to.Ptr("Please approve my request, thanks"),
// 			ActionsRequired: to.Ptr("None"),
// 			Status: to.Ptr(armapimanagement.PrivateEndpointServiceConnectionStatusPending),
// 		},
// 		ProvisioningState: to.Ptr(armapimanagement.PrivateEndpointConnectionProvisioningStateSucceeded),
// 	},
// }
Output:

func (*PrivateEndpointConnectionClient) GetPrivateLinkResource

func (client *PrivateEndpointConnectionClient) GetPrivateLinkResource(ctx context.Context, resourceGroupName string, serviceName string, privateLinkSubResourceName string, options *PrivateEndpointConnectionClientGetPrivateLinkResourceOptions) (PrivateEndpointConnectionClientGetPrivateLinkResourceResponse, error)

GetPrivateLinkResource - Gets the private link resources If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • privateLinkSubResourceName - Name of the private link resource.
  • options - PrivateEndpointConnectionClientGetPrivateLinkResourceOptions contains the optional parameters for the PrivateEndpointConnectionClient.GetPrivateLinkResource method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPrivateLinkGroupResource.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPrivateEndpointConnectionClient().GetPrivateLinkResource(ctx, "rg1", "apimService1", "privateLinkSubResourceName", 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.PrivateLinkResource = armapimanagement.PrivateLinkResource{
// 	Name: to.Ptr("Gateway"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/privateLinkResources"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateLinkResources/Gateway"),
// 	Properties: &armapimanagement.PrivateLinkResourceProperties{
// 		GroupID: to.Ptr("Gateway"),
// 		RequiredMembers: []*string{
// 			to.Ptr("Gateway")},
// 			RequiredZoneNames: []*string{
// 				to.Ptr("privateLink.azure-api.net")},
// 			},
// 		}
Output:

func (*PrivateEndpointConnectionClient) ListPrivateLinkResources

ListPrivateLinkResources - Gets the private link resources If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - PrivateEndpointConnectionClientListPrivateLinkResourcesOptions contains the optional parameters for the PrivateEndpointConnectionClient.ListPrivateLinkResources method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPrivateLinkGroupResources.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPrivateEndpointConnectionClient().ListPrivateLinkResources(ctx, "rg1", "apimService1", 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.PrivateLinkResourceListResult = armapimanagement.PrivateLinkResourceListResult{
// 	Value: []*armapimanagement.PrivateLinkResource{
// 		{
// 			Name: to.Ptr("Gateway"),
// 			Type: to.Ptr("Microsoft.ApiManagement/service/privateLinkResources"),
// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateLinkResources/Gateway"),
// 			Properties: &armapimanagement.PrivateLinkResourceProperties{
// 				GroupID: to.Ptr("Gateway"),
// 				RequiredMembers: []*string{
// 					to.Ptr("Gateway")},
// 					RequiredZoneNames: []*string{
// 						to.Ptr("privateLink.azure-api.net")},
// 					},
// 			}},
// 		}
Output:

func (*PrivateEndpointConnectionClient) NewListByServicePager

NewListByServicePager - Lists all private endpoint connections of the API Management service instance.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - PrivateEndpointConnectionClientListByServiceOptions contains the optional parameters for the PrivateEndpointConnectionClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPrivateEndpointConnections.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewPrivateEndpointConnectionClient().NewListByServicePager("rg1", "apimService1", 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.PrivateEndpointConnectionListResult = armapimanagement.PrivateEndpointConnectionListResult{
	// 	Value: []*armapimanagement.PrivateEndpointConnection{
	// 		{
	// 			Name: to.Ptr("privateEndpointProxyName"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/privateEndpointConnections"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/connectionName"),
	// 			Properties: &armapimanagement.PrivateEndpointConnectionProperties{
	// 				PrivateEndpoint: &armapimanagement.PrivateEndpoint{
	// 					ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/privateEndpointName"),
	// 				},
	// 				PrivateLinkServiceConnectionState: &armapimanagement.PrivateLinkServiceConnectionState{
	// 					Description: to.Ptr("Please approve my request, thanks"),
	// 					ActionsRequired: to.Ptr("None"),
	// 					Status: to.Ptr(armapimanagement.PrivateEndpointServiceConnectionStatusPending),
	// 				},
	// 				ProvisioningState: to.Ptr(armapimanagement.PrivateEndpointConnectionProvisioningStateSucceeded),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("privateEndpointProxyName2"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/privateEndpointConnections"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/privateEndpointProxyName2"),
	// 			Properties: &armapimanagement.PrivateEndpointConnectionProperties{
	// 				PrivateEndpoint: &armapimanagement.PrivateEndpoint{
	// 					ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/privateEndpointName2"),
	// 				},
	// 				PrivateLinkServiceConnectionState: &armapimanagement.PrivateLinkServiceConnectionState{
	// 					Description: to.Ptr("Please approve my request, thanks"),
	// 					ActionsRequired: to.Ptr("None"),
	// 					Status: to.Ptr(armapimanagement.PrivateEndpointServiceConnectionStatusPending),
	// 				},
	// 				ProvisioningState: to.Ptr(armapimanagement.PrivateEndpointConnectionProvisioningStateSucceeded),
	// 			},
	// 	}},
	// }
}
Output:

type PrivateEndpointConnectionClientBeginCreateOrUpdateOptions

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

PrivateEndpointConnectionClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginCreateOrUpdate method.

type PrivateEndpointConnectionClientBeginDeleteOptions

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

PrivateEndpointConnectionClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginDelete method.

type PrivateEndpointConnectionClientCreateOrUpdateResponse

type PrivateEndpointConnectionClientCreateOrUpdateResponse struct {
	// The Private Endpoint Connection resource.
	PrivateEndpointConnection
}

PrivateEndpointConnectionClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionClient.BeginCreateOrUpdate.

type PrivateEndpointConnectionClientDeleteResponse

type PrivateEndpointConnectionClientDeleteResponse struct {
}

PrivateEndpointConnectionClientDeleteResponse contains the response from method PrivateEndpointConnectionClient.BeginDelete.

type PrivateEndpointConnectionClientGetByNameOptions

type PrivateEndpointConnectionClientGetByNameOptions struct {
}

PrivateEndpointConnectionClientGetByNameOptions contains the optional parameters for the PrivateEndpointConnectionClient.GetByName method.

type PrivateEndpointConnectionClientGetByNameResponse

type PrivateEndpointConnectionClientGetByNameResponse struct {
	// The Private Endpoint Connection resource.
	PrivateEndpointConnection
}

PrivateEndpointConnectionClientGetByNameResponse contains the response from method PrivateEndpointConnectionClient.GetByName.

type PrivateEndpointConnectionClientGetPrivateLinkResourceOptions

type PrivateEndpointConnectionClientGetPrivateLinkResourceOptions struct {
}

PrivateEndpointConnectionClientGetPrivateLinkResourceOptions contains the optional parameters for the PrivateEndpointConnectionClient.GetPrivateLinkResource method.

type PrivateEndpointConnectionClientGetPrivateLinkResourceResponse

type PrivateEndpointConnectionClientGetPrivateLinkResourceResponse struct {
	// A private link resource
	PrivateLinkResource
}

PrivateEndpointConnectionClientGetPrivateLinkResourceResponse contains the response from method PrivateEndpointConnectionClient.GetPrivateLinkResource.

type PrivateEndpointConnectionClientListByServiceOptions

type PrivateEndpointConnectionClientListByServiceOptions struct {
}

PrivateEndpointConnectionClientListByServiceOptions contains the optional parameters for the PrivateEndpointConnectionClient.NewListByServicePager method.

type PrivateEndpointConnectionClientListByServiceResponse

type PrivateEndpointConnectionClientListByServiceResponse struct {
	// List of private endpoint connection associated with the specified storage account
	PrivateEndpointConnectionListResult
}

PrivateEndpointConnectionClientListByServiceResponse contains the response from method PrivateEndpointConnectionClient.NewListByServicePager.

type PrivateEndpointConnectionClientListPrivateLinkResourcesOptions

type PrivateEndpointConnectionClientListPrivateLinkResourcesOptions struct {
}

PrivateEndpointConnectionClientListPrivateLinkResourcesOptions contains the optional parameters for the PrivateEndpointConnectionClient.ListPrivateLinkResources method.

type PrivateEndpointConnectionClientListPrivateLinkResourcesResponse

type PrivateEndpointConnectionClientListPrivateLinkResourcesResponse struct {
	// A list of private link resources
	PrivateLinkResourceListResult
}

PrivateEndpointConnectionClientListPrivateLinkResourcesResponse contains the response from method PrivateEndpointConnectionClient.ListPrivateLinkResources.

type PrivateEndpointConnectionListResult

type PrivateEndpointConnectionListResult struct {
	// Array of private endpoint connections
	Value []*PrivateEndpointConnection
}

PrivateEndpointConnectionListResult - List of private endpoint connection associated with the specified storage account

func (PrivateEndpointConnectionListResult) MarshalJSON

func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult.

func (*PrivateEndpointConnectionListResult) UnmarshalJSON

func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult.

type PrivateEndpointConnectionProperties

type PrivateEndpointConnectionProperties struct {
	// REQUIRED; A collection of information about the state of the connection between service consumer and provider.
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState

	// The resource of private end point.
	PrivateEndpoint *PrivateEndpoint

	// READ-ONLY; The provisioning state of the private endpoint connection resource.
	ProvisioningState *PrivateEndpointConnectionProvisioningState
}

PrivateEndpointConnectionProperties - Properties of the PrivateEndpointConnectProperties.

func (PrivateEndpointConnectionProperties) MarshalJSON

func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.

func (*PrivateEndpointConnectionProperties) UnmarshalJSON

func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties.

type PrivateEndpointConnectionProvisioningState

type PrivateEndpointConnectionProvisioningState string

PrivateEndpointConnectionProvisioningState - The current provisioning state.

const (
	PrivateEndpointConnectionProvisioningStateCreating  PrivateEndpointConnectionProvisioningState = "Creating"
	PrivateEndpointConnectionProvisioningStateDeleting  PrivateEndpointConnectionProvisioningState = "Deleting"
	PrivateEndpointConnectionProvisioningStateFailed    PrivateEndpointConnectionProvisioningState = "Failed"
	PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded"
)

func PossiblePrivateEndpointConnectionProvisioningStateValues

func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState

PossiblePrivateEndpointConnectionProvisioningStateValues returns the possible values for the PrivateEndpointConnectionProvisioningState const type.

type PrivateEndpointConnectionRequest

type PrivateEndpointConnectionRequest struct {
	// Private Endpoint Connection Resource Id.
	ID *string

	// The connection state of the private endpoint connection.
	Properties *PrivateEndpointConnectionRequestProperties
}

PrivateEndpointConnectionRequest - A request to approve or reject a private endpoint connection

func (PrivateEndpointConnectionRequest) MarshalJSON

func (p PrivateEndpointConnectionRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionRequest.

func (*PrivateEndpointConnectionRequest) UnmarshalJSON

func (p *PrivateEndpointConnectionRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionRequest.

type PrivateEndpointConnectionRequestProperties

type PrivateEndpointConnectionRequestProperties struct {
	// A collection of information about the state of the connection between service consumer and provider.
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState
}

PrivateEndpointConnectionRequestProperties - The connection state of the private endpoint connection.

func (PrivateEndpointConnectionRequestProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionRequestProperties.

func (*PrivateEndpointConnectionRequestProperties) UnmarshalJSON

func (p *PrivateEndpointConnectionRequestProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionRequestProperties.

type PrivateEndpointConnectionWrapperProperties

type PrivateEndpointConnectionWrapperProperties struct {
	// REQUIRED; A collection of information about the state of the connection between service consumer and provider.
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState

	// The resource of private end point.
	PrivateEndpoint *ArmIDWrapper

	// READ-ONLY; All the Group ids.
	GroupIDs []*string

	// READ-ONLY; The provisioning state of the private endpoint connection resource.
	ProvisioningState *string
}

PrivateEndpointConnectionWrapperProperties - Properties of the PrivateEndpointConnectProperties.

func (PrivateEndpointConnectionWrapperProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionWrapperProperties.

func (*PrivateEndpointConnectionWrapperProperties) UnmarshalJSON

func (p *PrivateEndpointConnectionWrapperProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionWrapperProperties.

type PrivateEndpointServiceConnectionStatus

type PrivateEndpointServiceConnectionStatus string

PrivateEndpointServiceConnectionStatus - The private endpoint connection status.

const (
	PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved"
	PrivateEndpointServiceConnectionStatusPending  PrivateEndpointServiceConnectionStatus = "Pending"
	PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected"
)

func PossiblePrivateEndpointServiceConnectionStatusValues

func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus

PossiblePrivateEndpointServiceConnectionStatusValues returns the possible values for the PrivateEndpointServiceConnectionStatus const type.

type PrivateLinkResource

type PrivateLinkResource struct {
	// Resource properties.
	Properties *PrivateLinkResourceProperties

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

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

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

PrivateLinkResource - A private link resource

func (PrivateLinkResource) MarshalJSON

func (p PrivateLinkResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource.

func (*PrivateLinkResource) UnmarshalJSON

func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource.

type PrivateLinkResourceListResult

type PrivateLinkResourceListResult struct {
	// Array of private link resources
	Value []*PrivateLinkResource
}

PrivateLinkResourceListResult - A list of private link resources

func (PrivateLinkResourceListResult) MarshalJSON

func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult.

func (*PrivateLinkResourceListResult) UnmarshalJSON

func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult.

type PrivateLinkResourceProperties

type PrivateLinkResourceProperties struct {
	// The private link resource Private link DNS zone name.
	RequiredZoneNames []*string

	// READ-ONLY; The private link resource group id.
	GroupID *string

	// READ-ONLY; The private link resource required member names.
	RequiredMembers []*string
}

PrivateLinkResourceProperties - Properties of a private link resource.

func (PrivateLinkResourceProperties) MarshalJSON

func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties.

func (*PrivateLinkResourceProperties) UnmarshalJSON

func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties.

type PrivateLinkServiceConnectionState

type PrivateLinkServiceConnectionState struct {
	// A message indicating if changes on the service provider require any updates on the consumer.
	ActionsRequired *string

	// The reason for approval/rejection of the connection.
	Description *string

	// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
	Status *PrivateEndpointServiceConnectionStatus
}

PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.

func (PrivateLinkServiceConnectionState) MarshalJSON

func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState.

func (*PrivateLinkServiceConnectionState) UnmarshalJSON

func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState.

type ProductAPIClient

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

ProductAPIClient contains the methods for the ProductAPI group. Don't use this type directly, use NewProductAPIClient() instead.

func NewProductAPIClient

func NewProductAPIClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProductAPIClient, error)

NewProductAPIClient creates a new instance of ProductAPIClient 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 (*ProductAPIClient) CheckEntityExists

func (client *ProductAPIClient) CheckEntityExists(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiID string, options *ProductAPIClientCheckEntityExistsOptions) (ProductAPIClientCheckEntityExistsResponse, error)

CheckEntityExists - Checks that API entity specified by identifier is associated with the Product entity.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • options - ProductAPIClientCheckEntityExistsOptions contains the optional parameters for the ProductAPIClient.CheckEntityExists method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProductApi.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewProductAPIClient().CheckEntityExists(ctx, "rg1", "apimService1", "5931a75ae4bbd512a88c680b", "59306a29e4bbd510dc24e5f9", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*ProductAPIClient) CreateOrUpdate

func (client *ProductAPIClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiID string, options *ProductAPIClientCreateOrUpdateOptions) (ProductAPIClientCreateOrUpdateResponse, error)

CreateOrUpdate - Adds an API to the specified product. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • options - ProductAPIClientCreateOrUpdateOptions contains the optional parameters for the ProductAPIClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductApi.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProductAPIClient().CreateOrUpdate(ctx, "rg1", "apimService1", "testproduct", "echo-api", 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.APIContract = armapimanagement.APIContract{
// 	Name: to.Ptr("5931a75ae4bbd512a88c680b"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/apis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5931a75ae4bbd512a88c680b"),
// 	Properties: &armapimanagement.APIContractProperties{
// 		APIRevision: to.Ptr("1"),
// 		IsCurrent: to.Ptr(true),
// 		SubscriptionKeyParameterNames: &armapimanagement.SubscriptionKeyParameterNamesContract{
// 			Header: to.Ptr("Ocp-Apim-Subscription-Key"),
// 			Query: to.Ptr("subscription-key"),
// 		},
// 		Path: to.Ptr(""),
// 		DisplayName: to.Ptr("EchoApi"),
// 		Protocols: []*armapimanagement.Protocol{
// 			to.Ptr(armapimanagement.ProtocolHTTP),
// 			to.Ptr(armapimanagement.ProtocolHTTPS)},
// 			ServiceURL: to.Ptr("https://contoso.com/apis/echo"),
// 		},
// 	}
Output:

func (*ProductAPIClient) Delete

func (client *ProductAPIClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiID string, options *ProductAPIClientDeleteOptions) (ProductAPIClientDeleteResponse, error)

Delete - Deletes the specified API from the specified product. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • options - ProductAPIClientDeleteOptions contains the optional parameters for the ProductAPIClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProductApi.json

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

func (*ProductAPIClient) NewListByProductPager

func (client *ProductAPIClient) NewListByProductPager(resourceGroupName string, serviceName string, productID string, options *ProductAPIClientListByProductOptions) *runtime.Pager[ProductAPIClientListByProductResponse]

NewListByProductPager - Lists a collection of the APIs associated with a product.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • options - ProductAPIClientListByProductOptions contains the optional parameters for the ProductAPIClient.NewListByProductPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductApis.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewProductAPIClient().NewListByProductPager("rg1", "apimService1", "5768181ea40f7eb6c49f6ac7", &armapimanagement.ProductAPIClientListByProductOptions{Filter: nil,
	Top:  nil,
	Skip: 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.APICollection = armapimanagement.APICollection{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.APIContract{
	// 		{
	// 			Name: to.Ptr("57681820a40f7eb6c49f6aca"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/products/apis"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5768181ea40f7eb6c49f6ac7/apis/57681820a40f7eb6c49f6aca"),
	// 			Properties: &armapimanagement.APIContractProperties{
	// 				Description: to.Ptr("description_57681820a40f7eb6c49f6acc"),
	// 				APIRevision: to.Ptr("1"),
	// 				IsCurrent: to.Ptr(true),
	// 				Path: to.Ptr("suffix_57681820a40f7eb6c49f6ace"),
	// 				DisplayName: to.Ptr("api_57681820a40f7eb6c49f6acb"),
	// 				Protocols: []*armapimanagement.Protocol{
	// 					to.Ptr(armapimanagement.ProtocolHTTPS)},
	// 					ServiceURL: to.Ptr("http://contoso/57681820a40f7eb6c49f6acd"),
	// 				},
	// 		}},
	// 	}
}
Output:

type ProductAPIClientCheckEntityExistsOptions

type ProductAPIClientCheckEntityExistsOptions struct {
}

ProductAPIClientCheckEntityExistsOptions contains the optional parameters for the ProductAPIClient.CheckEntityExists method.

type ProductAPIClientCheckEntityExistsResponse

type ProductAPIClientCheckEntityExistsResponse struct {
	// Success indicates if the operation succeeded or failed.
	Success bool
}

ProductAPIClientCheckEntityExistsResponse contains the response from method ProductAPIClient.CheckEntityExists.

type ProductAPIClientCreateOrUpdateOptions

type ProductAPIClientCreateOrUpdateOptions struct {
}

ProductAPIClientCreateOrUpdateOptions contains the optional parameters for the ProductAPIClient.CreateOrUpdate method.

type ProductAPIClientCreateOrUpdateResponse

type ProductAPIClientCreateOrUpdateResponse struct {
	// API details.
	APIContract
}

ProductAPIClientCreateOrUpdateResponse contains the response from method ProductAPIClient.CreateOrUpdate.

type ProductAPIClientDeleteOptions

type ProductAPIClientDeleteOptions struct {
}

ProductAPIClientDeleteOptions contains the optional parameters for the ProductAPIClient.Delete method.

type ProductAPIClientDeleteResponse

type ProductAPIClientDeleteResponse struct {
}

ProductAPIClientDeleteResponse contains the response from method ProductAPIClient.Delete.

type ProductAPIClientListByProductOptions

type ProductAPIClientListByProductOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

ProductAPIClientListByProductOptions contains the optional parameters for the ProductAPIClient.NewListByProductPager method.

type ProductAPIClientListByProductResponse

type ProductAPIClientListByProductResponse struct {
	// Paged API list representation.
	APICollection
}

ProductAPIClientListByProductResponse contains the response from method ProductAPIClient.NewListByProductPager.

type ProductClient

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

ProductClient contains the methods for the Product group. Don't use this type directly, use NewProductClient() instead.

func NewProductClient

func NewProductClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProductClient, error)

NewProductClient creates a new instance of ProductClient 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 (*ProductClient) CreateOrUpdate

func (client *ProductClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, parameters ProductContract, options *ProductClientCreateOrUpdateOptions) (ProductClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or Updates a product. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • parameters - Create or update parameters.
  • options - ProductClientCreateOrUpdateOptions contains the optional parameters for the ProductClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProduct.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProductClient().CreateOrUpdate(ctx, "rg1", "apimService1", "testproduct", armapimanagement.ProductContract{
	Properties: &armapimanagement.ProductContractProperties{
		DisplayName: to.Ptr("Test Template ProductName 4"),
	},
}, &armapimanagement.ProductClientCreateOrUpdateOptions{IfMatch: 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.ProductContract = armapimanagement.ProductContract{
// 	Name: to.Ptr("testproduct"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/products"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/testproduct"),
// 	Properties: &armapimanagement.ProductContractProperties{
// 		ApprovalRequired: to.Ptr(false),
// 		State: to.Ptr(armapimanagement.ProductStateNotPublished),
// 		SubscriptionRequired: to.Ptr(true),
// 		DisplayName: to.Ptr("Test Template ProductName 4"),
// 	},
// }
Output:

func (*ProductClient) Delete

func (client *ProductClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, ifMatch string, options *ProductClientDeleteOptions) (ProductClientDeleteResponse, error)

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

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - ProductClientDeleteOptions contains the optional parameters for the ProductClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProduct.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewProductClient().Delete(ctx, "rg1", "apimService1", "testproduct", "*", &armapimanagement.ProductClientDeleteOptions{DeleteSubscriptions: to.Ptr(true)})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*ProductClient) Get

func (client *ProductClient) Get(ctx context.Context, resourceGroupName string, serviceName string, productID string, options *ProductClientGetOptions) (ProductClientGetResponse, error)

Get - Gets the details of the product specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • options - ProductClientGetOptions contains the optional parameters for the ProductClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProduct.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProductClient().Get(ctx, "rg1", "apimService1", "unlimited", 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.ProductContract = armapimanagement.ProductContract{
// 	Name: to.Ptr("unlimited"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/products"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/unlimited"),
// 	Properties: &armapimanagement.ProductContractProperties{
// 		Description: to.Ptr("Subscribers have completely unlimited access to the API. Administrator approval is required."),
// 		ApprovalRequired: to.Ptr(true),
// 		State: to.Ptr(armapimanagement.ProductStatePublished),
// 		SubscriptionRequired: to.Ptr(true),
// 		SubscriptionsLimit: to.Ptr[int32](1),
// 		DisplayName: to.Ptr("Unlimited"),
// 	},
// }
Output:

func (*ProductClient) GetEntityTag

func (client *ProductClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, productID string, options *ProductClientGetEntityTagOptions) (ProductClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the product specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • options - ProductClientGetEntityTagOptions contains the optional parameters for the ProductClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProduct.json

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

func (*ProductClient) NewListByServicePager

func (client *ProductClient) NewListByServicePager(resourceGroupName string, serviceName string, options *ProductClientListByServiceOptions) *runtime.Pager[ProductClientListByServiceResponse]

NewListByServicePager - Lists a collection of products in the specified service instance.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - ProductClientListByServiceOptions contains the optional parameters for the ProductClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProducts.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewProductClient().NewListByServicePager("rg1", "apimService1", &armapimanagement.ProductClientListByServiceOptions{Filter: nil,
	Top:          nil,
	Skip:         nil,
	ExpandGroups: nil,
	Tags:         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.ProductCollection = armapimanagement.ProductCollection{
	// 	Count: to.Ptr[int64](3),
	// 	Value: []*armapimanagement.ProductContract{
	// 		{
	// 			Name: to.Ptr("kjoshiarmtemplateCert1"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/products"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/kjoshiarmtemplateCert1"),
	// 			Properties: &armapimanagement.ProductContractProperties{
	// 				Description: to.Ptr("Development Product"),
	// 				State: to.Ptr(armapimanagement.ProductStatePublished),
	// 				SubscriptionRequired: to.Ptr(false),
	// 				DisplayName: to.Ptr("Dev"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("starter"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/products"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/starter"),
	// 			Properties: &armapimanagement.ProductContractProperties{
	// 				Description: to.Ptr("Subscribers will be able to run 5 calls/minute up to a maximum of 100 calls/week."),
	// 				ApprovalRequired: to.Ptr(false),
	// 				State: to.Ptr(armapimanagement.ProductStatePublished),
	// 				SubscriptionRequired: to.Ptr(true),
	// 				SubscriptionsLimit: to.Ptr[int32](1),
	// 				Terms: to.Ptr(""),
	// 				DisplayName: to.Ptr("Starter"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("unlimited"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/products"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/unlimited"),
	// 			Properties: &armapimanagement.ProductContractProperties{
	// 				Description: to.Ptr("Subscribers have completely unlimited access to the API. Administrator approval is required."),
	// 				ApprovalRequired: to.Ptr(true),
	// 				State: to.Ptr(armapimanagement.ProductStatePublished),
	// 				SubscriptionRequired: to.Ptr(true),
	// 				SubscriptionsLimit: to.Ptr[int32](1),
	// 				DisplayName: to.Ptr("Unlimited"),
	// 			},
	// 	}},
	// }
}
Output:

func (*ProductClient) NewListByTagsPager

func (client *ProductClient) NewListByTagsPager(resourceGroupName string, serviceName string, options *ProductClientListByTagsOptions) *runtime.Pager[ProductClientListByTagsResponse]

NewListByTagsPager - Lists a collection of products associated with tags.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - ProductClientListByTagsOptions contains the optional parameters for the ProductClient.NewListByTagsPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductsByTags.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewProductClient().NewListByTagsPager("rg1", "apimService1", &armapimanagement.ProductClientListByTagsOptions{Filter: nil,
	Top:                      nil,
	Skip:                     nil,
	IncludeNotTaggedProducts: 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.TagResourceCollection = armapimanagement.TagResourceCollection{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.TagResourceContract{
	// 		{
	// 			Product: &armapimanagement.ProductTagResourceContractProperties{
	// 				Description: to.Ptr("Subscribers will be able to run 5 calls/minute up to a maximum of 100 calls/week."),
	// 				ApprovalRequired: to.Ptr(false),
	// 				State: to.Ptr(armapimanagement.ProductStatePublished),
	// 				SubscriptionRequired: to.Ptr(true),
	// 				SubscriptionsLimit: to.Ptr[int32](1),
	// 				Terms: to.Ptr(""),
	// 				Name: to.Ptr("Starter"),
	// 				ID: to.Ptr("/products/starter"),
	// 			},
	// 			Tag: &armapimanagement.TagResourceContractProperties{
	// 				Name: to.Ptr("awesomeTag"),
	// 				ID: to.Ptr("/tags/apitag123"),
	// 			},
	// 	}},
	// }
}
Output:

func (*ProductClient) Update

func (client *ProductClient) Update(ctx context.Context, resourceGroupName string, serviceName string, productID string, ifMatch string, parameters ProductUpdateParameters, options *ProductClientUpdateOptions) (ProductClientUpdateResponse, error)

Update - Update existing product details. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - Update parameters.
  • options - ProductClientUpdateOptions contains the optional parameters for the ProductClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateProduct.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProductClient().Update(ctx, "rg1", "apimService1", "testproduct", "*", armapimanagement.ProductUpdateParameters{
	Properties: &armapimanagement.ProductUpdateProperties{
		DisplayName: to.Ptr("Test Template ProductName 4"),
	},
}, 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.ProductContract = armapimanagement.ProductContract{
// 	Name: to.Ptr("testproduct"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/products"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/testproduct"),
// 	Properties: &armapimanagement.ProductContractProperties{
// 		Description: to.Ptr("Subscribers have completely unlimited access to the API. Administrator approval is required."),
// 		ApprovalRequired: to.Ptr(true),
// 		State: to.Ptr(armapimanagement.ProductStatePublished),
// 		SubscriptionRequired: to.Ptr(true),
// 		SubscriptionsLimit: to.Ptr[int32](1),
// 		DisplayName: to.Ptr("Test Template ProductName 4"),
// 	},
// }
Output:

type ProductClientCreateOrUpdateOptions

type ProductClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

ProductClientCreateOrUpdateOptions contains the optional parameters for the ProductClient.CreateOrUpdate method.

type ProductClientCreateOrUpdateResponse

type ProductClientCreateOrUpdateResponse struct {
	// Product details.
	ProductContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

ProductClientCreateOrUpdateResponse contains the response from method ProductClient.CreateOrUpdate.

type ProductClientDeleteOptions

type ProductClientDeleteOptions struct {
	// Delete existing subscriptions associated with the product or not.
	DeleteSubscriptions *bool
}

ProductClientDeleteOptions contains the optional parameters for the ProductClient.Delete method.

type ProductClientDeleteResponse

type ProductClientDeleteResponse struct {
}

ProductClientDeleteResponse contains the response from method ProductClient.Delete.

type ProductClientGetEntityTagOptions

type ProductClientGetEntityTagOptions struct {
}

ProductClientGetEntityTagOptions contains the optional parameters for the ProductClient.GetEntityTag method.

type ProductClientGetEntityTagResponse

type ProductClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

ProductClientGetEntityTagResponse contains the response from method ProductClient.GetEntityTag.

type ProductClientGetOptions

type ProductClientGetOptions struct {
}

ProductClientGetOptions contains the optional parameters for the ProductClient.Get method.

type ProductClientGetResponse

type ProductClientGetResponse struct {
	// Product details.
	ProductContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

ProductClientGetResponse contains the response from method ProductClient.Get.

type ProductClientListByServiceOptions

type ProductClientListByServiceOptions struct {
	// When set to true, the response contains an array of groups that have visibility to the product. The default is false.
	ExpandGroups *bool

	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | state | filter | eq | |
	// | groups | expand | | |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Products which are part of a specific tag.
	Tags *string

	// Number of records to return.
	Top *int32
}

ProductClientListByServiceOptions contains the optional parameters for the ProductClient.NewListByServicePager method.

type ProductClientListByServiceResponse

type ProductClientListByServiceResponse struct {
	// Paged Products list representation.
	ProductCollection
}

ProductClientListByServiceResponse contains the response from method ProductClient.NewListByServicePager.

type ProductClientListByTagsOptions

type ProductClientListByTagsOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | state | filter | eq | substringof, contains, startswith, endswith |
	Filter *string

	// Include not tagged Products.
	IncludeNotTaggedProducts *bool

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

ProductClientListByTagsOptions contains the optional parameters for the ProductClient.NewListByTagsPager method.

type ProductClientListByTagsResponse

type ProductClientListByTagsResponse struct {
	// Paged Tag list representation.
	TagResourceCollection
}

ProductClientListByTagsResponse contains the response from method ProductClient.NewListByTagsPager.

type ProductClientUpdateOptions

type ProductClientUpdateOptions struct {
}

ProductClientUpdateOptions contains the optional parameters for the ProductClient.Update method.

type ProductClientUpdateResponse

type ProductClientUpdateResponse struct {
	// Product details.
	ProductContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

ProductClientUpdateResponse contains the response from method ProductClient.Update.

type ProductCollection

type ProductCollection struct {
	// Total record count number across all pages.
	Count *int64

	// Next page link if any.
	NextLink *string

	// Page values.
	Value []*ProductContract
}

ProductCollection - Paged Products list representation.

func (ProductCollection) MarshalJSON

func (p ProductCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProductCollection.

func (*ProductCollection) UnmarshalJSON

func (p *ProductCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProductCollection.

type ProductContract

type ProductContract struct {
	// Product entity contract properties.
	Properties *ProductContractProperties

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

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

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

ProductContract - Product details.

func (ProductContract) MarshalJSON

func (p ProductContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProductContract.

func (*ProductContract) UnmarshalJSON

func (p *ProductContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProductContract.

type ProductContractProperties

type ProductContractProperties struct {
	// REQUIRED; Product name.
	DisplayName *string

	// whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers
	// to call the product’s APIs immediately after subscribing. If true,
	// administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present
	// only if subscriptionRequired property is present and has a value of false.
	ApprovalRequired *bool

	// Product description. May include HTML formatting tags.
	Description *string

	// whether product is published or not. Published products are discoverable by users of developer portal. Non published products
	// are visible only to administrators. Default state of Product is
	// notPublished.
	State *ProductState

	// Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred
	// to as "protected" and a valid subscription key is required for a request to an
	// API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included
	// in the product can be made without a subscription key. If property is omitted
	// when creating a new product it's value is assumed to be true.
	SubscriptionRequired *bool

	// Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited
	// per user subscriptions. Can be present only if subscriptionRequired
	// property is present and has a value of false.
	SubscriptionsLimit *int32

	// Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms
	// before they can complete the subscription process.
	Terms *string
}

ProductContractProperties - Product profile.

func (ProductContractProperties) MarshalJSON

func (p ProductContractProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProductContractProperties.

func (*ProductContractProperties) UnmarshalJSON

func (p *ProductContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProductContractProperties.

type ProductEntityBaseParameters

type ProductEntityBaseParameters struct {
	// whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers
	// to call the product’s APIs immediately after subscribing. If true,
	// administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present
	// only if subscriptionRequired property is present and has a value of false.
	ApprovalRequired *bool

	// Product description. May include HTML formatting tags.
	Description *string

	// whether product is published or not. Published products are discoverable by users of developer portal. Non published products
	// are visible only to administrators. Default state of Product is
	// notPublished.
	State *ProductState

	// Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred
	// to as "protected" and a valid subscription key is required for a request to an
	// API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included
	// in the product can be made without a subscription key. If property is omitted
	// when creating a new product it's value is assumed to be true.
	SubscriptionRequired *bool

	// Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited
	// per user subscriptions. Can be present only if subscriptionRequired
	// property is present and has a value of false.
	SubscriptionsLimit *int32

	// Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms
	// before they can complete the subscription process.
	Terms *string
}

ProductEntityBaseParameters - Product Entity Base Parameters

func (ProductEntityBaseParameters) MarshalJSON

func (p ProductEntityBaseParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProductEntityBaseParameters.

func (*ProductEntityBaseParameters) UnmarshalJSON

func (p *ProductEntityBaseParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProductEntityBaseParameters.

type ProductGroupClient

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

ProductGroupClient contains the methods for the ProductGroup group. Don't use this type directly, use NewProductGroupClient() instead.

func NewProductGroupClient

func NewProductGroupClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProductGroupClient, error)

NewProductGroupClient creates a new instance of ProductGroupClient 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 (*ProductGroupClient) CheckEntityExists

func (client *ProductGroupClient) CheckEntityExists(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string, options *ProductGroupClientCheckEntityExistsOptions) (ProductGroupClientCheckEntityExistsResponse, error)

CheckEntityExists - Checks that Group entity specified by identifier is associated with the Product entity.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • groupID - Group identifier. Must be unique in the current API Management service instance.
  • options - ProductGroupClientCheckEntityExistsOptions contains the optional parameters for the ProductGroupClient.CheckEntityExists method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProductGroup.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewProductGroupClient().CheckEntityExists(ctx, "rg1", "apimService1", "5931a75ae4bbd512a88c680b", "59306a29e4bbd510dc24e5f9", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*ProductGroupClient) CreateOrUpdate

func (client *ProductGroupClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string, options *ProductGroupClientCreateOrUpdateOptions) (ProductGroupClientCreateOrUpdateResponse, error)

CreateOrUpdate - Adds the association between the specified developer group with the specified product. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • groupID - Group identifier. Must be unique in the current API Management service instance.
  • options - ProductGroupClientCreateOrUpdateOptions contains the optional parameters for the ProductGroupClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductGroup.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProductGroupClient().CreateOrUpdate(ctx, "rg1", "apimService1", "testproduct", "templateGroup", 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.GroupContract = armapimanagement.GroupContract{
// 	Name: to.Ptr("templateGroup"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/products/groups"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/templateGroup"),
// 	Properties: &armapimanagement.GroupContractProperties{
// 		Type: to.Ptr(armapimanagement.GroupTypeCustom),
// 		Description: to.Ptr("group created via Template"),
// 		BuiltIn: to.Ptr(false),
// 		DisplayName: to.Ptr("Template Group"),
// 	},
// }
Output:

func (*ProductGroupClient) Delete

func (client *ProductGroupClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string, options *ProductGroupClientDeleteOptions) (ProductGroupClientDeleteResponse, error)

Delete - Deletes the association between the specified group and product. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • groupID - Group identifier. Must be unique in the current API Management service instance.
  • options - ProductGroupClientDeleteOptions contains the optional parameters for the ProductGroupClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProductGroup.json

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

func (*ProductGroupClient) NewListByProductPager

func (client *ProductGroupClient) NewListByProductPager(resourceGroupName string, serviceName string, productID string, options *ProductGroupClientListByProductOptions) *runtime.Pager[ProductGroupClientListByProductResponse]

NewListByProductPager - Lists the collection of developer groups associated with the specified product.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • options - ProductGroupClientListByProductOptions contains the optional parameters for the ProductGroupClient.NewListByProductPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductGroups.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewProductGroupClient().NewListByProductPager("rg1", "apimService1", "5600b57e7e8880006a060002", &armapimanagement.ProductGroupClientListByProductOptions{Filter: nil,
	Top:  nil,
	Skip: 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.GroupCollection = armapimanagement.GroupCollection{
	// 	Count: to.Ptr[int64](3),
	// 	Value: []*armapimanagement.GroupContract{
	// 		{
	// 			Name: to.Ptr("5600b57e7e8880006a020001"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/products/groups"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b57e7e8880006a060002/groups/5600b57e7e8880006a020001"),
	// 			Properties: &armapimanagement.GroupContractProperties{
	// 				Type: to.Ptr(armapimanagement.GroupTypeSystem),
	// 				Description: to.Ptr("Administrators is a built-in group. Its membership is managed by the system. Microsoft Azure subscription administrators fall into this group."),
	// 				BuiltIn: to.Ptr(true),
	// 				DisplayName: to.Ptr("Administrators"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("5600b57e7e8880006a020002"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/products/groups"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b57e7e8880006a060002/groups/5600b57e7e8880006a020002"),
	// 			Properties: &armapimanagement.GroupContractProperties{
	// 				Type: to.Ptr(armapimanagement.GroupTypeSystem),
	// 				Description: to.Ptr("Developers is a built-in group. Its membership is managed by the system. Signed-in users fall into this group."),
	// 				BuiltIn: to.Ptr(true),
	// 				DisplayName: to.Ptr("Developers"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("5600b57e7e8880006a020003"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/products/groups"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b57e7e8880006a060002/groups/5600b57e7e8880006a020003"),
	// 			Properties: &armapimanagement.GroupContractProperties{
	// 				Type: to.Ptr(armapimanagement.GroupTypeSystem),
	// 				Description: to.Ptr("Guests is a built-in group. Its membership is managed by the system. Unauthenticated users visiting the developer portal fall into this group."),
	// 				BuiltIn: to.Ptr(true),
	// 				DisplayName: to.Ptr("Guests"),
	// 			},
	// 	}},
	// }
}
Output:

type ProductGroupClientCheckEntityExistsOptions

type ProductGroupClientCheckEntityExistsOptions struct {
}

ProductGroupClientCheckEntityExistsOptions contains the optional parameters for the ProductGroupClient.CheckEntityExists method.

type ProductGroupClientCheckEntityExistsResponse

type ProductGroupClientCheckEntityExistsResponse struct {
	// Success indicates if the operation succeeded or failed.
	Success bool
}

ProductGroupClientCheckEntityExistsResponse contains the response from method ProductGroupClient.CheckEntityExists.

type ProductGroupClientCreateOrUpdateOptions

type ProductGroupClientCreateOrUpdateOptions struct {
}

ProductGroupClientCreateOrUpdateOptions contains the optional parameters for the ProductGroupClient.CreateOrUpdate method.

type ProductGroupClientCreateOrUpdateResponse

type ProductGroupClientCreateOrUpdateResponse struct {
	// Contract details.
	GroupContract
}

ProductGroupClientCreateOrUpdateResponse contains the response from method ProductGroupClient.CreateOrUpdate.

type ProductGroupClientDeleteOptions

type ProductGroupClientDeleteOptions struct {
}

ProductGroupClientDeleteOptions contains the optional parameters for the ProductGroupClient.Delete method.

type ProductGroupClientDeleteResponse

type ProductGroupClientDeleteResponse struct {
}

ProductGroupClientDeleteResponse contains the response from method ProductGroupClient.Delete.

type ProductGroupClientListByProductOptions

type ProductGroupClientListByProductOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | |
	// | displayName | filter | eq, ne | |
	// | description | filter | eq, ne | |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

ProductGroupClientListByProductOptions contains the optional parameters for the ProductGroupClient.NewListByProductPager method.

type ProductGroupClientListByProductResponse

type ProductGroupClientListByProductResponse struct {
	// Paged Group list representation.
	GroupCollection
}

ProductGroupClientListByProductResponse contains the response from method ProductGroupClient.NewListByProductPager.

type ProductPolicyClient

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

ProductPolicyClient contains the methods for the ProductPolicy group. Don't use this type directly, use NewProductPolicyClient() instead.

func NewProductPolicyClient

func NewProductPolicyClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProductPolicyClient, error)

NewProductPolicyClient creates a new instance of ProductPolicyClient 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 (*ProductPolicyClient) CreateOrUpdate

func (client *ProductPolicyClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, policyID PolicyIDName, parameters PolicyContract, options *ProductPolicyClientCreateOrUpdateOptions) (ProductPolicyClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates policy configuration for the Product. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • policyID - The identifier of the Policy.
  • parameters - The policy contents to apply.
  • options - ProductPolicyClientCreateOrUpdateOptions contains the optional parameters for the ProductPolicyClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductPolicy.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProductPolicyClient().CreateOrUpdate(ctx, "rg1", "apimService1", "5702e97e5157a50f48dce801", armapimanagement.PolicyIDNamePolicy, armapimanagement.PolicyContract{
	Properties: &armapimanagement.PolicyContractProperties{
		Format: to.Ptr(armapimanagement.PolicyContentFormatXML),
		Value:  to.Ptr("<policies>\r\n  <inbound>\r\n    <rate-limit calls=\"{{call-count}}\" renewal-period=\"15\"></rate-limit>\r\n    <log-to-eventhub logger-id=\"16\">\r\n                      @( string.Join(\",\", DateTime.UtcNow, context.Deployment.ServiceName, context.RequestId, context.Request.IpAddress, context.Operation.Name) ) \r\n                  </log-to-eventhub>\r\n    <quota-by-key calls=\"40\" counter-key=\"cc\" renewal-period=\"3600\" increment-count=\"@(context.Request.Method == &quot;POST&quot; ? 1:2)\" />\r\n    <base />\r\n  </inbound>\r\n  <backend>\r\n    <base />\r\n  </backend>\r\n  <outbound>\r\n    <base />\r\n  </outbound>\r\n</policies>"),
	},
}, &armapimanagement.ProductPolicyClientCreateOrUpdateOptions{IfMatch: 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.PolicyContract = armapimanagement.PolicyContract{
// 	Name: to.Ptr("policy"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/products/policies"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5702e97e5157a50f48dce801/policies/policy"),
// 	Properties: &armapimanagement.PolicyContractProperties{
// 		Value: to.Ptr("<policies>\r\n  <inbound>\r\n    <rate-limit calls=\"{{58c884fed8d14f127cec38f0}}\" renewal-period=\"15\" version=\"2\"></rate-limit>\r\n    <log-to-eventhub logger-id=\"16\">\r\n                      @( string.Join(\",\", DateTime.UtcNow, context.Deployment.ServiceName, context.RequestId, context.Request.IpAddress, context.Operation.Name) ) \r\n                  </log-to-eventhub>\r\n    <quota-by-key calls=\"40\" counter-key=\"cc\" renewal-period=\"3600\" increment-count=\"@(context.Request.Method == &quot;POST&quot; ? 1:2)\" />\r\n    <base />\r\n  </inbound>\r\n  <backend>\r\n    <base />\r\n  </backend>\r\n  <outbound>\r\n    <base />\r\n  </outbound>\r\n</policies>"),
// 	},
// }
Output:

func (*ProductPolicyClient) Delete

func (client *ProductPolicyClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, policyID PolicyIDName, ifMatch string, options *ProductPolicyClientDeleteOptions) (ProductPolicyClientDeleteResponse, error)

Delete - Deletes the policy configuration at the Product. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • policyID - The identifier of the Policy.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - ProductPolicyClientDeleteOptions contains the optional parameters for the ProductPolicyClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProductPolicy.json

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

func (*ProductPolicyClient) Get

func (client *ProductPolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, productID string, policyID PolicyIDName, options *ProductPolicyClientGetOptions) (ProductPolicyClientGetResponse, error)

Get - Get the policy configuration at the Product level. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • policyID - The identifier of the Policy.
  • options - ProductPolicyClientGetOptions contains the optional parameters for the ProductPolicyClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProductPolicy.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProductPolicyClient().Get(ctx, "rg1", "apimService1", "kjoshiarmTemplateProduct4", armapimanagement.PolicyIDNamePolicy, &armapimanagement.ProductPolicyClientGetOptions{Format: 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.PolicyContract = armapimanagement.PolicyContract{
// 	Name: to.Ptr("policy"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/products/policies"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/kjoshiarmTemplateProduct4/policies/policy"),
// 	Properties: &armapimanagement.PolicyContractProperties{
// 		Value: to.Ptr("<policies>\r\n  <inbound>\r\n    <base />\r\n  </inbound>\r\n  <backend>\r\n    <base />\r\n  </backend>\r\n  <outbound>\r\n    <base />\r\n  </outbound>\r\n  <on-error>\r\n    <base />\r\n  </on-error>\r\n</policies>"),
// 	},
// }
Output:

func (*ProductPolicyClient) GetEntityTag

func (client *ProductPolicyClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, productID string, policyID PolicyIDName, options *ProductPolicyClientGetEntityTagOptions) (ProductPolicyClientGetEntityTagResponse, error)

GetEntityTag - Get the ETag of the policy configuration at the Product level.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • policyID - The identifier of the Policy.
  • options - ProductPolicyClientGetEntityTagOptions contains the optional parameters for the ProductPolicyClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProductPolicy.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewProductPolicyClient().GetEntityTag(ctx, "rg1", "apimService1", "unlimited", armapimanagement.PolicyIDNamePolicy, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*ProductPolicyClient) ListByProduct

func (client *ProductPolicyClient) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, options *ProductPolicyClientListByProductOptions) (ProductPolicyClientListByProductResponse, error)

ListByProduct - Get the policy configuration at the Product level. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • options - ProductPolicyClientListByProductOptions contains the optional parameters for the ProductPolicyClient.ListByProduct method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductPolicies.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProductPolicyClient().ListByProduct(ctx, "rg1", "apimService1", "armTemplateProduct4", 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.PolicyCollection = armapimanagement.PolicyCollection{
// 	Count: to.Ptr[int64](1),
// 	Value: []*armapimanagement.PolicyContract{
// 		{
// 			Name: to.Ptr("policy"),
// 			Type: to.Ptr("Microsoft.ApiManagement/service/products/policies"),
// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/armTemplateProduct4/policies/policy"),
// 			Properties: &armapimanagement.PolicyContractProperties{
// 				Value: to.Ptr("<policies>\r\n  <inbound>\r\n    <base />\r\n  </inbound>\r\n  <backend>\r\n    <base />\r\n  </backend>\r\n  <outbound>\r\n    <base />\r\n  </outbound>\r\n  <on-error>\r\n    <base />\r\n  </on-error>\r\n</policies>"),
// 			},
// 	}},
// }
Output:

type ProductPolicyClientCreateOrUpdateOptions

type ProductPolicyClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

ProductPolicyClientCreateOrUpdateOptions contains the optional parameters for the ProductPolicyClient.CreateOrUpdate method.

type ProductPolicyClientCreateOrUpdateResponse

type ProductPolicyClientCreateOrUpdateResponse struct {
	// Policy Contract details.
	PolicyContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

ProductPolicyClientCreateOrUpdateResponse contains the response from method ProductPolicyClient.CreateOrUpdate.

type ProductPolicyClientDeleteOptions

type ProductPolicyClientDeleteOptions struct {
}

ProductPolicyClientDeleteOptions contains the optional parameters for the ProductPolicyClient.Delete method.

type ProductPolicyClientDeleteResponse

type ProductPolicyClientDeleteResponse struct {
}

ProductPolicyClientDeleteResponse contains the response from method ProductPolicyClient.Delete.

type ProductPolicyClientGetEntityTagOptions

type ProductPolicyClientGetEntityTagOptions struct {
}

ProductPolicyClientGetEntityTagOptions contains the optional parameters for the ProductPolicyClient.GetEntityTag method.

type ProductPolicyClientGetEntityTagResponse

type ProductPolicyClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

ProductPolicyClientGetEntityTagResponse contains the response from method ProductPolicyClient.GetEntityTag.

type ProductPolicyClientGetOptions

type ProductPolicyClientGetOptions struct {
	// Policy Export Format.
	Format *PolicyExportFormat
}

ProductPolicyClientGetOptions contains the optional parameters for the ProductPolicyClient.Get method.

type ProductPolicyClientGetResponse

type ProductPolicyClientGetResponse struct {
	// Policy Contract details.
	PolicyContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

ProductPolicyClientGetResponse contains the response from method ProductPolicyClient.Get.

type ProductPolicyClientListByProductOptions

type ProductPolicyClientListByProductOptions struct {
}

ProductPolicyClientListByProductOptions contains the optional parameters for the ProductPolicyClient.ListByProduct method.

type ProductPolicyClientListByProductResponse

type ProductPolicyClientListByProductResponse struct {
	// The response of the list policy operation.
	PolicyCollection
}

ProductPolicyClientListByProductResponse contains the response from method ProductPolicyClient.ListByProduct.

type ProductState

type ProductState string

ProductState - whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished.

const (
	ProductStateNotPublished ProductState = "notPublished"
	ProductStatePublished    ProductState = "published"
)

func PossibleProductStateValues

func PossibleProductStateValues() []ProductState

PossibleProductStateValues returns the possible values for the ProductState const type.

type ProductSubscriptionsClient

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

ProductSubscriptionsClient contains the methods for the ProductSubscriptions group. Don't use this type directly, use NewProductSubscriptionsClient() instead.

func NewProductSubscriptionsClient

func NewProductSubscriptionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProductSubscriptionsClient, error)

NewProductSubscriptionsClient creates a new instance of ProductSubscriptionsClient 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 (*ProductSubscriptionsClient) NewListPager

func (client *ProductSubscriptionsClient) NewListPager(resourceGroupName string, serviceName string, productID string, options *ProductSubscriptionsClientListOptions) *runtime.Pager[ProductSubscriptionsClientListResponse]

NewListPager - Lists the collection of subscriptions to the specified product.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • options - ProductSubscriptionsClientListOptions contains the optional parameters for the ProductSubscriptionsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductSubscriptions.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewProductSubscriptionsClient().NewListPager("rg1", "apimService1", "5600b57e7e8880006a060002", &armapimanagement.ProductSubscriptionsClientListOptions{Filter: nil,
	Top:  nil,
	Skip: 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.SubscriptionCollection = armapimanagement.SubscriptionCollection{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.SubscriptionContract{
	// 		{
	// 			Name: to.Ptr("5600b57e7e8880006a070002"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/products/subscriptions"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b57e7e8880006a060002/subscriptions/5600b57e7e8880006a070002"),
	// 			Properties: &armapimanagement.SubscriptionContractProperties{
	// 				CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-09-22T01:57:18.723Z"); return t}()),
	// 				OwnerID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1"),
	// 				Scope: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b57e7e8880006a060002"),
	// 				State: to.Ptr(armapimanagement.SubscriptionStateActive),
	// 			},
	// 	}},
	// }
}
Output:

type ProductSubscriptionsClientListOptions

type ProductSubscriptionsClientListOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | state | filter | eq | |
	// | user | expand | | |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

ProductSubscriptionsClientListOptions contains the optional parameters for the ProductSubscriptionsClient.NewListPager method.

type ProductSubscriptionsClientListResponse

type ProductSubscriptionsClientListResponse struct {
	// Paged Subscriptions list representation.
	SubscriptionCollection
}

ProductSubscriptionsClientListResponse contains the response from method ProductSubscriptionsClient.NewListPager.

type ProductTagResourceContractProperties

type ProductTagResourceContractProperties struct {
	// REQUIRED; Product name.
	Name *string

	// whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers
	// to call the product’s APIs immediately after subscribing. If true,
	// administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present
	// only if subscriptionRequired property is present and has a value of false.
	ApprovalRequired *bool

	// Product description. May include HTML formatting tags.
	Description *string

	// Identifier of the product in the form of /products/{productId}
	ID *string

	// whether product is published or not. Published products are discoverable by users of developer portal. Non published products
	// are visible only to administrators. Default state of Product is
	// notPublished.
	State *ProductState

	// Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred
	// to as "protected" and a valid subscription key is required for a request to an
	// API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included
	// in the product can be made without a subscription key. If property is omitted
	// when creating a new product it's value is assumed to be true.
	SubscriptionRequired *bool

	// Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited
	// per user subscriptions. Can be present only if subscriptionRequired
	// property is present and has a value of false.
	SubscriptionsLimit *int32

	// Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms
	// before they can complete the subscription process.
	Terms *string
}

ProductTagResourceContractProperties - Product profile.

func (ProductTagResourceContractProperties) MarshalJSON

func (p ProductTagResourceContractProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProductTagResourceContractProperties.

func (*ProductTagResourceContractProperties) UnmarshalJSON

func (p *ProductTagResourceContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProductTagResourceContractProperties.

type ProductUpdateParameters

type ProductUpdateParameters struct {
	// Product entity Update contract properties.
	Properties *ProductUpdateProperties
}

ProductUpdateParameters - Product Update parameters.

func (ProductUpdateParameters) MarshalJSON

func (p ProductUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProductUpdateParameters.

func (*ProductUpdateParameters) UnmarshalJSON

func (p *ProductUpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProductUpdateParameters.

type ProductUpdateProperties

type ProductUpdateProperties struct {
	// whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers
	// to call the product’s APIs immediately after subscribing. If true,
	// administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present
	// only if subscriptionRequired property is present and has a value of false.
	ApprovalRequired *bool

	// Product description. May include HTML formatting tags.
	Description *string

	// Product name.
	DisplayName *string

	// whether product is published or not. Published products are discoverable by users of developer portal. Non published products
	// are visible only to administrators. Default state of Product is
	// notPublished.
	State *ProductState

	// Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred
	// to as "protected" and a valid subscription key is required for a request to an
	// API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included
	// in the product can be made without a subscription key. If property is omitted
	// when creating a new product it's value is assumed to be true.
	SubscriptionRequired *bool

	// Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited
	// per user subscriptions. Can be present only if subscriptionRequired
	// property is present and has a value of false.
	SubscriptionsLimit *int32

	// Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms
	// before they can complete the subscription process.
	Terms *string
}

ProductUpdateProperties - Parameters supplied to the Update Product operation.

func (ProductUpdateProperties) MarshalJSON

func (p ProductUpdateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProductUpdateProperties.

func (*ProductUpdateProperties) UnmarshalJSON

func (p *ProductUpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProductUpdateProperties.

type ProductWikiClient

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

ProductWikiClient contains the methods for the ProductWiki group. Don't use this type directly, use NewProductWikiClient() instead.

func NewProductWikiClient

func NewProductWikiClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProductWikiClient, error)

NewProductWikiClient creates a new instance of ProductWikiClient 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 (*ProductWikiClient) CreateOrUpdate

func (client *ProductWikiClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, parameters WikiContract, options *ProductWikiClientCreateOrUpdateOptions) (ProductWikiClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates a new Wiki for a Product or updates an existing one. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • parameters - Create parameters.
  • options - ProductWikiClientCreateOrUpdateOptions contains the optional parameters for the ProductWikiClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductWiki.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProductWikiClient().CreateOrUpdate(ctx, "rg1", "apimService1", "57d1f7558aa04f15146d9d8a", armapimanagement.WikiContract{
	Properties: &armapimanagement.WikiContractProperties{
		Documents: []*armapimanagement.WikiDocumentationContract{
			{
				DocumentationID: to.Ptr("docId1"),
			},
			{
				DocumentationID: to.Ptr("docId2"),
			}},
	},
}, &armapimanagement.ProductWikiClientCreateOrUpdateOptions{IfMatch: 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.WikiContract = armapimanagement.WikiContract{
// 	Name: to.Ptr("default"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/products/wikis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/57d1f7558aa04f15146d9d8a/wikis/default"),
// 	Properties: &armapimanagement.WikiContractProperties{
// 		Documents: []*armapimanagement.WikiDocumentationContract{
// 			{
// 				DocumentationID: to.Ptr("docId1"),
// 			},
// 			{
// 				DocumentationID: to.Ptr("docId2"),
// 		}},
// 	},
// }
Output:

func (*ProductWikiClient) Delete

func (client *ProductWikiClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, ifMatch string, options *ProductWikiClientDeleteOptions) (ProductWikiClientDeleteResponse, error)

Delete - Deletes the specified Wiki from a Product. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - ProductWikiClientDeleteOptions contains the optional parameters for the ProductWikiClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProductWiki.json

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

func (*ProductWikiClient) Get

func (client *ProductWikiClient) Get(ctx context.Context, resourceGroupName string, serviceName string, productID string, options *ProductWikiClientGetOptions) (ProductWikiClientGetResponse, error)

Get - Gets the details of the Wiki for a Product specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • options - ProductWikiClientGetOptions contains the optional parameters for the ProductWikiClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProductWiki.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProductWikiClient().Get(ctx, "rg1", "apimService1", "57d1f7558aa04f15146d9d8a", 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.WikiContract = armapimanagement.WikiContract{
// 	Name: to.Ptr("default"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/products/wikis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/57d1f7558aa04f15146d9d8a/wikis/default"),
// 	Properties: &armapimanagement.WikiContractProperties{
// 		Documents: []*armapimanagement.WikiDocumentationContract{
// 			{
// 				DocumentationID: to.Ptr("docId1"),
// 			},
// 			{
// 				DocumentationID: to.Ptr("docId2"),
// 		}},
// 	},
// }
Output:

func (*ProductWikiClient) GetEntityTag

func (client *ProductWikiClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, productID string, options *ProductWikiClientGetEntityTagOptions) (ProductWikiClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • options - ProductWikiClientGetEntityTagOptions contains the optional parameters for the ProductWikiClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProductWiki.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewProductWikiClient().GetEntityTag(ctx, "rg1", "apimService1", "57d1f7558aa04f15146d9d8a", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*ProductWikiClient) Update

func (client *ProductWikiClient) Update(ctx context.Context, resourceGroupName string, serviceName string, productID string, ifMatch string, parameters WikiUpdateContract, options *ProductWikiClientUpdateOptions) (ProductWikiClientUpdateResponse, error)

Update - Updates the details of the Wiki for a Product specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - Wiki Update parameters.
  • options - ProductWikiClientUpdateOptions contains the optional parameters for the ProductWikiClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateProductWiki.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProductWikiClient().Update(ctx, "rg1", "apimService1", "57d1f7558aa04f15146d9d8a", "*", armapimanagement.WikiUpdateContract{
	Properties: &armapimanagement.WikiContractProperties{
		Documents: []*armapimanagement.WikiDocumentationContract{
			{
				DocumentationID: to.Ptr("docId1"),
			}},
	},
}, 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.WikiContract = armapimanagement.WikiContract{
// 	Name: to.Ptr("default"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/products/wikis"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/57d1f7558aa04f15146d9d8a/wikis/default"),
// 	Properties: &armapimanagement.WikiContractProperties{
// 		Documents: []*armapimanagement.WikiDocumentationContract{
// 			{
// 				DocumentationID: to.Ptr("docId1"),
// 		}},
// 	},
// }
Output:

type ProductWikiClientCreateOrUpdateOptions

type ProductWikiClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

ProductWikiClientCreateOrUpdateOptions contains the optional parameters for the ProductWikiClient.CreateOrUpdate method.

type ProductWikiClientCreateOrUpdateResponse

type ProductWikiClientCreateOrUpdateResponse struct {
	// Wiki properties
	WikiContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

ProductWikiClientCreateOrUpdateResponse contains the response from method ProductWikiClient.CreateOrUpdate.

type ProductWikiClientDeleteOptions

type ProductWikiClientDeleteOptions struct {
}

ProductWikiClientDeleteOptions contains the optional parameters for the ProductWikiClient.Delete method.

type ProductWikiClientDeleteResponse

type ProductWikiClientDeleteResponse struct {
}

ProductWikiClientDeleteResponse contains the response from method ProductWikiClient.Delete.

type ProductWikiClientGetEntityTagOptions

type ProductWikiClientGetEntityTagOptions struct {
}

ProductWikiClientGetEntityTagOptions contains the optional parameters for the ProductWikiClient.GetEntityTag method.

type ProductWikiClientGetEntityTagResponse

type ProductWikiClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

ProductWikiClientGetEntityTagResponse contains the response from method ProductWikiClient.GetEntityTag.

type ProductWikiClientGetOptions

type ProductWikiClientGetOptions struct {
}

ProductWikiClientGetOptions contains the optional parameters for the ProductWikiClient.Get method.

type ProductWikiClientGetResponse

type ProductWikiClientGetResponse struct {
	// Wiki properties
	WikiContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

ProductWikiClientGetResponse contains the response from method ProductWikiClient.Get.

type ProductWikiClientUpdateOptions

type ProductWikiClientUpdateOptions struct {
}

ProductWikiClientUpdateOptions contains the optional parameters for the ProductWikiClient.Update method.

type ProductWikiClientUpdateResponse

type ProductWikiClientUpdateResponse struct {
	// Wiki properties
	WikiContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

ProductWikiClientUpdateResponse contains the response from method ProductWikiClient.Update.

type ProductWikisClient

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

ProductWikisClient contains the methods for the ProductWikis group. Don't use this type directly, use NewProductWikisClient() instead.

func NewProductWikisClient

func NewProductWikisClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProductWikisClient, error)

NewProductWikisClient creates a new instance of ProductWikisClient 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 (*ProductWikisClient) NewListPager

func (client *ProductWikisClient) NewListPager(resourceGroupName string, serviceName string, productID string, options *ProductWikisClientListOptions) *runtime.Pager[ProductWikisClientListResponse]

NewListPager - Gets the details of the Wiki for a Product specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • options - ProductWikisClientListOptions contains the optional parameters for the ProductWikisClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductWikis.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewProductWikisClient().NewListPager("rg1", "apimService1", "57d1f7558aa04f15146d9d8a", &armapimanagement.ProductWikisClientListOptions{Filter: nil,
	Top:  nil,
	Skip: 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.WikiCollection = armapimanagement.WikiCollection{
	// 	Value: []*armapimanagement.WikiContract{
	// 		{
	// 			Name: to.Ptr("default"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/products/wikis"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/57d1f7558aa04f15146d9d8a/wikis/default"),
	// 			Properties: &armapimanagement.WikiContractProperties{
	// 				Documents: []*armapimanagement.WikiDocumentationContract{
	// 					{
	// 						DocumentationID: to.Ptr("docId1"),
	// 					},
	// 					{
	// 						DocumentationID: to.Ptr("docId2"),
	// 				}},
	// 			},
	// 	}},
	// }
}
Output:

type ProductWikisClientListOptions

type ProductWikisClientListOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | eq | contains |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

ProductWikisClientListOptions contains the optional parameters for the ProductWikisClient.NewListPager method.

type ProductWikisClientListResponse

type ProductWikisClientListResponse struct {
	// Paged Wiki list representation.
	WikiCollection

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

ProductWikisClientListResponse contains the response from method ProductWikisClient.NewListPager.

type Protocol

type Protocol string
const (
	ProtocolHTTP  Protocol = "http"
	ProtocolHTTPS Protocol = "https"
	ProtocolWs    Protocol = "ws"
	ProtocolWss   Protocol = "wss"
)

func PossibleProtocolValues

func PossibleProtocolValues() []Protocol

PossibleProtocolValues returns the possible values for the Protocol const type.

type ProxyResource

type ProxyResource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

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

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

ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location

func (ProxyResource) MarshalJSON

func (p ProxyResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProxyResource.

func (*ProxyResource) UnmarshalJSON

func (p *ProxyResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.

type PublicNetworkAccess

type PublicNetworkAccess string

PublicNetworkAccess - Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'

const (
	PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled"
	PublicNetworkAccessEnabled  PublicNetworkAccess = "Enabled"
)

func PossiblePublicNetworkAccessValues

func PossiblePublicNetworkAccessValues() []PublicNetworkAccess

PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type.

type QuotaByCounterKeysClient

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

QuotaByCounterKeysClient contains the methods for the QuotaByCounterKeys group. Don't use this type directly, use NewQuotaByCounterKeysClient() instead.

func NewQuotaByCounterKeysClient

func NewQuotaByCounterKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*QuotaByCounterKeysClient, error)

NewQuotaByCounterKeysClient creates a new instance of QuotaByCounterKeysClient 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 (*QuotaByCounterKeysClient) ListByService

func (client *QuotaByCounterKeysClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, quotaCounterKey string, options *QuotaByCounterKeysClientListByServiceOptions) (QuotaByCounterKeysClientListByServiceResponse, error)

ListByService - Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • quotaCounterKey - Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key
  • options - QuotaByCounterKeysClientListByServiceOptions contains the optional parameters for the QuotaByCounterKeysClient.ListByService method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetQuotaCounterKeys.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewQuotaByCounterKeysClient().ListByService(ctx, "rg1", "apimService1", "ba", 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.QuotaCounterCollection = armapimanagement.QuotaCounterCollection{
// 	Value: []*armapimanagement.QuotaCounterContract{
// 		{
// 			CounterKey: to.Ptr("ba"),
// 			PeriodEndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-08T16:54:40.000Z"); return t}()),
// 			PeriodKey: to.Ptr("0_P3Y6M4DT12H30M5S"),
// 			PeriodStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2014-08-04T04:24:35.000Z"); return t}()),
// 			Value: &armapimanagement.QuotaCounterValueContractProperties{
// 				CallsCount: to.Ptr[int32](5),
// 				KbTransferred: to.Ptr[float64](2.5830078125),
// 			},
// 	}},
// }
Output:

func (*QuotaByCounterKeysClient) Update

func (client *QuotaByCounterKeysClient) Update(ctx context.Context, resourceGroupName string, serviceName string, quotaCounterKey string, parameters QuotaCounterValueUpdateContract, options *QuotaByCounterKeysClientUpdateOptions) (QuotaByCounterKeysClientUpdateResponse, error)

Update - Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • quotaCounterKey - Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key
  • parameters - The value of the quota counter to be applied to all quota counter periods.
  • options - QuotaByCounterKeysClientUpdateOptions contains the optional parameters for the QuotaByCounterKeysClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateQuotaCounterKey.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewQuotaByCounterKeysClient().Update(ctx, "rg1", "apimService1", "ba", armapimanagement.QuotaCounterValueUpdateContract{
	Properties: &armapimanagement.QuotaCounterValueContractProperties{
		CallsCount:    to.Ptr[int32](0),
		KbTransferred: to.Ptr[float64](2.5630078125),
	},
}, 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.QuotaCounterCollection = armapimanagement.QuotaCounterCollection{
// 	Value: []*armapimanagement.QuotaCounterContract{
// 		{
// 			CounterKey: to.Ptr("ba"),
// 			PeriodEndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-08T16:54:40.000Z"); return t}()),
// 			PeriodKey: to.Ptr("0_P3Y6M4DT12H30M5S"),
// 			PeriodStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2014-08-04T04:24:35.000Z"); return t}()),
// 			Value: &armapimanagement.QuotaCounterValueContractProperties{
// 				CallsCount: to.Ptr[int32](5),
// 				KbTransferred: to.Ptr[float64](2.5830078125),
// 			},
// 	}},
// }
Output:

type QuotaByCounterKeysClientListByServiceOptions

type QuotaByCounterKeysClientListByServiceOptions struct {
}

QuotaByCounterKeysClientListByServiceOptions contains the optional parameters for the QuotaByCounterKeysClient.ListByService method.

type QuotaByCounterKeysClientListByServiceResponse

type QuotaByCounterKeysClientListByServiceResponse struct {
	// Paged Quota Counter list representation.
	QuotaCounterCollection
}

QuotaByCounterKeysClientListByServiceResponse contains the response from method QuotaByCounterKeysClient.ListByService.

type QuotaByCounterKeysClientUpdateOptions

type QuotaByCounterKeysClientUpdateOptions struct {
}

QuotaByCounterKeysClientUpdateOptions contains the optional parameters for the QuotaByCounterKeysClient.Update method.

type QuotaByCounterKeysClientUpdateResponse

type QuotaByCounterKeysClientUpdateResponse struct {
	// Paged Quota Counter list representation.
	QuotaCounterCollection
}

QuotaByCounterKeysClientUpdateResponse contains the response from method QuotaByCounterKeysClient.Update.

type QuotaByPeriodKeysClient

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

QuotaByPeriodKeysClient contains the methods for the QuotaByPeriodKeys group. Don't use this type directly, use NewQuotaByPeriodKeysClient() instead.

func NewQuotaByPeriodKeysClient

func NewQuotaByPeriodKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*QuotaByPeriodKeysClient, error)

NewQuotaByPeriodKeysClient creates a new instance of QuotaByPeriodKeysClient 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 (*QuotaByPeriodKeysClient) Get

func (client *QuotaByPeriodKeysClient) Get(ctx context.Context, resourceGroupName string, serviceName string, quotaCounterKey string, quotaPeriodKey string, options *QuotaByPeriodKeysClientGetOptions) (QuotaByPeriodKeysClientGetResponse, error)

Get - Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • quotaCounterKey - Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key
  • quotaPeriodKey - Quota period key identifier.
  • options - QuotaByPeriodKeysClientGetOptions contains the optional parameters for the QuotaByPeriodKeysClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetQuotaCounterKeysByQuotaPeriod.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewQuotaByPeriodKeysClient().Get(ctx, "rg1", "apimService1", "ba", "0_P3Y6M4DT12H30M5S", 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.QuotaCounterContract = armapimanagement.QuotaCounterContract{
// 	CounterKey: to.Ptr("ba"),
// 	PeriodEndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-08T16:54:40.000Z"); return t}()),
// 	PeriodKey: to.Ptr("0_P3Y6M4DT12H30M5S"),
// 	PeriodStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2014-08-04T04:24:35.000Z"); return t}()),
// 	Value: &armapimanagement.QuotaCounterValueContractProperties{
// 		CallsCount: to.Ptr[int32](0),
// 		KbTransferred: to.Ptr[float64](2.5625),
// 	},
// }
Output:

func (*QuotaByPeriodKeysClient) Update

func (client *QuotaByPeriodKeysClient) Update(ctx context.Context, resourceGroupName string, serviceName string, quotaCounterKey string, quotaPeriodKey string, parameters QuotaCounterValueUpdateContract, options *QuotaByPeriodKeysClientUpdateOptions) (QuotaByPeriodKeysClientUpdateResponse, error)

Update - Updates an existing quota counter value in the specified service instance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • quotaCounterKey - Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key
  • quotaPeriodKey - Quota period key identifier.
  • parameters - The value of the Quota counter to be applied on the specified period.
  • options - QuotaByPeriodKeysClientUpdateOptions contains the optional parameters for the QuotaByPeriodKeysClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateQuotaCounterKeyByQuotaPeriod.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewQuotaByPeriodKeysClient().Update(ctx, "rg1", "apimService1", "ba", "0_P3Y6M4DT12H30M5S", armapimanagement.QuotaCounterValueUpdateContract{
	Properties: &armapimanagement.QuotaCounterValueContractProperties{
		CallsCount:    to.Ptr[int32](0),
		KbTransferred: to.Ptr[float64](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.QuotaCounterContract = armapimanagement.QuotaCounterContract{
// 	CounterKey: to.Ptr("ba"),
// 	PeriodEndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-08T16:54:40.000Z"); return t}()),
// 	PeriodKey: to.Ptr("0_P3Y6M4DT12H30M5S"),
// 	PeriodStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2014-08-04T04:24:35.000Z"); return t}()),
// 	Value: &armapimanagement.QuotaCounterValueContractProperties{
// 		CallsCount: to.Ptr[int32](0),
// 		KbTransferred: to.Ptr[float64](2.5625),
// 	},
// }
Output:

type QuotaByPeriodKeysClientGetOptions

type QuotaByPeriodKeysClientGetOptions struct {
}

QuotaByPeriodKeysClientGetOptions contains the optional parameters for the QuotaByPeriodKeysClient.Get method.

type QuotaByPeriodKeysClientGetResponse

type QuotaByPeriodKeysClientGetResponse struct {
	// Quota counter details.
	QuotaCounterContract
}

QuotaByPeriodKeysClientGetResponse contains the response from method QuotaByPeriodKeysClient.Get.

type QuotaByPeriodKeysClientUpdateOptions

type QuotaByPeriodKeysClientUpdateOptions struct {
}

QuotaByPeriodKeysClientUpdateOptions contains the optional parameters for the QuotaByPeriodKeysClient.Update method.

type QuotaByPeriodKeysClientUpdateResponse

type QuotaByPeriodKeysClientUpdateResponse struct {
	// Quota counter details.
	QuotaCounterContract
}

QuotaByPeriodKeysClientUpdateResponse contains the response from method QuotaByPeriodKeysClient.Update.

type QuotaCounterCollection

type QuotaCounterCollection struct {
	// Total record count number across all pages.
	Count *int64

	// Next page link if any.
	NextLink *string

	// Quota counter values.
	Value []*QuotaCounterContract
}

QuotaCounterCollection - Paged Quota Counter list representation.

func (QuotaCounterCollection) MarshalJSON

func (q QuotaCounterCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type QuotaCounterCollection.

func (*QuotaCounterCollection) UnmarshalJSON

func (q *QuotaCounterCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type QuotaCounterCollection.

type QuotaCounterContract

type QuotaCounterContract struct {
	// REQUIRED; The Key value of the Counter. Must not be empty.
	CounterKey *string

	// REQUIRED; The date of the end of Counter Period. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified
	// by the ISO 8601 standard.
	PeriodEndTime *time.Time

	// REQUIRED; Identifier of the Period for which the counter was collected. Must not be empty.
	PeriodKey *string

	// REQUIRED; The date of the start of Counter Period. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified
	// by the ISO 8601 standard.
	PeriodStartTime *time.Time

	// Quota Value Properties
	Value *QuotaCounterValueContractProperties
}

QuotaCounterContract - Quota counter details.

func (QuotaCounterContract) MarshalJSON

func (q QuotaCounterContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type QuotaCounterContract.

func (*QuotaCounterContract) UnmarshalJSON

func (q *QuotaCounterContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type QuotaCounterContract.

type QuotaCounterValueContract

type QuotaCounterValueContract struct {
	// Quota counter Value Properties.
	Value *QuotaCounterValueContractProperties
}

QuotaCounterValueContract - Quota counter value details.

func (QuotaCounterValueContract) MarshalJSON

func (q QuotaCounterValueContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type QuotaCounterValueContract.

func (*QuotaCounterValueContract) UnmarshalJSON

func (q *QuotaCounterValueContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type QuotaCounterValueContract.

type QuotaCounterValueContractProperties

type QuotaCounterValueContractProperties struct {
	// Number of times Counter was called.
	CallsCount *int32

	// Data Transferred in KiloBytes.
	KbTransferred *float64
}

QuotaCounterValueContractProperties - Quota counter value details.

func (QuotaCounterValueContractProperties) MarshalJSON

func (q QuotaCounterValueContractProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type QuotaCounterValueContractProperties.

func (*QuotaCounterValueContractProperties) UnmarshalJSON

func (q *QuotaCounterValueContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type QuotaCounterValueContractProperties.

type QuotaCounterValueUpdateContract

type QuotaCounterValueUpdateContract struct {
	// Quota counter value details.
	Properties *QuotaCounterValueContractProperties
}

QuotaCounterValueUpdateContract - Quota counter value details.

func (QuotaCounterValueUpdateContract) MarshalJSON

func (q QuotaCounterValueUpdateContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type QuotaCounterValueUpdateContract.

func (*QuotaCounterValueUpdateContract) UnmarshalJSON

func (q *QuotaCounterValueUpdateContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type QuotaCounterValueUpdateContract.

type RecipientEmailCollection

type RecipientEmailCollection struct {
	// Total record count number across all pages.
	Count *int64

	// Next page link if any.
	NextLink *string

	// Page values.
	Value []*RecipientEmailContract
}

RecipientEmailCollection - Paged Recipient User list representation.

func (RecipientEmailCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type RecipientEmailCollection.

func (*RecipientEmailCollection) UnmarshalJSON

func (r *RecipientEmailCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RecipientEmailCollection.

type RecipientEmailContract

type RecipientEmailContract struct {
	// Recipient Email contract properties.
	Properties *RecipientEmailContractProperties

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

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

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

RecipientEmailContract - Recipient Email details.

func (RecipientEmailContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type RecipientEmailContract.

func (*RecipientEmailContract) UnmarshalJSON

func (r *RecipientEmailContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RecipientEmailContract.

type RecipientEmailContractProperties

type RecipientEmailContractProperties struct {
	// User Email subscribed to notification.
	Email *string
}

RecipientEmailContractProperties - Recipient Email Contract Properties.

func (RecipientEmailContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type RecipientEmailContractProperties.

func (*RecipientEmailContractProperties) UnmarshalJSON

func (r *RecipientEmailContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RecipientEmailContractProperties.

type RecipientUserCollection

type RecipientUserCollection struct {
	// Total record count number across all pages.
	Count *int64

	// Next page link if any.
	NextLink *string

	// Page values.
	Value []*RecipientUserContract
}

RecipientUserCollection - Paged Recipient User list representation.

func (RecipientUserCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type RecipientUserCollection.

func (*RecipientUserCollection) UnmarshalJSON

func (r *RecipientUserCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RecipientUserCollection.

type RecipientUserContract

type RecipientUserContract struct {
	// Recipient User entity contract properties.
	Properties *RecipientUsersContractProperties

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

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

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

RecipientUserContract - Recipient User details.

func (RecipientUserContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type RecipientUserContract.

func (*RecipientUserContract) UnmarshalJSON

func (r *RecipientUserContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RecipientUserContract.

type RecipientUsersContractProperties

type RecipientUsersContractProperties struct {
	// API Management UserId subscribed to notification.
	UserID *string
}

RecipientUsersContractProperties - Recipient User Contract Properties.

func (RecipientUsersContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type RecipientUsersContractProperties.

func (*RecipientUsersContractProperties) UnmarshalJSON

func (r *RecipientUsersContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RecipientUsersContractProperties.

type RecipientsContractProperties

type RecipientsContractProperties struct {
	// List of Emails subscribed for the notification.
	Emails []*string

	// List of Users subscribed for the notification.
	Users []*string
}

RecipientsContractProperties - Notification Parameter contract.

func (RecipientsContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type RecipientsContractProperties.

func (*RecipientsContractProperties) UnmarshalJSON

func (r *RecipientsContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RecipientsContractProperties.

type RegionClient

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

RegionClient contains the methods for the Region group. Don't use this type directly, use NewRegionClient() instead.

func NewRegionClient

func NewRegionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegionClient, error)

NewRegionClient creates a new instance of RegionClient 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 (*RegionClient) NewListByServicePager

func (client *RegionClient) NewListByServicePager(resourceGroupName string, serviceName string, options *RegionClientListByServiceOptions) *runtime.Pager[RegionClientListByServiceResponse]

NewListByServicePager - Lists all azure regions in which the service exists.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - RegionClientListByServiceOptions contains the optional parameters for the RegionClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListRegions.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewRegionClient().NewListByServicePager("rg1", "apimService1", 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.RegionListResult = armapimanagement.RegionListResult{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.RegionContract{
	// 		{
	// 			Name: to.Ptr("West US"),
	// 			IsDeleted: to.Ptr(false),
	// 			IsMasterRegion: to.Ptr(true),
	// 	}},
	// }
}
Output:

type RegionClientListByServiceOptions

type RegionClientListByServiceOptions struct {
}

RegionClientListByServiceOptions contains the optional parameters for the RegionClient.NewListByServicePager method.

type RegionClientListByServiceResponse

type RegionClientListByServiceResponse struct {
	// Lists Regions operation response details.
	RegionListResult
}

RegionClientListByServiceResponse contains the response from method RegionClient.NewListByServicePager.

type RegionContract

type RegionContract struct {
	// whether Region is deleted.
	IsDeleted *bool

	// whether Region is the master region.
	IsMasterRegion *bool

	// READ-ONLY; Region name.
	Name *string
}

RegionContract - Region profile.

func (RegionContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type RegionContract.

func (*RegionContract) UnmarshalJSON

func (r *RegionContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegionContract.

type RegionListResult

type RegionListResult struct {
	// Total record count number across all pages.
	Count *int64

	// Next page link if any.
	NextLink *string

	// Lists of Regions.
	Value []*RegionContract
}

RegionListResult - Lists Regions operation response details.

func (RegionListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type RegionListResult.

func (*RegionListResult) UnmarshalJSON

func (r *RegionListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegionListResult.

type RegistrationDelegationSettingsProperties

type RegistrationDelegationSettingsProperties struct {
	// Enable or disable delegation for user registration.
	Enabled *bool
}

RegistrationDelegationSettingsProperties - User registration delegation settings properties.

func (RegistrationDelegationSettingsProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type RegistrationDelegationSettingsProperties.

func (*RegistrationDelegationSettingsProperties) UnmarshalJSON

func (r *RegistrationDelegationSettingsProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegistrationDelegationSettingsProperties.

type RemotePrivateEndpointConnectionWrapper

type RemotePrivateEndpointConnectionWrapper struct {
	// Private Endpoint connection resource id
	ID *string

	// Private Endpoint Connection Name
	Name *string

	// Resource properties.
	Properties *PrivateEndpointConnectionWrapperProperties

	// Private Endpoint Connection Resource Type
	Type *string
}

RemotePrivateEndpointConnectionWrapper - Remote Private Endpoint Connection resource.

func (RemotePrivateEndpointConnectionWrapper) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type RemotePrivateEndpointConnectionWrapper.

func (*RemotePrivateEndpointConnectionWrapper) UnmarshalJSON

func (r *RemotePrivateEndpointConnectionWrapper) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RemotePrivateEndpointConnectionWrapper.

type ReportCollection

type ReportCollection struct {
	// Total record count number across all pages.
	Count *int64

	// Next page link if any.
	NextLink *string

	// Page values.
	Value []*ReportRecordContract
}

ReportCollection - Paged Report records list representation.

func (ReportCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ReportCollection.

func (*ReportCollection) UnmarshalJSON

func (r *ReportCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ReportCollection.

type ReportRecordContract

type ReportRecordContract struct {
	// API identifier path. /apis/{apiId}
	APIID *string

	// API region identifier.
	APIRegion *string

	// Average time it took to process request.
	APITimeAvg *float64

	// Maximum time it took to process request.
	APITimeMax *float64

	// Minimum time it took to process request.
	APITimeMin *float64

	// Bandwidth consumed.
	Bandwidth *int64

	// Number of times when content was served from cache policy.
	CacheHitCount *int32

	// Number of times content was fetched from backend.
	CacheMissCount *int32

	// Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden
	// and HttpStatusCode.TooManyRequests
	CallCountBlocked *int32

	// Number of calls failed due to gateway or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and
	// any Code between HttpStatusCode.InternalServerError (500) and 600
	CallCountFailed *int32

	// Number of other calls.
	CallCountOther *int32

	// Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect
	CallCountSuccess *int32

	// Total number of calls.
	CallCountTotal *int32

	// Country to which this record data is related.
	Country *string

	// Length of aggregation period. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601
	// format (http://en.wikipedia.org/wiki/ISO_8601#Durations).
	Interval *string

	// Name depending on report endpoint specifies product, API, operation or developer name.
	Name *string

	// Operation identifier path. /apis/{apiId}/operations/{operationId}
	OperationID *string

	// Country region to which this record data is related.
	Region *string

	// Average time it took to process request on backend.
	ServiceTimeAvg *float64

	// Maximum time it took to process request on backend.
	ServiceTimeMax *float64

	// Minimum time it took to process request on backend.
	ServiceTimeMin *float64

	// Subscription identifier path. /subscriptions/{subscriptionId}
	SubscriptionID *string

	// Start of aggregation period. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601
	// standard.
	Timestamp *time.Time

	// Zip code to which this record data is related.
	Zip *string

	// READ-ONLY; Product identifier path. /products/{productId}
	ProductID *string

	// READ-ONLY; User identifier path. /users/{userId}
	UserID *string
}

ReportRecordContract - Report data.

func (ReportRecordContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ReportRecordContract.

func (*ReportRecordContract) UnmarshalJSON

func (r *ReportRecordContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ReportRecordContract.

type ReportsClient

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

ReportsClient contains the methods for the Reports group. Don't use this type directly, use NewReportsClient() instead.

func NewReportsClient

func NewReportsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReportsClient, error)

NewReportsClient creates a new instance of ReportsClient 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 (*ReportsClient) NewListByAPIPager

func (client *ReportsClient) NewListByAPIPager(resourceGroupName string, serviceName string, filter string, options *ReportsClientListByAPIOptions) *runtime.Pager[ReportsClientListByAPIResponse]

NewListByAPIPager - Lists report records by API.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • filter - The filter to apply on the operation.
  • options - ReportsClientListByAPIOptions contains the optional parameters for the ReportsClient.NewListByAPIPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByApi.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewReportsClient().NewListByAPIPager("rg1", "apimService1", "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", &armapimanagement.ReportsClientListByAPIOptions{Top: nil,
	Skip:    nil,
	Orderby: 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.ReportCollection = armapimanagement.ReportCollection{
	// 	Count: to.Ptr[int64](2),
	// 	Value: []*armapimanagement.ReportRecordContract{
	// 		{
	// 			Name: to.Ptr("Echo API"),
	// 			APIID: to.Ptr("/apis/5600b59475ff190048040001"),
	// 			APITimeAvg: to.Ptr[float64](0),
	// 			APITimeMax: to.Ptr[float64](0),
	// 			APITimeMin: to.Ptr[float64](0),
	// 			Bandwidth: to.Ptr[int64](0),
	// 			CacheHitCount: to.Ptr[int32](0),
	// 			CacheMissCount: to.Ptr[int32](0),
	// 			CallCountBlocked: to.Ptr[int32](0),
	// 			CallCountFailed: to.Ptr[int32](0),
	// 			CallCountOther: to.Ptr[int32](0),
	// 			CallCountSuccess: to.Ptr[int32](0),
	// 			CallCountTotal: to.Ptr[int32](0),
	// 			ServiceTimeAvg: to.Ptr[float64](0),
	// 			ServiceTimeMax: to.Ptr[float64](0),
	// 			ServiceTimeMin: to.Ptr[float64](0),
	// 		},
	// 		{
	// 			Name: to.Ptr("httpbin"),
	// 			APIID: to.Ptr("/apis/57a03a13e4bbd5119c8b19e9"),
	// 			APITimeAvg: to.Ptr[float64](1015.7607923076923),
	// 			APITimeMax: to.Ptr[float64](1819.2173),
	// 			APITimeMin: to.Ptr[float64](330.3206),
	// 			Bandwidth: to.Ptr[int64](11019),
	// 			CacheHitCount: to.Ptr[int32](0),
	// 			CacheMissCount: to.Ptr[int32](0),
	// 			CallCountBlocked: to.Ptr[int32](1),
	// 			CallCountFailed: to.Ptr[int32](0),
	// 			CallCountOther: to.Ptr[int32](0),
	// 			CallCountSuccess: to.Ptr[int32](13),
	// 			CallCountTotal: to.Ptr[int32](14),
	// 			ServiceTimeAvg: to.Ptr[float64](957.094776923077),
	// 			ServiceTimeMax: to.Ptr[float64](1697.3612),
	// 			ServiceTimeMin: to.Ptr[float64](215.24),
	// 	}},
	// }
}
Output:

func (*ReportsClient) NewListByGeoPager

func (client *ReportsClient) NewListByGeoPager(resourceGroupName string, serviceName string, filter string, options *ReportsClientListByGeoOptions) *runtime.Pager[ReportsClientListByGeoResponse]

NewListByGeoPager - Lists report records by geography.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • filter - | Field | Usage | Supported operators | Supported functions | |-------------|-------------|-------------|-------------| | timestamp | filter | ge, le | | | country | select | | | | region | select | | | | zip | select | | | | apiRegion | filter | eq | | | userId | filter | eq | | | productId | filter | eq | | | subscriptionId | filter | eq | | | apiId | filter | eq | | | operationId | filter | eq | | | callCountSuccess | select | | | | callCountBlocked | select | | | | callCountFailed | select | | | | callCountOther | select | | | | bandwidth | select, orderBy | | | | cacheHitsCount | select | | | | cacheMissCount | select | | | | apiTimeAvg | select | | | | apiTimeMin | select | | | | apiTimeMax | select | | | | serviceTimeAvg | select | | | | serviceTimeMin | select | | | | serviceTimeMax | select | | |
  • options - ReportsClientListByGeoOptions contains the optional parameters for the ReportsClient.NewListByGeoPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByGeo.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewReportsClient().NewListByGeoPager("rg1", "apimService1", "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", &armapimanagement.ReportsClientListByGeoOptions{Top: nil,
	Skip: 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.ReportCollection = armapimanagement.ReportCollection{
	// 	Value: []*armapimanagement.ReportRecordContract{
	// 		{
	// 			APITimeAvg: to.Ptr[float64](1015.7607923076923),
	// 			APITimeMax: to.Ptr[float64](1819.2173),
	// 			APITimeMin: to.Ptr[float64](330.3206),
	// 			Bandwidth: to.Ptr[int64](11019),
	// 			CacheHitCount: to.Ptr[int32](0),
	// 			CacheMissCount: to.Ptr[int32](0),
	// 			CallCountBlocked: to.Ptr[int32](1),
	// 			CallCountFailed: to.Ptr[int32](0),
	// 			CallCountOther: to.Ptr[int32](0),
	// 			CallCountSuccess: to.Ptr[int32](13),
	// 			CallCountTotal: to.Ptr[int32](14),
	// 			Country: to.Ptr("US"),
	// 			Region: to.Ptr("WA"),
	// 			ServiceTimeAvg: to.Ptr[float64](957.094776923077),
	// 			ServiceTimeMax: to.Ptr[float64](1697.3612),
	// 			ServiceTimeMin: to.Ptr[float64](215.24),
	// 			Zip: to.Ptr("98052"),
	// 	}},
	// }
}
Output:

func (*ReportsClient) NewListByOperationPager

func (client *ReportsClient) NewListByOperationPager(resourceGroupName string, serviceName string, filter string, options *ReportsClientListByOperationOptions) *runtime.Pager[ReportsClientListByOperationResponse]

NewListByOperationPager - Lists report records by API Operations.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • filter - | Field | Usage | Supported operators | Supported functions | |-------------|-------------|-------------|-------------| | timestamp | filter | ge, le | | | displayName | select, orderBy | | | | apiRegion | filter | eq | | | userId | filter | eq | | | productId | filter | eq | | | subscriptionId | filter | eq | | | apiId | filter | eq | | | operationId | select, filter | eq | | | callCountSuccess | select, orderBy | | | | callCountBlocked | select, orderBy | | | | callCountFailed | select, orderBy | | | | callCountOther | select, orderBy | | | | callCountTotal | select, orderBy | | | | bandwidth | select, orderBy | | | | cacheHitsCount | select | | | | cacheMissCount | select | | | | apiTimeAvg | select, orderBy | | | | apiTimeMin | select | | | | apiTimeMax | select | | | | serviceTimeAvg | select | | | | serviceTimeMin | select | | | | serviceTimeMax | select | | |
  • options - ReportsClientListByOperationOptions contains the optional parameters for the ReportsClient.NewListByOperationPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByOperation.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewReportsClient().NewListByOperationPager("rg1", "apimService1", "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", &armapimanagement.ReportsClientListByOperationOptions{Top: nil,
	Skip:    nil,
	Orderby: 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.ReportCollection = armapimanagement.ReportCollection{
	// 	Count: to.Ptr[int64](3),
	// 	Value: []*armapimanagement.ReportRecordContract{
	// 		{
	// 			Name: to.Ptr("get"),
	// 			OperationID: to.Ptr("/apis/57a03a13e4bbd5119c8b19e9/operations/57a03a1dd8d14f0a780d7d14"),
	// 			APIID: to.Ptr("/apis/57a03a13e4bbd5119c8b19e9"),
	// 			APITimeAvg: to.Ptr[float64](1015.7607923076923),
	// 			APITimeMax: to.Ptr[float64](1819.2173),
	// 			APITimeMin: to.Ptr[float64](330.3206),
	// 			Bandwidth: to.Ptr[int64](11019),
	// 			CacheHitCount: to.Ptr[int32](0),
	// 			CacheMissCount: to.Ptr[int32](0),
	// 			CallCountBlocked: to.Ptr[int32](1),
	// 			CallCountFailed: to.Ptr[int32](0),
	// 			CallCountOther: to.Ptr[int32](0),
	// 			CallCountSuccess: to.Ptr[int32](13),
	// 			CallCountTotal: to.Ptr[int32](14),
	// 			ServiceTimeAvg: to.Ptr[float64](957.094776923077),
	// 			ServiceTimeMax: to.Ptr[float64](1697.3612),
	// 			ServiceTimeMin: to.Ptr[float64](215.24),
	// 		},
	// 		{
	// 			Name: to.Ptr("GetWeatherInformation"),
	// 			OperationID: to.Ptr("/apis/57c999d1e4bbd50c988cb2c3/operations/57c999d1e4bbd50df889c93e"),
	// 			APIID: to.Ptr("/apis/57c999d1e4bbd50c988cb2c3"),
	// 			APITimeAvg: to.Ptr[float64](0),
	// 			APITimeMax: to.Ptr[float64](0),
	// 			APITimeMin: to.Ptr[float64](0),
	// 			Bandwidth: to.Ptr[int64](0),
	// 			CacheHitCount: to.Ptr[int32](0),
	// 			CacheMissCount: to.Ptr[int32](0),
	// 			CallCountBlocked: to.Ptr[int32](0),
	// 			CallCountFailed: to.Ptr[int32](0),
	// 			CallCountOther: to.Ptr[int32](0),
	// 			CallCountSuccess: to.Ptr[int32](0),
	// 			CallCountTotal: to.Ptr[int32](0),
	// 			ServiceTimeAvg: to.Ptr[float64](0),
	// 			ServiceTimeMax: to.Ptr[float64](0),
	// 			ServiceTimeMin: to.Ptr[float64](0),
	// 		},
	// 		{
	// 			Name: to.Ptr("GetCityForecastByZIP"),
	// 			OperationID: to.Ptr("/apis/57c999d1e4bbd50c988cb2c3/operations/57c999d1e4bbd50df889c93f"),
	// 			APIID: to.Ptr("/apis/57c999d1e4bbd50c988cb2c3"),
	// 			APITimeAvg: to.Ptr[float64](0),
	// 			APITimeMax: to.Ptr[float64](0),
	// 			APITimeMin: to.Ptr[float64](0),
	// 			Bandwidth: to.Ptr[int64](0),
	// 			CacheHitCount: to.Ptr[int32](0),
	// 			CacheMissCount: to.Ptr[int32](0),
	// 			CallCountBlocked: to.Ptr[int32](0),
	// 			CallCountFailed: to.Ptr[int32](0),
	// 			CallCountOther: to.Ptr[int32](0),
	// 			CallCountSuccess: to.Ptr[int32](0),
	// 			CallCountTotal: to.Ptr[int32](0),
	// 			ServiceTimeAvg: to.Ptr[float64](0),
	// 			ServiceTimeMax: to.Ptr[float64](0),
	// 			ServiceTimeMin: to.Ptr[float64](0),
	// 	}},
	// }
}
Output:

func (*ReportsClient) NewListByProductPager

func (client *ReportsClient) NewListByProductPager(resourceGroupName string, serviceName string, filter string, options *ReportsClientListByProductOptions) *runtime.Pager[ReportsClientListByProductResponse]

NewListByProductPager - Lists report records by Product.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • filter - | Field | Usage | Supported operators | Supported functions | |-------------|-------------|-------------|-------------| | timestamp | filter | ge, le | | | displayName | select, orderBy | | | | apiRegion | filter | eq | | | userId | filter | eq | | | productId | select, filter | eq | | | subscriptionId | filter | eq | | | callCountSuccess | select, orderBy | | | | callCountBlocked | select, orderBy | | | | callCountFailed | select, orderBy | | | | callCountOther | select, orderBy | | | | callCountTotal | select, orderBy | | | | bandwidth | select, orderBy | | | | cacheHitsCount | select | | | | cacheMissCount | select | | | | apiTimeAvg | select, orderBy | | | | apiTimeMin | select | | | | apiTimeMax | select | | | | serviceTimeAvg | select | | | | serviceTimeMin | select | | | | serviceTimeMax | select | | |
  • options - ReportsClientListByProductOptions contains the optional parameters for the ReportsClient.NewListByProductPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByProduct.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewReportsClient().NewListByProductPager("rg1", "apimService1", "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", &armapimanagement.ReportsClientListByProductOptions{Top: nil,
	Skip:    nil,
	Orderby: 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.ReportCollection = armapimanagement.ReportCollection{
	// 	Count: to.Ptr[int64](2),
	// 	Value: []*armapimanagement.ReportRecordContract{
	// 		{
	// 			Name: to.Ptr("Starter"),
	// 			APITimeAvg: to.Ptr[float64](0),
	// 			APITimeMax: to.Ptr[float64](0),
	// 			APITimeMin: to.Ptr[float64](0),
	// 			Bandwidth: to.Ptr[int64](0),
	// 			CacheHitCount: to.Ptr[int32](0),
	// 			CacheMissCount: to.Ptr[int32](0),
	// 			CallCountBlocked: to.Ptr[int32](0),
	// 			CallCountFailed: to.Ptr[int32](0),
	// 			CallCountOther: to.Ptr[int32](0),
	// 			CallCountSuccess: to.Ptr[int32](0),
	// 			CallCountTotal: to.Ptr[int32](0),
	// 			ProductID: to.Ptr("/products/5600b59475ff190048060001"),
	// 			ServiceTimeAvg: to.Ptr[float64](0),
	// 			ServiceTimeMax: to.Ptr[float64](0),
	// 			ServiceTimeMin: to.Ptr[float64](0),
	// 		},
	// 		{
	// 			Name: to.Ptr("Unlimited"),
	// 			APITimeAvg: to.Ptr[float64](1015.7607923076923),
	// 			APITimeMax: to.Ptr[float64](1819.2173),
	// 			APITimeMin: to.Ptr[float64](330.3206),
	// 			Bandwidth: to.Ptr[int64](11019),
	// 			CacheHitCount: to.Ptr[int32](0),
	// 			CacheMissCount: to.Ptr[int32](0),
	// 			CallCountBlocked: to.Ptr[int32](1),
	// 			CallCountFailed: to.Ptr[int32](0),
	// 			CallCountOther: to.Ptr[int32](0),
	// 			CallCountSuccess: to.Ptr[int32](13),
	// 			CallCountTotal: to.Ptr[int32](14),
	// 			ProductID: to.Ptr("/products/5600b59475ff190048060002"),
	// 			ServiceTimeAvg: to.Ptr[float64](957.094776923077),
	// 			ServiceTimeMax: to.Ptr[float64](1697.3612),
	// 			ServiceTimeMin: to.Ptr[float64](215.24),
	// 	}},
	// }
}
Output:

func (*ReportsClient) NewListByRequestPager

func (client *ReportsClient) NewListByRequestPager(resourceGroupName string, serviceName string, filter string, options *ReportsClientListByRequestOptions) *runtime.Pager[ReportsClientListByRequestResponse]

NewListByRequestPager - Lists report records by Request.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • filter - | Field | Usage | Supported operators | Supported functions | |-------------|-------------|-------------|-------------| | timestamp | filter | ge, le | | | apiId | filter | eq | | | operationId | filter | eq | | | productId | filter | eq | | | userId | filter | eq | | | apiRegion | filter | eq | | | subscriptionId | filter | eq | |
  • options - ReportsClientListByRequestOptions contains the optional parameters for the ReportsClient.NewListByRequestPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByRequest.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewReportsClient().NewListByRequestPager("rg1", "apimService1", "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", &armapimanagement.ReportsClientListByRequestOptions{Top: nil,
	Skip: 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.RequestReportCollection = armapimanagement.RequestReportCollection{
	// 	Count: to.Ptr[int64](2),
	// 	Value: []*armapimanagement.RequestReportRecordContract{
	// 		{
	// 			OperationID: to.Ptr("/apis/5931a75ae4bbd512a88c680b/operations/-"),
	// 			Method: to.Ptr("GET"),
	// 			APIID: to.Ptr("/apis/5931a75ae4bbd512a88c680b"),
	// 			APIRegion: to.Ptr("East Asia"),
	// 			APITime: to.Ptr[float64](221.1544),
	// 			Cache: to.Ptr("none"),
	// 			IPAddress: to.Ptr("207.xx.155.xx"),
	// 			ProductID: to.Ptr("/products/-"),
	// 			RequestID: to.Ptr("63e7119c-26aa-433c-96d7-f6f3267ff52f"),
	// 			RequestSize: to.Ptr[int32](0),
	// 			ResponseCode: to.Ptr[int32](404),
	// 			ResponseSize: to.Ptr[int32](405),
	// 			ServiceTime: to.Ptr[float64](0),
	// 			SubscriptionID: to.Ptr("/subscriptions/5600b59475ff190048070002"),
	// 			Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-03T00:17:00.164Z"); return t}()),
	// 			URL: to.Ptr("https://apimService1.azure-api.net/echo/resource?param1=sample"),
	// 			UserID: to.Ptr("/users/1"),
	// 		},
	// 		{
	// 			OperationID: to.Ptr("/apis/5931a75ae4bbd512a88c680b/operations/-"),
	// 			Method: to.Ptr("POST"),
	// 			APIID: to.Ptr("/apis/5931a75ae4bbd512a88c680b"),
	// 			APIRegion: to.Ptr("East Asia"),
	// 			APITime: to.Ptr[float64](6.675400000000001),
	// 			Cache: to.Ptr("none"),
	// 			IPAddress: to.Ptr("207.xx.155.xx"),
	// 			ProductID: to.Ptr("/products/-"),
	// 			RequestID: to.Ptr("e581b7f7-c9ec-4fc6-8ab9-3855d9b00b04"),
	// 			RequestSize: to.Ptr[int32](0),
	// 			ResponseCode: to.Ptr[int32](404),
	// 			ResponseSize: to.Ptr[int32](403),
	// 			ServiceTime: to.Ptr[float64](0),
	// 			SubscriptionID: to.Ptr("/subscriptions/5600b59475ff190048070002"),
	// 			Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-03T00:17:20.525Z"); return t}()),
	// 			URL: to.Ptr("https://apimService1.azure-api.net/echo/resource"),
	// 			UserID: to.Ptr("/users/1"),
	// 	}},
	// }
}
Output:

func (*ReportsClient) NewListBySubscriptionPager

func (client *ReportsClient) NewListBySubscriptionPager(resourceGroupName string, serviceName string, filter string, options *ReportsClientListBySubscriptionOptions) *runtime.Pager[ReportsClientListBySubscriptionResponse]

NewListBySubscriptionPager - Lists report records by subscription.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • filter - | Field | Usage | Supported operators | Supported functions | |-------------|-------------|-------------|-------------| | timestamp | filter | ge, le | | | displayName | select, orderBy | | | | apiRegion | filter | eq | | | userId | select, filter | eq | | | productId | select, filter | eq | | | subscriptionId | select, filter | eq | | | callCountSuccess | select, orderBy | | | | callCountBlocked | select, orderBy | | | | callCountFailed | select, orderBy | | | | callCountOther | select, orderBy | | | | callCountTotal | select, orderBy | | | | bandwidth | select, orderBy | | | | cacheHitsCount | select | | | | cacheMissCount | select | | | | apiTimeAvg | select, orderBy | | | | apiTimeMin | select | | | | apiTimeMax | select | | | | serviceTimeAvg | select | | | | serviceTimeMin | select | | | | serviceTimeMax | select | | |
  • options - ReportsClientListBySubscriptionOptions contains the optional parameters for the ReportsClient.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsBySubscription.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewReportsClient().NewListBySubscriptionPager("rg1", "apimService1", "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", &armapimanagement.ReportsClientListBySubscriptionOptions{Top: nil,
	Skip:    nil,
	Orderby: 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.ReportCollection = armapimanagement.ReportCollection{
	// 	Count: to.Ptr[int64](3),
	// 	Value: []*armapimanagement.ReportRecordContract{
	// 		{
	// 			Name: to.Ptr(""),
	// 			APITimeAvg: to.Ptr[float64](0),
	// 			APITimeMax: to.Ptr[float64](0),
	// 			APITimeMin: to.Ptr[float64](0),
	// 			Bandwidth: to.Ptr[int64](0),
	// 			CacheHitCount: to.Ptr[int32](0),
	// 			CacheMissCount: to.Ptr[int32](0),
	// 			CallCountBlocked: to.Ptr[int32](0),
	// 			CallCountFailed: to.Ptr[int32](0),
	// 			CallCountOther: to.Ptr[int32](0),
	// 			CallCountSuccess: to.Ptr[int32](0),
	// 			CallCountTotal: to.Ptr[int32](0),
	// 			ProductID: to.Ptr("/products/5600b59475ff190048060001"),
	// 			ServiceTimeAvg: to.Ptr[float64](0),
	// 			ServiceTimeMax: to.Ptr[float64](0),
	// 			ServiceTimeMin: to.Ptr[float64](0),
	// 			SubscriptionID: to.Ptr("/subscriptions/5600b59475ff190048070001"),
	// 			UserID: to.Ptr("/users/1"),
	// 		},
	// 		{
	// 			Name: to.Ptr(""),
	// 			APITimeAvg: to.Ptr[float64](1015.7607923076923),
	// 			APITimeMax: to.Ptr[float64](1819.2173),
	// 			APITimeMin: to.Ptr[float64](330.3206),
	// 			Bandwidth: to.Ptr[int64](11019),
	// 			CacheHitCount: to.Ptr[int32](0),
	// 			CacheMissCount: to.Ptr[int32](0),
	// 			CallCountBlocked: to.Ptr[int32](1),
	// 			CallCountFailed: to.Ptr[int32](0),
	// 			CallCountOther: to.Ptr[int32](0),
	// 			CallCountSuccess: to.Ptr[int32](13),
	// 			CallCountTotal: to.Ptr[int32](14),
	// 			ProductID: to.Ptr("/products/5600b59475ff190048060002"),
	// 			ServiceTimeAvg: to.Ptr[float64](957.094776923077),
	// 			ServiceTimeMax: to.Ptr[float64](1697.3612),
	// 			ServiceTimeMin: to.Ptr[float64](215.24),
	// 			SubscriptionID: to.Ptr("/subscriptions/5600b59475ff190048070002"),
	// 			UserID: to.Ptr("/users/1"),
	// 		},
	// 		{
	// 			Name: to.Ptr(""),
	// 			APITimeAvg: to.Ptr[float64](0),
	// 			APITimeMax: to.Ptr[float64](0),
	// 			APITimeMin: to.Ptr[float64](0),
	// 			Bandwidth: to.Ptr[int64](0),
	// 			CacheHitCount: to.Ptr[int32](0),
	// 			CacheMissCount: to.Ptr[int32](0),
	// 			CallCountBlocked: to.Ptr[int32](0),
	// 			CallCountFailed: to.Ptr[int32](0),
	// 			CallCountOther: to.Ptr[int32](0),
	// 			CallCountSuccess: to.Ptr[int32](0),
	// 			CallCountTotal: to.Ptr[int32](0),
	// 			ProductID: to.Ptr("/products/5702e97e5157a50f48dce801"),
	// 			ServiceTimeAvg: to.Ptr[float64](0),
	// 			ServiceTimeMax: to.Ptr[float64](0),
	// 			ServiceTimeMin: to.Ptr[float64](0),
	// 			SubscriptionID: to.Ptr("/subscriptions/5702e97e5157a50a9c733303"),
	// 			UserID: to.Ptr("/users/1"),
	// 	}},
	// }
}
Output:

func (*ReportsClient) NewListByTimePager

func (client *ReportsClient) NewListByTimePager(resourceGroupName string, serviceName string, filter string, interval string, options *ReportsClientListByTimeOptions) *runtime.Pager[ReportsClientListByTimeResponse]

NewListByTimePager - Lists report records by Time.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • filter - | Field | Usage | Supported operators | Supported functions | |-------------|-------------|-------------|-------------| | timestamp | filter, select | ge, le | | | interval | select | | | | apiRegion | filter | eq | | | userId | filter | eq | | | productId | filter | eq | | | subscriptionId | filter | eq | | | apiId | filter | eq | | | operationId | filter | eq | | | callCountSuccess | select | | | | callCountBlocked | select | | | | callCountFailed | select | | | | callCountOther | select | | | | bandwidth | select, orderBy | | | | cacheHitsCount | select | | | | cacheMissCount | select | | | | apiTimeAvg | select | | | | apiTimeMin | select | | | | apiTimeMax | select | | | | serviceTimeAvg | select | | | | serviceTimeMin | select | | | | serviceTimeMax | select | | |
  • interval - By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)).
  • options - ReportsClientListByTimeOptions contains the optional parameters for the ReportsClient.NewListByTimePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByTime.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewReportsClient().NewListByTimePager("rg1", "apimService1", "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", "PT15M", &armapimanagement.ReportsClientListByTimeOptions{Top: nil,
	Skip:    nil,
	Orderby: 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.ReportCollection = armapimanagement.ReportCollection{
	// 	Count: to.Ptr[int64](2),
	// 	Value: []*armapimanagement.ReportRecordContract{
	// 		{
	// 			APITimeAvg: to.Ptr[float64](1337.46335),
	// 			APITimeMax: to.Ptr[float64](1819.2173),
	// 			APITimeMin: to.Ptr[float64](885.0839000000001),
	// 			Bandwidth: to.Ptr[int64](3243),
	// 			CacheHitCount: to.Ptr[int32](0),
	// 			CacheMissCount: to.Ptr[int32](0),
	// 			CallCountBlocked: to.Ptr[int32](0),
	// 			CallCountFailed: to.Ptr[int32](0),
	// 			CallCountOther: to.Ptr[int32](0),
	// 			CallCountSuccess: to.Ptr[int32](4),
	// 			CallCountTotal: to.Ptr[int32](4),
	// 			Interval: to.Ptr("PT15M"),
	// 			ServiceTimeAvg: to.Ptr[float64](1255.917425),
	// 			ServiceTimeMax: to.Ptr[float64](1697.3612),
	// 			ServiceTimeMin: to.Ptr[float64](882.8264),
	// 			Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-03T00:15:00.000Z"); return t}()),
	// 		},
	// 		{
	// 			APITimeAvg: to.Ptr[float64](872.7818777777778),
	// 			APITimeMax: to.Ptr[float64](1093.8407),
	// 			APITimeMin: to.Ptr[float64](330.3206),
	// 			Bandwidth: to.Ptr[int64](7776),
	// 			CacheHitCount: to.Ptr[int32](0),
	// 			CacheMissCount: to.Ptr[int32](0),
	// 			CallCountBlocked: to.Ptr[int32](1),
	// 			CallCountFailed: to.Ptr[int32](0),
	// 			CallCountOther: to.Ptr[int32](0),
	// 			CallCountSuccess: to.Ptr[int32](9),
	// 			CallCountTotal: to.Ptr[int32](10),
	// 			Interval: to.Ptr("PT15M"),
	// 			ServiceTimeAvg: to.Ptr[float64](824.2847111111112),
	// 			ServiceTimeMax: to.Ptr[float64](973.2262000000001),
	// 			ServiceTimeMin: to.Ptr[float64](215.24),
	// 			Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-03T00:30:00.000Z"); return t}()),
	// 	}},
	// }
}
Output:

func (*ReportsClient) NewListByUserPager

func (client *ReportsClient) NewListByUserPager(resourceGroupName string, serviceName string, filter string, options *ReportsClientListByUserOptions) *runtime.Pager[ReportsClientListByUserResponse]

NewListByUserPager - Lists report records by User.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • filter - | Field | Usage | Supported operators | Supported functions | |-------------|-------------|-------------|-------------| | timestamp | filter | ge, le | | | displayName | select, orderBy | | | | userId | select, filter | eq | | | apiRegion | filter | eq | | | productId | filter | eq | | | subscriptionId | filter | eq | | | apiId | filter | eq | | | operationId | filter | eq | | | callCountSuccess | select, orderBy | | | | callCountBlocked | select, orderBy | | | | callCountFailed | select, orderBy | | | | callCountOther | select, orderBy | | | | callCountTotal | select, orderBy | | | | bandwidth | select, orderBy | | | | cacheHitsCount | select | | | | cacheMissCount | select | | | | apiTimeAvg | select, orderBy | | | | apiTimeMin | select | | | | apiTimeMax | select | | | | serviceTimeAvg | select | | | | serviceTimeMin | select | | | | serviceTimeMax | select | | |
  • options - ReportsClientListByUserOptions contains the optional parameters for the ReportsClient.NewListByUserPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByUser.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewReportsClient().NewListByUserPager("rg1", "apimService1", "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", &armapimanagement.ReportsClientListByUserOptions{Top: nil,
	Skip:    nil,
	Orderby: 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.ReportCollection = armapimanagement.ReportCollection{
	// 	Count: to.Ptr[int64](3),
	// 	Value: []*armapimanagement.ReportRecordContract{
	// 		{
	// 			Name: to.Ptr("Administrator"),
	// 			APITimeAvg: to.Ptr[float64](1015.7607923076923),
	// 			APITimeMax: to.Ptr[float64](1819.2173),
	// 			APITimeMin: to.Ptr[float64](330.3206),
	// 			Bandwidth: to.Ptr[int64](11019),
	// 			CacheHitCount: to.Ptr[int32](0),
	// 			CacheMissCount: to.Ptr[int32](0),
	// 			CallCountBlocked: to.Ptr[int32](1),
	// 			CallCountFailed: to.Ptr[int32](0),
	// 			CallCountOther: to.Ptr[int32](0),
	// 			CallCountSuccess: to.Ptr[int32](13),
	// 			CallCountTotal: to.Ptr[int32](14),
	// 			ServiceTimeAvg: to.Ptr[float64](957.094776923077),
	// 			ServiceTimeMax: to.Ptr[float64](1697.3612),
	// 			ServiceTimeMin: to.Ptr[float64](215.24),
	// 			UserID: to.Ptr("/users/1"),
	// 		},
	// 		{
	// 			Name: to.Ptr("Samir Solanki"),
	// 			APITimeAvg: to.Ptr[float64](0),
	// 			APITimeMax: to.Ptr[float64](0),
	// 			APITimeMin: to.Ptr[float64](0),
	// 			Bandwidth: to.Ptr[int64](0),
	// 			CacheHitCount: to.Ptr[int32](0),
	// 			CacheMissCount: to.Ptr[int32](0),
	// 			CallCountBlocked: to.Ptr[int32](0),
	// 			CallCountFailed: to.Ptr[int32](0),
	// 			CallCountOther: to.Ptr[int32](0),
	// 			CallCountSuccess: to.Ptr[int32](0),
	// 			CallCountTotal: to.Ptr[int32](0),
	// 			ServiceTimeAvg: to.Ptr[float64](0),
	// 			ServiceTimeMax: to.Ptr[float64](0),
	// 			ServiceTimeMin: to.Ptr[float64](0),
	// 			UserID: to.Ptr("/users/56eaec62baf08b06e46d27fd"),
	// 		},
	// 		{
	// 			Name: to.Ptr("Anonymous"),
	// 			APITimeAvg: to.Ptr[float64](0),
	// 			APITimeMax: to.Ptr[float64](0),
	// 			APITimeMin: to.Ptr[float64](0),
	// 			Bandwidth: to.Ptr[int64](0),
	// 			CacheHitCount: to.Ptr[int32](0),
	// 			CacheMissCount: to.Ptr[int32](0),
	// 			CallCountBlocked: to.Ptr[int32](0),
	// 			CallCountFailed: to.Ptr[int32](0),
	// 			CallCountOther: to.Ptr[int32](0),
	// 			CallCountSuccess: to.Ptr[int32](0),
	// 			CallCountTotal: to.Ptr[int32](0),
	// 			ServiceTimeAvg: to.Ptr[float64](0),
	// 			ServiceTimeMax: to.Ptr[float64](0),
	// 			ServiceTimeMin: to.Ptr[float64](0),
	// 			UserID: to.Ptr("/users/54c800b332965a0035030000"),
	// 	}},
	// }
}
Output:

type ReportsClientListByAPIOptions

type ReportsClientListByAPIOptions struct {
	// OData order by query option.
	Orderby *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

ReportsClientListByAPIOptions contains the optional parameters for the ReportsClient.NewListByAPIPager method.

type ReportsClientListByAPIResponse

type ReportsClientListByAPIResponse struct {
	// Paged Report records list representation.
	ReportCollection
}

ReportsClientListByAPIResponse contains the response from method ReportsClient.NewListByAPIPager.

type ReportsClientListByGeoOptions

type ReportsClientListByGeoOptions struct {
	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

ReportsClientListByGeoOptions contains the optional parameters for the ReportsClient.NewListByGeoPager method.

type ReportsClientListByGeoResponse

type ReportsClientListByGeoResponse struct {
	// Paged Report records list representation.
	ReportCollection
}

ReportsClientListByGeoResponse contains the response from method ReportsClient.NewListByGeoPager.

type ReportsClientListByOperationOptions

type ReportsClientListByOperationOptions struct {
	// OData order by query option.
	Orderby *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

ReportsClientListByOperationOptions contains the optional parameters for the ReportsClient.NewListByOperationPager method.

type ReportsClientListByOperationResponse

type ReportsClientListByOperationResponse struct {
	// Paged Report records list representation.
	ReportCollection
}

ReportsClientListByOperationResponse contains the response from method ReportsClient.NewListByOperationPager.

type ReportsClientListByProductOptions

type ReportsClientListByProductOptions struct {
	// OData order by query option.
	Orderby *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

ReportsClientListByProductOptions contains the optional parameters for the ReportsClient.NewListByProductPager method.

type ReportsClientListByProductResponse

type ReportsClientListByProductResponse struct {
	// Paged Report records list representation.
	ReportCollection
}

ReportsClientListByProductResponse contains the response from method ReportsClient.NewListByProductPager.

type ReportsClientListByRequestOptions

type ReportsClientListByRequestOptions struct {
	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

ReportsClientListByRequestOptions contains the optional parameters for the ReportsClient.NewListByRequestPager method.

type ReportsClientListByRequestResponse

type ReportsClientListByRequestResponse struct {
	// Paged Report records list representation.
	RequestReportCollection
}

ReportsClientListByRequestResponse contains the response from method ReportsClient.NewListByRequestPager.

type ReportsClientListBySubscriptionOptions

type ReportsClientListBySubscriptionOptions struct {
	// OData order by query option.
	Orderby *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

ReportsClientListBySubscriptionOptions contains the optional parameters for the ReportsClient.NewListBySubscriptionPager method.

type ReportsClientListBySubscriptionResponse

type ReportsClientListBySubscriptionResponse struct {
	// Paged Report records list representation.
	ReportCollection
}

ReportsClientListBySubscriptionResponse contains the response from method ReportsClient.NewListBySubscriptionPager.

type ReportsClientListByTimeOptions

type ReportsClientListByTimeOptions struct {
	// OData order by query option.
	Orderby *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

ReportsClientListByTimeOptions contains the optional parameters for the ReportsClient.NewListByTimePager method.

type ReportsClientListByTimeResponse

type ReportsClientListByTimeResponse struct {
	// Paged Report records list representation.
	ReportCollection
}

ReportsClientListByTimeResponse contains the response from method ReportsClient.NewListByTimePager.

type ReportsClientListByUserOptions

type ReportsClientListByUserOptions struct {
	// OData order by query option.
	Orderby *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

ReportsClientListByUserOptions contains the optional parameters for the ReportsClient.NewListByUserPager method.

type ReportsClientListByUserResponse

type ReportsClientListByUserResponse struct {
	// Paged Report records list representation.
	ReportCollection
}

ReportsClientListByUserResponse contains the response from method ReportsClient.NewListByUserPager.

type RepresentationContract

type RepresentationContract struct {
	// REQUIRED; Specifies a registered or custom content type for this representation, e.g. application/xml.
	ContentType *string

	// Exampled defined for the representation.
	Examples map[string]*ParameterExampleContract

	// Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'..
	FormParameters []*ParameterContract

	// Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.
	SchemaID *string

	// Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded'
	// nor 'multipart/form-data'.
	TypeName *string
}

RepresentationContract - Operation request/response representation details.

func (RepresentationContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type RepresentationContract.

func (*RepresentationContract) UnmarshalJSON

func (r *RepresentationContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RepresentationContract.

type RequestContract

type RequestContract struct {
	// Operation request description.
	Description *string

	// Collection of operation request headers.
	Headers []*ParameterContract

	// Collection of operation request query parameters.
	QueryParameters []*ParameterContract

	// Collection of operation request representations.
	Representations []*RepresentationContract
}

RequestContract - Operation request details.

func (RequestContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type RequestContract.

func (*RequestContract) UnmarshalJSON

func (r *RequestContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RequestContract.

type RequestReportCollection

type RequestReportCollection struct {
	// Total record count number across all pages.
	Count *int64

	// Page values.
	Value []*RequestReportRecordContract
}

RequestReportCollection - Paged Report records list representation.

func (RequestReportCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type RequestReportCollection.

func (*RequestReportCollection) UnmarshalJSON

func (r *RequestReportCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RequestReportCollection.

type RequestReportRecordContract

type RequestReportRecordContract struct {
	// API identifier path. /apis/{apiId}
	APIID *string

	// Azure region where the gateway that processed this request is located.
	APIRegion *string

	// The total time it took to process this request.
	APITime *float64

	// The HTTP status code received by the gateway as a result of forwarding this request to the backend.
	BackendResponseCode *string

	// Specifies if response cache was involved in generating the response. If the value is none, the cache was not used. If the
	// value is hit, cached response was returned. If the value is miss, the cache
	// was used but lookup resulted in a miss and request was fulfilled by the backend.
	Cache *string

	// The client IP address associated with this request.
	IPAddress *string

	// The HTTP method associated with this request..
	Method *string

	// Operation identifier path. /apis/{apiId}/operations/{operationId}
	OperationID *string

	// Request Identifier.
	RequestID *string

	// The size of this request..
	RequestSize *int32

	// The HTTP status code returned by the gateway.
	ResponseCode *int32

	// The size of the response returned by the gateway.
	ResponseSize *int32

	// he time it took to forward this request to the backend and get the response back.
	ServiceTime *float64

	// Subscription identifier path. /subscriptions/{subscriptionId}
	SubscriptionID *string

	// The date and time when this request was received by the gateway in ISO 8601 format.
	Timestamp *time.Time

	// The full URL associated with this request.
	URL *string

	// READ-ONLY; Product identifier path. /products/{productId}
	ProductID *string

	// READ-ONLY; User identifier path. /users/{userId}
	UserID *string
}

RequestReportRecordContract - Request Report data.

func (RequestReportRecordContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type RequestReportRecordContract.

func (*RequestReportRecordContract) UnmarshalJSON

func (r *RequestReportRecordContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RequestReportRecordContract.

type ResolverCollection

type ResolverCollection struct {
	// Total record count number across all pages.
	Count *int64

	// READ-ONLY; Next page link if any.
	NextLink *string

	// READ-ONLY; Page values.
	Value []*ResolverContract
}

ResolverCollection - Paged Resolver list representation.

func (ResolverCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResolverCollection.

func (*ResolverCollection) UnmarshalJSON

func (r *ResolverCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResolverCollection.

type ResolverContract

type ResolverContract struct {
	// Properties of the Resolver Contract.
	Properties *ResolverEntityBaseContract

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

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

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

ResolverContract - GraphQL API Resolver details.

func (ResolverContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResolverContract.

func (*ResolverContract) UnmarshalJSON

func (r *ResolverContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResolverContract.

type ResolverEntityBaseContract

type ResolverEntityBaseContract struct {
	// Description of the resolver. May include HTML formatting tags.
	Description *string

	// Resolver Name.
	DisplayName *string

	// Path is type/field being resolved.
	Path *string
}

ResolverEntityBaseContract - GraphQL API Resolver Entity Base Contract details.

func (ResolverEntityBaseContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResolverEntityBaseContract.

func (*ResolverEntityBaseContract) UnmarshalJSON

func (r *ResolverEntityBaseContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResolverEntityBaseContract.

type ResolverResultContract

type ResolverResultContract struct {
	// Properties of the Resolver Contract.
	Properties *ResolverResultContractProperties

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

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

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

ResolverResultContract - Long Running Git Resolver Results.

func (ResolverResultContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResolverResultContract.

func (*ResolverResultContract) UnmarshalJSON

func (r *ResolverResultContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResolverResultContract.

type ResolverResultContractProperties

type ResolverResultContractProperties struct {
	// Error Body Contract
	Error *ErrorResponseBody

	// Resolver result identifier.
	ID *string

	// Optional result info.
	ResultInfo *string

	// Start time of an async resolver. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO
	// 8601 standard.
	Started *time.Time

	// Status of an async resolver.
	Status *AsyncResolverStatus

	// Last update time of an async resolver. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by
	// the ISO 8601 standard.
	Updated *time.Time

	// READ-ONLY; This property if only provided as part of the TenantConfigurationValidate resolver. It contains the log the
	// entities which will be updated/created/deleted as part of the TenantConfigurationDeploy
	// resolver.
	ActionLog []*ResolverResultLogItemContract
}

ResolverResultContractProperties - Resolver Result.

func (ResolverResultContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResolverResultContractProperties.

func (*ResolverResultContractProperties) UnmarshalJSON

func (r *ResolverResultContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResolverResultContractProperties.

type ResolverResultLogItemContract

type ResolverResultLogItemContract struct {
	// Action like create/update/delete.
	Action *string

	// Identifier of the entity being created/updated/deleted.
	ObjectKey *string

	// The type of entity contract.
	ObjectType *string
}

ResolverResultLogItemContract - Log of the entity being created, updated or deleted.

func (ResolverResultLogItemContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResolverResultLogItemContract.

func (*ResolverResultLogItemContract) UnmarshalJSON

func (r *ResolverResultLogItemContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResolverResultLogItemContract.

type ResolverUpdateContract

type ResolverUpdateContract struct {
	// Properties of the GraphQL API Resolver entity that can be updated.
	Properties *ResolverUpdateContractProperties
}

ResolverUpdateContract - GraphQL API Resolver Update Contract details.

func (ResolverUpdateContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResolverUpdateContract.

func (*ResolverUpdateContract) UnmarshalJSON

func (r *ResolverUpdateContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResolverUpdateContract.

type ResolverUpdateContractProperties

type ResolverUpdateContractProperties struct {
	// Description of the resolver. May include HTML formatting tags.
	Description *string

	// Resolver Name.
	DisplayName *string

	// Path is type/field being resolved.
	Path *string
}

ResolverUpdateContractProperties - Resolver Update Contract Properties.

func (ResolverUpdateContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResolverUpdateContractProperties.

func (*ResolverUpdateContractProperties) UnmarshalJSON

func (r *ResolverUpdateContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResolverUpdateContractProperties.

type Resource

type Resource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

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

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

Resource - Common fields that are returned in the response for all Azure Resource Manager resources

func (Resource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON

func (r *Resource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type ResourceCollection

type ResourceCollection struct {
	// Total record count number.
	Count *int64

	// Next page link if any.
	NextLink *string

	// A collection of resources.
	Value []*ResourceCollectionValueItem
}

ResourceCollection - A collection of resources.

func (ResourceCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourceCollection.

func (*ResourceCollection) UnmarshalJSON

func (r *ResourceCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceCollection.

type ResourceCollectionValueItem

type ResourceCollectionValueItem struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

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

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

func (ResourceCollectionValueItem) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourceCollectionValueItem.

func (*ResourceCollectionValueItem) UnmarshalJSON

func (r *ResourceCollectionValueItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceCollectionValueItem.

type ResourceLocationDataContract

type ResourceLocationDataContract struct {
	// REQUIRED; A canonical name for the geographic or physical location.
	Name *string

	// The city or locality where the resource is located.
	City *string

	// The country or region where the resource is located.
	CountryOrRegion *string

	// The district, state, or province where the resource is located.
	District *string
}

ResourceLocationDataContract - Resource location data properties.

func (ResourceLocationDataContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourceLocationDataContract.

func (*ResourceLocationDataContract) UnmarshalJSON

func (r *ResourceLocationDataContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceLocationDataContract.

type ResourceSKU

type ResourceSKU struct {
	// Name of the Sku.
	Name *SKUType
}

ResourceSKU - Describes an available API Management SKU.

func (ResourceSKU) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourceSKU.

func (*ResourceSKU) UnmarshalJSON

func (r *ResourceSKU) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKU.

type ResourceSKUCapacity

type ResourceSKUCapacity struct {
	// READ-ONLY; The default capacity.
	Default *int32

	// READ-ONLY; The maximum capacity that can be set.
	Maximum *int32

	// READ-ONLY; The minimum capacity.
	Minimum *int32

	// READ-ONLY; The scale type applicable to the sku.
	ScaleType *ResourceSKUCapacityScaleType
}

ResourceSKUCapacity - Describes scaling information of a SKU.

func (ResourceSKUCapacity) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourceSKUCapacity.

func (*ResourceSKUCapacity) UnmarshalJSON

func (r *ResourceSKUCapacity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUCapacity.

type ResourceSKUCapacityScaleType

type ResourceSKUCapacityScaleType string

ResourceSKUCapacityScaleType - The scale type applicable to the sku.

const (
	// ResourceSKUCapacityScaleTypeAutomatic - Supported scale type automatic.
	ResourceSKUCapacityScaleTypeAutomatic ResourceSKUCapacityScaleType = "automatic"
	// ResourceSKUCapacityScaleTypeManual - Supported scale type manual.
	ResourceSKUCapacityScaleTypeManual ResourceSKUCapacityScaleType = "manual"
	// ResourceSKUCapacityScaleTypeNone - Scaling not supported.
	ResourceSKUCapacityScaleTypeNone ResourceSKUCapacityScaleType = "none"
)

func PossibleResourceSKUCapacityScaleTypeValues

func PossibleResourceSKUCapacityScaleTypeValues() []ResourceSKUCapacityScaleType

PossibleResourceSKUCapacityScaleTypeValues returns the possible values for the ResourceSKUCapacityScaleType const type.

type ResourceSKUResult

type ResourceSKUResult struct {
	// READ-ONLY; Specifies the number of API Management units.
	Capacity *ResourceSKUCapacity

	// READ-ONLY; The type of resource the SKU applies to.
	ResourceType *string

	// READ-ONLY; Specifies API Management SKU.
	SKU *ResourceSKU
}

ResourceSKUResult - Describes an available API Management service SKU.

func (ResourceSKUResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourceSKUResult.

func (*ResourceSKUResult) UnmarshalJSON

func (r *ResourceSKUResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUResult.

type ResourceSKUResults

type ResourceSKUResults struct {
	// REQUIRED; The list of skus available for the service.
	Value []*ResourceSKUResult

	// The uri to fetch the next page of API Management service Skus.
	NextLink *string
}

ResourceSKUResults - The API Management service SKUs operation response.

func (ResourceSKUResults) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourceSKUResults.

func (*ResourceSKUResults) UnmarshalJSON

func (r *ResourceSKUResults) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUResults.

type ResponseContract

type ResponseContract struct {
	// REQUIRED; Operation response HTTP status code.
	StatusCode *int32

	// Operation response description.
	Description *string

	// Collection of operation response headers.
	Headers []*ParameterContract

	// Collection of operation response representations.
	Representations []*RepresentationContract
}

ResponseContract - Operation response details.

func (ResponseContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResponseContract.

func (*ResponseContract) UnmarshalJSON

func (r *ResponseContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResponseContract.

type SKU

type SKU struct {
	// READ-ONLY; The api versions that support this SKU.
	APIVersions []*string

	// READ-ONLY; A name value pair to describe the capability.
	Capabilities []*SKUCapabilities

	// READ-ONLY; Specifies the number of virtual machines in the scale set.
	Capacity *SKUCapacity

	// READ-ONLY; Metadata for retrieving price info.
	Costs []*SKUCosts

	// READ-ONLY; The Family of this particular SKU.
	Family *string

	// READ-ONLY; The Kind of resources that are supported in this SKU.
	Kind *string

	// READ-ONLY; A list of locations and availability zones in those locations where the SKU is available.
	LocationInfo []*SKULocationInfo

	// READ-ONLY; The set of locations that the SKU is available.
	Locations []*string

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

	// READ-ONLY; The type of resource the SKU applies to.
	ResourceType *string

	// READ-ONLY; The restrictions because of which SKU cannot be used. This is empty if there are no restrictions.
	Restrictions []*SKURestrictions

	// READ-ONLY; The Size of the SKU.
	Size *string

	// READ-ONLY; Specifies the tier of virtual machines in a scale set.
	// Possible Values:
	// Standard
	// Basic
	Tier *string
}

SKU - Describes an available ApiManagement 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 SKUCapabilities

type SKUCapabilities struct {
	// READ-ONLY; An invariant to describe the feature.
	Name *string

	// READ-ONLY; An invariant if the feature is measured by quantity.
	Value *string
}

SKUCapabilities - Describes The SKU capabilities object.

func (SKUCapabilities) MarshalJSON

func (s SKUCapabilities) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKUCapabilities.

func (*SKUCapabilities) UnmarshalJSON

func (s *SKUCapabilities) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKUCapabilities.

type SKUCapacity

type SKUCapacity struct {
	// READ-ONLY; The default capacity.
	Default *int32

	// READ-ONLY; The maximum capacity that can be set.
	Maximum *int32

	// READ-ONLY; The minimum capacity.
	Minimum *int32

	// READ-ONLY; The scale type applicable to the sku.
	ScaleType *APIManagementSKUCapacityScaleType
}

SKUCapacity - Describes scaling information of a SKU.

func (SKUCapacity) MarshalJSON

func (s SKUCapacity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKUCapacity.

func (*SKUCapacity) UnmarshalJSON

func (s *SKUCapacity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKUCapacity.

type SKUCosts

type SKUCosts struct {
	// READ-ONLY; An invariant to show the extended unit.
	ExtendedUnit *string

	// READ-ONLY; Used for querying price from commerce.
	MeterID *string

	// READ-ONLY; The multiplier is needed to extend the base metered cost.
	Quantity *int64
}

SKUCosts - Describes metadata for retrieving price info.

func (SKUCosts) MarshalJSON

func (s SKUCosts) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKUCosts.

func (*SKUCosts) UnmarshalJSON

func (s *SKUCosts) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKUCosts.

type SKULocationInfo

type SKULocationInfo struct {
	// READ-ONLY; Location of the SKU
	Location *string

	// READ-ONLY; Details of capabilities available to a SKU in specific zones.
	ZoneDetails []*SKUZoneDetails

	// READ-ONLY; List of availability zones where the SKU is supported.
	Zones []*string
}

func (SKULocationInfo) MarshalJSON

func (s SKULocationInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKULocationInfo.

func (*SKULocationInfo) UnmarshalJSON

func (s *SKULocationInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKULocationInfo.

type SKURestrictionInfo

type SKURestrictionInfo struct {
	// READ-ONLY; Locations where the SKU is restricted
	Locations []*string

	// READ-ONLY; List of availability zones where the SKU is restricted.
	Zones []*string
}

func (SKURestrictionInfo) MarshalJSON

func (s SKURestrictionInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKURestrictionInfo.

func (*SKURestrictionInfo) UnmarshalJSON

func (s *SKURestrictionInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKURestrictionInfo.

type SKURestrictions

type SKURestrictions struct {
	// READ-ONLY; The reason for restriction.
	ReasonCode *APIManagementSKURestrictionsReasonCode

	// READ-ONLY; The information about the restriction where the SKU cannot be used.
	RestrictionInfo *SKURestrictionInfo

	// READ-ONLY; The type of restrictions.
	Type *APIManagementSKURestrictionsType

	// READ-ONLY; The value of restrictions. If the restriction type is set to location. This would be different locations where
	// the SKU is restricted.
	Values []*string
}

SKURestrictions - Describes scaling information of a SKU.

func (SKURestrictions) MarshalJSON

func (s SKURestrictions) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKURestrictions.

func (*SKURestrictions) UnmarshalJSON

func (s *SKURestrictions) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKURestrictions.

type SKUType

type SKUType string

SKUType - Name of the Sku.

const (
	// SKUTypeBasic - Basic SKU of Api Management.
	SKUTypeBasic SKUType = "Basic"
	// SKUTypeConsumption - Consumption SKU of Api Management.
	SKUTypeConsumption SKUType = "Consumption"
	// SKUTypeDeveloper - Developer SKU of Api Management.
	SKUTypeDeveloper SKUType = "Developer"
	// SKUTypeIsolated - Isolated SKU of Api Management.
	SKUTypeIsolated SKUType = "Isolated"
	// SKUTypePremium - Premium SKU of Api Management.
	SKUTypePremium SKUType = "Premium"
	// SKUTypeStandard - Standard SKU of Api Management.
	SKUTypeStandard SKUType = "Standard"
)

func PossibleSKUTypeValues

func PossibleSKUTypeValues() []SKUType

PossibleSKUTypeValues returns the possible values for the SKUType const type.

type SKUZoneDetails

type SKUZoneDetails struct {
	// READ-ONLY; A list of capabilities that are available for the SKU in the specified list of zones.
	Capabilities []*SKUCapabilities

	// READ-ONLY; The set of zones that the SKU is available in with the specified capabilities.
	Name []*string
}

SKUZoneDetails - Describes The zonal capabilities of a SKU.

func (SKUZoneDetails) MarshalJSON

func (s SKUZoneDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKUZoneDetails.

func (*SKUZoneDetails) UnmarshalJSON

func (s *SKUZoneDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKUZoneDetails.

type SKUsClient

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

SKUsClient contains the methods for the APIManagementSKUs 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) NewListPager

func (client *SKUsClient) NewListPager(options *SKUsClientListOptions) *runtime.Pager[SKUsClientListResponse]

NewListPager - Gets the list of Microsoft.ApiManagement SKUs available for your Subscription.

Generated from API version 2022-08-01

  • options - SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSku.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewSKUsClient().NewListPager(nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.SKUsResult = armapimanagement.SKUsResult{
	// 	Value: []*armapimanagement.SKU{
	// 		{
	// 			Name: to.Ptr("Developer"),
	// 			Capacity: &armapimanagement.SKUCapacity{
	// 				Default: to.Ptr[int32](1),
	// 				Maximum: to.Ptr[int32](1),
	// 				Minimum: to.Ptr[int32](1),
	// 				ScaleType: to.Ptr(armapimanagement.APIManagementSKUCapacityScaleTypeNone),
	// 			},
	// 			LocationInfo: []*armapimanagement.SKULocationInfo{
	// 				{
	// 					Location: to.Ptr("centralindia"),
	// 					ZoneDetails: []*armapimanagement.SKUZoneDetails{
	// 					},
	// 					Zones: []*string{
	// 					},
	// 			}},
	// 			Locations: []*string{
	// 				to.Ptr("centralindia")},
	// 				ResourceType: to.Ptr("service"),
	// 				Restrictions: []*armapimanagement.SKURestrictions{
	// 				},
	// 			},
	// 			{
	// 				Name: to.Ptr("Standard"),
	// 				Capacity: &armapimanagement.SKUCapacity{
	// 					Default: to.Ptr[int32](1),
	// 					Maximum: to.Ptr[int32](4),
	// 					Minimum: to.Ptr[int32](1),
	// 					ScaleType: to.Ptr(armapimanagement.APIManagementSKUCapacityScaleTypeAutomatic),
	// 				},
	// 				LocationInfo: []*armapimanagement.SKULocationInfo{
	// 					{
	// 						Location: to.Ptr("centralindia"),
	// 						ZoneDetails: []*armapimanagement.SKUZoneDetails{
	// 						},
	// 						Zones: []*string{
	// 						},
	// 				}},
	// 				Locations: []*string{
	// 					to.Ptr("centralindia")},
	// 					ResourceType: to.Ptr("service"),
	// 					Restrictions: []*armapimanagement.SKURestrictions{
	// 					},
	// 				},
	// 				{
	// 					Name: to.Ptr("Premium"),
	// 					Capacity: &armapimanagement.SKUCapacity{
	// 						Default: to.Ptr[int32](1),
	// 						Maximum: to.Ptr[int32](10),
	// 						Minimum: to.Ptr[int32](1),
	// 						ScaleType: to.Ptr(armapimanagement.APIManagementSKUCapacityScaleTypeAutomatic),
	// 					},
	// 					LocationInfo: []*armapimanagement.SKULocationInfo{
	// 						{
	// 							Location: to.Ptr("centralindia"),
	// 							ZoneDetails: []*armapimanagement.SKUZoneDetails{
	// 							},
	// 							Zones: []*string{
	// 							},
	// 					}},
	// 					Locations: []*string{
	// 						to.Ptr("centralindia")},
	// 						ResourceType: to.Ptr("service"),
	// 						Restrictions: []*armapimanagement.SKURestrictions{
	// 						},
	// 					},
	// 					{
	// 						Name: to.Ptr("Basic"),
	// 						Capacity: &armapimanagement.SKUCapacity{
	// 							Default: to.Ptr[int32](1),
	// 							Maximum: to.Ptr[int32](2),
	// 							Minimum: to.Ptr[int32](1),
	// 							ScaleType: to.Ptr(armapimanagement.APIManagementSKUCapacityScaleTypeManual),
	// 						},
	// 						LocationInfo: []*armapimanagement.SKULocationInfo{
	// 							{
	// 								Location: to.Ptr("centralindia"),
	// 								ZoneDetails: []*armapimanagement.SKUZoneDetails{
	// 								},
	// 								Zones: []*string{
	// 								},
	// 						}},
	// 						Locations: []*string{
	// 							to.Ptr("centralindia")},
	// 							ResourceType: to.Ptr("service"),
	// 							Restrictions: []*armapimanagement.SKURestrictions{
	// 							},
	// 						},
	// 						{
	// 							Name: to.Ptr("Consumption"),
	// 							Capacity: &armapimanagement.SKUCapacity{
	// 								Default: to.Ptr[int32](0),
	// 								Maximum: to.Ptr[int32](0),
	// 								Minimum: to.Ptr[int32](0),
	// 								ScaleType: to.Ptr(armapimanagement.APIManagementSKUCapacityScaleTypeNone),
	// 							},
	// 							LocationInfo: []*armapimanagement.SKULocationInfo{
	// 								{
	// 									Location: to.Ptr("centralindia"),
	// 									ZoneDetails: []*armapimanagement.SKUZoneDetails{
	// 									},
	// 									Zones: []*string{
	// 									},
	// 							}},
	// 							Locations: []*string{
	// 								to.Ptr("centralindia")},
	// 								ResourceType: to.Ptr("service"),
	// 								Restrictions: []*armapimanagement.SKURestrictions{
	// 								},
	// 							},
	// 							{
	// 								Name: to.Ptr("Developer"),
	// 								Capacity: &armapimanagement.SKUCapacity{
	// 									Default: to.Ptr[int32](1),
	// 									Maximum: to.Ptr[int32](1),
	// 									Minimum: to.Ptr[int32](1),
	// 									ScaleType: to.Ptr(armapimanagement.APIManagementSKUCapacityScaleTypeNone),
	// 								},
	// 								LocationInfo: []*armapimanagement.SKULocationInfo{
	// 									{
	// 										Location: to.Ptr("uaenorth"),
	// 										ZoneDetails: []*armapimanagement.SKUZoneDetails{
	// 										},
	// 										Zones: []*string{
	// 										},
	// 								}},
	// 								Locations: []*string{
	// 									to.Ptr("uaenorth")},
	// 									ResourceType: to.Ptr("service"),
	// 									Restrictions: []*armapimanagement.SKURestrictions{
	// 									},
	// 								},
	// 								{
	// 									Name: to.Ptr("Standard"),
	// 									Capacity: &armapimanagement.SKUCapacity{
	// 										Default: to.Ptr[int32](1),
	// 										Maximum: to.Ptr[int32](4),
	// 										Minimum: to.Ptr[int32](1),
	// 										ScaleType: to.Ptr(armapimanagement.APIManagementSKUCapacityScaleTypeAutomatic),
	// 									},
	// 									LocationInfo: []*armapimanagement.SKULocationInfo{
	// 										{
	// 											Location: to.Ptr("uaenorth"),
	// 											ZoneDetails: []*armapimanagement.SKUZoneDetails{
	// 											},
	// 											Zones: []*string{
	// 											},
	// 									}},
	// 									Locations: []*string{
	// 										to.Ptr("uaenorth")},
	// 										ResourceType: to.Ptr("service"),
	// 										Restrictions: []*armapimanagement.SKURestrictions{
	// 										},
	// 									},
	// 									{
	// 										Name: to.Ptr("Premium"),
	// 										Capacity: &armapimanagement.SKUCapacity{
	// 											Default: to.Ptr[int32](1),
	// 											Maximum: to.Ptr[int32](10),
	// 											Minimum: to.Ptr[int32](1),
	// 											ScaleType: to.Ptr(armapimanagement.APIManagementSKUCapacityScaleTypeAutomatic),
	// 										},
	// 										LocationInfo: []*armapimanagement.SKULocationInfo{
	// 											{
	// 												Location: to.Ptr("uaenorth"),
	// 												ZoneDetails: []*armapimanagement.SKUZoneDetails{
	// 												},
	// 												Zones: []*string{
	// 												},
	// 										}},
	// 										Locations: []*string{
	// 											to.Ptr("uaenorth")},
	// 											ResourceType: to.Ptr("service"),
	// 											Restrictions: []*armapimanagement.SKURestrictions{
	// 											},
	// 										},
	// 										{
	// 											Name: to.Ptr("Basic"),
	// 											Capacity: &armapimanagement.SKUCapacity{
	// 												Default: to.Ptr[int32](1),
	// 												Maximum: to.Ptr[int32](2),
	// 												Minimum: to.Ptr[int32](1),
	// 												ScaleType: to.Ptr(armapimanagement.APIManagementSKUCapacityScaleTypeManual),
	// 											},
	// 											LocationInfo: []*armapimanagement.SKULocationInfo{
	// 												{
	// 													Location: to.Ptr("uaenorth"),
	// 													ZoneDetails: []*armapimanagement.SKUZoneDetails{
	// 													},
	// 													Zones: []*string{
	// 													},
	// 											}},
	// 											Locations: []*string{
	// 												to.Ptr("uaenorth")},
	// 												ResourceType: to.Ptr("service"),
	// 												Restrictions: []*armapimanagement.SKURestrictions{
	// 												},
	// 											},
	// 											{
	// 												Name: to.Ptr("Developer"),
	// 												Capacity: &armapimanagement.SKUCapacity{
	// 													Default: to.Ptr[int32](1),
	// 													Maximum: to.Ptr[int32](1),
	// 													Minimum: to.Ptr[int32](1),
	// 													ScaleType: to.Ptr(armapimanagement.APIManagementSKUCapacityScaleTypeNone),
	// 												},
	// 												LocationInfo: []*armapimanagement.SKULocationInfo{
	// 													{
	// 														Location: to.Ptr("australiacentral"),
	// 														ZoneDetails: []*armapimanagement.SKUZoneDetails{
	// 														},
	// 														Zones: []*string{
	// 														},
	// 												}},
	// 												Locations: []*string{
	// 													to.Ptr("australiacentral")},
	// 													ResourceType: to.Ptr("service"),
	// 													Restrictions: []*armapimanagement.SKURestrictions{
	// 													},
	// 											}},
	// 										}
}
Output:

type SKUsClientListOptions

type SKUsClientListOptions struct {
}

SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method.

type SKUsClientListResponse

type SKUsClientListResponse struct {
	// The List Resource Skus operation response.
	SKUsResult
}

SKUsClientListResponse contains the response from method SKUsClient.NewListPager.

type SKUsResult

type SKUsResult struct {
	// REQUIRED; The list of skus available for the subscription.
	Value []*SKU

	// READ-ONLY; The URI to fetch the next page of Resource Skus. Call ListNext() with this URI to fetch the next page of Resource
	// Skus
	NextLink *string
}

SKUsResult - The List Resource Skus operation response.

func (SKUsResult) MarshalJSON

func (s SKUsResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKUsResult.

func (*SKUsResult) UnmarshalJSON

func (s *SKUsResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKUsResult.

type SamplingSettings

type SamplingSettings struct {
	// Rate of sampling for fixed-rate sampling.
	Percentage *float64

	// Sampling type.
	SamplingType *SamplingType
}

SamplingSettings - Sampling settings for Diagnostic.

func (SamplingSettings) MarshalJSON

func (s SamplingSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SamplingSettings.

func (*SamplingSettings) UnmarshalJSON

func (s *SamplingSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SamplingSettings.

type SamplingType

type SamplingType string

SamplingType - Sampling type.

const (
	// SamplingTypeFixed - Fixed-rate sampling.
	SamplingTypeFixed SamplingType = "fixed"
)

func PossibleSamplingTypeValues

func PossibleSamplingTypeValues() []SamplingType

PossibleSamplingTypeValues returns the possible values for the SamplingType const type.

type SaveConfigurationParameter

type SaveConfigurationParameter struct {
	// Properties of the Save Configuration Parameters.
	Properties *SaveConfigurationParameterProperties
}

SaveConfigurationParameter - Save Tenant Configuration Contract details.

func (SaveConfigurationParameter) MarshalJSON

func (s SaveConfigurationParameter) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SaveConfigurationParameter.

func (*SaveConfigurationParameter) UnmarshalJSON

func (s *SaveConfigurationParameter) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SaveConfigurationParameter.

type SaveConfigurationParameterProperties

type SaveConfigurationParameterProperties struct {
	// REQUIRED; The name of the Git branch in which to commit the current configuration snapshot.
	Branch *string

	// The value if true, the current configuration database is committed to the Git repository, even if the Git repository has
	// newer changes that would be overwritten.
	Force *bool
}

SaveConfigurationParameterProperties - Parameters supplied to the Save Tenant Configuration operation.

func (SaveConfigurationParameterProperties) MarshalJSON

func (s SaveConfigurationParameterProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SaveConfigurationParameterProperties.

func (*SaveConfigurationParameterProperties) UnmarshalJSON

func (s *SaveConfigurationParameterProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SaveConfigurationParameterProperties.

type SchemaCollection

type SchemaCollection struct {
	// Total record count number.
	Count *int64

	// READ-ONLY; Next page link if any.
	NextLink *string

	// READ-ONLY; API Schema Contract value.
	Value []*SchemaContract
}

SchemaCollection - The response of the list schema operation.

func (SchemaCollection) MarshalJSON

func (s SchemaCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SchemaCollection.

func (*SchemaCollection) UnmarshalJSON

func (s *SchemaCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SchemaCollection.

type SchemaContract

type SchemaContract struct {
	// Properties of the API Schema.
	Properties *SchemaContractProperties

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

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

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

SchemaContract - API Schema Contract details.

func (SchemaContract) MarshalJSON

func (s SchemaContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SchemaContract.

func (*SchemaContract) UnmarshalJSON

func (s *SchemaContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SchemaContract.

type SchemaContractProperties

type SchemaContractProperties struct {
	// REQUIRED; Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema
	// document (e.g. application/json, application/xml).
	// - Swagger Schema use application/vnd.ms-azure-apim.swagger.definitions+json
	// - WSDL Schema use application/vnd.ms-azure-apim.xsd+xml
	// - OpenApi Schema use application/vnd.oai.openapi.components+json
	// - WADL Schema use application/vnd.ms-azure-apim.wadl.grammars+xml.
	ContentType *string

	// REQUIRED; Create or update Properties of the API Schema Document.
	Document *SchemaDocumentProperties
}

SchemaContractProperties - API Schema create or update contract Properties.

func (SchemaContractProperties) MarshalJSON

func (s SchemaContractProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SchemaContractProperties.

func (*SchemaContractProperties) UnmarshalJSON

func (s *SchemaContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SchemaContractProperties.

type SchemaDocumentProperties

type SchemaDocumentProperties struct {
	// Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise.
	Components any

	// Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise.
	Definitions any

	// Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI.
	Value *string
}

SchemaDocumentProperties - Api Schema Document Properties.

func (SchemaDocumentProperties) MarshalJSON

func (s SchemaDocumentProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SchemaDocumentProperties.

func (*SchemaDocumentProperties) UnmarshalJSON

func (s *SchemaDocumentProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SchemaDocumentProperties.

type SchemaType

type SchemaType string

SchemaType - Schema Type. Immutable.

const (
	// SchemaTypeJSON - Json schema type.
	SchemaTypeJSON SchemaType = "json"
	// SchemaTypeXML - XML schema type.
	SchemaTypeXML SchemaType = "xml"
)

func PossibleSchemaTypeValues

func PossibleSchemaTypeValues() []SchemaType

PossibleSchemaTypeValues returns the possible values for the SchemaType const type.

type ServiceApplyNetworkConfigurationParameters

type ServiceApplyNetworkConfigurationParameters struct {
	// Location of the Api Management service to update for a multi-region service. For a service deployed in a single region,
	// this parameter is not required.
	Location *string
}

ServiceApplyNetworkConfigurationParameters - Parameter supplied to the Apply Network configuration operation.

func (ServiceApplyNetworkConfigurationParameters) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type ServiceApplyNetworkConfigurationParameters.

func (*ServiceApplyNetworkConfigurationParameters) UnmarshalJSON

func (s *ServiceApplyNetworkConfigurationParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceApplyNetworkConfigurationParameters.

type ServiceBackupRestoreParameters

type ServiceBackupRestoreParameters struct {
	// REQUIRED; The name of the backup file to create/retrieve.
	BackupName *string

	// REQUIRED; The name of the blob container (used to place/retrieve the backup).
	ContainerName *string

	// REQUIRED; The name of the Azure storage account (used to place/retrieve the backup).
	StorageAccount *string

	// Storage account access key. Required only if accessType is set to AccessKey.
	AccessKey *string

	// The type of access to be used for the storage account.
	AccessType *AccessType

	// The Client ID of user assigned managed identity. Required only if accessType is set to UserAssignedManagedIdentity.
	ClientID *string
}

ServiceBackupRestoreParameters - Parameters supplied to the Backup/Restore of an API Management service operation.

func (ServiceBackupRestoreParameters) MarshalJSON

func (s ServiceBackupRestoreParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceBackupRestoreParameters.

func (*ServiceBackupRestoreParameters) UnmarshalJSON

func (s *ServiceBackupRestoreParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceBackupRestoreParameters.

type ServiceBaseProperties

type ServiceBaseProperties struct {
	// Control Plane Apis version constraint for the API Management service.
	APIVersionConstraint *APIVersionConstraint

	// Additional datacenter locations of the API Management service.
	AdditionalLocations []*AdditionalLocation

	// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed
	// is 10.
	Certificates []*CertificateConfiguration

	// Custom properties of the API Management service.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168 will disable the cipher TLSRSAWITH3DESEDECBCSHA
	// for all TLS(1.0, 1.1 and 1.2).
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11 can be used to disable just TLS 1.1.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10 can be used to disable TLS 1.0 on an API
	// Management service.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11 can be used to disable just TLS 1.1
	// for communications with backends.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10 can be used to disable TLS 1.0 for
	// communications with backends.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2 can be used to enable HTTP2 protocol on an
	// API Management service.
	// Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For
	// all the settings except Http2 the default value is True if the service was
	// created on or before April 1, 2018 and False otherwise. Http2 setting's default value is False.
	// You can disable any of the following ciphers by using settings Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]:
	// TLSECDHEECDSAWITHAES256CBCSHA, TLSECDHEECDSAWITHAES128CBC
	// SHA, TLSECDHERSAWITHAES256CBCSHA, TLSECDHERSAWITHAES128CBCSHA, TLSRSAWITHAES128GCMSHA256, TLSRSAWITHAES256CBCSHA256, TLSRSAWITHAES128CBCSHA256,
	// TLSRSAWITHAES256CBCSHA, TLSRSAWITHAES128CBCSHA. For
	// example, Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256:false. The default
	// value is true for them.
	// Note: The following ciphers can't be disabled since they are required by internal platform components: TLSAES256GCMSHA384,TLSAES128GCMSHA256,TLSECDHEECDSAWITHAES256GCMSHA384,TLSECDHEECDSAWITHAES128GCM
	// SHA256,TLSECDHERSAWITHAES256GCMSHA384,TLSECDHERSAWITHAES128GCMSHA256,TLSECDHEECDSAWITHAES256CBCSHA384,TLSECDHEECDSAWITHAES128CBCSHA256,TLSECDHERSAWITHAES256CBCSHA384,TLSECDHERSAWITHAES128CBCSHA256
	CustomProperties map[string]*string

	// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway
	// in master region.
	DisableGateway *bool

	// Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each
	// request to the gateway. This also enables the ability to authenticate the
	// certificate in the policy on the gateway.
	EnableClientCertificate *bool

	// Custom hostname configuration of the API Management service.
	HostnameConfigurations []*HostnameConfiguration

	// Property can be used to enable NAT Gateway for this API Management service.
	NatGatewayState *NatGatewayState

	// Email address from which the notification will be sent.
	NotificationSenderEmail *string

	// List of Private Endpoint Connections of this service.
	PrivateEndpointConnections []*RemotePrivateEndpointConnectionWrapper

	// Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported
	// only for Developer and Premium SKU being deployed in Virtual Network.
	PublicIPAddressID *string

	// Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must
	// be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the
	// exclusive access method. Default value is 'Enabled'
	PublicNetworkAccess *PublicNetworkAccess

	// Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other
	// properties will be ignored.
	Restore *bool

	// Virtual network configuration of the API Management service.
	VirtualNetworkConfiguration *VirtualNetworkConfiguration

	// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management
	// service is not part of any Virtual Network, External means the API Management
	// deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management
	// deployment is setup inside a Virtual Network having an Intranet Facing Endpoint
	// only.
	VirtualNetworkType *VirtualNetworkType

	// READ-ONLY; Creation UTC date of the API Management service.The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ
	// as specified by the ISO 8601 standard.
	CreatedAtUTC *time.Time

	// READ-ONLY; DEveloper Portal endpoint URL of the API Management service.
	DeveloperPortalURL *string

	// READ-ONLY; Gateway URL of the API Management service in the Default Region.
	GatewayRegionalURL *string

	// READ-ONLY; Gateway URL of the API Management service.
	GatewayURL *string

	// READ-ONLY; Management API endpoint URL of the API Management service.
	ManagementAPIURL *string

	// READ-ONLY; Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium
	// SKU on stv2 platform.
	OutboundPublicIPAddresses []*string

	// READ-ONLY; Compute Platform Version running the service in this location.
	PlatformVersion *PlatformVersion

	// READ-ONLY; Publisher portal endpoint Url of the API Management service.
	PortalURL *string

	// READ-ONLY; Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed
	// in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated
	// SKU.
	PrivateIPAddresses []*string

	// READ-ONLY; The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted.
	ProvisioningState *string

	// READ-ONLY; Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for
	// Basic, Standard, Premium and Isolated SKU.
	PublicIPAddresses []*string

	// READ-ONLY; SCM endpoint URL of the API Management service.
	ScmURL *string

	// READ-ONLY; The provisioning state of the API Management service, which is targeted by the long running operation started
	// on the service.
	TargetProvisioningState *string
}

ServiceBaseProperties - Base Properties of an API Management service resource description.

func (ServiceBaseProperties) MarshalJSON

func (s ServiceBaseProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceBaseProperties.

func (*ServiceBaseProperties) UnmarshalJSON

func (s *ServiceBaseProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceBaseProperties.

type ServiceCheckNameAvailabilityParameters

type ServiceCheckNameAvailabilityParameters struct {
	// REQUIRED; The name to check for availability.
	Name *string
}

ServiceCheckNameAvailabilityParameters - Parameters supplied to the CheckNameAvailability operation.

func (ServiceCheckNameAvailabilityParameters) MarshalJSON

func (s ServiceCheckNameAvailabilityParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceCheckNameAvailabilityParameters.

func (*ServiceCheckNameAvailabilityParameters) UnmarshalJSON

func (s *ServiceCheckNameAvailabilityParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceCheckNameAvailabilityParameters.

type ServiceClient

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

ServiceClient contains the methods for the APIManagementService group. Don't use this type directly, use NewServiceClient() instead.

func NewServiceClient

func NewServiceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceClient, error)

NewServiceClient creates a new instance of ServiceClient 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 (*ServiceClient) BeginApplyNetworkConfigurationUpdates

func (client *ServiceClient) BeginApplyNetworkConfigurationUpdates(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientBeginApplyNetworkConfigurationUpdatesOptions) (*runtime.Poller[ServiceClientApplyNetworkConfigurationUpdatesResponse], error)

BeginApplyNetworkConfigurationUpdates - Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - ServiceClientBeginApplyNetworkConfigurationUpdatesOptions contains the optional parameters for the ServiceClient.BeginApplyNetworkConfigurationUpdates method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementApplyNetworkConfigurationUpdates.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServiceClient().BeginApplyNetworkConfigurationUpdates(ctx, "rg1", "apimService1", &armapimanagement.ServiceClientBeginApplyNetworkConfigurationUpdatesOptions{Parameters: &armapimanagement.ServiceApplyNetworkConfigurationParameters{
	Location: to.Ptr("west us"),
},
})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ServiceResource = armapimanagement.ServiceResource{
// 	Name: to.Ptr("apimService1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1"),
// 	Tags: map[string]*string{
// 		"UID": to.Ptr("52ed5986-717b-45b4-b17c-3df8db372cff"),
// 	},
// 	Etag: to.Ptr("AAAAAAAXX6Y="),
// 	Location: to.Ptr("East Asia"),
// 	Properties: &armapimanagement.ServiceProperties{
// 		CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-09-22T01:50:34.792Z"); return t}()),
// 		GatewayURL: to.Ptr("https://apimService1.azure-api.net"),
// 		HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
// 		},
// 		ManagementAPIURL: to.Ptr("https://apimService1.management.azure-api.net"),
// 		PortalURL: to.Ptr("https://apimService1.portal.azure-api.net"),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		PublicIPAddresses: []*string{
// 			to.Ptr("207.46.155.24")},
// 			ScmURL: to.Ptr("https://apimService1.scm.azure-api.net"),
// 			TargetProvisioningState: to.Ptr(""),
// 			VirtualNetworkConfiguration: &armapimanagement.VirtualNetworkConfiguration{
// 				SubnetResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/eastUsVirtualNetwork/subnets/apimSubnet"),
// 			},
// 			VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeExternal),
// 			PublisherEmail: to.Ptr("admin@live.com"),
// 			PublisherName: to.Ptr("Contoso"),
// 		},
// 		SKU: &armapimanagement.ServiceSKUProperties{
// 			Name: to.Ptr(armapimanagement.SKUTypePremium),
// 			Capacity: to.Ptr[int32](1),
// 		},
// 	}
Output:

func (*ServiceClient) BeginBackup

func (client *ServiceClient) BeginBackup(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceBackupRestoreParameters, options *ServiceClientBeginBackupOptions) (*runtime.Poller[ServiceClientBackupResponse], error)

BeginBackup - Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • parameters - Parameters supplied to the ApiManagementService_Backup operation.
  • options - ServiceClientBeginBackupOptions contains the optional parameters for the ServiceClient.BeginBackup method.
Example (ApiManagementBackupWithAccessKey)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithAccessKey.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServiceClient().BeginBackup(ctx, "rg1", "apimService1", armapimanagement.ServiceBackupRestoreParameters{
	AccessKey:      to.Ptr("**************************************************"),
	AccessType:     to.Ptr(armapimanagement.AccessTypeAccessKey),
	BackupName:     to.Ptr("apimService1backup_2017_03_19"),
	ContainerName:  to.Ptr("backupContainer"),
	StorageAccount: to.Ptr("teststorageaccount"),
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ServiceResource = armapimanagement.ServiceResource{
// 	Name: to.Ptr("apimService1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1"),
// 	Tags: map[string]*string{
// 		"tag1": to.Ptr("value1"),
// 		"tag2": to.Ptr("value2"),
// 		"tag3": to.Ptr("value3"),
// 	},
// 	Etag: to.Ptr("AAAAAAACXok="),
// 	Location: to.Ptr("West US"),
// 	Properties: &armapimanagement.ServiceProperties{
// 		AdditionalLocations: []*armapimanagement.AdditionalLocation{
// 			{
// 				DisableGateway: to.Ptr(true),
// 				GatewayRegionalURL: to.Ptr("https://apimService1-eastus-01.regional.azure-api.net"),
// 				Location: to.Ptr("East US"),
// 				PublicIPAddresses: []*string{
// 					to.Ptr("23.101.138.153")},
// 					SKU: &armapimanagement.ServiceSKUProperties{
// 						Name: to.Ptr(armapimanagement.SKUTypePremium),
// 						Capacity: to.Ptr[int32](1),
// 					},
// 			}},
// 			APIVersionConstraint: &armapimanagement.APIVersionConstraint{
// 				MinAPIVersion: to.Ptr("2019-01-01"),
// 			},
// 			CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-18T06:26:20.334Z"); return t}()),
// 			CustomProperties: map[string]*string{
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": to.Ptr("False"),
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("False"),
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("False"),
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("False"),
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": to.Ptr("False"),
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": to.Ptr("False"),
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("False"),
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("False"),
// 			},
// 			DeveloperPortalURL: to.Ptr("https://apimService1.developer.azure-api.net"),
// 			DisableGateway: to.Ptr(false),
// 			GatewayRegionalURL: to.Ptr("https://apimService1-westus-01.regional.azure-api.net"),
// 			GatewayURL: to.Ptr("https://apimService1.azure-api.net"),
// 			HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
// 				{
// 					Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// 					DefaultSSLBinding: to.Ptr(false),
// 					HostName: to.Ptr("apimService1.azure-api.net"),
// 					NegotiateClientCertificate: to.Ptr(false),
// 				},
// 				{
// 					Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// 					Certificate: &armapimanagement.CertificateInformation{
// 						Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2036-01-01T07:00:00.000Z"); return t}()),
// 						Subject: to.Ptr("CN=*.msitesting.net"),
// 						Thumbprint: to.Ptr("8E989XXXXXXXXXXXXXXXXB9C2C91F1D174FDB3A2"),
// 					},
// 					DefaultSSLBinding: to.Ptr(true),
// 					HostName: to.Ptr("gateway1.msitesting.net"),
// 					NegotiateClientCertificate: to.Ptr(false),
// 				},
// 				{
// 					Type: to.Ptr(armapimanagement.HostnameTypeManagement),
// 					Certificate: &armapimanagement.CertificateInformation{
// 						Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2036-01-01T07:00:00.000Z"); return t}()),
// 						Subject: to.Ptr("CN=*.msitesting.net"),
// 						Thumbprint: to.Ptr("8E989XXXXXXXXXXXXXXXXB9C2C91F1D174FDB3A2"),
// 					},
// 					DefaultSSLBinding: to.Ptr(false),
// 					HostName: to.Ptr("mgmt.msitesting.net"),
// 					NegotiateClientCertificate: to.Ptr(false),
// 				},
// 				{
// 					Type: to.Ptr(armapimanagement.HostnameTypePortal),
// 					Certificate: &armapimanagement.CertificateInformation{
// 						Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2036-01-01T07:00:00.000Z"); return t}()),
// 						Subject: to.Ptr("CN=*.msitesting.net"),
// 						Thumbprint: to.Ptr("8E989XXXXXXXXXXXXXXXXB9C2C91F1D174FDB3A2"),
// 					},
// 					DefaultSSLBinding: to.Ptr(false),
// 					HostName: to.Ptr("portal1.msitesting.net"),
// 					NegotiateClientCertificate: to.Ptr(false),
// 			}},
// 			ManagementAPIURL: to.Ptr("https://apimService1.management.azure-api.net"),
// 			NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
// 			PortalURL: to.Ptr("https://apimService1.portal.azure-api.net"),
// 			ProvisioningState: to.Ptr("Succeeded"),
// 			PublicIPAddresses: []*string{
// 				to.Ptr("13.91.32.113")},
// 				ScmURL: to.Ptr("https://apimService1.scm.azure-api.net"),
// 				TargetProvisioningState: to.Ptr(""),
// 				VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
// 				PublisherEmail: to.Ptr("apim@autorestsdk.com"),
// 				PublisherName: to.Ptr("autorestsdk"),
// 			},
// 			SKU: &armapimanagement.ServiceSKUProperties{
// 				Name: to.Ptr(armapimanagement.SKUTypePremium),
// 				Capacity: to.Ptr[int32](1),
// 			},
// 		}
Output:

Example (ApiManagementBackupWithSystemManagedIdentity)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithSystemManagedIdentity.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServiceClient().BeginBackup(ctx, "rg1", "apimService1", armapimanagement.ServiceBackupRestoreParameters{
	AccessType:     to.Ptr(armapimanagement.AccessTypeSystemAssignedManagedIdentity),
	BackupName:     to.Ptr("backup5"),
	ContainerName:  to.Ptr("apim-backups"),
	StorageAccount: to.Ptr("contosorpstorage"),
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ServiceResource = armapimanagement.ServiceResource{
// 	Name: to.Ptr("apimService1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1"),
// 	Tags: map[string]*string{
// 		"Owner": to.Ptr("apimService1"),
// 	},
// 	Etag: to.Ptr("AAAAAAAQM8o="),
// 	Identity: &armapimanagement.ServiceIdentity{
// 		Type: to.Ptr(armapimanagement.ApimIdentityTypeSystemAssignedUserAssigned),
// 		PrincipalID: to.Ptr("00000000-5fb4-4916-95d4-64b306f9d924"),
// 		TenantID: to.Ptr("00000000-86f1-0000-91ab-2d7cd011db47"),
// 		UserAssignedIdentities: map[string]*armapimanagement.UserIdentityProperties{
// 			"/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/rg1UserIdentity": &armapimanagement.UserIdentityProperties{
// 				ClientID: to.Ptr("00000000-a154-4830-0000-46a12da1a1e2"),
// 				PrincipalID: to.Ptr("00000000-a100-4478-0000-d65d98118ba0"),
// 			},
// 			"/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/vpnpremium": &armapimanagement.UserIdentityProperties{
// 				ClientID: to.Ptr("00000000-6328-4db2-0000-ab0e3e7806cf"),
// 				PrincipalID: to.Ptr("00000000-9208-4128-af2d-a10d2af9b5a3"),
// 			},
// 		},
// 	},
// 	Location: to.Ptr("Central US EUAP"),
// 	Properties: &armapimanagement.ServiceProperties{
// 		CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-23T16:26:47.863Z"); return t}()),
// 		CustomProperties: map[string]*string{
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("False"),
// 		},
// 		DeveloperPortalURL: to.Ptr("https://apimService1.developer.azure-api.net"),
// 		DisableGateway: to.Ptr(false),
// 		GatewayRegionalURL: to.Ptr("https://apimService1-centraluseuap-01.regional.azure-api.net"),
// 		GatewayURL: to.Ptr("https://apimService1.azure-api.net"),
// 		HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
// 			{
// 				Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// 				CertificateSource: to.Ptr(armapimanagement.CertificateSourceBuiltIn),
// 				DefaultSSLBinding: to.Ptr(true),
// 				HostName: to.Ptr("apimService1.azure-api.net"),
// 				NegotiateClientCertificate: to.Ptr(false),
// 		}},
// 		ManagementAPIURL: to.Ptr("https://apimService1.management.azure-api.net"),
// 		NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
// 		PlatformVersion: to.Ptr(armapimanagement.PlatformVersionStv1),
// 		PortalURL: to.Ptr("https://apimService1.portal.azure-api.net"),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		PublicIPAddresses: []*string{
// 			to.Ptr("52.XXXX.160.66")},
// 			PublicNetworkAccess: to.Ptr(armapimanagement.PublicNetworkAccessEnabled),
// 			ScmURL: to.Ptr("https://apimService1.scm.azure-api.net"),
// 			TargetProvisioningState: to.Ptr(""),
// 			VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
// 			PublisherEmail: to.Ptr("apimService1@corp.microsoft.com"),
// 			PublisherName: to.Ptr("MS"),
// 		},
// 		SKU: &armapimanagement.ServiceSKUProperties{
// 			Name: to.Ptr(armapimanagement.SKUTypePremium),
// 			Capacity: to.Ptr[int32](1),
// 		},
// 		SystemData: &armapimanagement.SystemData{
// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-30T06:24:57.000Z"); return t}()),
// 			LastModifiedBy: to.Ptr("contoso@microsoft.com"),
// 			LastModifiedByType: to.Ptr(armapimanagement.CreatedByTypeUser),
// 		},
// 	}
Output:

Example (ApiManagementBackupWithUserAssignedManagedIdentity)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithUserAssignedManagedIdentity.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServiceClient().BeginBackup(ctx, "rg1", "apimService1", armapimanagement.ServiceBackupRestoreParameters{
	AccessType:     to.Ptr(armapimanagement.AccessTypeUserAssignedManagedIdentity),
	BackupName:     to.Ptr("backup5"),
	ClientID:       to.Ptr("XXXXX-a154-4830-XXXX-46a12da1a1e2"),
	ContainerName:  to.Ptr("apim-backups"),
	StorageAccount: to.Ptr("contosorpstorage"),
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ServiceResource = armapimanagement.ServiceResource{
// 	Name: to.Ptr("apimService1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1"),
// 	Tags: map[string]*string{
// 		"Owner": to.Ptr("apimService1"),
// 	},
// 	Etag: to.Ptr("AAAAAAAQM8o="),
// 	Identity: &armapimanagement.ServiceIdentity{
// 		Type: to.Ptr(armapimanagement.ApimIdentityTypeSystemAssignedUserAssigned),
// 		PrincipalID: to.Ptr("00000000-5fb4-4916-95d4-64b306f9d924"),
// 		TenantID: to.Ptr("00000000-86f1-0000-91ab-2d7cd011db47"),
// 		UserAssignedIdentities: map[string]*armapimanagement.UserIdentityProperties{
// 			"/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/rg1UserIdentity": &armapimanagement.UserIdentityProperties{
// 				ClientID: to.Ptr("00000000-a154-4830-0000-46a12da1a1e2"),
// 				PrincipalID: to.Ptr("00000000-a100-4478-0000-d65d98118ba0"),
// 			},
// 			"/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/vpnpremium": &armapimanagement.UserIdentityProperties{
// 				ClientID: to.Ptr("00000000-6328-4db2-0000-ab0e3e7806cf"),
// 				PrincipalID: to.Ptr("00000000-9208-4128-af2d-a10d2af9b5a3"),
// 			},
// 		},
// 	},
// 	Location: to.Ptr("Central US EUAP"),
// 	Properties: &armapimanagement.ServiceProperties{
// 		CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-23T16:26:47.863Z"); return t}()),
// 		CustomProperties: map[string]*string{
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("False"),
// 		},
// 		DeveloperPortalURL: to.Ptr("https://apimService1.developer.azure-api.net"),
// 		DisableGateway: to.Ptr(false),
// 		GatewayRegionalURL: to.Ptr("https://apimService1-centraluseuap-01.regional.azure-api.net"),
// 		GatewayURL: to.Ptr("https://apimService1.azure-api.net"),
// 		HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
// 			{
// 				Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// 				CertificateSource: to.Ptr(armapimanagement.CertificateSourceBuiltIn),
// 				DefaultSSLBinding: to.Ptr(true),
// 				HostName: to.Ptr("apimService1.azure-api.net"),
// 				NegotiateClientCertificate: to.Ptr(false),
// 		}},
// 		ManagementAPIURL: to.Ptr("https://apimService1.management.azure-api.net"),
// 		NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
// 		PlatformVersion: to.Ptr(armapimanagement.PlatformVersionStv1),
// 		PortalURL: to.Ptr("https://apimService1.portal.azure-api.net"),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		PublicIPAddresses: []*string{
// 			to.Ptr("52.XXXX.160.66")},
// 			PublicNetworkAccess: to.Ptr(armapimanagement.PublicNetworkAccessEnabled),
// 			ScmURL: to.Ptr("https://apimService1.scm.azure-api.net"),
// 			TargetProvisioningState: to.Ptr(""),
// 			VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
// 			PublisherEmail: to.Ptr("apimService1@corp.microsoft.com"),
// 			PublisherName: to.Ptr("MS"),
// 		},
// 		SKU: &armapimanagement.ServiceSKUProperties{
// 			Name: to.Ptr(armapimanagement.SKUTypePremium),
// 			Capacity: to.Ptr[int32](1),
// 		},
// 		SystemData: &armapimanagement.SystemData{
// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-30T06:24:57.000Z"); return t}()),
// 			LastModifiedBy: to.Ptr("contoso@microsoft.com"),
// 			LastModifiedByType: to.Ptr(armapimanagement.CreatedByTypeUser),
// 		},
// 	}
Output:

func (*ServiceClient) BeginCreateOrUpdate

func (client *ServiceClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceResource, options *ServiceClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServiceClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates an API Management service. This is long running operation and could take several minutes to complete. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • parameters - Parameters supplied to the CreateOrUpdate API Management service operation.
  • options - ServiceClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceClient.BeginCreateOrUpdate method.
Example (ApiManagementCreateMultiRegionServiceWithCustomHostname)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateMultiRegionServiceWithCustomHostname.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServiceClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", armapimanagement.ServiceResource{
	Tags: map[string]*string{
		"tag1": to.Ptr("value1"),
		"tag2": to.Ptr("value2"),
		"tag3": to.Ptr("value3"),
	},
	Location: to.Ptr("West US"),
	Properties: &armapimanagement.ServiceProperties{
		AdditionalLocations: []*armapimanagement.AdditionalLocation{
			{
				DisableGateway: to.Ptr(true),
				Location:       to.Ptr("East US"),
				SKU: &armapimanagement.ServiceSKUProperties{
					Name:     to.Ptr(armapimanagement.SKUTypePremium),
					Capacity: to.Ptr[int32](1),
				},
			}},
		APIVersionConstraint: &armapimanagement.APIVersionConstraint{
			MinAPIVersion: to.Ptr("2019-01-01"),
		},
		HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
			{
				Type:                to.Ptr(armapimanagement.HostnameTypeProxy),
				CertificatePassword: to.Ptr("Password"),
				DefaultSSLBinding:   to.Ptr(true),
				EncodedCertificate:  to.Ptr("****** Base 64 Encoded Certificate ************"),
				HostName:            to.Ptr("gateway1.msitesting.net"),
			},
			{
				Type:                to.Ptr(armapimanagement.HostnameTypeManagement),
				CertificatePassword: to.Ptr("Password"),
				EncodedCertificate:  to.Ptr("****** Base 64 Encoded Certificate ************"),
				HostName:            to.Ptr("mgmt.msitesting.net"),
			},
			{
				Type:                to.Ptr(armapimanagement.HostnameTypePortal),
				CertificatePassword: to.Ptr("Password"),
				EncodedCertificate:  to.Ptr("****** Base 64 Encoded Certificate ************"),
				HostName:            to.Ptr("portal1.msitesting.net"),
			}},
		VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
		PublisherEmail:     to.Ptr("apim@autorestsdk.com"),
		PublisherName:      to.Ptr("autorestsdk"),
	},
	SKU: &armapimanagement.ServiceSKUProperties{
		Name:     to.Ptr(armapimanagement.SKUTypePremium),
		Capacity: to.Ptr[int32](1),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ServiceResource = armapimanagement.ServiceResource{
// 	Name: to.Ptr("apimService1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1"),
// 	Tags: map[string]*string{
// 		"tag1": to.Ptr("value1"),
// 		"tag2": to.Ptr("value2"),
// 		"tag3": to.Ptr("value3"),
// 	},
// 	Etag: to.Ptr("AAAAAAACXok="),
// 	Location: to.Ptr("West US"),
// 	Properties: &armapimanagement.ServiceProperties{
// 		AdditionalLocations: []*armapimanagement.AdditionalLocation{
// 			{
// 				DisableGateway: to.Ptr(true),
// 				GatewayRegionalURL: to.Ptr("https://apimService1-eastus-01.regional.azure-api.net"),
// 				Location: to.Ptr("East US"),
// 				PublicIPAddresses: []*string{
// 					to.Ptr("23.101.138.153")},
// 					SKU: &armapimanagement.ServiceSKUProperties{
// 						Name: to.Ptr(armapimanagement.SKUTypePremium),
// 						Capacity: to.Ptr[int32](1),
// 					},
// 			}},
// 			APIVersionConstraint: &armapimanagement.APIVersionConstraint{
// 				MinAPIVersion: to.Ptr("2019-01-01"),
// 			},
// 			CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-18T06:26:20.334Z"); return t}()),
// 			CustomProperties: map[string]*string{
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": to.Ptr("False"),
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("False"),
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("False"),
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("False"),
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": to.Ptr("False"),
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": to.Ptr("False"),
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("False"),
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("False"),
// 			},
// 			DeveloperPortalURL: to.Ptr("https://apimService1.developer.azure-api.net"),
// 			DisableGateway: to.Ptr(false),
// 			GatewayRegionalURL: to.Ptr("https://apimService1-westus-01.regional.azure-api.net"),
// 			GatewayURL: to.Ptr("https://apimService1.azure-api.net"),
// 			HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
// 				{
// 					Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// 					DefaultSSLBinding: to.Ptr(false),
// 					HostName: to.Ptr("apimService1.azure-api.net"),
// 					NegotiateClientCertificate: to.Ptr(false),
// 				},
// 				{
// 					Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// 					Certificate: &armapimanagement.CertificateInformation{
// 						Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2036-01-01T07:00:00.000Z"); return t}()),
// 						Subject: to.Ptr("CN=*.msitesting.net"),
// 						Thumbprint: to.Ptr("8E989XXXXXXXXXXXXXXXXF1D174FDB3A2"),
// 					},
// 					DefaultSSLBinding: to.Ptr(true),
// 					HostName: to.Ptr("gateway1.msitesting.net"),
// 					NegotiateClientCertificate: to.Ptr(false),
// 				},
// 				{
// 					Type: to.Ptr(armapimanagement.HostnameTypeManagement),
// 					Certificate: &armapimanagement.CertificateInformation{
// 						Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2036-01-01T07:00:00.000Z"); return t}()),
// 						Subject: to.Ptr("CN=*.msitesting.net"),
// 						Thumbprint: to.Ptr("8E989XXXXXXXXXXXXXXXXF1D174FDB3A2"),
// 					},
// 					DefaultSSLBinding: to.Ptr(false),
// 					HostName: to.Ptr("mgmt.msitesting.net"),
// 					NegotiateClientCertificate: to.Ptr(false),
// 				},
// 				{
// 					Type: to.Ptr(armapimanagement.HostnameTypePortal),
// 					Certificate: &armapimanagement.CertificateInformation{
// 						Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2036-01-01T07:00:00.000Z"); return t}()),
// 						Subject: to.Ptr("CN=*.msitesting.net"),
// 						Thumbprint: to.Ptr("8E989XXXXXXXXXXXXXXXXF1D174FDB3A2"),
// 					},
// 					DefaultSSLBinding: to.Ptr(false),
// 					HostName: to.Ptr("portal1.msitesting.net"),
// 					NegotiateClientCertificate: to.Ptr(false),
// 			}},
// 			ManagementAPIURL: to.Ptr("https://apimService1.management.azure-api.net"),
// 			NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
// 			PortalURL: to.Ptr("https://apimService1.portal.azure-api.net"),
// 			ProvisioningState: to.Ptr("Succeeded"),
// 			PublicIPAddresses: []*string{
// 				to.Ptr("13.91.32.113")},
// 				ScmURL: to.Ptr("https://apimService1.scm.azure-api.net"),
// 				TargetProvisioningState: to.Ptr(""),
// 				VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
// 				PublisherEmail: to.Ptr("apim@autorestsdk.com"),
// 				PublisherName: to.Ptr("autorestsdk"),
// 			},
// 			SKU: &armapimanagement.ServiceSKUProperties{
// 				Name: to.Ptr(armapimanagement.SKUTypePremium),
// 				Capacity: to.Ptr[int32](1),
// 			},
// 		}
Output:

Example (ApiManagementCreateService)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateService.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServiceClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", armapimanagement.ServiceResource{
	Tags: map[string]*string{
		"Name": to.Ptr("Contoso"),
		"Test": to.Ptr("User"),
	},
	Location: to.Ptr("South Central US"),
	Properties: &armapimanagement.ServiceProperties{
		PublisherEmail: to.Ptr("foo@contoso.com"),
		PublisherName:  to.Ptr("foo"),
	},
	SKU: &armapimanagement.ServiceSKUProperties{
		Name:     to.Ptr(armapimanagement.SKUTypeDeveloper),
		Capacity: to.Ptr[int32](1),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ServiceResource = armapimanagement.ServiceResource{
// 	Name: to.Ptr("apimService1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1"),
// 	Tags: map[string]*string{
// 		"api-version": to.Ptr("2022-08-01"),
// 	},
// 	Etag: to.Ptr("AAAAAAAmREI="),
// 	Location: to.Ptr("East US"),
// 	Properties: &armapimanagement.ServiceProperties{
// 		CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-07-11T18:41:01.250Z"); return t}()),
// 		CustomProperties: map[string]*string{
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("False"),
// 		},
// 		DeveloperPortalURL: to.Ptr("https://apimService1.developer.azure-api.net"),
// 		DisableGateway: to.Ptr(false),
// 		GatewayRegionalURL: to.Ptr("https://apimService1-eastus-01.regional.azure-api.net"),
// 		GatewayURL: to.Ptr("https://apimService1.azure-api.net"),
// 		HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
// 			{
// 				Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// 				CertificateSource: to.Ptr(armapimanagement.CertificateSourceBuiltIn),
// 				DefaultSSLBinding: to.Ptr(true),
// 				HostName: to.Ptr("apimService1.azure-api.net"),
// 				NegotiateClientCertificate: to.Ptr(false),
// 		}},
// 		ManagementAPIURL: to.Ptr("https://apimService1.management.azure-api.net"),
// 		NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
// 		PlatformVersion: to.Ptr(armapimanagement.PlatformVersionStv1),
// 		PortalURL: to.Ptr("https://apimService1.portal.azure-api.net"),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		PublicIPAddresses: []*string{
// 			to.Ptr("13.90.229.33")},
// 			PublicNetworkAccess: to.Ptr(armapimanagement.PublicNetworkAccessEnabled),
// 			ScmURL: to.Ptr("https://apimService1.scm.azure-api.net"),
// 			TargetProvisioningState: to.Ptr(""),
// 			VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
// 			PublisherEmail: to.Ptr("samir@microsoft.com"),
// 			PublisherName: to.Ptr("foo"),
// 		},
// 		SKU: &armapimanagement.ServiceSKUProperties{
// 			Name: to.Ptr(armapimanagement.SKUTypeStandard),
// 			Capacity: to.Ptr[int32](1),
// 		},
// 		SystemData: &armapimanagement.SystemData{
// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-07-11T18:41:00.939Z"); return t}()),
// 			CreatedBy: to.Ptr("user@contoso.com"),
// 			CreatedByType: to.Ptr(armapimanagement.CreatedByTypeUser),
// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-07-11T18:41:00.939Z"); return t}()),
// 			LastModifiedBy: to.Ptr("user@contoso.com"),
// 			LastModifiedByType: to.Ptr(armapimanagement.CreatedByTypeUser),
// 		},
// 	}
Output:

Example (ApiManagementCreateServiceHavingMsi)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceHavingMsi.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServiceClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", armapimanagement.ServiceResource{
	Tags: map[string]*string{
		"tag1": to.Ptr("value1"),
		"tag2": to.Ptr("value2"),
		"tag3": to.Ptr("value3"),
	},
	Identity: &armapimanagement.ServiceIdentity{
		Type: to.Ptr(armapimanagement.ApimIdentityTypeSystemAssigned),
	},
	Location: to.Ptr("West US"),
	Properties: &armapimanagement.ServiceProperties{
		PublisherEmail: to.Ptr("apim@autorestsdk.com"),
		PublisherName:  to.Ptr("autorestsdk"),
	},
	SKU: &armapimanagement.ServiceSKUProperties{
		Name:     to.Ptr(armapimanagement.SKUTypeConsumption),
		Capacity: to.Ptr[int32](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.ServiceResource = armapimanagement.ServiceResource{
// 	Name: to.Ptr("apimService1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1"),
// 	Tags: map[string]*string{
// 		"tag1": to.Ptr("value1"),
// 		"tag2": to.Ptr("value2"),
// 		"tag3": to.Ptr("value3"),
// 	},
// 	Etag: to.Ptr("AAAAAAAAWiU="),
// 	Identity: &armapimanagement.ServiceIdentity{
// 		Type: to.Ptr(armapimanagement.ApimIdentityTypeSystemAssigned),
// 		PrincipalID: to.Ptr("dfb9a757-df69-4966-a8d0-711a9cd8ffb4"),
// 		TenantID: to.Ptr("00000000-86f1-41af-91ab-2d7cd011db47"),
// 	},
// 	Location: to.Ptr("West US"),
// 	Properties: &armapimanagement.ServiceProperties{
// 		CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-11T16:29:29.971Z"); return t}()),
// 		EnableClientCertificate: to.Ptr(false),
// 		GatewayURL: to.Ptr("https://apimService1.azure-api.net"),
// 		HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
// 			{
// 				Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// 				CertificateSource: to.Ptr(armapimanagement.CertificateSourceBuiltIn),
// 				DefaultSSLBinding: to.Ptr(true),
// 				HostName: to.Ptr("apimService1.azure-api.net"),
// 				NegotiateClientCertificate: to.Ptr(false),
// 		}},
// 		NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
// 		PlatformVersion: to.Ptr(armapimanagement.PlatformVersionMtv1),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		TargetProvisioningState: to.Ptr(""),
// 		VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
// 		PublisherEmail: to.Ptr("apim@autorestsdk.com"),
// 		PublisherName: to.Ptr("autorestsdk"),
// 	},
// 	SKU: &armapimanagement.ServiceSKUProperties{
// 		Name: to.Ptr(armapimanagement.SKUTypeConsumption),
// 		Capacity: to.Ptr[int32](0),
// 	},
// 	SystemData: &armapimanagement.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()),
// 		CreatedBy: to.Ptr("string"),
// 		CreatedByType: to.Ptr(armapimanagement.CreatedByTypeApplication),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-02T02:03:01.197Z"); return t}()),
// 		LastModifiedBy: to.Ptr("string"),
// 		LastModifiedByType: to.Ptr(armapimanagement.CreatedByTypeApplication),
// 	},
// }
Output:

Example (ApiManagementCreateServiceInVnetWithPublicIp)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceInVnetWithPublicIP.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServiceClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", armapimanagement.ServiceResource{
	Tags: map[string]*string{
		"tag1": to.Ptr("value1"),
		"tag2": to.Ptr("value2"),
		"tag3": to.Ptr("value3"),
	},
	Location: to.Ptr("East US 2 EUAP"),
	Properties: &armapimanagement.ServiceProperties{
		PublicIPAddressID: to.Ptr("/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/publicIPAddresses/apimazvnet"),
		VirtualNetworkConfiguration: &armapimanagement.VirtualNetworkConfiguration{
			SubnetResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/virtualNetworks/apimcus/subnets/tenant"),
		},
		VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeExternal),
		PublisherEmail:     to.Ptr("apim@autorestsdk.com"),
		PublisherName:      to.Ptr("autorestsdk"),
	},
	SKU: &armapimanagement.ServiceSKUProperties{
		Name:     to.Ptr(armapimanagement.SKUTypePremium),
		Capacity: to.Ptr[int32](2),
	},
	Zones: []*string{
		to.Ptr("1"),
		to.Ptr("2")},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ServiceResource = armapimanagement.ServiceResource{
// 	Name: to.Ptr("apimService1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.ApiManagement/service/apimService1"),
// 	Tags: map[string]*string{
// 		"tag1": to.Ptr("value1"),
// 		"tag2": to.Ptr("value2"),
// 		"tag3": to.Ptr("value3"),
// 	},
// 	Etag: to.Ptr("AAAAAAAGTAs="),
// 	Location: to.Ptr("East US 2 EUAP"),
// 	Properties: &armapimanagement.ServiceProperties{
// 		CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-02-22T06:53:46.640Z"); return t}()),
// 		CustomProperties: map[string]*string{
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("False"),
// 		},
// 		DeveloperPortalURL: to.Ptr("https://apimService1.developer.azure-api.net"),
// 		DisableGateway: to.Ptr(false),
// 		GatewayRegionalURL: to.Ptr("https://apimService1-eastus2euap-01.regional.azure-api.net"),
// 		GatewayURL: to.Ptr("https://apimService1.azure-api.net"),
// 		HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
// 			{
// 				Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// 				DefaultSSLBinding: to.Ptr(true),
// 				HostName: to.Ptr("apimService1.azure-api.net"),
// 				NegotiateClientCertificate: to.Ptr(false),
// 		}},
// 		ManagementAPIURL: to.Ptr("https://apimService1.management.azure-api.net"),
// 		NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
// 		PlatformVersion: to.Ptr(armapimanagement.PlatformVersionStv2),
// 		PortalURL: to.Ptr("https://apimService1.portal.azure-api.net"),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		PublicIPAddresses: []*string{
// 			to.Ptr("20.47.137.XXX")},
// 			PublicIPAddressID: to.Ptr("/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/publicIPAddresses/apimazvnet"),
// 			ScmURL: to.Ptr("https://apimService1.scm.azure-api.net"),
// 			TargetProvisioningState: to.Ptr(""),
// 			VirtualNetworkConfiguration: &armapimanagement.VirtualNetworkConfiguration{
// 				SubnetResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/virtualNetworks/apimcus/subnets/tenant"),
// 			},
// 			VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeExternal),
// 			PublisherEmail: to.Ptr("apim@autorestsdk.com"),
// 			PublisherName: to.Ptr("autorestsdk"),
// 		},
// 		SKU: &armapimanagement.ServiceSKUProperties{
// 			Name: to.Ptr(armapimanagement.SKUTypePremium),
// 			Capacity: to.Ptr[int32](2),
// 		},
// 		SystemData: &armapimanagement.SystemData{
// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()),
// 			CreatedBy: to.Ptr("string"),
// 			CreatedByType: to.Ptr(armapimanagement.CreatedByTypeApplication),
// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-02T02:03:01.197Z"); return t}()),
// 			LastModifiedBy: to.Ptr("string"),
// 			LastModifiedByType: to.Ptr(armapimanagement.CreatedByTypeApplication),
// 		},
// 		Zones: []*string{
// 			to.Ptr("1"),
// 			to.Ptr("2")},
// 		}
Output:

Example (ApiManagementCreateServiceInZones)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceInZones.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServiceClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", armapimanagement.ServiceResource{
	Tags: map[string]*string{
		"tag1": to.Ptr("value1"),
		"tag2": to.Ptr("value2"),
		"tag3": to.Ptr("value3"),
	},
	Location: to.Ptr("North europe"),
	Properties: &armapimanagement.ServiceProperties{
		PublisherEmail: to.Ptr("apim@autorestsdk.com"),
		PublisherName:  to.Ptr("autorestsdk"),
	},
	SKU: &armapimanagement.ServiceSKUProperties{
		Name:     to.Ptr(armapimanagement.SKUTypePremium),
		Capacity: to.Ptr[int32](2),
	},
	Zones: []*string{
		to.Ptr("1"),
		to.Ptr("2")},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ServiceResource = armapimanagement.ServiceResource{
// 	Name: to.Ptr("apimService1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1"),
// 	Tags: map[string]*string{
// 		"tag1": to.Ptr("value1"),
// 		"tag2": to.Ptr("value2"),
// 		"tag3": to.Ptr("value3"),
// 	},
// 	Etag: to.Ptr("AAAAAAAiXvE="),
// 	Location: to.Ptr("North Europe"),
// 	Properties: &armapimanagement.ServiceProperties{
// 		CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-07-28T23:18:14.656Z"); return t}()),
// 		CustomProperties: map[string]*string{
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("False"),
// 		},
// 		DeveloperPortalURL: to.Ptr("https://apimService1.developer.azure-api.net"),
// 		DisableGateway: to.Ptr(false),
// 		GatewayRegionalURL: to.Ptr("https://apimService1-northeurope-01.regional.azure-api.net"),
// 		GatewayURL: to.Ptr("https://apimService1.azure-api.net"),
// 		HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
// 			{
// 				Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// 				DefaultSSLBinding: to.Ptr(true),
// 				HostName: to.Ptr("apimService1.azure-api.net"),
// 				NegotiateClientCertificate: to.Ptr(false),
// 		}},
// 		ManagementAPIURL: to.Ptr("https://apimService1.management.azure-api.net"),
// 		NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
// 		PlatformVersion: to.Ptr(armapimanagement.PlatformVersionStv2),
// 		PortalURL: to.Ptr("https://apimService1.portal.azure-api.net"),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		PublicIPAddresses: []*string{
// 			to.Ptr("20.54.34.66")},
// 			ScmURL: to.Ptr("https://apimService1.scm.azure-api.net"),
// 			TargetProvisioningState: to.Ptr(""),
// 			VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
// 			PublisherEmail: to.Ptr("apim@autorestsdk.com"),
// 			PublisherName: to.Ptr("autorestsdk"),
// 		},
// 		SKU: &armapimanagement.ServiceSKUProperties{
// 			Name: to.Ptr(armapimanagement.SKUTypePremium),
// 			Capacity: to.Ptr[int32](2),
// 		},
// 		SystemData: &armapimanagement.SystemData{
// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()),
// 			CreatedBy: to.Ptr("string"),
// 			CreatedByType: to.Ptr(armapimanagement.CreatedByTypeApplication),
// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-02T02:03:01.197Z"); return t}()),
// 			LastModifiedBy: to.Ptr("string"),
// 			LastModifiedByType: to.Ptr(armapimanagement.CreatedByTypeApplication),
// 		},
// 		Zones: []*string{
// 			to.Ptr("1"),
// 			to.Ptr("2")},
// 		}
Output:

Example (ApiManagementCreateServiceWithCustomHostnameKeyVault)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceWithCustomHostnameKeyVault.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServiceClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", armapimanagement.ServiceResource{
	Tags: map[string]*string{
		"tag1": to.Ptr("value1"),
		"tag2": to.Ptr("value2"),
		"tag3": to.Ptr("value3"),
	},
	Identity: &armapimanagement.ServiceIdentity{
		Type: to.Ptr(armapimanagement.ApimIdentityTypeUserAssigned),
		UserAssignedIdentities: map[string]*armapimanagement.UserIdentityProperties{
			"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
		},
	},
	Location: to.Ptr("North Europe"),
	Properties: &armapimanagement.ServiceProperties{
		APIVersionConstraint: &armapimanagement.APIVersionConstraint{
			MinAPIVersion: to.Ptr("2019-01-01"),
		},
		HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
			{
				Type:              to.Ptr(armapimanagement.HostnameTypeProxy),
				DefaultSSLBinding: to.Ptr(true),
				HostName:          to.Ptr("gateway1.msitesting.net"),
				IdentityClientID:  to.Ptr("329419bc-adec-4dce-9568-25a6d486e468"),
				KeyVaultID:        to.Ptr("https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert"),
			},
			{
				Type:             to.Ptr(armapimanagement.HostnameTypeManagement),
				HostName:         to.Ptr("mgmt.msitesting.net"),
				IdentityClientID: to.Ptr("329419bc-adec-4dce-9568-25a6d486e468"),
				KeyVaultID:       to.Ptr("https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert"),
			},
			{
				Type:             to.Ptr(armapimanagement.HostnameTypePortal),
				HostName:         to.Ptr("portal1.msitesting.net"),
				IdentityClientID: to.Ptr("329419bc-adec-4dce-9568-25a6d486e468"),
				KeyVaultID:       to.Ptr("https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert"),
			}},
		VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
		PublisherEmail:     to.Ptr("apim@autorestsdk.com"),
		PublisherName:      to.Ptr("autorestsdk"),
	},
	SKU: &armapimanagement.ServiceSKUProperties{
		Name:     to.Ptr(armapimanagement.SKUTypePremium),
		Capacity: to.Ptr[int32](1),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ServiceResource = armapimanagement.ServiceResource{
// 	Name: to.Ptr("apimService1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1"),
// 	Tags: map[string]*string{
// 		"tag1": to.Ptr("value1"),
// 		"tag2": to.Ptr("value2"),
// 		"tag3": to.Ptr("value3"),
// 	},
// 	Etag: to.Ptr("AAAAAAAigjU="),
// 	Identity: &armapimanagement.ServiceIdentity{
// 		Type: to.Ptr(armapimanagement.ApimIdentityTypeUserAssigned),
// 		TenantID: to.Ptr("f686d426-8d16-0000-0000-ab578e110ccd"),
// 		UserAssignedIdentities: map[string]*armapimanagement.UserIdentityProperties{
// 			"/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armapimanagement.UserIdentityProperties{
// 				ClientID: to.Ptr("329419bc-adec-4dce-9568-25a6d486e468"),
// 				PrincipalID: to.Ptr("15e769b2-0000-0000-0000-3fd9a923ac3a"),
// 			},
// 		},
// 	},
// 	Location: to.Ptr("North Europe"),
// 	Properties: &armapimanagement.ServiceProperties{
// 		APIVersionConstraint: &armapimanagement.APIVersionConstraint{
// 			MinAPIVersion: to.Ptr("2019-01-01"),
// 		},
// 		CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-13T22:30:20.775Z"); return t}()),
// 		CustomProperties: map[string]*string{
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("False"),
// 		},
// 		DeveloperPortalURL: to.Ptr("https://apimService1.developer.azure-api.net"),
// 		DisableGateway: to.Ptr(false),
// 		GatewayRegionalURL: to.Ptr("https://apimService1-northeurope-01.regional.azure-api.net"),
// 		GatewayURL: to.Ptr("https://apimService1.azure-api.net"),
// 		HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
// 			{
// 				Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// 				CertificateSource: to.Ptr(armapimanagement.CertificateSourceBuiltIn),
// 				DefaultSSLBinding: to.Ptr(false),
// 				HostName: to.Ptr("apimService1.azure-api.net"),
// 				NegotiateClientCertificate: to.Ptr(false),
// 			},
// 			{
// 				Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// 				Certificate: &armapimanagement.CertificateInformation{
// 					Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2037-01-01T07:00:00.000Z"); return t}()),
// 					Subject: to.Ptr("CN=*.msitesting.net"),
// 					Thumbprint: to.Ptr("EA276907917CB5XXXXXXXXXXX690"),
// 				},
// 				CertificateSource: to.Ptr(armapimanagement.CertificateSourceKeyVault),
// 				DefaultSSLBinding: to.Ptr(true),
// 				HostName: to.Ptr("gateway1.msitesting.net"),
// 				IdentityClientID: to.Ptr("329419bc-adec-4dce-9568-25a6d486e468"),
// 				KeyVaultID: to.Ptr("https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert"),
// 				NegotiateClientCertificate: to.Ptr(false),
// 			},
// 			{
// 				Type: to.Ptr(armapimanagement.HostnameTypeManagement),
// 				Certificate: &armapimanagement.CertificateInformation{
// 					Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2037-01-01T07:00:00.000Z"); return t}()),
// 					Subject: to.Ptr("CN=*.msitesting.net"),
// 					Thumbprint: to.Ptr("EA276907917CB5XXXXXXXXXXX690"),
// 				},
// 				CertificateSource: to.Ptr(armapimanagement.CertificateSourceKeyVault),
// 				DefaultSSLBinding: to.Ptr(false),
// 				HostName: to.Ptr("mgmt.msitesting.net"),
// 				IdentityClientID: to.Ptr("329419bc-adec-4dce-9568-25a6d486e468"),
// 				KeyVaultID: to.Ptr("https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert"),
// 				NegotiateClientCertificate: to.Ptr(false),
// 			},
// 			{
// 				Type: to.Ptr(armapimanagement.HostnameTypePortal),
// 				Certificate: &armapimanagement.CertificateInformation{
// 					Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2037-01-01T07:00:00.000Z"); return t}()),
// 					Subject: to.Ptr("CN=*.msitesting.net"),
// 					Thumbprint: to.Ptr("EA276907917CB5XXXXXXXXXXX690"),
// 				},
// 				CertificateSource: to.Ptr(armapimanagement.CertificateSourceKeyVault),
// 				DefaultSSLBinding: to.Ptr(false),
// 				HostName: to.Ptr("portal1.msitesting.net"),
// 				IdentityClientID: to.Ptr("329419bc-adec-4dce-9568-25a6d486e468"),
// 				KeyVaultID: to.Ptr("https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert"),
// 				NegotiateClientCertificate: to.Ptr(false),
// 		}},
// 		ManagementAPIURL: to.Ptr("https://apimService1.management.azure-api.net"),
// 		NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
// 		PlatformVersion: to.Ptr(armapimanagement.PlatformVersionStv2),
// 		PortalURL: to.Ptr("https://apimService1.portal.azure-api.net"),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		PublicIPAddresses: []*string{
// 			to.Ptr("40.112.74.192")},
// 			ScmURL: to.Ptr("https://apimService1.scm.azure-api.net"),
// 			TargetProvisioningState: to.Ptr(""),
// 			VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
// 			PublisherEmail: to.Ptr("apim@autorestsdk.com"),
// 			PublisherName: to.Ptr("autorestsdk"),
// 		},
// 		SKU: &armapimanagement.ServiceSKUProperties{
// 			Name: to.Ptr(armapimanagement.SKUTypePremium),
// 			Capacity: to.Ptr[int32](1),
// 		},
// 		SystemData: &armapimanagement.SystemData{
// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()),
// 			CreatedBy: to.Ptr("string"),
// 			CreatedByType: to.Ptr(armapimanagement.CreatedByTypeApplication),
// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-02T02:03:01.197Z"); return t}()),
// 			LastModifiedBy: to.Ptr("string"),
// 			LastModifiedByType: to.Ptr(armapimanagement.CreatedByTypeApplication),
// 		},
// 	}
Output:

Example (ApiManagementCreateServiceWithNatGatewayEnabled)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceWithNatGatewayEnabled.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServiceClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", armapimanagement.ServiceResource{
	Tags: map[string]*string{
		"tag1": to.Ptr("value1"),
		"tag2": to.Ptr("value2"),
		"tag3": to.Ptr("value3"),
	},
	Location: to.Ptr("East US"),
	Properties: &armapimanagement.ServiceProperties{
		NatGatewayState: to.Ptr(armapimanagement.NatGatewayStateEnabled),
		PublisherEmail:  to.Ptr("apim@autorestsdk.com"),
		PublisherName:   to.Ptr("autorestsdk"),
	},
	SKU: &armapimanagement.ServiceSKUProperties{
		Name:     to.Ptr(armapimanagement.SKUTypePremium),
		Capacity: to.Ptr[int32](1),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ServiceResource = armapimanagement.ServiceResource{
// 	Name: to.Ptr("apimService1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1"),
// 	Tags: map[string]*string{
// 		"api-version": to.Ptr("2022-08-01"),
// 	},
// 	Etag: to.Ptr("AAAAAAAmREI="),
// 	Location: to.Ptr("East US"),
// 	Properties: &armapimanagement.ServiceProperties{
// 		APIVersionConstraint: &armapimanagement.APIVersionConstraint{
// 		},
// 		CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-07-26T18:41:01.250Z"); return t}()),
// 		CustomProperties: map[string]*string{
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": to.Ptr("false"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("false"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("false"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("false"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": to.Ptr("false"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": to.Ptr("false"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("false"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("false"),
// 		},
// 		DeveloperPortalURL: to.Ptr("https://apimService1.developer.azure-api.net"),
// 		DisableGateway: to.Ptr(false),
// 		GatewayRegionalURL: to.Ptr("https://apimService1-eastus-01.regional.azure-api.net"),
// 		GatewayURL: to.Ptr("https://apimService1.azure-api.net"),
// 		HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
// 			{
// 				Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// 				CertificateSource: to.Ptr(armapimanagement.CertificateSourceBuiltIn),
// 				DefaultSSLBinding: to.Ptr(true),
// 				HostName: to.Ptr("apimService1.azure-api.net"),
// 				NegotiateClientCertificate: to.Ptr(false),
// 		}},
// 		ManagementAPIURL: to.Ptr("https://apimService1.management.azure-api.net"),
// 		NatGatewayState: to.Ptr(armapimanagement.NatGatewayStateEnabled),
// 		NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
// 		OutboundPublicIPAddresses: []*string{
// 			to.Ptr("60.0.0.0/31")},
// 			PlatformVersion: to.Ptr(armapimanagement.PlatformVersionStv2),
// 			PortalURL: to.Ptr("https://apimService1.portal.azure-api.net"),
// 			ProvisioningState: to.Ptr("Succeeded"),
// 			PublicIPAddresses: []*string{
// 				to.Ptr("13.90.229.33")},
// 				PublicNetworkAccess: to.Ptr(armapimanagement.PublicNetworkAccessEnabled),
// 				ScmURL: to.Ptr("https://apimService1.scm.azure-api.net"),
// 				TargetProvisioningState: to.Ptr(""),
// 				VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
// 				PublisherEmail: to.Ptr("apim@autorestsdk.com"),
// 				PublisherName: to.Ptr("autorestsdk"),
// 			},
// 			SKU: &armapimanagement.ServiceSKUProperties{
// 				Name: to.Ptr(armapimanagement.SKUTypePremium),
// 				Capacity: to.Ptr[int32](1),
// 			},
// 			SystemData: &armapimanagement.SystemData{
// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-07-11T18:41:00.939Z"); return t}()),
// 				CreatedBy: to.Ptr("user@contoso.com"),
// 				CreatedByType: to.Ptr(armapimanagement.CreatedByTypeUser),
// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-07-11T18:41:00.939Z"); return t}()),
// 				LastModifiedBy: to.Ptr("user@contoso.com"),
// 				LastModifiedByType: to.Ptr(armapimanagement.CreatedByTypeUser),
// 			},
// 		}
Output:

Example (ApiManagementCreateServiceWithSystemCertificates)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceWithSystemCertificates.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServiceClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", armapimanagement.ServiceResource{
	Tags: map[string]*string{
		"tag1": to.Ptr("value1"),
		"tag2": to.Ptr("value2"),
		"tag3": to.Ptr("value3"),
	},
	Location: to.Ptr("Central US"),
	Properties: &armapimanagement.ServiceProperties{
		Certificates: []*armapimanagement.CertificateConfiguration{
			{
				CertificatePassword: to.Ptr("Password"),
				EncodedCertificate:  to.Ptr("*******Base64 encoded Certificate******************"),
				StoreName:           to.Ptr(armapimanagement.CertificateConfigurationStoreNameCertificateAuthority),
			}},
		PublisherEmail: to.Ptr("apim@autorestsdk.com"),
		PublisherName:  to.Ptr("autorestsdk"),
	},
	SKU: &armapimanagement.ServiceSKUProperties{
		Name:     to.Ptr(armapimanagement.SKUTypeBasic),
		Capacity: to.Ptr[int32](1),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ServiceResource = armapimanagement.ServiceResource{
// 	Name: to.Ptr("apimService1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1"),
// 	Tags: map[string]*string{
// 		"tag1": to.Ptr("value1"),
// 		"tag2": to.Ptr("value2"),
// 		"tag3": to.Ptr("value3"),
// 	},
// 	Etag: to.Ptr("AAAAAAAp3UM="),
// 	Location: to.Ptr("Central US"),
// 	Properties: &armapimanagement.ServiceProperties{
// 		APIVersionConstraint: &armapimanagement.APIVersionConstraint{
// 		},
// 		Certificates: []*armapimanagement.CertificateConfiguration{
// 			{
// 				Certificate: &armapimanagement.CertificateInformation{
// 					Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2036-01-01T07:00:00.000Z"); return t}()),
// 					Subject: to.Ptr("CN=*.msitesting.net"),
// 					Thumbprint: to.Ptr("8E989652CABCF585ACBFCB9C2C91F1D174FDB3A2"),
// 				},
// 				StoreName: to.Ptr(armapimanagement.CertificateConfigurationStoreNameCertificateAuthority),
// 		}},
// 		CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-18T06:33:28.090Z"); return t}()),
// 		CustomProperties: map[string]*string{
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("False"),
// 		},
// 		DeveloperPortalURL: to.Ptr("https://apimService1.developer.azure-api.net"),
// 		DisableGateway: to.Ptr(false),
// 		GatewayRegionalURL: to.Ptr("https://apimService1-centralus-01.regional.azure-api.net"),
// 		GatewayURL: to.Ptr("https://apimService1.azure-api.net"),
// 		HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
// 			{
// 				Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// 				CertificateSource: to.Ptr(armapimanagement.CertificateSourceBuiltIn),
// 				DefaultSSLBinding: to.Ptr(true),
// 				HostName: to.Ptr("apimService1.azure-api.net"),
// 				NegotiateClientCertificate: to.Ptr(false),
// 		}},
// 		ManagementAPIURL: to.Ptr("https://apimService1.management.azure-api.net"),
// 		NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
// 		PlatformVersion: to.Ptr(armapimanagement.PlatformVersionStv2),
// 		PortalURL: to.Ptr("https://apimService1.portal.azure-api.net"),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		PublicIPAddresses: []*string{
// 			to.Ptr("40.113.223.117")},
// 			ScmURL: to.Ptr("https://apimService1.scm.azure-api.net"),
// 			TargetProvisioningState: to.Ptr(""),
// 			VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
// 			PublisherEmail: to.Ptr("apim@autorestsdk.com"),
// 			PublisherName: to.Ptr("autorestsdk"),
// 		},
// 		SKU: &armapimanagement.ServiceSKUProperties{
// 			Name: to.Ptr(armapimanagement.SKUTypeBasic),
// 			Capacity: to.Ptr[int32](1),
// 		},
// 		SystemData: &armapimanagement.SystemData{
// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()),
// 			CreatedBy: to.Ptr("string"),
// 			CreatedByType: to.Ptr(armapimanagement.CreatedByTypeApplication),
// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-02T02:03:01.197Z"); return t}()),
// 			LastModifiedBy: to.Ptr("string"),
// 			LastModifiedByType: to.Ptr(armapimanagement.CreatedByTypeApplication),
// 		},
// 	}
Output:

Example (ApiManagementCreateServiceWithUserAssignedIdentity)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceWithUserAssignedIdentity.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServiceClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", armapimanagement.ServiceResource{
	Tags: map[string]*string{
		"tag1": to.Ptr("value1"),
		"tag2": to.Ptr("value2"),
		"tag3": to.Ptr("value3"),
	},
	Identity: &armapimanagement.ServiceIdentity{
		Type: to.Ptr(armapimanagement.ApimIdentityTypeUserAssigned),
		UserAssignedIdentities: map[string]*armapimanagement.UserIdentityProperties{
			"/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apimService1": {},
		},
	},
	Location: to.Ptr("West US"),
	Properties: &armapimanagement.ServiceProperties{
		PublisherEmail: to.Ptr("apim@autorestsdk.com"),
		PublisherName:  to.Ptr("autorestsdk"),
	},
	SKU: &armapimanagement.ServiceSKUProperties{
		Name:     to.Ptr(armapimanagement.SKUTypeConsumption),
		Capacity: to.Ptr[int32](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.ServiceResource = armapimanagement.ServiceResource{
// 	Name: to.Ptr("apimService1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1"),
// 	Tags: map[string]*string{
// 		"tag1": to.Ptr("value1"),
// 		"tag2": to.Ptr("value2"),
// 		"tag3": to.Ptr("value3"),
// 	},
// 	Etag: to.Ptr("AAAAAAAFzyk="),
// 	Identity: &armapimanagement.ServiceIdentity{
// 		Type: to.Ptr(armapimanagement.ApimIdentityTypeUserAssigned),
// 		TenantID: to.Ptr("00000000-86f1-41af-0000-2d7cd011db47"),
// 		UserAssignedIdentities: map[string]*armapimanagement.UserIdentityProperties{
// 			"/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apimService1": &armapimanagement.UserIdentityProperties{
// 				ClientID: to.Ptr("5a2c6b8e-0905-0000-a772-993c9418137f"),
// 				PrincipalID: to.Ptr("00000000-6e62-4649-9f54-a119fc1ba85e"),
// 			},
// 		},
// 	},
// 	Location: to.Ptr("West US"),
// 	Properties: &armapimanagement.ServiceProperties{
// 		CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-12T01:05:33.457Z"); return t}()),
// 		CustomProperties: map[string]*string{
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("False"),
// 		},
// 		DisableGateway: to.Ptr(false),
// 		GatewayURL: to.Ptr("https://apimService1.azure-api.net"),
// 		HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
// 			{
// 				Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// 				CertificateSource: to.Ptr(armapimanagement.CertificateSourceBuiltIn),
// 				DefaultSSLBinding: to.Ptr(true),
// 				HostName: to.Ptr("apimService1.azure-api.net"),
// 				NegotiateClientCertificate: to.Ptr(false),
// 		}},
// 		NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
// 		PlatformVersion: to.Ptr(armapimanagement.PlatformVersionMtv1),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		TargetProvisioningState: to.Ptr(""),
// 		VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
// 		PublisherEmail: to.Ptr("apim@autorestsdk.com"),
// 		PublisherName: to.Ptr("autorestsdk"),
// 	},
// 	SKU: &armapimanagement.ServiceSKUProperties{
// 		Name: to.Ptr(armapimanagement.SKUTypeConsumption),
// 		Capacity: to.Ptr[int32](0),
// 	},
// 	SystemData: &armapimanagement.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T01:01:01.107Z"); return t}()),
// 		CreatedBy: to.Ptr("string"),
// 		CreatedByType: to.Ptr(armapimanagement.CreatedByTypeApplication),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-02T02:03:01.197Z"); return t}()),
// 		LastModifiedBy: to.Ptr("string"),
// 		LastModifiedByType: to.Ptr(armapimanagement.CreatedByTypeApplication),
// 	},
// }
Output:

Example (ApiManagementUndelete)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUndelete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServiceClient().BeginCreateOrUpdate(ctx, "rg1", "apimService1", armapimanagement.ServiceResource{
	Location: to.Ptr("South Central US"),
	Properties: &armapimanagement.ServiceProperties{
		Restore:        to.Ptr(true),
		PublisherEmail: to.Ptr("foo@contoso.com"),
		PublisherName:  to.Ptr("foo"),
	},
	SKU: &armapimanagement.ServiceSKUProperties{
		Name:     to.Ptr(armapimanagement.SKUTypeDeveloper),
		Capacity: to.Ptr[int32](1),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ServiceResource = armapimanagement.ServiceResource{
// 	Name: to.Ptr("apimService1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1"),
// 	Etag: to.Ptr("AAAAAAAp3T4="),
// 	Location: to.Ptr("South Central US"),
// 	Properties: &armapimanagement.ServiceProperties{
// 		APIVersionConstraint: &armapimanagement.APIVersionConstraint{
// 		},
// 		CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-18T06:10:56.032Z"); return t}()),
// 		CustomProperties: map[string]*string{
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("False"),
// 		},
// 		DeveloperPortalURL: to.Ptr("https://apimService1.developer.azure-api.net"),
// 		DisableGateway: to.Ptr(false),
// 		GatewayRegionalURL: to.Ptr("https://apimService1-southcentralus-01.regional.azure-api.net"),
// 		GatewayURL: to.Ptr("https://apimService1.azure-api.net"),
// 		HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
// 			{
// 				Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// 				DefaultSSLBinding: to.Ptr(true),
// 				HostName: to.Ptr("apimService1.azure-api.net"),
// 				NegotiateClientCertificate: to.Ptr(false),
// 		}},
// 		ManagementAPIURL: to.Ptr("https://apimService1.management.azure-api.net"),
// 		NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
// 		PortalURL: to.Ptr("https://apimService1.portal.azure-api.net"),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		PublicIPAddresses: []*string{
// 			to.Ptr("23.102.171.124")},
// 			ScmURL: to.Ptr("https://apimService1.scm.azure-api.net"),
// 			TargetProvisioningState: to.Ptr(""),
// 			VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
// 			PublisherEmail: to.Ptr("foo@contoso.com"),
// 			PublisherName: to.Ptr("foo"),
// 		},
// 		SKU: &armapimanagement.ServiceSKUProperties{
// 			Name: to.Ptr(armapimanagement.SKUTypeDeveloper),
// 			Capacity: to.Ptr[int32](1),
// 		},
// 	}
Output:

func (*ServiceClient) BeginDelete

func (client *ServiceClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientBeginDeleteOptions) (*runtime.Poller[ServiceClientDeleteResponse], error)

BeginDelete - Deletes an existing API Management service. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - ServiceClientBeginDeleteOptions contains the optional parameters for the ServiceClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceDeleteService.json

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

func (client *ServiceClient) BeginMigrateToStv2(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientBeginMigrateToStv2Options) (*runtime.Poller[ServiceClientMigrateToStv2Response], error)

BeginMigrateToStv2 - Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - ServiceClientBeginMigrateToStv2Options contains the optional parameters for the ServiceClient.BeginMigrateToStv2 method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceMigrateToStv2.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServiceClient().BeginMigrateToStv2(ctx, "rg1", "apimService1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ServiceResource = armapimanagement.ServiceResource{
// 	Name: to.Ptr("apimservice1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimservice1"),
// 	Tags: map[string]*string{
// 	},
// 	Etag: to.Ptr("AAAAAADqC0c="),
// 	Location: to.Ptr("West US"),
// 	Properties: &armapimanagement.ServiceProperties{
// 		AdditionalLocations: []*armapimanagement.AdditionalLocation{
// 			{
// 				DisableGateway: to.Ptr(false),
// 				GatewayRegionalURL: to.Ptr("https://apimservice1-westus2-01.regional.azure-api.net"),
// 				Location: to.Ptr("West US 2"),
// 				PrivateIPAddresses: []*string{
// 					to.Ptr("10.0.X.6")},
// 					PublicIPAddresses: []*string{
// 						to.Ptr("40.XXX.79.187")},
// 						SKU: &armapimanagement.ServiceSKUProperties{
// 							Name: to.Ptr(armapimanagement.SKUTypePremium),
// 							Capacity: to.Ptr[int32](1),
// 						},
// 						VirtualNetworkConfiguration: &armapimanagement.VirtualNetworkConfiguration{
// 							SubnetResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/APIMVNet/subnets/apim-internal-sub"),
// 						},
// 				}},
// 				APIVersionConstraint: &armapimanagement.APIVersionConstraint{
// 				},
// 				CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-02T01:42:09.126Z"); return t}()),
// 				CustomProperties: map[string]*string{
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("False"),
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("True"),
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("True"),
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": to.Ptr("True"),
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": to.Ptr("False"),
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("True"),
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("True"),
// 				},
// 				DeveloperPortalURL: to.Ptr("https://apimService1.developer.azure-api.net"),
// 				DisableGateway: to.Ptr(false),
// 				GatewayRegionalURL: to.Ptr("https://apimservice1-westus-01.regional.azure-api.net"),
// 				GatewayURL: to.Ptr("https://apimservice1.azure-api.net"),
// 				HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
// 					{
// 						Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// 						CertificateSource: to.Ptr(armapimanagement.CertificateSourceBuiltIn),
// 						DefaultSSLBinding: to.Ptr(false),
// 						HostName: to.Ptr("apimService1.azure-api.net"),
// 						NegotiateClientCertificate: to.Ptr(false),
// 					},
// 					{
// 						Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// 						Certificate: &armapimanagement.CertificateInformation{
// 							Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-08-16T16:51:34.000Z"); return t}()),
// 							Subject: to.Ptr("CN=*.preview.net"),
// 							Thumbprint: to.Ptr("B4330123DBAXXXXXXXXX1F35E84493476"),
// 						},
// 						CertificateSource: to.Ptr(armapimanagement.CertificateSourceCustom),
// 						DefaultSSLBinding: to.Ptr(true),
// 						HostName: to.Ptr("apimgatewaytest.preview.net"),
// 						NegotiateClientCertificate: to.Ptr(false),
// 				}},
// 				ManagementAPIURL: to.Ptr("https://apimservice1.management.azure-api.net"),
// 				NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
// 				PlatformVersion: to.Ptr(armapimanagement.PlatformVersionStv1),
// 				PortalURL: to.Ptr("https://apimservice1.portal.azure-api.net"),
// 				PrivateIPAddresses: []*string{
// 					to.Ptr("172.XX.0.5")},
// 					ProvisioningState: to.Ptr("Succeeded"),
// 					PublicIPAddresses: []*string{
// 						to.Ptr("137.XXX.11.74")},
// 						ScmURL: to.Ptr("https://apimservice1.scm.azure-api.net"),
// 						TargetProvisioningState: to.Ptr(""),
// 						VirtualNetworkConfiguration: &armapimanagement.VirtualNetworkConfiguration{
// 							SubnetResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/apim-appGateway-vnet/subnets/apim-subnet"),
// 						},
// 						VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeInternal),
// 						PublisherEmail: to.Ptr("abcs@contoso.com"),
// 						PublisherName: to.Ptr("contoso publisher"),
// 					},
// 					SKU: &armapimanagement.ServiceSKUProperties{
// 						Name: to.Ptr(armapimanagement.SKUTypePremium),
// 						Capacity: to.Ptr[int32](1),
// 					},
// 				}
Output:

func (*ServiceClient) BeginRestore

func (client *ServiceClient) BeginRestore(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceBackupRestoreParameters, options *ServiceClientBeginRestoreOptions) (*runtime.Poller[ServiceClientRestoreResponse], error)

BeginRestore - Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • parameters - Parameters supplied to the Restore API Management service from backup operation.
  • options - ServiceClientBeginRestoreOptions contains the optional parameters for the ServiceClient.BeginRestore method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementRestoreWithAccessKey.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServiceClient().BeginRestore(ctx, "rg1", "apimService1", armapimanagement.ServiceBackupRestoreParameters{
	AccessKey:      to.Ptr("**************************************************"),
	AccessType:     to.Ptr(armapimanagement.AccessTypeAccessKey),
	BackupName:     to.Ptr("apimService1backup_2017_03_19"),
	ContainerName:  to.Ptr("backupContainer"),
	StorageAccount: to.Ptr("teststorageaccount"),
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ServiceResource = armapimanagement.ServiceResource{
// 	Name: to.Ptr("apimService1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1"),
// 	Tags: map[string]*string{
// 		"tag1": to.Ptr("value1"),
// 		"tag2": to.Ptr("value2"),
// 		"tag3": to.Ptr("value3"),
// 	},
// 	Etag: to.Ptr("AAAAAAACXok="),
// 	Location: to.Ptr("West US"),
// 	Properties: &armapimanagement.ServiceProperties{
// 		AdditionalLocations: []*armapimanagement.AdditionalLocation{
// 			{
// 				DisableGateway: to.Ptr(true),
// 				GatewayRegionalURL: to.Ptr("https://apimService1-eastus-01.regional.azure-api.net"),
// 				Location: to.Ptr("East US"),
// 				PublicIPAddresses: []*string{
// 					to.Ptr("23.101.138.153")},
// 					SKU: &armapimanagement.ServiceSKUProperties{
// 						Name: to.Ptr(armapimanagement.SKUTypePremium),
// 						Capacity: to.Ptr[int32](1),
// 					},
// 			}},
// 			APIVersionConstraint: &armapimanagement.APIVersionConstraint{
// 				MinAPIVersion: to.Ptr("2019-01-01"),
// 			},
// 			CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-18T06:26:20.334Z"); return t}()),
// 			CustomProperties: map[string]*string{
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": to.Ptr("False"),
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("False"),
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("False"),
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("False"),
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": to.Ptr("False"),
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": to.Ptr("False"),
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("False"),
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("False"),
// 			},
// 			DeveloperPortalURL: to.Ptr("https://apimService1.developer.azure-api.net"),
// 			DisableGateway: to.Ptr(false),
// 			GatewayRegionalURL: to.Ptr("https://apimService1-westus-01.regional.azure-api.net"),
// 			GatewayURL: to.Ptr("https://apimService1.azure-api.net"),
// 			HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
// 				{
// 					Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// 					DefaultSSLBinding: to.Ptr(false),
// 					HostName: to.Ptr("apimService1.azure-api.net"),
// 					NegotiateClientCertificate: to.Ptr(false),
// 				},
// 				{
// 					Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// 					Certificate: &armapimanagement.CertificateInformation{
// 						Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2036-01-01T07:00:00.000Z"); return t}()),
// 						Subject: to.Ptr("CN=*.msitesting.net"),
// 						Thumbprint: to.Ptr("8E989XXXXXXXXXXXXXXXXB9C2C91F1D174FDB3A2"),
// 					},
// 					DefaultSSLBinding: to.Ptr(true),
// 					HostName: to.Ptr("gateway1.msitesting.net"),
// 					NegotiateClientCertificate: to.Ptr(false),
// 				},
// 				{
// 					Type: to.Ptr(armapimanagement.HostnameTypeManagement),
// 					Certificate: &armapimanagement.CertificateInformation{
// 						Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2036-01-01T07:00:00.000Z"); return t}()),
// 						Subject: to.Ptr("CN=*.msitesting.net"),
// 						Thumbprint: to.Ptr("8E989XXXXXXXXXXXXXXXXB9C2C91F1D174FDB3A2"),
// 					},
// 					DefaultSSLBinding: to.Ptr(false),
// 					HostName: to.Ptr("mgmt.msitesting.net"),
// 					NegotiateClientCertificate: to.Ptr(false),
// 				},
// 				{
// 					Type: to.Ptr(armapimanagement.HostnameTypePortal),
// 					Certificate: &armapimanagement.CertificateInformation{
// 						Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2036-01-01T07:00:00.000Z"); return t}()),
// 						Subject: to.Ptr("CN=*.msitesting.net"),
// 						Thumbprint: to.Ptr("8E989XXXXXXXXXXXXXXXXB9C2C91F1D174FDB3A2"),
// 					},
// 					DefaultSSLBinding: to.Ptr(false),
// 					HostName: to.Ptr("portal1.msitesting.net"),
// 					NegotiateClientCertificate: to.Ptr(false),
// 			}},
// 			ManagementAPIURL: to.Ptr("https://apimService1.management.azure-api.net"),
// 			NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
// 			PortalURL: to.Ptr("https://apimService1.portal.azure-api.net"),
// 			ProvisioningState: to.Ptr("Succeeded"),
// 			PublicIPAddresses: []*string{
// 				to.Ptr("13.91.32.113")},
// 				ScmURL: to.Ptr("https://apimService1.scm.azure-api.net"),
// 				TargetProvisioningState: to.Ptr(""),
// 				VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
// 				PublisherEmail: to.Ptr("apim@autorestsdk.com"),
// 				PublisherName: to.Ptr("autorestsdk"),
// 			},
// 			SKU: &armapimanagement.ServiceSKUProperties{
// 				Name: to.Ptr(armapimanagement.SKUTypePremium),
// 				Capacity: to.Ptr[int32](1),
// 			},
// 		}
Output:

func (*ServiceClient) BeginUpdate

func (client *ServiceClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceUpdateParameters, options *ServiceClientBeginUpdateOptions) (*runtime.Poller[ServiceClientUpdateResponse], error)

BeginUpdate - Updates an existing API Management service. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • parameters - Parameters supplied to the CreateOrUpdate API Management service operation.
  • options - ServiceClientBeginUpdateOptions contains the optional parameters for the ServiceClient.BeginUpdate method.
Example (ApiManagementUpdateServiceDisableTls10)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateServiceDisableTls10.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServiceClient().BeginUpdate(ctx, "rg1", "apimService1", armapimanagement.ServiceUpdateParameters{
	Properties: &armapimanagement.ServiceUpdateProperties{
		CustomProperties: map[string]*string{
			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("false"),
		},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ServiceResource = armapimanagement.ServiceResource{
// 	Name: to.Ptr("apimService1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1"),
// 	Tags: map[string]*string{
// 		"Owner": to.Ptr("sasolank"),
// 		"Pool": to.Ptr("Manual"),
// 		"Reserved": to.Ptr(""),
// 		"TestExpiration": to.Ptr("Thu, 29 Jun 2017 18:50:40 GMT"),
// 		"TestSuiteExpiration": to.Ptr("Thu, 29 Jun 2017 18:51:46 GMT"),
// 		"UID": to.Ptr("4f5025fe-0669-4e2e-8320-5199466e5eb3"),
// 	},
// 	Etag: to.Ptr("AAAAAAAYRPs="),
// 	Location: to.Ptr("West US"),
// 	Properties: &armapimanagement.ServiceProperties{
// 		CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-29T17:50:42.319Z"); return t}()),
// 		CustomProperties: map[string]*string{
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("False"),
// 		},
// 		GatewayURL: to.Ptr("https://apimService1.azure-api.net"),
// 		HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
// 		},
// 		ManagementAPIURL: to.Ptr("https://apimService1.management.azure-api.net"),
// 		NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
// 		PortalURL: to.Ptr("https://apimService1.portal.azure-api.net"),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		PublicIPAddresses: []*string{
// 			to.Ptr("40.86.176.232")},
// 			ScmURL: to.Ptr("https://apimService1.scm.azure-api.net"),
// 			TargetProvisioningState: to.Ptr(""),
// 			VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
// 			PublisherEmail: to.Ptr("admin@live.com"),
// 			PublisherName: to.Ptr("Contoso"),
// 		},
// 		SKU: &armapimanagement.ServiceSKUProperties{
// 			Name: to.Ptr(armapimanagement.SKUTypeStandard),
// 			Capacity: to.Ptr[int32](1),
// 		},
// 	}
Output:

Example (ApiManagementUpdateServicePublisherDetails)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateServicePublisherDetails.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServiceClient().BeginUpdate(ctx, "rg1", "apimService1", armapimanagement.ServiceUpdateParameters{
	Properties: &armapimanagement.ServiceUpdateProperties{
		PublisherEmail: to.Ptr("foobar@live.com"),
		PublisherName:  to.Ptr("Contoso Vnext"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ServiceResource = armapimanagement.ServiceResource{
// 	Name: to.Ptr("apimService1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1"),
// 	Tags: map[string]*string{
// 		"Owner": to.Ptr("sasolank"),
// 		"Pool": to.Ptr("Manual"),
// 		"Reserved": to.Ptr(""),
// 		"TestExpiration": to.Ptr("Thu, 29 Jun 2017 18:50:40 GMT"),
// 		"TestSuiteExpiration": to.Ptr("Thu, 29 Jun 2017 18:51:46 GMT"),
// 		"UID": to.Ptr("4f5025fe-0669-4e2e-8320-5199466e5eb3"),
// 	},
// 	Etag: to.Ptr("AAAAAAAYRPs="),
// 	Location: to.Ptr("West US"),
// 	Properties: &armapimanagement.ServiceProperties{
// 		CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-29T17:50:42.319Z"); return t}()),
// 		CustomProperties: map[string]*string{
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("False"),
// 		},
// 		GatewayURL: to.Ptr("https://apimService1.azure-api.net"),
// 		HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
// 		},
// 		ManagementAPIURL: to.Ptr("https://apimService1.management.azure-api.net"),
// 		NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
// 		PortalURL: to.Ptr("https://apimService1.portal.azure-api.net"),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		PublicIPAddresses: []*string{
// 			to.Ptr("40.86.176.232")},
// 			ScmURL: to.Ptr("https://apimService1.scm.azure-api.net"),
// 			TargetProvisioningState: to.Ptr(""),
// 			VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
// 			PublisherEmail: to.Ptr("foobar@live.com"),
// 			PublisherName: to.Ptr("Contoso Vnext"),
// 		},
// 		SKU: &armapimanagement.ServiceSKUProperties{
// 			Name: to.Ptr(armapimanagement.SKUTypeStandard),
// 			Capacity: to.Ptr[int32](1),
// 		},
// 	}
Output:

Example (ApiManagementUpdateServiceToNewVnetAndAvailabilityZones)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateServiceToNewVnetAndAZs.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServiceClient().BeginUpdate(ctx, "rg1", "apimService1", armapimanagement.ServiceUpdateParameters{
	Properties: &armapimanagement.ServiceUpdateProperties{
		AdditionalLocations: []*armapimanagement.AdditionalLocation{
			{
				Location:          to.Ptr("Australia East"),
				PublicIPAddressID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/apim-australia-east-publicip"),
				SKU: &armapimanagement.ServiceSKUProperties{
					Name:     to.Ptr(armapimanagement.SKUTypePremium),
					Capacity: to.Ptr[int32](3),
				},
				VirtualNetworkConfiguration: &armapimanagement.VirtualNetworkConfiguration{
					SubnetResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/apimaeavnet/subnets/default"),
				},
				Zones: []*string{
					to.Ptr("1"),
					to.Ptr("2"),
					to.Ptr("3")},
			}},
		PublicIPAddressID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/publicip-apim-japan-east"),
		VirtualNetworkConfiguration: &armapimanagement.VirtualNetworkConfiguration{
			SubnetResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-apim-japaneast/subnets/apim2"),
		},
		VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeExternal),
	},
	SKU: &armapimanagement.ServiceSKUProperties{
		Name:     to.Ptr(armapimanagement.SKUTypePremium),
		Capacity: to.Ptr[int32](3),
	},
	Zones: []*string{
		to.Ptr("1"),
		to.Ptr("2"),
		to.Ptr("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.ServiceResource = armapimanagement.ServiceResource{
// 	Name: to.Ptr("apimService1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1"),
// 	Etag: to.Ptr("AAAAAAAWBIU="),
// 	Location: to.Ptr("Japan East"),
// 	Properties: &armapimanagement.ServiceProperties{
// 		AdditionalLocations: []*armapimanagement.AdditionalLocation{
// 			{
// 				DisableGateway: to.Ptr(false),
// 				GatewayRegionalURL: to.Ptr("https://apimService1-australiaeast-01.regional.azure-api.net"),
// 				Location: to.Ptr("Australia East"),
// 				PlatformVersion: to.Ptr(armapimanagement.PlatformVersionStv2),
// 				PublicIPAddresses: []*string{
// 					to.Ptr("20.213.1.35")},
// 					PublicIPAddressID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/apim-australia-east-publicip"),
// 					SKU: &armapimanagement.ServiceSKUProperties{
// 						Name: to.Ptr(armapimanagement.SKUTypePremium),
// 						Capacity: to.Ptr[int32](3),
// 					},
// 					VirtualNetworkConfiguration: &armapimanagement.VirtualNetworkConfiguration{
// 						SubnetResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/apimaeavnet/subnets/default"),
// 					},
// 					Zones: []*string{
// 						to.Ptr("1"),
// 						to.Ptr("2"),
// 						to.Ptr("3")},
// 				}},
// 				CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-08T23:41:35.644Z"); return t}()),
// 				CustomProperties: map[string]*string{
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": to.Ptr("false"),
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("false"),
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("false"),
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("false"),
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA": to.Ptr("false"),
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA": to.Ptr("false"),
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA": to.Ptr("false"),
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256": to.Ptr("false"),
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_GCM_SHA256": to.Ptr("false"),
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_256_CBC_SHA": to.Ptr("false"),
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_256_CBC_SHA256": to.Ptr("false"),
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": to.Ptr("false"),
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": to.Ptr("false"),
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("false"),
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("false"),
// 				},
// 				DeveloperPortalURL: to.Ptr("https://apimService1.developer.azure-api.net"),
// 				DisableGateway: to.Ptr(false),
// 				GatewayRegionalURL: to.Ptr("https://apimService1-japaneast-01.regional.azure-api.net"),
// 				GatewayURL: to.Ptr("https://apimService1.azure-api.net"),
// 				HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
// 					{
// 						Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// 						CertificateSource: to.Ptr(armapimanagement.CertificateSourceBuiltIn),
// 						DefaultSSLBinding: to.Ptr(false),
// 						HostName: to.Ptr("apimService1.azure-api.net"),
// 						NegotiateClientCertificate: to.Ptr(false),
// 					},
// 					{
// 						Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// 						Certificate: &armapimanagement.CertificateInformation{
// 							Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-06-09T23:59:59.000Z"); return t}()),
// 							Subject: to.Ptr("CN=mycustomdomain.int-azure-api.net"),
// 							Thumbprint: to.Ptr("2994B5FFB8F76B3C687D324A8DEE0432C1ED18CD"),
// 						},
// 						CertificateSource: to.Ptr(armapimanagement.CertificateSourceManaged),
// 						DefaultSSLBinding: to.Ptr(true),
// 						HostName: to.Ptr("mycustomdomain.int-azure-api.net"),
// 						NegotiateClientCertificate: to.Ptr(false),
// 				}},
// 				ManagementAPIURL: to.Ptr("https://apimService1.management.azure-api.net"),
// 				NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
// 				PlatformVersion: to.Ptr(armapimanagement.PlatformVersionStv2),
// 				PortalURL: to.Ptr("https://apimService1.portal.azure-api.net"),
// 				ProvisioningState: to.Ptr("Succeeded"),
// 				PublicIPAddresses: []*string{
// 					to.Ptr("20.78.248.217")},
// 					PublicIPAddressID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/publicip-apim-japan-east"),
// 					PublicNetworkAccess: to.Ptr(armapimanagement.PublicNetworkAccessEnabled),
// 					ScmURL: to.Ptr("https://apimService1.scm.azure-api.net"),
// 					TargetProvisioningState: to.Ptr(""),
// 					VirtualNetworkConfiguration: &armapimanagement.VirtualNetworkConfiguration{
// 						SubnetResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-apim-japaneast/subnets/apim2"),
// 					},
// 					VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeInternal),
// 					PublisherEmail: to.Ptr("contoso@microsoft.com"),
// 					PublisherName: to.Ptr("apimPublisher"),
// 				},
// 				SKU: &armapimanagement.ServiceSKUProperties{
// 					Name: to.Ptr(armapimanagement.SKUTypePremium),
// 					Capacity: to.Ptr[int32](3),
// 				},
// 				SystemData: &armapimanagement.SystemData{
// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-21T20:04:21.610Z"); return t}()),
// 					LastModifiedBy: to.Ptr("contoso@microsoft.com"),
// 					LastModifiedByType: to.Ptr(armapimanagement.CreatedByTypeUser),
// 				},
// 				Zones: []*string{
// 					to.Ptr("1"),
// 					to.Ptr("2"),
// 					to.Ptr("3")},
// 				}
Output:

func (*ServiceClient) CheckNameAvailability

CheckNameAvailability - Checks availability and correctness of a name for an API Management service. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • parameters - Parameters supplied to the CheckNameAvailability operation.
  • options - ServiceClientCheckNameAvailabilityOptions contains the optional parameters for the ServiceClient.CheckNameAvailability method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceCheckNameAvailability.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewServiceClient().CheckNameAvailability(ctx, armapimanagement.ServiceCheckNameAvailabilityParameters{
	Name: to.Ptr("apimService1"),
}, 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.ServiceNameAvailabilityResult = armapimanagement.ServiceNameAvailabilityResult{
// 	Message: to.Ptr(""),
// 	NameAvailable: to.Ptr(true),
// 	Reason: to.Ptr(armapimanagement.NameAvailabilityReasonValid),
// }
Output:

func (*ServiceClient) Get

func (client *ServiceClient) Get(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientGetOptions) (ServiceClientGetResponse, error)

Get - Gets an API Management service resource description. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - ServiceClientGetOptions contains the optional parameters for the ServiceClient.Get method.
Example (ApiManagementServiceGetMultiRegionInternalVnet)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewServiceClient().Get(ctx, "rg1", "apimService1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ServiceResource = armapimanagement.ServiceResource{
// 	Name: to.Ptr("apimservice1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimservice1"),
// 	Tags: map[string]*string{
// 	},
// 	Etag: to.Ptr("AAAAAADqC0c="),
// 	Location: to.Ptr("West US"),
// 	Properties: &armapimanagement.ServiceProperties{
// 		AdditionalLocations: []*armapimanagement.AdditionalLocation{
// 			{
// 				DisableGateway: to.Ptr(false),
// 				GatewayRegionalURL: to.Ptr("https://apimservice1-westus2-01.regional.azure-api.net"),
// 				Location: to.Ptr("West US 2"),
// 				PrivateIPAddresses: []*string{
// 					to.Ptr("10.0.X.6")},
// 					PublicIPAddresses: []*string{
// 						to.Ptr("40.XXX.79.187")},
// 						SKU: &armapimanagement.ServiceSKUProperties{
// 							Name: to.Ptr(armapimanagement.SKUTypePremium),
// 							Capacity: to.Ptr[int32](1),
// 						},
// 						VirtualNetworkConfiguration: &armapimanagement.VirtualNetworkConfiguration{
// 							SubnetResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/APIMVNet/subnets/apim-internal-sub"),
// 						},
// 				}},
// 				APIVersionConstraint: &armapimanagement.APIVersionConstraint{
// 				},
// 				CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-02T01:42:09.126Z"); return t}()),
// 				CustomProperties: map[string]*string{
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("False"),
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("True"),
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("True"),
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": to.Ptr("True"),
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": to.Ptr("False"),
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("True"),
// 					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("True"),
// 				},
// 				DeveloperPortalURL: to.Ptr("https://apimService1.developer.azure-api.net"),
// 				DisableGateway: to.Ptr(false),
// 				GatewayRegionalURL: to.Ptr("https://apimservice1-westus-01.regional.azure-api.net"),
// 				GatewayURL: to.Ptr("https://apimservice1.azure-api.net"),
// 				HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
// 					{
// 						Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// 						CertificateSource: to.Ptr(armapimanagement.CertificateSourceBuiltIn),
// 						DefaultSSLBinding: to.Ptr(false),
// 						HostName: to.Ptr("apimService1.azure-api.net"),
// 						NegotiateClientCertificate: to.Ptr(false),
// 					},
// 					{
// 						Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// 						Certificate: &armapimanagement.CertificateInformation{
// 							Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-08-16T16:51:34.000Z"); return t}()),
// 							Subject: to.Ptr("CN=*.preview.net"),
// 							Thumbprint: to.Ptr("B4330123DBAXXXXXXXXX1F35E84493476"),
// 						},
// 						CertificateSource: to.Ptr(armapimanagement.CertificateSourceCustom),
// 						DefaultSSLBinding: to.Ptr(true),
// 						HostName: to.Ptr("apimgatewaytest.preview.net"),
// 						NegotiateClientCertificate: to.Ptr(false),
// 				}},
// 				ManagementAPIURL: to.Ptr("https://apimservice1.management.azure-api.net"),
// 				NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
// 				PortalURL: to.Ptr("https://apimservice1.portal.azure-api.net"),
// 				PrivateIPAddresses: []*string{
// 					to.Ptr("172.XX.0.5")},
// 					ProvisioningState: to.Ptr("Succeeded"),
// 					PublicIPAddresses: []*string{
// 						to.Ptr("137.XXX.11.74")},
// 						ScmURL: to.Ptr("https://apimservice1.scm.azure-api.net"),
// 						TargetProvisioningState: to.Ptr(""),
// 						VirtualNetworkConfiguration: &armapimanagement.VirtualNetworkConfiguration{
// 							SubnetResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/apim-appGateway-vnet/subnets/apim-subnet"),
// 						},
// 						VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeInternal),
// 						PublisherEmail: to.Ptr("abcs@contoso.com"),
// 						PublisherName: to.Ptr("contoso publisher"),
// 					},
// 					SKU: &armapimanagement.ServiceSKUProperties{
// 						Name: to.Ptr(armapimanagement.SKUTypePremium),
// 						Capacity: to.Ptr[int32](1),
// 					},
// 				}
Output:

Example (ApiManagementServiceGetService)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetService.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewServiceClient().Get(ctx, "rg1", "apimService1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ServiceResource = armapimanagement.ServiceResource{
// 	Name: to.Ptr("OGF-Z3-06162021-Premium"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/OGF-Z3-06162021-Premium"),
// 	Tags: map[string]*string{
// 		"ReleaseName": to.Ptr("Z3"),
// 		"owner": to.Ptr("v-aswmoh"),
// 	},
// 	Etag: to.Ptr("AAAAAAAWN/4="),
// 	Identity: &armapimanagement.ServiceIdentity{
// 		Type: to.Ptr(armapimanagement.ApimIdentityTypeSystemAssignedUserAssigned),
// 		PrincipalID: to.Ptr("306205e7-b21a-41bf-92e2-3e28af30041e"),
// 		TenantID: to.Ptr("f686d426-8d16-42db-81b7-ab578e110ccd"),
// 		UserAssignedIdentities: map[string]*armapimanagement.UserIdentityProperties{
// 			"/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ogf-identity": &armapimanagement.UserIdentityProperties{
// 				ClientID: to.Ptr("8d9791f2-0cdf-41f4-9e66-cdc39b496789"),
// 				PrincipalID: to.Ptr("713784d2-ee37-412a-95f0-3768f397f82d"),
// 			},
// 		},
// 	},
// 	Location: to.Ptr("East US"),
// 	Properties: &armapimanagement.ServiceProperties{
// 		AdditionalLocations: []*armapimanagement.AdditionalLocation{
// 			{
// 				DisableGateway: to.Ptr(false),
// 				GatewayRegionalURL: to.Ptr("https://ogf-z3-06162021-premium-eastus2-01.regional.azure-api.net"),
// 				Location: to.Ptr("East US 2"),
// 				PlatformVersion: to.Ptr(armapimanagement.PlatformVersionStv2),
// 				PublicIPAddresses: []*string{
// 					to.Ptr("40.70.24.106")},
// 					SKU: &armapimanagement.ServiceSKUProperties{
// 						Name: to.Ptr(armapimanagement.SKUTypePremium),
// 						Capacity: to.Ptr[int32](1),
// 					},
// 					Zones: []*string{
// 					},
// 			}},
// 			APIVersionConstraint: &armapimanagement.APIVersionConstraint{
// 				MinAPIVersion: to.Ptr("2019-12-01"),
// 			},
// 			Certificates: []*armapimanagement.CertificateConfiguration{
// 			},
// 			CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-16T09:40:00.945Z"); return t}()),
// 			CustomProperties: map[string]*string{
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": to.Ptr("false"),
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("false"),
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("false"),
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("false"),
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": to.Ptr("false"),
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": to.Ptr("false"),
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("false"),
// 				"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("false"),
// 			},
// 			DeveloperPortalURL: to.Ptr("https://ogf-z3-06162021-premium.developer.azure-api.net"),
// 			DisableGateway: to.Ptr(false),
// 			GatewayRegionalURL: to.Ptr("https://ogf-z3-06162021-premium-eastus-01.regional.azure-api.net"),
// 			GatewayURL: to.Ptr("https://ogf-z3-06162021-premium.azure-api.net"),
// 			HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
// 				{
// 					Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// 					CertificateSource: to.Ptr(armapimanagement.CertificateSourceBuiltIn),
// 					DefaultSSLBinding: to.Ptr(false),
// 					HostName: to.Ptr("ogf-z3-06162021-premium.azure-api.net"),
// 					NegotiateClientCertificate: to.Ptr(false),
// 				},
// 				{
// 					Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// 					Certificate: &armapimanagement.CertificateInformation{
// 						Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-08T22:32:32.000Z"); return t}()),
// 						Subject: to.Ptr("CN=*.current.int-azure-api.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US"),
// 						Thumbprint: to.Ptr("BA0C286XXXXXXXX58A4A507E3DBD51"),
// 					},
// 					CertificateSource: to.Ptr(armapimanagement.CertificateSourceCustom),
// 					DefaultSSLBinding: to.Ptr(true),
// 					HostName: to.Ptr("gateway.current.int-azure-api.net"),
// 					KeyVaultID: to.Ptr("https://ogf-testing.vault.azure.net/secrets/current-ssl"),
// 					NegotiateClientCertificate: to.Ptr(true),
// 				},
// 				{
// 					Type: to.Ptr(armapimanagement.HostnameTypeDeveloperPortal),
// 					Certificate: &armapimanagement.CertificateInformation{
// 						Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-08T22:32:32.000Z"); return t}()),
// 						Subject: to.Ptr("CN=*.current.int-azure-api.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US"),
// 						Thumbprint: to.Ptr("BA0C286XXXXXXXX58A4A507E3DBD51"),
// 					},
// 					CertificateSource: to.Ptr(armapimanagement.CertificateSourceCustom),
// 					DefaultSSLBinding: to.Ptr(false),
// 					HostName: to.Ptr("developer.current.int-azure-api.net"),
// 					KeyVaultID: to.Ptr("https://ogf-testing.vault.azure.net/secrets/current-ssl"),
// 					NegotiateClientCertificate: to.Ptr(false),
// 				},
// 				{
// 					Type: to.Ptr(armapimanagement.HostnameTypeManagement),
// 					Certificate: &armapimanagement.CertificateInformation{
// 						Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-08T22:32:32.000Z"); return t}()),
// 						Subject: to.Ptr("CN=*.current.int-azure-api.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US"),
// 						Thumbprint: to.Ptr("BA0C286XXXXXXXX58A4A507E3DBD51"),
// 					},
// 					CertificateSource: to.Ptr(armapimanagement.CertificateSourceCustom),
// 					DefaultSSLBinding: to.Ptr(false),
// 					HostName: to.Ptr("mgmt.current.int-azure-api.net"),
// 					KeyVaultID: to.Ptr("https://ogf-testing.vault.azure.net/secrets/current-ssl"),
// 					NegotiateClientCertificate: to.Ptr(false),
// 			}},
// 			ManagementAPIURL: to.Ptr("https://ogf-z3-06162021-premium.management.azure-api.net"),
// 			NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
// 			PlatformVersion: to.Ptr(armapimanagement.PlatformVersionStv2),
// 			PortalURL: to.Ptr("https://ogf-z3-06162021-premium.portal.azure-api.net"),
// 			PrivateEndpointConnections: []*armapimanagement.RemotePrivateEndpointConnectionWrapper{
// 				{
// 					Name: to.Ptr("privateEndpointProxyName"),
// 					Type: to.Ptr("Microsoft.ApiManagement/service/privateEndpointConnections"),
// 					ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/privateEndpointProxyName"),
// 					Properties: &armapimanagement.PrivateEndpointConnectionWrapperProperties{
// 						GroupIDs: []*string{
// 							to.Ptr("Gateway")},
// 							PrivateEndpoint: &armapimanagement.ArmIDWrapper{
// 								ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/privateEndpointName"),
// 							},
// 							PrivateLinkServiceConnectionState: &armapimanagement.PrivateLinkServiceConnectionState{
// 								Description: to.Ptr("Please approve my request, thanks"),
// 								ActionsRequired: to.Ptr("None"),
// 								Status: to.Ptr(armapimanagement.PrivateEndpointServiceConnectionStatusPending),
// 							},
// 							ProvisioningState: to.Ptr("Succeeded"),
// 						},
// 				}},
// 				ProvisioningState: to.Ptr("Succeeded"),
// 				PublicIPAddresses: []*string{
// 					to.Ptr("13.92.130.49")},
// 					PublicNetworkAccess: to.Ptr(armapimanagement.PublicNetworkAccessEnabled),
// 					ScmURL: to.Ptr("https://ogf-z3-06162021-premium.scm.azure-api.net"),
// 					TargetProvisioningState: to.Ptr(""),
// 					VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
// 					PublisherEmail: to.Ptr("string"),
// 					PublisherName: to.Ptr("Test Premium"),
// 				},
// 				SKU: &armapimanagement.ServiceSKUProperties{
// 					Name: to.Ptr(armapimanagement.SKUTypePremium),
// 					Capacity: to.Ptr[int32](1),
// 				},
// 				SystemData: &armapimanagement.SystemData{
// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-16T09:40:00.710Z"); return t}()),
// 					CreatedBy: to.Ptr("string"),
// 					CreatedByType: to.Ptr(armapimanagement.CreatedByTypeUser),
// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-20T06:33:09.615Z"); return t}()),
// 					LastModifiedBy: to.Ptr("foo@contoso.com"),
// 					LastModifiedByType: to.Ptr(armapimanagement.CreatedByTypeUser),
// 				},
// 			}
Output:

Example (ApiManagementServiceGetServiceHavingMsi)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetServiceHavingMsi.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewServiceClient().Get(ctx, "rg1", "apimService1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ServiceResource = armapimanagement.ServiceResource{
// 	Name: to.Ptr("apimService1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1"),
// 	Tags: map[string]*string{
// 	},
// 	Etag: to.Ptr("AAAAAAAENfI="),
// 	Identity: &armapimanagement.ServiceIdentity{
// 		Type: to.Ptr(armapimanagement.ApimIdentityTypeSystemAssignedUserAssigned),
// 		PrincipalID: to.Ptr("ca1d33f7-0000-42ec-0000-d526a1ee953a"),
// 		TenantID: to.Ptr("72f988bf-0000-41af-0000-2d7cd011db47"),
// 		UserAssignedIdentities: map[string]*armapimanagement.UserIdentityProperties{
// 			"/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apimService1": &armapimanagement.UserIdentityProperties{
// 				ClientID: to.Ptr("aaff9c7d-0000-4db2-0000-ab0e3e7806cf"),
// 				PrincipalID: to.Ptr("95194df2-9208-0000-0000-a10d2af9b5a3"),
// 			},
// 		},
// 	},
// 	Location: to.Ptr("West Europe"),
// 	Properties: &armapimanagement.ServiceProperties{
// 		CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-04-12T00:20:15.601Z"); return t}()),
// 		CustomProperties: map[string]*string{
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("True"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("True"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": to.Ptr("True"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": to.Ptr("False"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("True"),
// 			"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("True"),
// 		},
// 		DeveloperPortalURL: to.Ptr("https://apimService1.developer.azure-api.net"),
// 		DisableGateway: to.Ptr(false),
// 		GatewayRegionalURL: to.Ptr("https://apimService1-westeurope-01.regional.azure-api.net"),
// 		GatewayURL: to.Ptr("https://apimService1.azure-api.net"),
// 		HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
// 			{
// 				Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// 				CertificateSource: to.Ptr(armapimanagement.CertificateSourceBuiltIn),
// 				DefaultSSLBinding: to.Ptr(false),
// 				HostName: to.Ptr("apimService1.azure-api.net"),
// 				NegotiateClientCertificate: to.Ptr(false),
// 			},
// 			{
// 				Type: to.Ptr(armapimanagement.HostnameTypeProxy),
// 				Certificate: &armapimanagement.CertificateInformation{
// 					Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-18T11:11:47.000Z"); return t}()),
// 					Subject: to.Ptr("CN=*.msitesting.net"),
// 					Thumbprint: to.Ptr("9833D531D7A45XXXXXA85908BD3692E0BD3F"),
// 				},
// 				CertificateSource: to.Ptr(armapimanagement.CertificateSourceKeyVault),
// 				DefaultSSLBinding: to.Ptr(true),
// 				HostName: to.Ptr("proxy.msitesting.net"),
// 				KeyVaultID: to.Ptr("https://samir-msi-keyvault.vault.azure.net/secrets/msicertificate"),
// 				NegotiateClientCertificate: to.Ptr(false),
// 		}},
// 		ManagementAPIURL: to.Ptr("https://apimService1.management.azure-api.net"),
// 		NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
// 		PortalURL: to.Ptr("https://apimService1.portal.azure-api.net"),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		PublicIPAddresses: []*string{
// 			to.Ptr("13.94.xxx.188")},
// 			ScmURL: to.Ptr("https://apimService1.scm.azure-api.net"),
// 			TargetProvisioningState: to.Ptr(""),
// 			VirtualNetworkConfiguration: &armapimanagement.VirtualNetworkConfiguration{
// 				SubnetResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/dfVirtualNetwork/subnets/backendSubnet"),
// 			},
// 			VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeExternal),
// 			PublisherEmail: to.Ptr("foo@contoso.com"),
// 			PublisherName: to.Ptr("Contoso"),
// 		},
// 		SKU: &armapimanagement.ServiceSKUProperties{
// 			Name: to.Ptr(armapimanagement.SKUTypePremium),
// 			Capacity: to.Ptr[int32](1),
// 		},
// 	}
Output:

func (*ServiceClient) GetDomainOwnershipIdentifier

GetDomainOwnershipIdentifier - Get the custom domain ownership identifier for an API Management service. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • options - ServiceClientGetDomainOwnershipIdentifierOptions contains the optional parameters for the ServiceClient.GetDomainOwnershipIdentifier method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetDomainOwnershipIdentifier.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewServiceClient().GetDomainOwnershipIdentifier(ctx, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ServiceGetDomainOwnershipIdentifierResult = armapimanagement.ServiceGetDomainOwnershipIdentifierResult{
// 	DomainOwnershipIdentifier: to.Ptr("KLE1vdMblVeHECAi4nCe3oNaXXXXvNlLrXt2ev84KM="),
// }
Output:

func (*ServiceClient) GetSsoToken

func (client *ServiceClient) GetSsoToken(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientGetSsoTokenOptions) (ServiceClientGetSsoTokenResponse, error)

GetSsoToken - Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - ServiceClientGetSsoTokenOptions contains the optional parameters for the ServiceClient.GetSsoToken method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetSsoToken.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewServiceClient().GetSsoToken(ctx, "rg1", "apimService1", 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.ServiceGetSsoTokenResult = armapimanagement.ServiceGetSsoTokenResult{
// 	RedirectURI: to.Ptr("https://apimService1.portal.azure-api.net:443/signin-sso?token=1%26201705301929%26eIkr3%2fnfaLs1GVJ0OVbzkJjAcwPFkEZAPM8VUXvXPf7cJ6lWsB9oUwsk2zln9x0KLkn21txCPJWWheSPq7SNeA%3d%3d"),
// }
Output:

func (*ServiceClient) NewListByResourceGroupPager

func (client *ServiceClient) NewListByResourceGroupPager(resourceGroupName string, options *ServiceClientListByResourceGroupOptions) *runtime.Pager[ServiceClientListByResourceGroupResponse]

NewListByResourceGroupPager - List all API Management services within a resource group.

Generated from API version 2022-08-01

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

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListServiceBySubscriptionAndResourceGroup.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewServiceClient().NewListByResourceGroupPager("rg1", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.ServiceListResult = armapimanagement.ServiceListResult{
	// 	Value: []*armapimanagement.ServiceResource{
	// 		{
	// 			Name: to.Ptr("OGF-Z3-06162021-Premium"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/OGF-Z3-06162021-Premium"),
	// 			Tags: map[string]*string{
	// 				"ReleaseName": to.Ptr("Z3"),
	// 				"owner": to.Ptr("v-aswmoh"),
	// 			},
	// 			Etag: to.Ptr("AAAAAAAWN/4="),
	// 			Identity: &armapimanagement.ServiceIdentity{
	// 				Type: to.Ptr(armapimanagement.ApimIdentityTypeSystemAssignedUserAssigned),
	// 				PrincipalID: to.Ptr("306205e7-b21a-41bf-92e2-3e28af30041e"),
	// 				TenantID: to.Ptr("f686d426-8d16-42db-81b7-ab578e110ccd"),
	// 				UserAssignedIdentities: map[string]*armapimanagement.UserIdentityProperties{
	// 					"/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ogf-identity": &armapimanagement.UserIdentityProperties{
	// 						ClientID: to.Ptr("8d9791f2-0cdf-41f4-9e66-cdc39b496789"),
	// 						PrincipalID: to.Ptr("713784d2-ee37-412a-95f0-3768f397f82d"),
	// 					},
	// 				},
	// 			},
	// 			Location: to.Ptr("East US"),
	// 			Properties: &armapimanagement.ServiceProperties{
	// 				AdditionalLocations: []*armapimanagement.AdditionalLocation{
	// 					{
	// 						DisableGateway: to.Ptr(false),
	// 						GatewayRegionalURL: to.Ptr("https://ogf-z3-06162021-premium-eastus2-01.regional.azure-api.net"),
	// 						Location: to.Ptr("East US 2"),
	// 						PublicIPAddresses: []*string{
	// 							to.Ptr("40.70.24.106")},
	// 							SKU: &armapimanagement.ServiceSKUProperties{
	// 								Name: to.Ptr(armapimanagement.SKUTypePremium),
	// 								Capacity: to.Ptr[int32](1),
	// 							},
	// 							Zones: []*string{
	// 							},
	// 					}},
	// 					APIVersionConstraint: &armapimanagement.APIVersionConstraint{
	// 						MinAPIVersion: to.Ptr("2019-12-01"),
	// 					},
	// 					Certificates: []*armapimanagement.CertificateConfiguration{
	// 					},
	// 					CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-16T09:40:00.945Z"); return t}()),
	// 					CustomProperties: map[string]*string{
	// 						"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": to.Ptr("false"),
	// 						"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("false"),
	// 						"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("false"),
	// 						"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("false"),
	// 						"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": to.Ptr("false"),
	// 						"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": to.Ptr("false"),
	// 						"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("false"),
	// 						"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("false"),
	// 					},
	// 					DeveloperPortalURL: to.Ptr("https://ogf-z3-06162021-premium.developer.azure-api.net"),
	// 					DisableGateway: to.Ptr(false),
	// 					GatewayRegionalURL: to.Ptr("https://ogf-z3-06162021-premium-eastus-01.regional.azure-api.net"),
	// 					GatewayURL: to.Ptr("https://ogf-z3-06162021-premium.azure-api.net"),
	// 					HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
	// 						{
	// 							Type: to.Ptr(armapimanagement.HostnameTypeProxy),
	// 							CertificateSource: to.Ptr(armapimanagement.CertificateSourceBuiltIn),
	// 							DefaultSSLBinding: to.Ptr(false),
	// 							HostName: to.Ptr("ogf-z3-06162021-premium.azure-api.net"),
	// 							NegotiateClientCertificate: to.Ptr(false),
	// 						},
	// 						{
	// 							Type: to.Ptr(armapimanagement.HostnameTypeProxy),
	// 							Certificate: &armapimanagement.CertificateInformation{
	// 								Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-08T22:32:32.000Z"); return t}()),
	// 								Subject: to.Ptr("CN=*.current.int-azure-api.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US"),
	// 								Thumbprint: to.Ptr("BA0C286F71AF3B6A01BDB240C58A4A507E3DBD51"),
	// 							},
	// 							CertificateSource: to.Ptr(armapimanagement.CertificateSourceCustom),
	// 							DefaultSSLBinding: to.Ptr(true),
	// 							HostName: to.Ptr("gateway.current.int-azure-api.net"),
	// 							KeyVaultID: to.Ptr("https://ogf-testing.vault-int.azure-int.net/secrets/current-ssl"),
	// 							NegotiateClientCertificate: to.Ptr(true),
	// 						},
	// 						{
	// 							Type: to.Ptr(armapimanagement.HostnameTypeDeveloperPortal),
	// 							Certificate: &armapimanagement.CertificateInformation{
	// 								Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-08T22:32:32.000Z"); return t}()),
	// 								Subject: to.Ptr("CN=*.current.int-azure-api.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US"),
	// 								Thumbprint: to.Ptr("BA0C286F71AF3B6A01BDB240C58A4A507E3DBD51"),
	// 							},
	// 							CertificateSource: to.Ptr(armapimanagement.CertificateSourceCustom),
	// 							DefaultSSLBinding: to.Ptr(false),
	// 							HostName: to.Ptr("developer.current.int-azure-api.net"),
	// 							KeyVaultID: to.Ptr("https://ogf-testing.vault-int.azure-int.net/secrets/current-ssl"),
	// 							NegotiateClientCertificate: to.Ptr(false),
	// 						},
	// 						{
	// 							Type: to.Ptr(armapimanagement.HostnameTypeManagement),
	// 							Certificate: &armapimanagement.CertificateInformation{
	// 								Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-08T22:32:32.000Z"); return t}()),
	// 								Subject: to.Ptr("CN=*.current.int-azure-api.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US"),
	// 								Thumbprint: to.Ptr("BA0C286F71AF3B6A01BDB240C58A4A507E3DBD51"),
	// 							},
	// 							CertificateSource: to.Ptr(armapimanagement.CertificateSourceCustom),
	// 							DefaultSSLBinding: to.Ptr(false),
	// 							HostName: to.Ptr("mgmt.current.int-azure-api.net"),
	// 							KeyVaultID: to.Ptr("https://ogf-testing.vault-int.azure-int.net/secrets/current-ssl"),
	// 							NegotiateClientCertificate: to.Ptr(false),
	// 					}},
	// 					ManagementAPIURL: to.Ptr("https://ogf-z3-06162021-premium.management.azure-api.net"),
	// 					NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
	// 					PortalURL: to.Ptr("https://ogf-z3-06162021-premium.portal.azure-api.net"),
	// 					ProvisioningState: to.Ptr("Succeeded"),
	// 					PublicIPAddresses: []*string{
	// 						to.Ptr("13.92.130.49")},
	// 						PublicNetworkAccess: to.Ptr(armapimanagement.PublicNetworkAccessEnabled),
	// 						ScmURL: to.Ptr("https://ogf-z3-06162021-premium.scm.azure-api.net"),
	// 						TargetProvisioningState: to.Ptr(""),
	// 						VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
	// 						PublisherEmail: to.Ptr("bar@contoso.com"),
	// 						PublisherName: to.Ptr("Test Premium"),
	// 					},
	// 					SKU: &armapimanagement.ServiceSKUProperties{
	// 						Name: to.Ptr(armapimanagement.SKUTypePremium),
	// 						Capacity: to.Ptr[int32](1),
	// 					},
	// 					SystemData: &armapimanagement.SystemData{
	// 						CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-16T09:40:00.710Z"); return t}()),
	// 						CreatedBy: to.Ptr("bar@contoso.com"),
	// 						CreatedByType: to.Ptr(armapimanagement.CreatedByTypeUser),
	// 						LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-20T06:33:09.615Z"); return t}()),
	// 						LastModifiedBy: to.Ptr("foo@contoso.com"),
	// 						LastModifiedByType: to.Ptr(armapimanagement.CreatedByTypeUser),
	// 					},
	// 				},
	// 				{
	// 					Name: to.Ptr("vvktestcons"),
	// 					Type: to.Ptr("Microsoft.ApiManagement/service"),
	// 					ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/vvktestcons"),
	// 					Tags: map[string]*string{
	// 						"Owner": to.Ptr("vitaliik"),
	// 					},
	// 					Etag: to.Ptr("AAAAAAAWKwo="),
	// 					Location: to.Ptr("East US"),
	// 					Properties: &armapimanagement.ServiceProperties{
	// 						CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-10T18:07:23.456Z"); return t}()),
	// 						CustomProperties: map[string]*string{
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": to.Ptr("False"),
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("False"),
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("False"),
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("False"),
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("False"),
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("False"),
	// 						},
	// 						DisableGateway: to.Ptr(false),
	// 						EnableClientCertificate: to.Ptr(false),
	// 						GatewayURL: to.Ptr("https://vvktestcons.azure-api.net"),
	// 						HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
	// 							{
	// 								Type: to.Ptr(armapimanagement.HostnameTypeProxy),
	// 								CertificateSource: to.Ptr(armapimanagement.CertificateSourceBuiltIn),
	// 								DefaultSSLBinding: to.Ptr(true),
	// 								HostName: to.Ptr("vvktestcons.azure-api.net"),
	// 								NegotiateClientCertificate: to.Ptr(false),
	// 						}},
	// 						NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
	// 						ProvisioningState: to.Ptr("Succeeded"),
	// 						PublicNetworkAccess: to.Ptr(armapimanagement.PublicNetworkAccessEnabled),
	// 						TargetProvisioningState: to.Ptr(""),
	// 						VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
	// 						PublisherEmail: to.Ptr("bar@contoso.com"),
	// 						PublisherName: to.Ptr("vvktestcons"),
	// 					},
	// 					SKU: &armapimanagement.ServiceSKUProperties{
	// 						Name: to.Ptr(armapimanagement.SKUTypeConsumption),
	// 						Capacity: to.Ptr[int32](0),
	// 					},
	// 				},
	// 				{
	// 					Name: to.Ptr("OGF-Z3-06162021-Standard"),
	// 					Type: to.Ptr("Microsoft.ApiManagement/service"),
	// 					ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/OGF-Z3-06162021-Standard"),
	// 					Tags: map[string]*string{
	// 					},
	// 					Etag: to.Ptr("AAAAAAAWF7M="),
	// 					Identity: &armapimanagement.ServiceIdentity{
	// 						Type: to.Ptr(armapimanagement.ApimIdentityTypeSystemAssignedUserAssigned),
	// 						PrincipalID: to.Ptr("347a5800-ca99-475a-9202-fe38ca79ee41"),
	// 						TenantID: to.Ptr("f686d426-8d16-42db-81b7-ab578e110ccd"),
	// 						UserAssignedIdentities: map[string]*armapimanagement.UserIdentityProperties{
	// 							"/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ogf-identity": &armapimanagement.UserIdentityProperties{
	// 								ClientID: to.Ptr("8d9791f2-0cdf-41f4-9e66-cdc39b496789"),
	// 								PrincipalID: to.Ptr("713784d2-ee37-412a-95f0-3768f397f82d"),
	// 							},
	// 						},
	// 					},
	// 					Location: to.Ptr("East US"),
	// 					Properties: &armapimanagement.ServiceProperties{
	// 						APIVersionConstraint: &armapimanagement.APIVersionConstraint{
	// 							MinAPIVersion: to.Ptr("2019-12-01"),
	// 						},
	// 						CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-16T09:39:58.655Z"); return t}()),
	// 						CustomProperties: map[string]*string{
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": to.Ptr("false"),
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("False"),
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("False"),
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("False"),
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA": to.Ptr("true"),
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": to.Ptr("False"),
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": to.Ptr("False"),
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("False"),
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("False"),
	// 						},
	// 						DeveloperPortalURL: to.Ptr("https://ogf-z3-06162021-standard.developer.azure-api.net"),
	// 						DisableGateway: to.Ptr(false),
	// 						GatewayRegionalURL: to.Ptr("https://ogf-z3-06162021-standard-eastus-01.regional.azure-api.net"),
	// 						GatewayURL: to.Ptr("https://ogf-z3-06162021-standard.azure-api.net"),
	// 						HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
	// 							{
	// 								Type: to.Ptr(armapimanagement.HostnameTypeProxy),
	// 								CertificateSource: to.Ptr(armapimanagement.CertificateSourceBuiltIn),
	// 								DefaultSSLBinding: to.Ptr(true),
	// 								HostName: to.Ptr("ogf-z3-06162021-standard.azure-api.net"),
	// 								NegotiateClientCertificate: to.Ptr(false),
	// 						}},
	// 						ManagementAPIURL: to.Ptr("https://ogf-z3-06162021-standard.management.azure-api.net"),
	// 						NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
	// 						PortalURL: to.Ptr("https://ogf-z3-06162021-standard.portal.azure-api.net"),
	// 						ProvisioningState: to.Ptr("Succeeded"),
	// 						PublicIPAddresses: []*string{
	// 							to.Ptr("13.82.208.32")},
	// 							PublicNetworkAccess: to.Ptr(armapimanagement.PublicNetworkAccessEnabled),
	// 							ScmURL: to.Ptr("https://ogf-z3-06162021-standard.scm.azure-api.net"),
	// 							TargetProvisioningState: to.Ptr(""),
	// 							VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
	// 							PublisherEmail: to.Ptr("bar@contoso.com"),
	// 							PublisherName: to.Ptr("Test Standard"),
	// 						},
	// 						SKU: &armapimanagement.ServiceSKUProperties{
	// 							Name: to.Ptr(armapimanagement.SKUTypeStandard),
	// 							Capacity: to.Ptr[int32](2),
	// 						},
	// 						SystemData: &armapimanagement.SystemData{
	// 							CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-16T09:39:58.459Z"); return t}()),
	// 							CreatedBy: to.Ptr("bar@contoso.com"),
	// 							CreatedByType: to.Ptr(armapimanagement.CreatedByTypeUser),
	// 							LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T15:05:13.549Z"); return t}()),
	// 							LastModifiedBy: to.Ptr("bar@contoso.com"),
	// 							LastModifiedByType: to.Ptr(armapimanagement.CreatedByTypeUser),
	// 						},
	// 					},
	// 					{
	// 						Name: to.Ptr("ogf-dev-060921"),
	// 						Type: to.Ptr("Microsoft.ApiManagement/service"),
	// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/ogf-dev-060921"),
	// 						Tags: map[string]*string{
	// 						},
	// 						Etag: to.Ptr("AAAAAAAWEFg="),
	// 						Identity: &armapimanagement.ServiceIdentity{
	// 							Type: to.Ptr(armapimanagement.ApimIdentityTypeSystemAssigned),
	// 							PrincipalID: to.Ptr("c9bd4c05-205e-4431-b232-112cf2e9e0aa"),
	// 							TenantID: to.Ptr("f686d426-8d16-42db-81b7-ab578e110ccd"),
	// 						},
	// 						Location: to.Ptr("East US"),
	// 						Properties: &armapimanagement.ServiceProperties{
	// 							AdditionalLocations: []*armapimanagement.AdditionalLocation{
	// 								{
	// 									DisableGateway: to.Ptr(false),
	// 									GatewayRegionalURL: to.Ptr("https://ogf-dev-060921-southcentralus-01.regional.azure-api.net"),
	// 									Location: to.Ptr("South Central US"),
	// 									PublicIPAddresses: []*string{
	// 										to.Ptr("13.84.208.29")},
	// 										SKU: &armapimanagement.ServiceSKUProperties{
	// 											Name: to.Ptr(armapimanagement.SKUTypePremium),
	// 											Capacity: to.Ptr[int32](9),
	// 										},
	// 										Zones: []*string{
	// 										},
	// 								}},
	// 								APIVersionConstraint: &armapimanagement.APIVersionConstraint{
	// 									MinAPIVersion: to.Ptr("2019-12-01"),
	// 								},
	// 								Certificates: []*armapimanagement.CertificateConfiguration{
	// 									{
	// 										Certificate: &armapimanagement.CertificateInformation{
	// 											Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-25T22:51:47.000Z"); return t}()),
	// 											Subject: to.Ptr("CN=*.apim.net"),
	// 											Thumbprint: to.Ptr("4E8234312EC69245D1AE296C4882D46FB84076A3"),
	// 										},
	// 										StoreName: to.Ptr(armapimanagement.CertificateConfigurationStoreNameRoot),
	// 								}},
	// 								CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-09T10:06:22.213Z"); return t}()),
	// 								CustomProperties: map[string]*string{
	// 									"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": to.Ptr("false"),
	// 									"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("false"),
	// 									"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("false"),
	// 									"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("false"),
	// 									"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": to.Ptr("false"),
	// 									"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": to.Ptr("false"),
	// 									"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("false"),
	// 									"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("false"),
	// 								},
	// 								DeveloperPortalURL: to.Ptr("https://ogf-dev-060921.developer.azure-api.net"),
	// 								DisableGateway: to.Ptr(false),
	// 								GatewayRegionalURL: to.Ptr("https://ogf-dev-060921-eastus-01.regional.azure-api.net"),
	// 								GatewayURL: to.Ptr("https://ogf-dev-060921.azure-api.net"),
	// 								HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
	// 									{
	// 										Type: to.Ptr(armapimanagement.HostnameTypeProxy),
	// 										CertificateSource: to.Ptr(armapimanagement.CertificateSourceBuiltIn),
	// 										DefaultSSLBinding: to.Ptr(true),
	// 										HostName: to.Ptr("ogf-dev-060921.azure-api.net"),
	// 										NegotiateClientCertificate: to.Ptr(false),
	// 								}},
	// 								ManagementAPIURL: to.Ptr("https://ogf-dev-060921.management.azure-api.net"),
	// 								NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
	// 								PortalURL: to.Ptr("https://ogf-dev-060921.portal.azure-api.net"),
	// 								ProvisioningState: to.Ptr("Succeeded"),
	// 								PublicIPAddresses: []*string{
	// 									to.Ptr("168.62.39.172")},
	// 									PublicNetworkAccess: to.Ptr(armapimanagement.PublicNetworkAccessEnabled),
	// 									ScmURL: to.Ptr("https://ogf-dev-060921.scm.azure-api.net"),
	// 									TargetProvisioningState: to.Ptr(""),
	// 									VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
	// 									PublisherEmail: to.Ptr("v-ssaiprasan@microsoft.com"),
	// 									PublisherName: to.Ptr("TechM"),
	// 								},
	// 								SKU: &armapimanagement.ServiceSKUProperties{
	// 									Name: to.Ptr(armapimanagement.SKUTypePremium),
	// 									Capacity: to.Ptr[int32](3),
	// 								},
	// 								SystemData: &armapimanagement.SystemData{
	// 									CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-09T10:06:21.733Z"); return t}()),
	// 									CreatedBy: to.Ptr("v-ssaiprasan@microsoft.com"),
	// 									CreatedByType: to.Ptr(armapimanagement.CreatedByTypeUser),
	// 									LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-10T14:27:05.546Z"); return t}()),
	// 									LastModifiedBy: to.Ptr("v-ssaiprasan@microsoft.com"),
	// 									LastModifiedByType: to.Ptr(armapimanagement.CreatedByTypeUser),
	// 								},
	// 						}},
	// 					}
}
Output:

func (*ServiceClient) NewListPager

NewListPager - Lists all API Management services within an Azure subscription.

Generated from API version 2022-08-01

  • options - ServiceClientListOptions contains the optional parameters for the ServiceClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListServiceBySubscription.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewServiceClient().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.ServiceListResult = armapimanagement.ServiceListResult{
	// 	Value: []*armapimanagement.ServiceResource{
	// 		{
	// 			Name: to.Ptr("OGF-Z3-06162021-Premium"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/OGF-Z3-06162021-Premium"),
	// 			Tags: map[string]*string{
	// 				"ReleaseName": to.Ptr("Z3"),
	// 				"owner": to.Ptr("v-aswmoh"),
	// 			},
	// 			Etag: to.Ptr("AAAAAAAWN/4="),
	// 			Identity: &armapimanagement.ServiceIdentity{
	// 				Type: to.Ptr(armapimanagement.ApimIdentityTypeSystemAssignedUserAssigned),
	// 				PrincipalID: to.Ptr("306205e7-b21a-41bf-92e2-3e28af30041e"),
	// 				TenantID: to.Ptr("f686d426-8d16-42db-81b7-ab578e110ccd"),
	// 				UserAssignedIdentities: map[string]*armapimanagement.UserIdentityProperties{
	// 					"/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ogf-identity": &armapimanagement.UserIdentityProperties{
	// 						ClientID: to.Ptr("8d9791f2-0cdf-41f4-9e66-cdc39b496789"),
	// 						PrincipalID: to.Ptr("713784d2-ee37-412a-95f0-3768f397f82d"),
	// 					},
	// 				},
	// 			},
	// 			Location: to.Ptr("East US"),
	// 			Properties: &armapimanagement.ServiceProperties{
	// 				AdditionalLocations: []*armapimanagement.AdditionalLocation{
	// 					{
	// 						DisableGateway: to.Ptr(false),
	// 						GatewayRegionalURL: to.Ptr("https://ogf-z3-06162021-premium-eastus2-01.regional.azure-api.net"),
	// 						Location: to.Ptr("East US 2"),
	// 						PublicIPAddresses: []*string{
	// 							to.Ptr("40.70.24.106")},
	// 							SKU: &armapimanagement.ServiceSKUProperties{
	// 								Name: to.Ptr(armapimanagement.SKUTypePremium),
	// 								Capacity: to.Ptr[int32](1),
	// 							},
	// 							Zones: []*string{
	// 							},
	// 					}},
	// 					APIVersionConstraint: &armapimanagement.APIVersionConstraint{
	// 						MinAPIVersion: to.Ptr("2019-12-01"),
	// 					},
	// 					Certificates: []*armapimanagement.CertificateConfiguration{
	// 					},
	// 					CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-16T09:40:00.945Z"); return t}()),
	// 					CustomProperties: map[string]*string{
	// 						"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": to.Ptr("false"),
	// 						"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("false"),
	// 						"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("false"),
	// 						"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("false"),
	// 						"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": to.Ptr("false"),
	// 						"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": to.Ptr("false"),
	// 						"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("false"),
	// 						"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("false"),
	// 					},
	// 					DeveloperPortalURL: to.Ptr("https://ogf-z3-06162021-premium.developer.azure-api.net"),
	// 					DisableGateway: to.Ptr(false),
	// 					GatewayRegionalURL: to.Ptr("https://ogf-z3-06162021-premium-eastus-01.regional.azure-api.net"),
	// 					GatewayURL: to.Ptr("https://ogf-z3-06162021-premium.azure-api.net"),
	// 					HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
	// 						{
	// 							Type: to.Ptr(armapimanagement.HostnameTypeProxy),
	// 							CertificateSource: to.Ptr(armapimanagement.CertificateSourceBuiltIn),
	// 							DefaultSSLBinding: to.Ptr(false),
	// 							HostName: to.Ptr("ogf-z3-06162021-premium.azure-api.net"),
	// 							NegotiateClientCertificate: to.Ptr(false),
	// 						},
	// 						{
	// 							Type: to.Ptr(armapimanagement.HostnameTypeProxy),
	// 							Certificate: &armapimanagement.CertificateInformation{
	// 								Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-08T22:32:32.000Z"); return t}()),
	// 								Subject: to.Ptr("CN=*.current.int-azure-api.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US"),
	// 								Thumbprint: to.Ptr("BA0C286F71AF3B6A01BDB240C58A4A507E3DBD51"),
	// 							},
	// 							CertificateSource: to.Ptr(armapimanagement.CertificateSourceCustom),
	// 							DefaultSSLBinding: to.Ptr(true),
	// 							HostName: to.Ptr("gateway.current.int-azure-api.net"),
	// 							KeyVaultID: to.Ptr("https://ogf-testing.vault-int.azure-int.net/secrets/current-ssl"),
	// 							NegotiateClientCertificate: to.Ptr(true),
	// 						},
	// 						{
	// 							Type: to.Ptr(armapimanagement.HostnameTypeDeveloperPortal),
	// 							Certificate: &armapimanagement.CertificateInformation{
	// 								Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-08T22:32:32.000Z"); return t}()),
	// 								Subject: to.Ptr("CN=*.current.int-azure-api.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US"),
	// 								Thumbprint: to.Ptr("BA0C286F71AF3B6A01BDB240C58A4A507E3DBD51"),
	// 							},
	// 							CertificateSource: to.Ptr(armapimanagement.CertificateSourceCustom),
	// 							DefaultSSLBinding: to.Ptr(false),
	// 							HostName: to.Ptr("developer.current.int-azure-api.net"),
	// 							KeyVaultID: to.Ptr("https://ogf-testing.vault-int.azure-int.net/secrets/current-ssl"),
	// 							NegotiateClientCertificate: to.Ptr(false),
	// 						},
	// 						{
	// 							Type: to.Ptr(armapimanagement.HostnameTypeManagement),
	// 							Certificate: &armapimanagement.CertificateInformation{
	// 								Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-08T22:32:32.000Z"); return t}()),
	// 								Subject: to.Ptr("CN=*.current.int-azure-api.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US"),
	// 								Thumbprint: to.Ptr("BA0C286F71AF3B6A01BDB240C58A4A507E3DBD51"),
	// 							},
	// 							CertificateSource: to.Ptr(armapimanagement.CertificateSourceCustom),
	// 							DefaultSSLBinding: to.Ptr(false),
	// 							HostName: to.Ptr("mgmt.current.int-azure-api.net"),
	// 							KeyVaultID: to.Ptr("https://ogf-testing.vault-int.azure-int.net/secrets/current-ssl"),
	// 							NegotiateClientCertificate: to.Ptr(false),
	// 					}},
	// 					ManagementAPIURL: to.Ptr("https://ogf-z3-06162021-premium.management.azure-api.net"),
	// 					NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
	// 					PortalURL: to.Ptr("https://ogf-z3-06162021-premium.portal.azure-api.net"),
	// 					ProvisioningState: to.Ptr("Succeeded"),
	// 					PublicIPAddresses: []*string{
	// 						to.Ptr("13.92.130.49")},
	// 						PublicNetworkAccess: to.Ptr(armapimanagement.PublicNetworkAccessEnabled),
	// 						ScmURL: to.Ptr("https://ogf-z3-06162021-premium.scm.azure-api.net"),
	// 						TargetProvisioningState: to.Ptr(""),
	// 						VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
	// 						PublisherEmail: to.Ptr("bar@contoso.com"),
	// 						PublisherName: to.Ptr("Test Premium"),
	// 					},
	// 					SKU: &armapimanagement.ServiceSKUProperties{
	// 						Name: to.Ptr(armapimanagement.SKUTypePremium),
	// 						Capacity: to.Ptr[int32](1),
	// 					},
	// 					SystemData: &armapimanagement.SystemData{
	// 						CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-16T09:40:00.710Z"); return t}()),
	// 						CreatedBy: to.Ptr("bar@contoso.com"),
	// 						CreatedByType: to.Ptr(armapimanagement.CreatedByTypeUser),
	// 						LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-20T06:33:09.615Z"); return t}()),
	// 						LastModifiedBy: to.Ptr("foo@contoso.com"),
	// 						LastModifiedByType: to.Ptr(armapimanagement.CreatedByTypeUser),
	// 					},
	// 				},
	// 				{
	// 					Name: to.Ptr("vvktestcons"),
	// 					Type: to.Ptr("Microsoft.ApiManagement/service"),
	// 					ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/vvktestcons"),
	// 					Tags: map[string]*string{
	// 						"Owner": to.Ptr("vitaliik"),
	// 					},
	// 					Etag: to.Ptr("AAAAAAAWKwo="),
	// 					Location: to.Ptr("East US"),
	// 					Properties: &armapimanagement.ServiceProperties{
	// 						CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-10T18:07:23.456Z"); return t}()),
	// 						CustomProperties: map[string]*string{
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": to.Ptr("False"),
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("False"),
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("False"),
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("False"),
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("False"),
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("False"),
	// 						},
	// 						DisableGateway: to.Ptr(false),
	// 						EnableClientCertificate: to.Ptr(false),
	// 						GatewayURL: to.Ptr("https://vvktestcons.azure-api.net"),
	// 						HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
	// 							{
	// 								Type: to.Ptr(armapimanagement.HostnameTypeProxy),
	// 								CertificateSource: to.Ptr(armapimanagement.CertificateSourceBuiltIn),
	// 								DefaultSSLBinding: to.Ptr(true),
	// 								HostName: to.Ptr("vvktestcons.azure-api.net"),
	// 								NegotiateClientCertificate: to.Ptr(false),
	// 						}},
	// 						NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
	// 						ProvisioningState: to.Ptr("Succeeded"),
	// 						PublicNetworkAccess: to.Ptr(armapimanagement.PublicNetworkAccessEnabled),
	// 						TargetProvisioningState: to.Ptr(""),
	// 						VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
	// 						PublisherEmail: to.Ptr("bar@contoso.com"),
	// 						PublisherName: to.Ptr("vvktestcons"),
	// 					},
	// 					SKU: &armapimanagement.ServiceSKUProperties{
	// 						Name: to.Ptr(armapimanagement.SKUTypeConsumption),
	// 						Capacity: to.Ptr[int32](0),
	// 					},
	// 				},
	// 				{
	// 					Name: to.Ptr("OGF-Z3-06162021-Standard"),
	// 					Type: to.Ptr("Microsoft.ApiManagement/service"),
	// 					ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/OGF-Z3-06162021-Standard"),
	// 					Tags: map[string]*string{
	// 					},
	// 					Etag: to.Ptr("AAAAAAAWF7M="),
	// 					Identity: &armapimanagement.ServiceIdentity{
	// 						Type: to.Ptr(armapimanagement.ApimIdentityTypeSystemAssignedUserAssigned),
	// 						PrincipalID: to.Ptr("347a5800-ca99-475a-9202-fe38ca79ee41"),
	// 						TenantID: to.Ptr("f686d426-8d16-42db-81b7-ab578e110ccd"),
	// 						UserAssignedIdentities: map[string]*armapimanagement.UserIdentityProperties{
	// 							"/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ogf-identity": &armapimanagement.UserIdentityProperties{
	// 								ClientID: to.Ptr("8d9791f2-0cdf-41f4-9e66-cdc39b496789"),
	// 								PrincipalID: to.Ptr("713784d2-ee37-412a-95f0-3768f397f82d"),
	// 							},
	// 						},
	// 					},
	// 					Location: to.Ptr("East US"),
	// 					Properties: &armapimanagement.ServiceProperties{
	// 						APIVersionConstraint: &armapimanagement.APIVersionConstraint{
	// 							MinAPIVersion: to.Ptr("2019-12-01"),
	// 						},
	// 						CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-16T09:39:58.655Z"); return t}()),
	// 						CustomProperties: map[string]*string{
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": to.Ptr("false"),
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("False"),
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("False"),
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("False"),
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA": to.Ptr("true"),
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": to.Ptr("False"),
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": to.Ptr("False"),
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("False"),
	// 							"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("False"),
	// 						},
	// 						DeveloperPortalURL: to.Ptr("https://ogf-z3-06162021-standard.developer.azure-api.net"),
	// 						DisableGateway: to.Ptr(false),
	// 						GatewayRegionalURL: to.Ptr("https://ogf-z3-06162021-standard-eastus-01.regional.azure-api.net"),
	// 						GatewayURL: to.Ptr("https://ogf-z3-06162021-standard.azure-api.net"),
	// 						HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
	// 							{
	// 								Type: to.Ptr(armapimanagement.HostnameTypeProxy),
	// 								CertificateSource: to.Ptr(armapimanagement.CertificateSourceBuiltIn),
	// 								DefaultSSLBinding: to.Ptr(true),
	// 								HostName: to.Ptr("ogf-z3-06162021-standard.azure-api.net"),
	// 								NegotiateClientCertificate: to.Ptr(false),
	// 						}},
	// 						ManagementAPIURL: to.Ptr("https://ogf-z3-06162021-standard.management.azure-api.net"),
	// 						NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
	// 						PortalURL: to.Ptr("https://ogf-z3-06162021-standard.portal.azure-api.net"),
	// 						ProvisioningState: to.Ptr("Succeeded"),
	// 						PublicIPAddresses: []*string{
	// 							to.Ptr("13.82.208.32")},
	// 							PublicNetworkAccess: to.Ptr(armapimanagement.PublicNetworkAccessEnabled),
	// 							ScmURL: to.Ptr("https://ogf-z3-06162021-standard.scm.azure-api.net"),
	// 							TargetProvisioningState: to.Ptr(""),
	// 							VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
	// 							PublisherEmail: to.Ptr("bar@contoso.com"),
	// 							PublisherName: to.Ptr("Test Standard"),
	// 						},
	// 						SKU: &armapimanagement.ServiceSKUProperties{
	// 							Name: to.Ptr(armapimanagement.SKUTypeStandard),
	// 							Capacity: to.Ptr[int32](2),
	// 						},
	// 						SystemData: &armapimanagement.SystemData{
	// 							CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-16T09:39:58.459Z"); return t}()),
	// 							CreatedBy: to.Ptr("bar@contoso.com"),
	// 							CreatedByType: to.Ptr(armapimanagement.CreatedByTypeUser),
	// 							LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-17T15:05:13.549Z"); return t}()),
	// 							LastModifiedBy: to.Ptr("bar@contoso.com"),
	// 							LastModifiedByType: to.Ptr(armapimanagement.CreatedByTypeUser),
	// 						},
	// 					},
	// 					{
	// 						Name: to.Ptr("ogf-dev-060921"),
	// 						Type: to.Ptr("Microsoft.ApiManagement/service"),
	// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/ogf-dev-060921"),
	// 						Tags: map[string]*string{
	// 						},
	// 						Etag: to.Ptr("AAAAAAAWEFg="),
	// 						Identity: &armapimanagement.ServiceIdentity{
	// 							Type: to.Ptr(armapimanagement.ApimIdentityTypeSystemAssigned),
	// 							PrincipalID: to.Ptr("c9bd4c05-205e-4431-b232-112cf2e9e0aa"),
	// 							TenantID: to.Ptr("f686d426-8d16-42db-81b7-ab578e110ccd"),
	// 						},
	// 						Location: to.Ptr("East US"),
	// 						Properties: &armapimanagement.ServiceProperties{
	// 							AdditionalLocations: []*armapimanagement.AdditionalLocation{
	// 								{
	// 									DisableGateway: to.Ptr(false),
	// 									GatewayRegionalURL: to.Ptr("https://ogf-dev-060921-southcentralus-01.regional.azure-api.net"),
	// 									Location: to.Ptr("South Central US"),
	// 									PublicIPAddresses: []*string{
	// 										to.Ptr("13.84.208.29")},
	// 										SKU: &armapimanagement.ServiceSKUProperties{
	// 											Name: to.Ptr(armapimanagement.SKUTypePremium),
	// 											Capacity: to.Ptr[int32](9),
	// 										},
	// 										Zones: []*string{
	// 										},
	// 								}},
	// 								APIVersionConstraint: &armapimanagement.APIVersionConstraint{
	// 									MinAPIVersion: to.Ptr("2019-12-01"),
	// 								},
	// 								Certificates: []*armapimanagement.CertificateConfiguration{
	// 									{
	// 										Certificate: &armapimanagement.CertificateInformation{
	// 											Expiry: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-25T22:51:47.000Z"); return t}()),
	// 											Subject: to.Ptr("CN=*.apim.net"),
	// 											Thumbprint: to.Ptr("4E8234312EC69245D1AE296C4882D46FB84076A3"),
	// 										},
	// 										StoreName: to.Ptr(armapimanagement.CertificateConfigurationStoreNameRoot),
	// 								}},
	// 								CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-09T10:06:22.213Z"); return t}()),
	// 								CustomProperties: map[string]*string{
	// 									"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": to.Ptr("false"),
	// 									"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": to.Ptr("false"),
	// 									"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": to.Ptr("false"),
	// 									"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": to.Ptr("false"),
	// 									"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": to.Ptr("false"),
	// 									"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": to.Ptr("false"),
	// 									"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.Ptr("false"),
	// 									"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": to.Ptr("false"),
	// 								},
	// 								DeveloperPortalURL: to.Ptr("https://ogf-dev-060921.developer.azure-api.net"),
	// 								DisableGateway: to.Ptr(false),
	// 								GatewayRegionalURL: to.Ptr("https://ogf-dev-060921-eastus-01.regional.azure-api.net"),
	// 								GatewayURL: to.Ptr("https://ogf-dev-060921.azure-api.net"),
	// 								HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
	// 									{
	// 										Type: to.Ptr(armapimanagement.HostnameTypeProxy),
	// 										CertificateSource: to.Ptr(armapimanagement.CertificateSourceBuiltIn),
	// 										DefaultSSLBinding: to.Ptr(true),
	// 										HostName: to.Ptr("ogf-dev-060921.azure-api.net"),
	// 										NegotiateClientCertificate: to.Ptr(false),
	// 								}},
	// 								ManagementAPIURL: to.Ptr("https://ogf-dev-060921.management.azure-api.net"),
	// 								NotificationSenderEmail: to.Ptr("apimgmt-noreply@mail.windowsazure.com"),
	// 								PortalURL: to.Ptr("https://ogf-dev-060921.portal.azure-api.net"),
	// 								ProvisioningState: to.Ptr("Succeeded"),
	// 								PublicIPAddresses: []*string{
	// 									to.Ptr("168.62.39.172")},
	// 									PublicNetworkAccess: to.Ptr(armapimanagement.PublicNetworkAccessEnabled),
	// 									ScmURL: to.Ptr("https://ogf-dev-060921.scm.azure-api.net"),
	// 									TargetProvisioningState: to.Ptr(""),
	// 									VirtualNetworkType: to.Ptr(armapimanagement.VirtualNetworkTypeNone),
	// 									PublisherEmail: to.Ptr("v-ssaiprasan@microsoft.com"),
	// 									PublisherName: to.Ptr("TechM"),
	// 								},
	// 								SKU: &armapimanagement.ServiceSKUProperties{
	// 									Name: to.Ptr(armapimanagement.SKUTypePremium),
	// 									Capacity: to.Ptr[int32](3),
	// 								},
	// 								SystemData: &armapimanagement.SystemData{
	// 									CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-09T10:06:21.733Z"); return t}()),
	// 									CreatedBy: to.Ptr("v-ssaiprasan@microsoft.com"),
	// 									CreatedByType: to.Ptr(armapimanagement.CreatedByTypeUser),
	// 									LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-06-10T14:27:05.546Z"); return t}()),
	// 									LastModifiedBy: to.Ptr("v-ssaiprasan@microsoft.com"),
	// 									LastModifiedByType: to.Ptr(armapimanagement.CreatedByTypeUser),
	// 								},
	// 						}},
	// 					}
}
Output:

type ServiceClientApplyNetworkConfigurationUpdatesResponse

type ServiceClientApplyNetworkConfigurationUpdatesResponse struct {
	// A single API Management service resource in List or Get response.
	ServiceResource
}

ServiceClientApplyNetworkConfigurationUpdatesResponse contains the response from method ServiceClient.BeginApplyNetworkConfigurationUpdates.

type ServiceClientBackupResponse

type ServiceClientBackupResponse struct {
	// A single API Management service resource in List or Get response.
	ServiceResource
}

ServiceClientBackupResponse contains the response from method ServiceClient.BeginBackup.

type ServiceClientBeginApplyNetworkConfigurationUpdatesOptions

type ServiceClientBeginApplyNetworkConfigurationUpdatesOptions struct {
	// Parameters supplied to the Apply Network Configuration operation. If the parameters are empty, all the regions in which
	// the Api Management service is deployed will be updated sequentially without
	// incurring downtime in the region.
	Parameters *ServiceApplyNetworkConfigurationParameters

	// Resumes the LRO from the provided token.
	ResumeToken string
}

ServiceClientBeginApplyNetworkConfigurationUpdatesOptions contains the optional parameters for the ServiceClient.BeginApplyNetworkConfigurationUpdates method.

type ServiceClientBeginBackupOptions

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

ServiceClientBeginBackupOptions contains the optional parameters for the ServiceClient.BeginBackup method.

type ServiceClientBeginCreateOrUpdateOptions

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

ServiceClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceClient.BeginCreateOrUpdate method.

type ServiceClientBeginDeleteOptions

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

ServiceClientBeginDeleteOptions contains the optional parameters for the ServiceClient.BeginDelete method.

type ServiceClientBeginMigrateToStv2Options

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

ServiceClientBeginMigrateToStv2Options contains the optional parameters for the ServiceClient.BeginMigrateToStv2 method.

type ServiceClientBeginRestoreOptions

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

ServiceClientBeginRestoreOptions contains the optional parameters for the ServiceClient.BeginRestore method.

type ServiceClientBeginUpdateOptions

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

ServiceClientBeginUpdateOptions contains the optional parameters for the ServiceClient.BeginUpdate method.

type ServiceClientCheckNameAvailabilityOptions

type ServiceClientCheckNameAvailabilityOptions struct {
}

ServiceClientCheckNameAvailabilityOptions contains the optional parameters for the ServiceClient.CheckNameAvailability method.

type ServiceClientCheckNameAvailabilityResponse

type ServiceClientCheckNameAvailabilityResponse struct {
	// Response of the CheckNameAvailability operation.
	ServiceNameAvailabilityResult
}

ServiceClientCheckNameAvailabilityResponse contains the response from method ServiceClient.CheckNameAvailability.

type ServiceClientCreateOrUpdateResponse

type ServiceClientCreateOrUpdateResponse struct {
	// A single API Management service resource in List or Get response.
	ServiceResource
}

ServiceClientCreateOrUpdateResponse contains the response from method ServiceClient.BeginCreateOrUpdate.

type ServiceClientDeleteResponse

type ServiceClientDeleteResponse struct {
	// A single API Management service resource in List or Get response.
	ServiceResource
}

ServiceClientDeleteResponse contains the response from method ServiceClient.BeginDelete.

type ServiceClientGetDomainOwnershipIdentifierOptions

type ServiceClientGetDomainOwnershipIdentifierOptions struct {
}

ServiceClientGetDomainOwnershipIdentifierOptions contains the optional parameters for the ServiceClient.GetDomainOwnershipIdentifier method.

type ServiceClientGetDomainOwnershipIdentifierResponse

type ServiceClientGetDomainOwnershipIdentifierResponse struct {
	// Response of the GetDomainOwnershipIdentifier operation.
	ServiceGetDomainOwnershipIdentifierResult
}

ServiceClientGetDomainOwnershipIdentifierResponse contains the response from method ServiceClient.GetDomainOwnershipIdentifier.

type ServiceClientGetOptions

type ServiceClientGetOptions struct {
}

ServiceClientGetOptions contains the optional parameters for the ServiceClient.Get method.

type ServiceClientGetResponse

type ServiceClientGetResponse struct {
	// A single API Management service resource in List or Get response.
	ServiceResource
}

ServiceClientGetResponse contains the response from method ServiceClient.Get.

type ServiceClientGetSsoTokenOptions

type ServiceClientGetSsoTokenOptions struct {
}

ServiceClientGetSsoTokenOptions contains the optional parameters for the ServiceClient.GetSsoToken method.

type ServiceClientGetSsoTokenResponse

type ServiceClientGetSsoTokenResponse struct {
	// The response of the GetSsoToken operation.
	ServiceGetSsoTokenResult
}

ServiceClientGetSsoTokenResponse contains the response from method ServiceClient.GetSsoToken.

type ServiceClientListByResourceGroupOptions

type ServiceClientListByResourceGroupOptions struct {
}

ServiceClientListByResourceGroupOptions contains the optional parameters for the ServiceClient.NewListByResourceGroupPager method.

type ServiceClientListByResourceGroupResponse

type ServiceClientListByResourceGroupResponse struct {
	// The response of the List API Management services operation.
	ServiceListResult
}

ServiceClientListByResourceGroupResponse contains the response from method ServiceClient.NewListByResourceGroupPager.

type ServiceClientListOptions

type ServiceClientListOptions struct {
}

ServiceClientListOptions contains the optional parameters for the ServiceClient.NewListPager method.

type ServiceClientListResponse

type ServiceClientListResponse struct {
	// The response of the List API Management services operation.
	ServiceListResult
}

ServiceClientListResponse contains the response from method ServiceClient.NewListPager.

type ServiceClientMigrateToStv2Response

type ServiceClientMigrateToStv2Response struct {
	// A single API Management service resource in List or Get response.
	ServiceResource
}

ServiceClientMigrateToStv2Response contains the response from method ServiceClient.BeginMigrateToStv2.

type ServiceClientRestoreResponse

type ServiceClientRestoreResponse struct {
	// A single API Management service resource in List or Get response.
	ServiceResource
}

ServiceClientRestoreResponse contains the response from method ServiceClient.BeginRestore.

type ServiceClientUpdateResponse

type ServiceClientUpdateResponse struct {
	// A single API Management service resource in List or Get response.
	ServiceResource
}

ServiceClientUpdateResponse contains the response from method ServiceClient.BeginUpdate.

type ServiceGetDomainOwnershipIdentifierResult

type ServiceGetDomainOwnershipIdentifierResult struct {
	// READ-ONLY; The domain ownership identifier value.
	DomainOwnershipIdentifier *string
}

ServiceGetDomainOwnershipIdentifierResult - Response of the GetDomainOwnershipIdentifier operation.

func (ServiceGetDomainOwnershipIdentifierResult) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type ServiceGetDomainOwnershipIdentifierResult.

func (*ServiceGetDomainOwnershipIdentifierResult) UnmarshalJSON

func (s *ServiceGetDomainOwnershipIdentifierResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceGetDomainOwnershipIdentifierResult.

type ServiceGetSsoTokenResult

type ServiceGetSsoTokenResult struct {
	// Redirect URL to the Publisher Portal containing the SSO token.
	RedirectURI *string
}

ServiceGetSsoTokenResult - The response of the GetSsoToken operation.

func (ServiceGetSsoTokenResult) MarshalJSON

func (s ServiceGetSsoTokenResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceGetSsoTokenResult.

func (*ServiceGetSsoTokenResult) UnmarshalJSON

func (s *ServiceGetSsoTokenResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceGetSsoTokenResult.

type ServiceIdentity

type ServiceIdentity struct {
	// REQUIRED; The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly
	// created identity and a set of user assigned identities. The type 'None' will remove any
	// identities from the service.
	Type *ApimIdentityType

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

	// READ-ONLY; The principal id of the identity.
	PrincipalID *string

	// READ-ONLY; The client tenant id of the identity.
	TenantID *string
}

ServiceIdentity - Identity properties of the Api Management service resource.

func (ServiceIdentity) MarshalJSON

func (s ServiceIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceIdentity.

func (*ServiceIdentity) UnmarshalJSON

func (s *ServiceIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceIdentity.

type ServiceListResult

type ServiceListResult struct {
	// REQUIRED; Result of the List API Management services operation.
	Value []*ServiceResource

	// Link to the next set of results. Not empty if Value contains incomplete list of API Management services.
	NextLink *string
}

ServiceListResult - The response of the List API Management services operation.

func (ServiceListResult) MarshalJSON

func (s ServiceListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceListResult.

func (*ServiceListResult) UnmarshalJSON

func (s *ServiceListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceListResult.

type ServiceNameAvailabilityResult

type ServiceNameAvailabilityResult struct {
	// Invalid indicates the name provided does not match the resource provider’s naming requirements (incorrect length, unsupported
	// characters, etc.) AlreadyExists indicates that the name is already in use
	// and is therefore unavailable.
	Reason *NameAvailabilityReason

	// READ-ONLY; If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource
	// naming requirements so that the user can select a valid name. If reason == AlreadyExists,
	// explain that is already in use, and direct them to select a different name.
	Message *string

	// READ-ONLY; True if the name is available and can be used to create a new API Management service; otherwise false.
	NameAvailable *bool
}

ServiceNameAvailabilityResult - Response of the CheckNameAvailability operation.

func (ServiceNameAvailabilityResult) MarshalJSON

func (s ServiceNameAvailabilityResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceNameAvailabilityResult.

func (*ServiceNameAvailabilityResult) UnmarshalJSON

func (s *ServiceNameAvailabilityResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceNameAvailabilityResult.

type ServiceProperties

type ServiceProperties struct {
	// REQUIRED; Publisher email.
	PublisherEmail *string

	// REQUIRED; Publisher name.
	PublisherName *string

	// Control Plane Apis version constraint for the API Management service.
	APIVersionConstraint *APIVersionConstraint

	// Additional datacenter locations of the API Management service.
	AdditionalLocations []*AdditionalLocation

	// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed
	// is 10.
	Certificates []*CertificateConfiguration

	// Custom properties of the API Management service.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168 will disable the cipher TLSRSAWITH3DESEDECBCSHA
	// for all TLS(1.0, 1.1 and 1.2).
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11 can be used to disable just TLS 1.1.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10 can be used to disable TLS 1.0 on an API
	// Management service.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11 can be used to disable just TLS 1.1
	// for communications with backends.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10 can be used to disable TLS 1.0 for
	// communications with backends.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2 can be used to enable HTTP2 protocol on an
	// API Management service.
	// Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For
	// all the settings except Http2 the default value is True if the service was
	// created on or before April 1, 2018 and False otherwise. Http2 setting's default value is False.
	// You can disable any of the following ciphers by using settings Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]:
	// TLSECDHEECDSAWITHAES256CBCSHA, TLSECDHEECDSAWITHAES128CBC
	// SHA, TLSECDHERSAWITHAES256CBCSHA, TLSECDHERSAWITHAES128CBCSHA, TLSRSAWITHAES128GCMSHA256, TLSRSAWITHAES256CBCSHA256, TLSRSAWITHAES128CBCSHA256,
	// TLSRSAWITHAES256CBCSHA, TLSRSAWITHAES128CBCSHA. For
	// example, Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256:false. The default
	// value is true for them.
	// Note: The following ciphers can't be disabled since they are required by internal platform components: TLSAES256GCMSHA384,TLSAES128GCMSHA256,TLSECDHEECDSAWITHAES256GCMSHA384,TLSECDHEECDSAWITHAES128GCM
	// SHA256,TLSECDHERSAWITHAES256GCMSHA384,TLSECDHERSAWITHAES128GCMSHA256,TLSECDHEECDSAWITHAES256CBCSHA384,TLSECDHEECDSAWITHAES128CBCSHA256,TLSECDHERSAWITHAES256CBCSHA384,TLSECDHERSAWITHAES128CBCSHA256
	CustomProperties map[string]*string

	// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway
	// in master region.
	DisableGateway *bool

	// Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each
	// request to the gateway. This also enables the ability to authenticate the
	// certificate in the policy on the gateway.
	EnableClientCertificate *bool

	// Custom hostname configuration of the API Management service.
	HostnameConfigurations []*HostnameConfiguration

	// Property can be used to enable NAT Gateway for this API Management service.
	NatGatewayState *NatGatewayState

	// Email address from which the notification will be sent.
	NotificationSenderEmail *string

	// List of Private Endpoint Connections of this service.
	PrivateEndpointConnections []*RemotePrivateEndpointConnectionWrapper

	// Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported
	// only for Developer and Premium SKU being deployed in Virtual Network.
	PublicIPAddressID *string

	// Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must
	// be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the
	// exclusive access method. Default value is 'Enabled'
	PublicNetworkAccess *PublicNetworkAccess

	// Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other
	// properties will be ignored.
	Restore *bool

	// Virtual network configuration of the API Management service.
	VirtualNetworkConfiguration *VirtualNetworkConfiguration

	// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management
	// service is not part of any Virtual Network, External means the API Management
	// deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management
	// deployment is setup inside a Virtual Network having an Intranet Facing Endpoint
	// only.
	VirtualNetworkType *VirtualNetworkType

	// READ-ONLY; Creation UTC date of the API Management service.The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ
	// as specified by the ISO 8601 standard.
	CreatedAtUTC *time.Time

	// READ-ONLY; DEveloper Portal endpoint URL of the API Management service.
	DeveloperPortalURL *string

	// READ-ONLY; Gateway URL of the API Management service in the Default Region.
	GatewayRegionalURL *string

	// READ-ONLY; Gateway URL of the API Management service.
	GatewayURL *string

	// READ-ONLY; Management API endpoint URL of the API Management service.
	ManagementAPIURL *string

	// READ-ONLY; Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium
	// SKU on stv2 platform.
	OutboundPublicIPAddresses []*string

	// READ-ONLY; Compute Platform Version running the service in this location.
	PlatformVersion *PlatformVersion

	// READ-ONLY; Publisher portal endpoint Url of the API Management service.
	PortalURL *string

	// READ-ONLY; Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed
	// in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated
	// SKU.
	PrivateIPAddresses []*string

	// READ-ONLY; The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted.
	ProvisioningState *string

	// READ-ONLY; Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for
	// Basic, Standard, Premium and Isolated SKU.
	PublicIPAddresses []*string

	// READ-ONLY; SCM endpoint URL of the API Management service.
	ScmURL *string

	// READ-ONLY; The provisioning state of the API Management service, which is targeted by the long running operation started
	// on the service.
	TargetProvisioningState *string
}

ServiceProperties - Properties of an API Management service resource description.

func (ServiceProperties) MarshalJSON

func (s ServiceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceProperties.

func (*ServiceProperties) UnmarshalJSON

func (s *ServiceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceProperties.

type ServiceResource

type ServiceResource struct {
	// REQUIRED; Resource location.
	Location *string

	// REQUIRED; Properties of the API Management service.
	Properties *ServiceProperties

	// REQUIRED; SKU properties of the API Management service.
	SKU *ServiceSKUProperties

	// Managed service identity of the Api Management service.
	Identity *ServiceIdentity

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

	// A list of availability zones denoting where the resource needs to come from.
	Zones []*string

	// READ-ONLY; ETag of the resource.
	Etag *string

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

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

	// READ-ONLY; Resource type for API Management resource is set to Microsoft.ApiManagement.
	Type *string
}

ServiceResource - A single API Management service resource in List or Get response.

func (ServiceResource) MarshalJSON

func (s ServiceResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceResource.

func (*ServiceResource) UnmarshalJSON

func (s *ServiceResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceResource.

type ServiceSKUProperties

type ServiceSKUProperties struct {
	// REQUIRED; Capacity of the SKU (number of deployed units of the SKU). For Consumption SKU capacity must be specified as
	// 0.
	Capacity *int32

	// REQUIRED; Name of the Sku.
	Name *SKUType
}

ServiceSKUProperties - API Management service resource SKU properties.

func (ServiceSKUProperties) MarshalJSON

func (s ServiceSKUProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceSKUProperties.

func (*ServiceSKUProperties) UnmarshalJSON

func (s *ServiceSKUProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceSKUProperties.

type ServiceSKUsClient

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

ServiceSKUsClient contains the methods for the APIManagementServiceSKUs group. Don't use this type directly, use NewServiceSKUsClient() instead.

func NewServiceSKUsClient

func NewServiceSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceSKUsClient, error)

NewServiceSKUsClient creates a new instance of ServiceSKUsClient 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 (*ServiceSKUsClient) NewListAvailableServiceSKUsPager

func (client *ServiceSKUsClient) NewListAvailableServiceSKUsPager(resourceGroupName string, serviceName string, options *ServiceSKUsClientListAvailableServiceSKUsOptions) *runtime.Pager[ServiceSKUsClientListAvailableServiceSKUsResponse]

NewListAvailableServiceSKUsPager - Gets all available SKU for a given API Management service

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - ServiceSKUsClientListAvailableServiceSKUsOptions contains the optional parameters for the ServiceSKUsClient.NewListAvailableServiceSKUsPager method.
Example (ApiManagementListSkUsConsumption)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSKUs-Consumption.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewServiceSKUsClient().NewListAvailableServiceSKUsPager("rg1", "apimService1", 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.ResourceSKUResults = armapimanagement.ResourceSKUResults{
	// 	Value: []*armapimanagement.ResourceSKUResult{
	// 		{
	// 			ResourceType: to.Ptr("Microsoft.ApiManagement/service"),
	// 			SKU: &armapimanagement.ResourceSKU{
	// 				Name: to.Ptr(armapimanagement.SKUTypeConsumption),
	// 			},
	// 	}},
	// }
}
Output:

Example (ApiManagementListSkUsDedicated)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSKUs-Dedicated.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewServiceSKUsClient().NewListAvailableServiceSKUsPager("rg1", "apimService1", 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.ResourceSKUResults = armapimanagement.ResourceSKUResults{
	// 	Value: []*armapimanagement.ResourceSKUResult{
	// 		{
	// 			Capacity: &armapimanagement.ResourceSKUCapacity{
	// 				Default: to.Ptr[int32](1),
	// 				Maximum: to.Ptr[int32](1),
	// 				Minimum: to.Ptr[int32](1),
	// 				ScaleType: to.Ptr(armapimanagement.ResourceSKUCapacityScaleTypeNone),
	// 			},
	// 			ResourceType: to.Ptr("Microsoft.ApiManagement/service"),
	// 			SKU: &armapimanagement.ResourceSKU{
	// 				Name: to.Ptr(armapimanagement.SKUTypeDeveloper),
	// 			},
	// 		},
	// 		{
	// 			Capacity: &armapimanagement.ResourceSKUCapacity{
	// 				Default: to.Ptr[int32](1),
	// 				Maximum: to.Ptr[int32](2),
	// 				Minimum: to.Ptr[int32](1),
	// 				ScaleType: to.Ptr(armapimanagement.ResourceSKUCapacityScaleTypeManual),
	// 			},
	// 			ResourceType: to.Ptr("Microsoft.ApiManagement/service"),
	// 			SKU: &armapimanagement.ResourceSKU{
	// 				Name: to.Ptr(armapimanagement.SKUTypeBasic),
	// 			},
	// 		},
	// 		{
	// 			Capacity: &armapimanagement.ResourceSKUCapacity{
	// 				Default: to.Ptr[int32](1),
	// 				Maximum: to.Ptr[int32](4),
	// 				Minimum: to.Ptr[int32](1),
	// 				ScaleType: to.Ptr(armapimanagement.ResourceSKUCapacityScaleTypeAutomatic),
	// 			},
	// 			ResourceType: to.Ptr("Microsoft.ApiManagement/service"),
	// 			SKU: &armapimanagement.ResourceSKU{
	// 				Name: to.Ptr(armapimanagement.SKUTypeStandard),
	// 			},
	// 		},
	// 		{
	// 			Capacity: &armapimanagement.ResourceSKUCapacity{
	// 				Default: to.Ptr[int32](1),
	// 				Maximum: to.Ptr[int32](10),
	// 				Minimum: to.Ptr[int32](1),
	// 				ScaleType: to.Ptr(armapimanagement.ResourceSKUCapacityScaleTypeAutomatic),
	// 			},
	// 			ResourceType: to.Ptr("Microsoft.ApiManagement/service"),
	// 			SKU: &armapimanagement.ResourceSKU{
	// 				Name: to.Ptr(armapimanagement.SKUTypePremium),
	// 			},
	// 		},
	// 		{
	// 			Capacity: &armapimanagement.ResourceSKUCapacity{
	// 				Default: to.Ptr[int32](1),
	// 				Maximum: to.Ptr[int32](1),
	// 				Minimum: to.Ptr[int32](1),
	// 				ScaleType: to.Ptr(armapimanagement.ResourceSKUCapacityScaleTypeAutomatic),
	// 			},
	// 			ResourceType: to.Ptr("Microsoft.ApiManagement/service"),
	// 			SKU: &armapimanagement.ResourceSKU{
	// 				Name: to.Ptr(armapimanagement.SKUTypeIsolated),
	// 			},
	// 	}},
	// }
}
Output:

type ServiceSKUsClientListAvailableServiceSKUsOptions

type ServiceSKUsClientListAvailableServiceSKUsOptions struct {
}

ServiceSKUsClientListAvailableServiceSKUsOptions contains the optional parameters for the ServiceSKUsClient.NewListAvailableServiceSKUsPager method.

type ServiceSKUsClientListAvailableServiceSKUsResponse

type ServiceSKUsClientListAvailableServiceSKUsResponse struct {
	// The API Management service SKUs operation response.
	ResourceSKUResults
}

ServiceSKUsClientListAvailableServiceSKUsResponse contains the response from method ServiceSKUsClient.NewListAvailableServiceSKUsPager.

type ServiceUpdateParameters

type ServiceUpdateParameters struct {
	// Managed service identity of the Api Management service.
	Identity *ServiceIdentity

	// Properties of the API Management service.
	Properties *ServiceUpdateProperties

	// SKU properties of the API Management service.
	SKU *ServiceSKUProperties

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

	// A list of availability zones denoting where the resource needs to come from.
	Zones []*string

	// READ-ONLY; ETag of the resource.
	Etag *string

	// READ-ONLY; Resource ID.
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type for API Management resource is set to Microsoft.ApiManagement.
	Type *string
}

ServiceUpdateParameters - Parameter supplied to Update Api Management Service.

func (ServiceUpdateParameters) MarshalJSON

func (s ServiceUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceUpdateParameters.

func (*ServiceUpdateParameters) UnmarshalJSON

func (s *ServiceUpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceUpdateParameters.

type ServiceUpdateProperties

type ServiceUpdateProperties struct {
	// Control Plane Apis version constraint for the API Management service.
	APIVersionConstraint *APIVersionConstraint

	// Additional datacenter locations of the API Management service.
	AdditionalLocations []*AdditionalLocation

	// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed
	// is 10.
	Certificates []*CertificateConfiguration

	// Custom properties of the API Management service.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168 will disable the cipher TLSRSAWITH3DESEDECBCSHA
	// for all TLS(1.0, 1.1 and 1.2).
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11 can be used to disable just TLS 1.1.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10 can be used to disable TLS 1.0 on an API
	// Management service.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11 can be used to disable just TLS 1.1
	// for communications with backends.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10 can be used to disable TLS 1.0 for
	// communications with backends.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2 can be used to enable HTTP2 protocol on an
	// API Management service.
	// Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For
	// all the settings except Http2 the default value is True if the service was
	// created on or before April 1, 2018 and False otherwise. Http2 setting's default value is False.
	// You can disable any of the following ciphers by using settings Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]:
	// TLSECDHEECDSAWITHAES256CBCSHA, TLSECDHEECDSAWITHAES128CBC
	// SHA, TLSECDHERSAWITHAES256CBCSHA, TLSECDHERSAWITHAES128CBCSHA, TLSRSAWITHAES128GCMSHA256, TLSRSAWITHAES256CBCSHA256, TLSRSAWITHAES128CBCSHA256,
	// TLSRSAWITHAES256CBCSHA, TLSRSAWITHAES128CBCSHA. For
	// example, Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256:false. The default
	// value is true for them.
	// Note: The following ciphers can't be disabled since they are required by internal platform components: TLSAES256GCMSHA384,TLSAES128GCMSHA256,TLSECDHEECDSAWITHAES256GCMSHA384,TLSECDHEECDSAWITHAES128GCM
	// SHA256,TLSECDHERSAWITHAES256GCMSHA384,TLSECDHERSAWITHAES128GCMSHA256,TLSECDHEECDSAWITHAES256CBCSHA384,TLSECDHEECDSAWITHAES128CBCSHA256,TLSECDHERSAWITHAES256CBCSHA384,TLSECDHERSAWITHAES128CBCSHA256
	CustomProperties map[string]*string

	// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway
	// in master region.
	DisableGateway *bool

	// Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each
	// request to the gateway. This also enables the ability to authenticate the
	// certificate in the policy on the gateway.
	EnableClientCertificate *bool

	// Custom hostname configuration of the API Management service.
	HostnameConfigurations []*HostnameConfiguration

	// Property can be used to enable NAT Gateway for this API Management service.
	NatGatewayState *NatGatewayState

	// Email address from which the notification will be sent.
	NotificationSenderEmail *string

	// List of Private Endpoint Connections of this service.
	PrivateEndpointConnections []*RemotePrivateEndpointConnectionWrapper

	// Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported
	// only for Developer and Premium SKU being deployed in Virtual Network.
	PublicIPAddressID *string

	// Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must
	// be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the
	// exclusive access method. Default value is 'Enabled'
	PublicNetworkAccess *PublicNetworkAccess

	// Publisher email.
	PublisherEmail *string

	// Publisher name.
	PublisherName *string

	// Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other
	// properties will be ignored.
	Restore *bool

	// Virtual network configuration of the API Management service.
	VirtualNetworkConfiguration *VirtualNetworkConfiguration

	// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management
	// service is not part of any Virtual Network, External means the API Management
	// deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management
	// deployment is setup inside a Virtual Network having an Intranet Facing Endpoint
	// only.
	VirtualNetworkType *VirtualNetworkType

	// READ-ONLY; Creation UTC date of the API Management service.The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ
	// as specified by the ISO 8601 standard.
	CreatedAtUTC *time.Time

	// READ-ONLY; DEveloper Portal endpoint URL of the API Management service.
	DeveloperPortalURL *string

	// READ-ONLY; Gateway URL of the API Management service in the Default Region.
	GatewayRegionalURL *string

	// READ-ONLY; Gateway URL of the API Management service.
	GatewayURL *string

	// READ-ONLY; Management API endpoint URL of the API Management service.
	ManagementAPIURL *string

	// READ-ONLY; Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium
	// SKU on stv2 platform.
	OutboundPublicIPAddresses []*string

	// READ-ONLY; Compute Platform Version running the service in this location.
	PlatformVersion *PlatformVersion

	// READ-ONLY; Publisher portal endpoint Url of the API Management service.
	PortalURL *string

	// READ-ONLY; Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed
	// in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated
	// SKU.
	PrivateIPAddresses []*string

	// READ-ONLY; The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted.
	ProvisioningState *string

	// READ-ONLY; Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for
	// Basic, Standard, Premium and Isolated SKU.
	PublicIPAddresses []*string

	// READ-ONLY; SCM endpoint URL of the API Management service.
	ScmURL *string

	// READ-ONLY; The provisioning state of the API Management service, which is targeted by the long running operation started
	// on the service.
	TargetProvisioningState *string
}

ServiceUpdateProperties - Properties of an API Management service resource description.

func (ServiceUpdateProperties) MarshalJSON

func (s ServiceUpdateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceUpdateProperties.

func (*ServiceUpdateProperties) UnmarshalJSON

func (s *ServiceUpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceUpdateProperties.

type SettingsTypeName

type SettingsTypeName string
const (
	SettingsTypeNamePublic SettingsTypeName = "public"
)

func PossibleSettingsTypeNameValues

func PossibleSettingsTypeNameValues() []SettingsTypeName

PossibleSettingsTypeNameValues returns the possible values for the SettingsTypeName const type.

type Severity

type Severity string

Severity - The severity of the issue.

const (
	SeverityError   Severity = "Error"
	SeverityWarning Severity = "Warning"
)

func PossibleSeverityValues

func PossibleSeverityValues() []Severity

PossibleSeverityValues returns the possible values for the Severity const type.

type SignInSettingsClient

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

SignInSettingsClient contains the methods for the SignInSettings group. Don't use this type directly, use NewSignInSettingsClient() instead.

func NewSignInSettingsClient

func NewSignInSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SignInSettingsClient, error)

NewSignInSettingsClient creates a new instance of SignInSettingsClient 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 (*SignInSettingsClient) CreateOrUpdate

CreateOrUpdate - Create or Update Sign-In settings. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • parameters - Create or update parameters.
  • options - SignInSettingsClientCreateOrUpdateOptions contains the optional parameters for the SignInSettingsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsPutSignIn.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewSignInSettingsClient().CreateOrUpdate(ctx, "rg1", "apimService1", armapimanagement.PortalSigninSettings{
	Properties: &armapimanagement.PortalSigninSettingProperties{
		Enabled: to.Ptr(true),
	},
}, &armapimanagement.SignInSettingsClientCreateOrUpdateOptions{IfMatch: to.Ptr("*")})
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.PortalSigninSettings = armapimanagement.PortalSigninSettings{
// 	Name: to.Ptr("signin"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/portalsettings"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/signin"),
// 	Properties: &armapimanagement.PortalSigninSettingProperties{
// 		Enabled: to.Ptr(true),
// 	},
// }
Output:

func (*SignInSettingsClient) Get

func (client *SignInSettingsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, options *SignInSettingsClientGetOptions) (SignInSettingsClientGetResponse, error)

Get - Get Sign In Settings for the Portal If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - SignInSettingsClientGetOptions contains the optional parameters for the SignInSettingsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsGetSignIn.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewSignInSettingsClient().Get(ctx, "rg1", "apimService1", 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.PortalSigninSettings = armapimanagement.PortalSigninSettings{
// 	Name: to.Ptr("signin"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/portalsettings"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/signin"),
// 	Properties: &armapimanagement.PortalSigninSettingProperties{
// 		Enabled: to.Ptr(true),
// 	},
// }
Output:

func (*SignInSettingsClient) GetEntityTag

func (client *SignInSettingsClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, options *SignInSettingsClientGetEntityTagOptions) (SignInSettingsClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the SignInSettings.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - SignInSettingsClientGetEntityTagOptions contains the optional parameters for the SignInSettingsClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadSignInSettings.json

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

func (*SignInSettingsClient) Update

func (client *SignInSettingsClient) Update(ctx context.Context, resourceGroupName string, serviceName string, ifMatch string, parameters PortalSigninSettings, options *SignInSettingsClientUpdateOptions) (SignInSettingsClientUpdateResponse, error)

Update - Update Sign-In settings. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - Update Sign-In settings.
  • options - SignInSettingsClientUpdateOptions contains the optional parameters for the SignInSettingsClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsUpdateSignIn.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewSignInSettingsClient().Update(ctx, "rg1", "apimService1", "*", armapimanagement.PortalSigninSettings{
	Properties: &armapimanagement.PortalSigninSettingProperties{
		Enabled: to.Ptr(true),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

type SignInSettingsClientCreateOrUpdateOptions

type SignInSettingsClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

SignInSettingsClientCreateOrUpdateOptions contains the optional parameters for the SignInSettingsClient.CreateOrUpdate method.

type SignInSettingsClientCreateOrUpdateResponse

type SignInSettingsClientCreateOrUpdateResponse struct {
	// Sign-In settings for the Developer Portal.
	PortalSigninSettings
}

SignInSettingsClientCreateOrUpdateResponse contains the response from method SignInSettingsClient.CreateOrUpdate.

type SignInSettingsClientGetEntityTagOptions

type SignInSettingsClientGetEntityTagOptions struct {
}

SignInSettingsClientGetEntityTagOptions contains the optional parameters for the SignInSettingsClient.GetEntityTag method.

type SignInSettingsClientGetEntityTagResponse

type SignInSettingsClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

SignInSettingsClientGetEntityTagResponse contains the response from method SignInSettingsClient.GetEntityTag.

type SignInSettingsClientGetOptions

type SignInSettingsClientGetOptions struct {
}

SignInSettingsClientGetOptions contains the optional parameters for the SignInSettingsClient.Get method.

type SignInSettingsClientGetResponse

type SignInSettingsClientGetResponse struct {
	// Sign-In settings for the Developer Portal.
	PortalSigninSettings

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

SignInSettingsClientGetResponse contains the response from method SignInSettingsClient.Get.

type SignInSettingsClientUpdateOptions

type SignInSettingsClientUpdateOptions struct {
}

SignInSettingsClientUpdateOptions contains the optional parameters for the SignInSettingsClient.Update method.

type SignInSettingsClientUpdateResponse

type SignInSettingsClientUpdateResponse struct {
}

SignInSettingsClientUpdateResponse contains the response from method SignInSettingsClient.Update.

type SignUpSettingsClient

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

SignUpSettingsClient contains the methods for the SignUpSettings group. Don't use this type directly, use NewSignUpSettingsClient() instead.

func NewSignUpSettingsClient

func NewSignUpSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SignUpSettingsClient, error)

NewSignUpSettingsClient creates a new instance of SignUpSettingsClient 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 (*SignUpSettingsClient) CreateOrUpdate

CreateOrUpdate - Create or Update Sign-Up settings. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • parameters - Create or update parameters.
  • options - SignUpSettingsClientCreateOrUpdateOptions contains the optional parameters for the SignUpSettingsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsPutSignUp.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewSignUpSettingsClient().CreateOrUpdate(ctx, "rg1", "apimService1", armapimanagement.PortalSignupSettings{
	Properties: &armapimanagement.PortalSignupSettingsProperties{
		Enabled: to.Ptr(true),
		TermsOfService: &armapimanagement.TermsOfServiceProperties{
			ConsentRequired: to.Ptr(true),
			Enabled:         to.Ptr(true),
			Text:            to.Ptr("Terms of service text."),
		},
	},
}, &armapimanagement.SignUpSettingsClientCreateOrUpdateOptions{IfMatch: to.Ptr("*")})
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.PortalSignupSettings = armapimanagement.PortalSignupSettings{
// 	Name: to.Ptr("signup"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/portalsettings"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/signup"),
// 	Properties: &armapimanagement.PortalSignupSettingsProperties{
// 		Enabled: to.Ptr(true),
// 		TermsOfService: &armapimanagement.TermsOfServiceProperties{
// 			ConsentRequired: to.Ptr(true),
// 			Enabled: to.Ptr(true),
// 			Text: to.Ptr("Terms of service text."),
// 		},
// 	},
// }
Output:

func (*SignUpSettingsClient) Get

func (client *SignUpSettingsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, options *SignUpSettingsClientGetOptions) (SignUpSettingsClientGetResponse, error)

Get - Get Sign Up Settings for the Portal If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - SignUpSettingsClientGetOptions contains the optional parameters for the SignUpSettingsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsGetSignUp.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewSignUpSettingsClient().Get(ctx, "rg1", "apimService1", 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.PortalSignupSettings = armapimanagement.PortalSignupSettings{
// 	Name: to.Ptr("signup"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/portalsettings"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/signup"),
// 	Properties: &armapimanagement.PortalSignupSettingsProperties{
// 		Enabled: to.Ptr(true),
// 		TermsOfService: &armapimanagement.TermsOfServiceProperties{
// 			ConsentRequired: to.Ptr(true),
// 			Enabled: to.Ptr(true),
// 			Text: to.Ptr("Terms of service text."),
// 		},
// 	},
// }
Output:

func (*SignUpSettingsClient) GetEntityTag

func (client *SignUpSettingsClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, options *SignUpSettingsClientGetEntityTagOptions) (SignUpSettingsClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the SignUpSettings.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - SignUpSettingsClientGetEntityTagOptions contains the optional parameters for the SignUpSettingsClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadSignUpSettings.json

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

func (*SignUpSettingsClient) Update

func (client *SignUpSettingsClient) Update(ctx context.Context, resourceGroupName string, serviceName string, ifMatch string, parameters PortalSignupSettings, options *SignUpSettingsClientUpdateOptions) (SignUpSettingsClientUpdateResponse, error)

Update - Update Sign-Up settings. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - Update Sign-Up settings.
  • options - SignUpSettingsClientUpdateOptions contains the optional parameters for the SignUpSettingsClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsUpdateSignUp.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewSignUpSettingsClient().Update(ctx, "rg1", "apimService1", "*", armapimanagement.PortalSignupSettings{
	Properties: &armapimanagement.PortalSignupSettingsProperties{
		Enabled: to.Ptr(true),
		TermsOfService: &armapimanagement.TermsOfServiceProperties{
			ConsentRequired: to.Ptr(true),
			Enabled:         to.Ptr(true),
			Text:            to.Ptr("Terms of service text."),
		},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

type SignUpSettingsClientCreateOrUpdateOptions

type SignUpSettingsClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

SignUpSettingsClientCreateOrUpdateOptions contains the optional parameters for the SignUpSettingsClient.CreateOrUpdate method.

type SignUpSettingsClientCreateOrUpdateResponse

type SignUpSettingsClientCreateOrUpdateResponse struct {
	// Sign-Up settings for a developer portal.
	PortalSignupSettings
}

SignUpSettingsClientCreateOrUpdateResponse contains the response from method SignUpSettingsClient.CreateOrUpdate.

type SignUpSettingsClientGetEntityTagOptions

type SignUpSettingsClientGetEntityTagOptions struct {
}

SignUpSettingsClientGetEntityTagOptions contains the optional parameters for the SignUpSettingsClient.GetEntityTag method.

type SignUpSettingsClientGetEntityTagResponse

type SignUpSettingsClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

SignUpSettingsClientGetEntityTagResponse contains the response from method SignUpSettingsClient.GetEntityTag.

type SignUpSettingsClientGetOptions

type SignUpSettingsClientGetOptions struct {
}

SignUpSettingsClientGetOptions contains the optional parameters for the SignUpSettingsClient.Get method.

type SignUpSettingsClientGetResponse

type SignUpSettingsClientGetResponse struct {
	// Sign-Up settings for a developer portal.
	PortalSignupSettings

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

SignUpSettingsClientGetResponse contains the response from method SignUpSettingsClient.Get.

type SignUpSettingsClientUpdateOptions

type SignUpSettingsClientUpdateOptions struct {
}

SignUpSettingsClientUpdateOptions contains the optional parameters for the SignUpSettingsClient.Update method.

type SignUpSettingsClientUpdateResponse

type SignUpSettingsClientUpdateResponse struct {
}

SignUpSettingsClientUpdateResponse contains the response from method SignUpSettingsClient.Update.

type SoapAPIType

type SoapAPIType string

SoapAPIType - Type of API to create. * http creates a REST API * soap creates a SOAP pass-through API * websocket creates websocket API * graphql creates GraphQL API.

const (
	// SoapAPITypeGraphQL - Imports the API having a GraphQL front end.
	SoapAPITypeGraphQL SoapAPIType = "graphql"
	// SoapAPITypeSoapPassThrough - Imports the SOAP API having a SOAP front end.
	SoapAPITypeSoapPassThrough SoapAPIType = "soap"
	// SoapAPITypeSoapToRest - Imports a SOAP API having a RESTful front end.
	SoapAPITypeSoapToRest SoapAPIType = "http"
	// SoapAPITypeWebSocket - Imports the API having a Websocket front end.
	SoapAPITypeWebSocket SoapAPIType = "websocket"
)

func PossibleSoapAPITypeValues

func PossibleSoapAPITypeValues() []SoapAPIType

PossibleSoapAPITypeValues returns the possible values for the SoapAPIType const type.

type State

type State string

State - Status of the issue.

const (
	// StateClosed - The issue was closed.
	StateClosed State = "closed"
	// StateOpen - The issue is opened.
	StateOpen State = "open"
	// StateProposed - The issue is proposed.
	StateProposed State = "proposed"
	// StateRemoved - The issue was removed.
	StateRemoved State = "removed"
	// StateResolved - The issue is now resolved.
	StateResolved State = "resolved"
)

func PossibleStateValues

func PossibleStateValues() []State

PossibleStateValues returns the possible values for the State const type.

type SubscriptionClient

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

SubscriptionClient contains the methods for the Subscription group. Don't use this type directly, use NewSubscriptionClient() instead.

func NewSubscriptionClient

func NewSubscriptionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SubscriptionClient, error)

NewSubscriptionClient creates a new instance of SubscriptionClient 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 (*SubscriptionClient) CreateOrUpdate

func (client *SubscriptionClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, sid string, parameters SubscriptionCreateParameters, options *SubscriptionClientCreateOrUpdateOptions) (SubscriptionClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates the subscription of specified user to the specified product. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
  • parameters - Create parameters.
  • options - SubscriptionClientCreateOrUpdateOptions contains the optional parameters for the SubscriptionClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateSubscription.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewSubscriptionClient().CreateOrUpdate(ctx, "rg1", "apimService1", "testsub", armapimanagement.SubscriptionCreateParameters{
	Properties: &armapimanagement.SubscriptionCreateParameterProperties{
		DisplayName: to.Ptr("testsub"),
		OwnerID:     to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57127d485157a511ace86ae7"),
		Scope:       to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002"),
	},
}, &armapimanagement.SubscriptionClientCreateOrUpdateOptions{Notify: nil,
	IfMatch: nil,
	AppType: 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.SubscriptionContract = armapimanagement.SubscriptionContract{
// 	Name: to.Ptr("testsub"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/subscriptions"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/subscriptions/testsub"),
// 	Properties: &armapimanagement.SubscriptionContractProperties{
// 		CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-02T23:34:03.105Z"); return t}()),
// 		DisplayName: to.Ptr("testsub"),
// 		OwnerID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57127d485157a511ace86ae7"),
// 		Scope: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002"),
// 		State: to.Ptr(armapimanagement.SubscriptionStateSubmitted),
// 	},
// }
Output:

func (*SubscriptionClient) Delete

func (client *SubscriptionClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, sid string, ifMatch string, options *SubscriptionClientDeleteOptions) (SubscriptionClientDeleteResponse, error)

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

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - SubscriptionClientDeleteOptions contains the optional parameters for the SubscriptionClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteSubscription.json

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

func (*SubscriptionClient) Get

func (client *SubscriptionClient) Get(ctx context.Context, resourceGroupName string, serviceName string, sid string, options *SubscriptionClientGetOptions) (SubscriptionClientGetResponse, error)

Get - Gets the specified Subscription entity. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
  • options - SubscriptionClientGetOptions contains the optional parameters for the SubscriptionClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetSubscription.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewSubscriptionClient().Get(ctx, "rg1", "apimService1", "5931a769d8d14f0ad8ce13b8", 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.SubscriptionContract = armapimanagement.SubscriptionContract{
// 	Name: to.Ptr("5931a769d8d14f0ad8ce13b8"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/subscriptions"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/subscriptions/5931a769d8d14f0ad8ce13b8"),
// 	Properties: &armapimanagement.SubscriptionContractProperties{
// 		CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-02T17:59:06.223Z"); return t}()),
// 		DisplayName: to.Ptr("Unlimited"),
// 		OwnerID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512a88c680b"),
// 		Scope: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002"),
// 		State: to.Ptr(armapimanagement.SubscriptionStateSubmitted),
// 	},
// }
Output:

func (*SubscriptionClient) GetEntityTag

func (client *SubscriptionClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, sid string, options *SubscriptionClientGetEntityTagOptions) (SubscriptionClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
  • options - SubscriptionClientGetEntityTagOptions contains the optional parameters for the SubscriptionClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadSubscription.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewSubscriptionClient().GetEntityTag(ctx, "rg1", "apimService1", "5931a769d8d14f0ad8ce13b8", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*SubscriptionClient) ListSecrets

func (client *SubscriptionClient) ListSecrets(ctx context.Context, resourceGroupName string, serviceName string, sid string, options *SubscriptionClientListSecretsOptions) (SubscriptionClientListSecretsResponse, error)

ListSecrets - Gets the specified Subscription keys. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
  • options - SubscriptionClientListSecretsOptions contains the optional parameters for the SubscriptionClient.ListSecrets method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementSubscriptionListSecrets.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewSubscriptionClient().ListSecrets(ctx, "rg1", "apimService1", "5931a769d8d14f0ad8ce13b8", 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.SubscriptionKeysContract = armapimanagement.SubscriptionKeysContract{
// 	PrimaryKey: to.Ptr("<primaryKey>"),
// 	SecondaryKey: to.Ptr("<secondaryKey>"),
// }
Output:

func (*SubscriptionClient) NewListPager

func (client *SubscriptionClient) NewListPager(resourceGroupName string, serviceName string, options *SubscriptionClientListOptions) *runtime.Pager[SubscriptionClientListResponse]

NewListPager - Lists all subscriptions of the API Management service instance.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - SubscriptionClientListOptions contains the optional parameters for the SubscriptionClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSubscriptions.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewSubscriptionClient().NewListPager("rg1", "apimService1", &armapimanagement.SubscriptionClientListOptions{Filter: nil,
	Top:  nil,
	Skip: 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.SubscriptionCollection = armapimanagement.SubscriptionCollection{
	// 	Count: to.Ptr[int64](3),
	// 	Value: []*armapimanagement.SubscriptionContract{
	// 		{
	// 			Name: to.Ptr("5600b59475ff190048070001"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/subscriptions"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/subscriptions/5600b59475ff190048070001"),
	// 			Properties: &armapimanagement.SubscriptionContractProperties{
	// 				CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-09-22T01:57:40.300Z"); return t}()),
	// 				OwnerID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1"),
	// 				Scope: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060001"),
	// 				State: to.Ptr(armapimanagement.SubscriptionStateActive),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("56eaed3dbaf08b06e46d27fe"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/subscriptions"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/subscriptions/56eaed3dbaf08b06e46d27fe"),
	// 			Properties: &armapimanagement.SubscriptionContractProperties{
	// 				CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-17T17:45:33.837Z"); return t}()),
	// 				DisplayName: to.Ptr("Starter"),
	// 				ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-04-01T00:00:00.000Z"); return t}()),
	// 				NotificationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-20T00:00:00.000Z"); return t}()),
	// 				OwnerID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/56eaec62baf08b06e46d27fd"),
	// 				Scope: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060001"),
	// 				StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-17T00:00:00.000Z"); return t}()),
	// 				State: to.Ptr(armapimanagement.SubscriptionStateActive),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("5931a769d8d14f0ad8ce13b8"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/subscriptions"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/subscriptions/5931a769d8d14f0ad8ce13b8"),
	// 			Properties: &armapimanagement.SubscriptionContractProperties{
	// 				CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-02T17:59:06.223Z"); return t}()),
	// 				DisplayName: to.Ptr("Unlimited"),
	// 				OwnerID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512a88c680b"),
	// 				Scope: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002"),
	// 				State: to.Ptr(armapimanagement.SubscriptionStateSubmitted),
	// 			},
	// 	}},
	// }
}
Output:

func (*SubscriptionClient) RegeneratePrimaryKey

func (client *SubscriptionClient) RegeneratePrimaryKey(ctx context.Context, resourceGroupName string, serviceName string, sid string, options *SubscriptionClientRegeneratePrimaryKeyOptions) (SubscriptionClientRegeneratePrimaryKeyResponse, error)

RegeneratePrimaryKey - Regenerates primary key of existing subscription of the API Management service instance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
  • options - SubscriptionClientRegeneratePrimaryKeyOptions contains the optional parameters for the SubscriptionClient.RegeneratePrimaryKey method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementSubscriptionRegeneratePrimaryKey.json

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

func (*SubscriptionClient) RegenerateSecondaryKey

func (client *SubscriptionClient) RegenerateSecondaryKey(ctx context.Context, resourceGroupName string, serviceName string, sid string, options *SubscriptionClientRegenerateSecondaryKeyOptions) (SubscriptionClientRegenerateSecondaryKeyResponse, error)

RegenerateSecondaryKey - Regenerates secondary key of existing subscription of the API Management service instance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
  • options - SubscriptionClientRegenerateSecondaryKeyOptions contains the optional parameters for the SubscriptionClient.RegenerateSecondaryKey method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementSubscriptionRegenerateSecondaryKey.json

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

func (*SubscriptionClient) Update

func (client *SubscriptionClient) Update(ctx context.Context, resourceGroupName string, serviceName string, sid string, ifMatch string, parameters SubscriptionUpdateParameters, options *SubscriptionClientUpdateOptions) (SubscriptionClientUpdateResponse, error)

Update - Updates the details of a subscription specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - Update parameters.
  • options - SubscriptionClientUpdateOptions contains the optional parameters for the SubscriptionClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateSubscription.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewSubscriptionClient().Update(ctx, "rg1", "apimService1", "testsub", "*", armapimanagement.SubscriptionUpdateParameters{
	Properties: &armapimanagement.SubscriptionUpdateParameterProperties{
		DisplayName: to.Ptr("testsub"),
	},
}, &armapimanagement.SubscriptionClientUpdateOptions{Notify: nil,
	AppType: 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.SubscriptionContract = armapimanagement.SubscriptionContract{
// 	Name: to.Ptr("testsub"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/subscriptions"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/subscriptions/testsub"),
// 	Properties: &armapimanagement.SubscriptionContractProperties{
// 		CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-02T17:59:06.223Z"); return t}()),
// 		DisplayName: to.Ptr("testsub"),
// 		OwnerID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512a88c680b"),
// 		Scope: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002"),
// 		State: to.Ptr(armapimanagement.SubscriptionStateSubmitted),
// 	},
// }
Output:

type SubscriptionClientCreateOrUpdateOptions

type SubscriptionClientCreateOrUpdateOptions struct {
	// Determines the type of application which send the create user request. Default is legacy publisher portal.
	AppType *AppType

	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string

	// Notify change in Subscription State.
	// * If false, do not send any email notification for change of state of subscription
	// * If true, send email notification of change of state of subscription
	Notify *bool
}

SubscriptionClientCreateOrUpdateOptions contains the optional parameters for the SubscriptionClient.CreateOrUpdate method.

type SubscriptionClientCreateOrUpdateResponse

type SubscriptionClientCreateOrUpdateResponse struct {
	// Subscription details.
	SubscriptionContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

SubscriptionClientCreateOrUpdateResponse contains the response from method SubscriptionClient.CreateOrUpdate.

type SubscriptionClientDeleteOptions

type SubscriptionClientDeleteOptions struct {
}

SubscriptionClientDeleteOptions contains the optional parameters for the SubscriptionClient.Delete method.

type SubscriptionClientDeleteResponse

type SubscriptionClientDeleteResponse struct {
}

SubscriptionClientDeleteResponse contains the response from method SubscriptionClient.Delete.

type SubscriptionClientGetEntityTagOptions

type SubscriptionClientGetEntityTagOptions struct {
}

SubscriptionClientGetEntityTagOptions contains the optional parameters for the SubscriptionClient.GetEntityTag method.

type SubscriptionClientGetEntityTagResponse

type SubscriptionClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

SubscriptionClientGetEntityTagResponse contains the response from method SubscriptionClient.GetEntityTag.

type SubscriptionClientGetOptions

type SubscriptionClientGetOptions struct {
}

SubscriptionClientGetOptions contains the optional parameters for the SubscriptionClient.Get method.

type SubscriptionClientGetResponse

type SubscriptionClientGetResponse struct {
	// Subscription details.
	SubscriptionContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

SubscriptionClientGetResponse contains the response from method SubscriptionClient.Get.

type SubscriptionClientListOptions

type SubscriptionClientListOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | state | filter | eq | |
	// | user | expand | | |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

SubscriptionClientListOptions contains the optional parameters for the SubscriptionClient.NewListPager method.

type SubscriptionClientListResponse

type SubscriptionClientListResponse struct {
	// Paged Subscriptions list representation.
	SubscriptionCollection
}

SubscriptionClientListResponse contains the response from method SubscriptionClient.NewListPager.

type SubscriptionClientListSecretsOptions

type SubscriptionClientListSecretsOptions struct {
}

SubscriptionClientListSecretsOptions contains the optional parameters for the SubscriptionClient.ListSecrets method.

type SubscriptionClientListSecretsResponse

type SubscriptionClientListSecretsResponse struct {
	// Subscription keys.
	SubscriptionKeysContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

SubscriptionClientListSecretsResponse contains the response from method SubscriptionClient.ListSecrets.

type SubscriptionClientRegeneratePrimaryKeyOptions

type SubscriptionClientRegeneratePrimaryKeyOptions struct {
}

SubscriptionClientRegeneratePrimaryKeyOptions contains the optional parameters for the SubscriptionClient.RegeneratePrimaryKey method.

type SubscriptionClientRegeneratePrimaryKeyResponse

type SubscriptionClientRegeneratePrimaryKeyResponse struct {
}

SubscriptionClientRegeneratePrimaryKeyResponse contains the response from method SubscriptionClient.RegeneratePrimaryKey.

type SubscriptionClientRegenerateSecondaryKeyOptions

type SubscriptionClientRegenerateSecondaryKeyOptions struct {
}

SubscriptionClientRegenerateSecondaryKeyOptions contains the optional parameters for the SubscriptionClient.RegenerateSecondaryKey method.

type SubscriptionClientRegenerateSecondaryKeyResponse

type SubscriptionClientRegenerateSecondaryKeyResponse struct {
}

SubscriptionClientRegenerateSecondaryKeyResponse contains the response from method SubscriptionClient.RegenerateSecondaryKey.

type SubscriptionClientUpdateOptions

type SubscriptionClientUpdateOptions struct {
	// Determines the type of application which send the create user request. Default is legacy publisher portal.
	AppType *AppType

	// Notify change in Subscription State.
	// * If false, do not send any email notification for change of state of subscription
	// * If true, send email notification of change of state of subscription
	Notify *bool
}

SubscriptionClientUpdateOptions contains the optional parameters for the SubscriptionClient.Update method.

type SubscriptionClientUpdateResponse

type SubscriptionClientUpdateResponse struct {
	// Subscription details.
	SubscriptionContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

SubscriptionClientUpdateResponse contains the response from method SubscriptionClient.Update.

type SubscriptionCollection

type SubscriptionCollection struct {
	// Total record count number across all pages.
	Count *int64

	// Next page link if any.
	NextLink *string

	// Page values.
	Value []*SubscriptionContract
}

SubscriptionCollection - Paged Subscriptions list representation.

func (SubscriptionCollection) MarshalJSON

func (s SubscriptionCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubscriptionCollection.

func (*SubscriptionCollection) UnmarshalJSON

func (s *SubscriptionCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionCollection.

type SubscriptionContract

type SubscriptionContract struct {
	// Subscription contract properties.
	Properties *SubscriptionContractProperties

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

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

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

SubscriptionContract - Subscription details.

func (SubscriptionContract) MarshalJSON

func (s SubscriptionContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubscriptionContract.

func (*SubscriptionContract) UnmarshalJSON

func (s *SubscriptionContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionContract.

type SubscriptionContractProperties

type SubscriptionContractProperties struct {
	// REQUIRED; Scope like /products/{productId} or /apis or /apis/{apiId}.
	Scope *string

	// REQUIRED; Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription
	// is blocked, and the subscriber cannot call any APIs of the product, * submitted – the
	// subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription
	// request has been denied by an administrator, * cancelled – the
	// subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration
	// date and was deactivated.
	State *SubscriptionState

	// Determines whether tracing is enabled
	AllowTracing *bool

	// The name of the subscription, or null if the subscription has no name.
	DisplayName *string

	// Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically
	// cancelled. The subscription lifecycle can be managed by using the
	// state property. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
	EndDate *time.Time

	// Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired.
	// The subscription lifecycle can be managed by using the state property. The date
	// conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
	ExpirationDate *time.Time

	// Upcoming subscription expiration notification date. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as
	// specified by the ISO 8601 standard.
	NotificationDate *time.Time

	// The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{userId}
	// where {userId} is a user identifier.
	OwnerID *string

	// Subscription primary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get
	// the value.
	PrimaryKey *string

	// Subscription secondary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get
	// the value.
	SecondaryKey *string

	// Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated.
	// The subscription lifecycle can be managed by using the state property. The
	// date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
	StartDate *time.Time

	// Optional subscription comment added by an administrator when the state is changed to the 'rejected'.
	StateComment *string

	// READ-ONLY; Subscription creation date. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by
	// the ISO 8601 standard.
	CreatedDate *time.Time
}

SubscriptionContractProperties - Subscription details.

func (SubscriptionContractProperties) MarshalJSON

func (s SubscriptionContractProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubscriptionContractProperties.

func (*SubscriptionContractProperties) UnmarshalJSON

func (s *SubscriptionContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionContractProperties.

type SubscriptionCreateParameterProperties

type SubscriptionCreateParameterProperties struct {
	// REQUIRED; Subscription name.
	DisplayName *string

	// REQUIRED; Scope like /products/{productId} or /apis or /apis/{apiId}.
	Scope *string

	// Determines whether tracing can be enabled
	AllowTracing *bool

	// User (user id path) for whom subscription is being created in form /users/{userId}
	OwnerID *string

	// Primary subscription key. If not specified during request key will be generated automatically.
	PrimaryKey *string

	// Secondary subscription key. If not specified during request key will be generated automatically.
	SecondaryKey *string

	// Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are
	// * active – the subscription is active, * suspended – the subscription is
	// blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by
	// the developer, but has not yet been approved or rejected, * rejected – the
	// subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer
	// or administrator, * expired – the subscription reached its expiration date
	// and was deactivated.
	State *SubscriptionState
}

SubscriptionCreateParameterProperties - Parameters supplied to the Create subscription operation.

func (SubscriptionCreateParameterProperties) MarshalJSON

func (s SubscriptionCreateParameterProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubscriptionCreateParameterProperties.

func (*SubscriptionCreateParameterProperties) UnmarshalJSON

func (s *SubscriptionCreateParameterProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionCreateParameterProperties.

type SubscriptionCreateParameters

type SubscriptionCreateParameters struct {
	// Subscription contract properties.
	Properties *SubscriptionCreateParameterProperties
}

SubscriptionCreateParameters - Subscription create details.

func (SubscriptionCreateParameters) MarshalJSON

func (s SubscriptionCreateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubscriptionCreateParameters.

func (*SubscriptionCreateParameters) UnmarshalJSON

func (s *SubscriptionCreateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionCreateParameters.

type SubscriptionKeyParameterNamesContract

type SubscriptionKeyParameterNamesContract struct {
	// Subscription key header name.
	Header *string

	// Subscription key query string parameter name.
	Query *string
}

SubscriptionKeyParameterNamesContract - Subscription key parameter names details.

func (SubscriptionKeyParameterNamesContract) MarshalJSON

func (s SubscriptionKeyParameterNamesContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubscriptionKeyParameterNamesContract.

func (*SubscriptionKeyParameterNamesContract) UnmarshalJSON

func (s *SubscriptionKeyParameterNamesContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionKeyParameterNamesContract.

type SubscriptionKeysContract

type SubscriptionKeysContract struct {
	// Subscription primary key.
	PrimaryKey *string

	// Subscription secondary key.
	SecondaryKey *string
}

SubscriptionKeysContract - Subscription keys.

func (SubscriptionKeysContract) MarshalJSON

func (s SubscriptionKeysContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubscriptionKeysContract.

func (*SubscriptionKeysContract) UnmarshalJSON

func (s *SubscriptionKeysContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionKeysContract.

type SubscriptionState

type SubscriptionState string

SubscriptionState - Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated.

const (
	SubscriptionStateActive    SubscriptionState = "active"
	SubscriptionStateCancelled SubscriptionState = "cancelled"
	SubscriptionStateExpired   SubscriptionState = "expired"
	SubscriptionStateRejected  SubscriptionState = "rejected"
	SubscriptionStateSubmitted SubscriptionState = "submitted"
	SubscriptionStateSuspended SubscriptionState = "suspended"
)

func PossibleSubscriptionStateValues

func PossibleSubscriptionStateValues() []SubscriptionState

PossibleSubscriptionStateValues returns the possible values for the SubscriptionState const type.

type SubscriptionUpdateParameterProperties

type SubscriptionUpdateParameterProperties struct {
	// Determines whether tracing can be enabled
	AllowTracing *bool

	// Subscription name.
	DisplayName *string

	// Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired.
	// The subscription lifecycle can be managed by using the state property. The date
	// conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
	ExpirationDate *time.Time

	// User identifier path: /users/{userId}
	OwnerID *string

	// Primary subscription key.
	PrimaryKey *string

	// Scope like /products/{productId} or /apis or /apis/{apiId}
	Scope *string

	// Secondary subscription key.
	SecondaryKey *string

	// Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked,
	// and the subscriber cannot call any APIs of the product, * submitted – the
	// subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription
	// request has been denied by an administrator, * cancelled – the
	// subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration
	// date and was deactivated.
	State *SubscriptionState

	// Comments describing subscription state change by the administrator when the state is changed to the 'rejected'.
	StateComment *string
}

SubscriptionUpdateParameterProperties - Parameters supplied to the Update subscription operation.

func (SubscriptionUpdateParameterProperties) MarshalJSON

func (s SubscriptionUpdateParameterProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubscriptionUpdateParameterProperties.

func (*SubscriptionUpdateParameterProperties) UnmarshalJSON

func (s *SubscriptionUpdateParameterProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionUpdateParameterProperties.

type SubscriptionUpdateParameters

type SubscriptionUpdateParameters struct {
	// Subscription Update contract properties.
	Properties *SubscriptionUpdateParameterProperties
}

SubscriptionUpdateParameters - Subscription update details.

func (SubscriptionUpdateParameters) MarshalJSON

func (s SubscriptionUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubscriptionUpdateParameters.

func (*SubscriptionUpdateParameters) UnmarshalJSON

func (s *SubscriptionUpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionUpdateParameters.

type SubscriptionsDelegationSettingsProperties

type SubscriptionsDelegationSettingsProperties struct {
	// Enable or disable delegation for subscriptions.
	Enabled *bool
}

SubscriptionsDelegationSettingsProperties - Subscriptions delegation settings properties.

func (SubscriptionsDelegationSettingsProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type SubscriptionsDelegationSettingsProperties.

func (*SubscriptionsDelegationSettingsProperties) UnmarshalJSON

func (s *SubscriptionsDelegationSettingsProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionsDelegationSettingsProperties.

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 TagClient

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

TagClient contains the methods for the Tag group. Don't use this type directly, use NewTagClient() instead.

func NewTagClient

func NewTagClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TagClient, error)

NewTagClient creates a new instance of TagClient 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 (*TagClient) AssignToAPI

func (client *TagClient) AssignToAPI(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagID string, options *TagClientAssignToAPIOptions) (TagClientAssignToAPIResponse, error)

AssignToAPI - Assign tag to the Api. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • tagID - Tag identifier. Must be unique in the current API Management service instance.
  • options - TagClientAssignToAPIOptions contains the optional parameters for the TagClient.AssignToAPI method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiTag.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewTagClient().AssignToAPI(ctx, "rg1", "apimService1", "5931a75ae4bbd512a88c680b", "tagId1", 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.TagContract = armapimanagement.TagContract{
// 	Name: to.Ptr("tagId1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/tags"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/tagId1"),
// 	Properties: &armapimanagement.TagContractProperties{
// 		DisplayName: to.Ptr("tag1"),
// 	},
// }
Output:

func (*TagClient) AssignToOperation

func (client *TagClient) AssignToOperation(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, tagID string, options *TagClientAssignToOperationOptions) (TagClientAssignToOperationResponse, error)

AssignToOperation - Assign tag to the Operation. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • operationID - Operation identifier within an API. Must be unique in the current API Management service instance.
  • tagID - Tag identifier. Must be unique in the current API Management service instance.
  • options - TagClientAssignToOperationOptions contains the optional parameters for the TagClient.AssignToOperation method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiOperationTag.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewTagClient().AssignToOperation(ctx, "rg1", "apimService1", "5931a75ae4bbd512a88c680b", "5931a75ae4bbd512a88c680a", "tagId1", 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.TagContract = armapimanagement.TagContract{
// 	Name: to.Ptr("tagId1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/tags"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/tagId1"),
// 	Properties: &armapimanagement.TagContractProperties{
// 		DisplayName: to.Ptr("tag1"),
// 	},
// }
Output:

func (*TagClient) AssignToProduct

func (client *TagClient) AssignToProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string, options *TagClientAssignToProductOptions) (TagClientAssignToProductResponse, error)

AssignToProduct - Assign tag to the Product. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • tagID - Tag identifier. Must be unique in the current API Management service instance.
  • options - TagClientAssignToProductOptions contains the optional parameters for the TagClient.AssignToProduct method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductTag.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewTagClient().AssignToProduct(ctx, "rg1", "apimService1", "5931a75ae4bbd512a88c680b", "tagId1", 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.TagContract = armapimanagement.TagContract{
// 	Name: to.Ptr("tagId1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/tags"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/tagId1"),
// 	Properties: &armapimanagement.TagContractProperties{
// 		DisplayName: to.Ptr("tag1"),
// 	},
// }
Output:

func (*TagClient) CreateOrUpdate

func (client *TagClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, tagID string, parameters TagCreateUpdateParameters, options *TagClientCreateOrUpdateOptions) (TagClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates a tag. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • tagID - Tag identifier. Must be unique in the current API Management service instance.
  • parameters - Create parameters.
  • options - TagClientCreateOrUpdateOptions contains the optional parameters for the TagClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateTag.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewTagClient().CreateOrUpdate(ctx, "rg1", "apimService1", "tagId1", armapimanagement.TagCreateUpdateParameters{
	Properties: &armapimanagement.TagContractProperties{
		DisplayName: to.Ptr("tag1"),
	},
}, &armapimanagement.TagClientCreateOrUpdateOptions{IfMatch: 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.TagContract = armapimanagement.TagContract{
// 	Name: to.Ptr("tagId1"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/tags"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/tagId1"),
// 	Properties: &armapimanagement.TagContractProperties{
// 		DisplayName: to.Ptr("tag1"),
// 	},
// }
Output:

func (*TagClient) Delete

func (client *TagClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, tagID string, ifMatch string, options *TagClientDeleteOptions) (TagClientDeleteResponse, error)

Delete - Deletes specific tag of the API Management service instance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • tagID - Tag identifier. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - TagClientDeleteOptions contains the optional parameters for the TagClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteTag.json

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

func (*TagClient) DetachFromAPI

func (client *TagClient) DetachFromAPI(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagID string, options *TagClientDetachFromAPIOptions) (TagClientDetachFromAPIResponse, error)

DetachFromAPI - Detach the tag from the Api. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • tagID - Tag identifier. Must be unique in the current API Management service instance.
  • options - TagClientDetachFromAPIOptions contains the optional parameters for the TagClient.DetachFromAPI method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiTag.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewTagClient().DetachFromAPI(ctx, "rg1", "apimService1", "59d5b28d1f7fab116c282650", "59d5b28e1f7fab116402044e", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*TagClient) DetachFromOperation

func (client *TagClient) DetachFromOperation(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, tagID string, options *TagClientDetachFromOperationOptions) (TagClientDetachFromOperationResponse, error)

DetachFromOperation - Detach the tag from the Operation. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • operationID - Operation identifier within an API. Must be unique in the current API Management service instance.
  • tagID - Tag identifier. Must be unique in the current API Management service instance.
  • options - TagClientDetachFromOperationOptions contains the optional parameters for the TagClient.DetachFromOperation method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiOperationTag.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewTagClient().DetachFromOperation(ctx, "rg1", "apimService1", "59d5b28d1f7fab116c282650", "59d5b28d1f7fab116c282651", "59d5b28e1f7fab116402044e", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*TagClient) DetachFromProduct

func (client *TagClient) DetachFromProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string, options *TagClientDetachFromProductOptions) (TagClientDetachFromProductResponse, error)

DetachFromProduct - Detach the tag from the Product. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • tagID - Tag identifier. Must be unique in the current API Management service instance.
  • options - TagClientDetachFromProductOptions contains the optional parameters for the TagClient.DetachFromProduct method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProductTag.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewTagClient().DetachFromProduct(ctx, "rg1", "apimService1", "59d5b28d1f7fab116c282650", "59d5b28e1f7fab116402044e", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*TagClient) Get

func (client *TagClient) Get(ctx context.Context, resourceGroupName string, serviceName string, tagID string, options *TagClientGetOptions) (TagClientGetResponse, error)

Get - Gets the details of the tag specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • tagID - Tag identifier. Must be unique in the current API Management service instance.
  • options - TagClientGetOptions contains the optional parameters for the TagClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTag.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewTagClient().Get(ctx, "rg1", "apimService1", "59306a29e4bbd510dc24e5f9", 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.TagContract = armapimanagement.TagContract{
// 	Name: to.Ptr("59306a29e4bbd510dc24e5f9"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/tags"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/59306a29e4bbd510dc24e5f9"),
// 	Properties: &armapimanagement.TagContractProperties{
// 		DisplayName: to.Ptr("tag1"),
// 	},
// }
Output:

func (*TagClient) GetByAPI

func (client *TagClient) GetByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagID string, options *TagClientGetByAPIOptions) (TagClientGetByAPIResponse, error)

GetByAPI - Get tag associated with the API. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • tagID - Tag identifier. Must be unique in the current API Management service instance.
  • options - TagClientGetByAPIOptions contains the optional parameters for the TagClient.GetByAPI method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiTag.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewTagClient().GetByAPI(ctx, "rg1", "apimService1", "59d6bb8f1f7fab13dc67ec9b", "59306a29e4bbd510dc24e5f9", 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.TagContract = armapimanagement.TagContract{
// 	Name: to.Ptr("59306a29e4bbd510dc24e5f9"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/tags"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/59306a29e4bbd510dc24e5f9"),
// 	Properties: &armapimanagement.TagContractProperties{
// 		DisplayName: to.Ptr("tag1"),
// 	},
// }
Output:

func (*TagClient) GetByOperation

func (client *TagClient) GetByOperation(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, tagID string, options *TagClientGetByOperationOptions) (TagClientGetByOperationResponse, error)

GetByOperation - Get tag associated with the Operation. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • operationID - Operation identifier within an API. Must be unique in the current API Management service instance.
  • tagID - Tag identifier. Must be unique in the current API Management service instance.
  • options - TagClientGetByOperationOptions contains the optional parameters for the TagClient.GetByOperation method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationTag.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewTagClient().GetByOperation(ctx, "rg1", "apimService1", "59d6bb8f1f7fab13dc67ec9b", "59d6bb8f1f7fab13dc67ec9a", "59306a29e4bbd510dc24e5f9", 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.TagContract = armapimanagement.TagContract{
// 	Name: to.Ptr("59306a29e4bbd510dc24e5f9"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/tags"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/59306a29e4bbd510dc24e5f9"),
// 	Properties: &armapimanagement.TagContractProperties{
// 		DisplayName: to.Ptr("tag1"),
// 	},
// }
Output:

func (*TagClient) GetByProduct

func (client *TagClient) GetByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string, options *TagClientGetByProductOptions) (TagClientGetByProductResponse, error)

GetByProduct - Get tag associated with the Product. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • tagID - Tag identifier. Must be unique in the current API Management service instance.
  • options - TagClientGetByProductOptions contains the optional parameters for the TagClient.GetByProduct method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProductTag.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewTagClient().GetByProduct(ctx, "rg1", "apimService1", "59d6bb8f1f7fab13dc67ec9b", "59306a29e4bbd510dc24e5f9", 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.TagContract = armapimanagement.TagContract{
// 	Name: to.Ptr("59306a29e4bbd510dc24e5f9"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/tags"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/59306a29e4bbd510dc24e5f9"),
// 	Properties: &armapimanagement.TagContractProperties{
// 		DisplayName: to.Ptr("tag1"),
// 	},
// }
Output:

func (*TagClient) GetEntityState

func (client *TagClient) GetEntityState(ctx context.Context, resourceGroupName string, serviceName string, tagID string, options *TagClientGetEntityStateOptions) (TagClientGetEntityStateResponse, error)

GetEntityState - Gets the entity state version of the tag specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • tagID - Tag identifier. Must be unique in the current API Management service instance.
  • options - TagClientGetEntityStateOptions contains the optional parameters for the TagClient.GetEntityState method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadTag.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewTagClient().GetEntityState(ctx, "rg1", "apimService1", "59306a29e4bbd510dc24e5f9", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*TagClient) GetEntityStateByAPI

func (client *TagClient) GetEntityStateByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagID string, options *TagClientGetEntityStateByAPIOptions) (TagClientGetEntityStateByAPIResponse, error)

GetEntityStateByAPI - Gets the entity state version of the tag specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • tagID - Tag identifier. Must be unique in the current API Management service instance.
  • options - TagClientGetEntityStateByAPIOptions contains the optional parameters for the TagClient.GetEntityStateByAPI method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiTag.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewTagClient().GetEntityStateByAPI(ctx, "rg1", "apimService1", "59d6bb8f1f7fab13dc67ec9b", "59306a29e4bbd510dc24e5f9", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*TagClient) GetEntityStateByOperation

func (client *TagClient) GetEntityStateByOperation(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, tagID string, options *TagClientGetEntityStateByOperationOptions) (TagClientGetEntityStateByOperationResponse, error)

GetEntityStateByOperation - Gets the entity state version of the tag specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • operationID - Operation identifier within an API. Must be unique in the current API Management service instance.
  • tagID - Tag identifier. Must be unique in the current API Management service instance.
  • options - TagClientGetEntityStateByOperationOptions contains the optional parameters for the TagClient.GetEntityStateByOperation method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiOperationTag.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewTagClient().GetEntityStateByOperation(ctx, "rg1", "apimService1", "59d6bb8f1f7fab13dc67ec9b", "59d6bb8f1f7fab13dc67ec9a", "59306a29e4bbd510dc24e5f9", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*TagClient) GetEntityStateByProduct

func (client *TagClient) GetEntityStateByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string, options *TagClientGetEntityStateByProductOptions) (TagClientGetEntityStateByProductResponse, error)

GetEntityStateByProduct - Gets the entity state version of the tag specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • tagID - Tag identifier. Must be unique in the current API Management service instance.
  • options - TagClientGetEntityStateByProductOptions contains the optional parameters for the TagClient.GetEntityStateByProduct method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProductTag.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewTagClient().GetEntityStateByProduct(ctx, "rg1", "apimService1", "59306a29e4bbd510dc24e5f8", "59306a29e4bbd510dc24e5f9", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*TagClient) NewListByAPIPager

func (client *TagClient) NewListByAPIPager(resourceGroupName string, serviceName string, apiID string, options *TagClientListByAPIOptions) *runtime.Pager[TagClientListByAPIResponse]

NewListByAPIPager - Lists all Tags associated with the API.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • options - TagClientListByAPIOptions contains the optional parameters for the TagClient.NewListByAPIPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiTags.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewTagClient().NewListByAPIPager("rg1", "apimService1", "57d2ef278aa04f0888cba3f3", &armapimanagement.TagClientListByAPIOptions{Filter: nil,
	Top:  nil,
	Skip: 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.TagCollection = armapimanagement.TagCollection{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.TagContract{
	// 		{
	// 			Name: to.Ptr("5600b539c53f5b0062060002"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/tags"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/5600b539c53f5b0062060002"),
	// 			Properties: &armapimanagement.TagContractProperties{
	// 				DisplayName: to.Ptr("tag1"),
	// 			},
	// 	}},
	// }
}
Output:

func (*TagClient) NewListByOperationPager

func (client *TagClient) NewListByOperationPager(resourceGroupName string, serviceName string, apiID string, operationID string, options *TagClientListByOperationOptions) *runtime.Pager[TagClientListByOperationResponse]

NewListByOperationPager - Lists all Tags associated with the Operation.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
  • operationID - Operation identifier within an API. Must be unique in the current API Management service instance.
  • options - TagClientListByOperationOptions contains the optional parameters for the TagClient.NewListByOperationPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiOperationTags.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewTagClient().NewListByOperationPager("rg1", "apimService1", "57d2ef278aa04f0888cba3f3", "57d2ef278aa04f0888cba3f6", &armapimanagement.TagClientListByOperationOptions{Filter: nil,
	Top:  nil,
	Skip: 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.TagCollection = armapimanagement.TagCollection{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.TagContract{
	// 		{
	// 			Name: to.Ptr("5600b539c53f5b0062060002"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/tags"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/5600b539c53f5b0062060002"),
	// 			Properties: &armapimanagement.TagContractProperties{
	// 				DisplayName: to.Ptr("tag1"),
	// 			},
	// 	}},
	// }
}
Output:

func (*TagClient) NewListByProductPager

func (client *TagClient) NewListByProductPager(resourceGroupName string, serviceName string, productID string, options *TagClientListByProductOptions) *runtime.Pager[TagClientListByProductResponse]

NewListByProductPager - Lists all Tags associated with the Product.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • productID - Product identifier. Must be unique in the current API Management service instance.
  • options - TagClientListByProductOptions contains the optional parameters for the TagClient.NewListByProductPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductTags.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewTagClient().NewListByProductPager("rg1", "apimService1", "57d2ef278aa04f0888cba3f1", &armapimanagement.TagClientListByProductOptions{Filter: nil,
	Top:  nil,
	Skip: 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.TagCollection = armapimanagement.TagCollection{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.TagContract{
	// 		{
	// 			Name: to.Ptr("5600b539c53f5b0062060002"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/tags"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/5600b539c53f5b0062060002"),
	// 			Properties: &armapimanagement.TagContractProperties{
	// 				DisplayName: to.Ptr("tag1"),
	// 			},
	// 	}},
	// }
}
Output:

func (*TagClient) NewListByServicePager

func (client *TagClient) NewListByServicePager(resourceGroupName string, serviceName string, options *TagClientListByServiceOptions) *runtime.Pager[TagClientListByServiceResponse]

NewListByServicePager - Lists a collection of tags defined within a service instance.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - TagClientListByServiceOptions contains the optional parameters for the TagClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListTags.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewTagClient().NewListByServicePager("rg1", "apimService1", &armapimanagement.TagClientListByServiceOptions{Filter: nil,
	Top:   nil,
	Skip:  nil,
	Scope: 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.TagCollection = armapimanagement.TagCollection{
	// 	Count: to.Ptr[int64](2),
	// 	Value: []*armapimanagement.TagContract{
	// 		{
	// 			Name: to.Ptr("5600b59375ff190048020001"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/tags"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/5600b59375ff190048020001"),
	// 			Properties: &armapimanagement.TagContractProperties{
	// 				DisplayName: to.Ptr("tag1"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("5600b59375ff190048020002"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/tags"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/5600b59375ff190048020002"),
	// 			Properties: &armapimanagement.TagContractProperties{
	// 				DisplayName: to.Ptr("tag2"),
	// 			},
	// 	}},
	// }
}
Output:

func (*TagClient) Update

func (client *TagClient) Update(ctx context.Context, resourceGroupName string, serviceName string, tagID string, ifMatch string, parameters TagCreateUpdateParameters, options *TagClientUpdateOptions) (TagClientUpdateResponse, error)

Update - Updates the details of the tag specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • tagID - Tag identifier. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - Update parameters.
  • options - TagClientUpdateOptions contains the optional parameters for the TagClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateTag.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewTagClient().Update(ctx, "rg1", "apimService1", "temptag", "*", armapimanagement.TagCreateUpdateParameters{
	Properties: &armapimanagement.TagContractProperties{
		DisplayName: to.Ptr("temp tag"),
	},
}, 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.TagContract = armapimanagement.TagContract{
// 	Name: to.Ptr("temptag"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/tags"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/temptag"),
// 	Properties: &armapimanagement.TagContractProperties{
// 		DisplayName: to.Ptr("tag1"),
// 	},
// }
Output:

type TagClientAssignToAPIOptions

type TagClientAssignToAPIOptions struct {
}

TagClientAssignToAPIOptions contains the optional parameters for the TagClient.AssignToAPI method.

type TagClientAssignToAPIResponse

type TagClientAssignToAPIResponse struct {
	// Tag Contract details.
	TagContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

TagClientAssignToAPIResponse contains the response from method TagClient.AssignToAPI.

type TagClientAssignToOperationOptions

type TagClientAssignToOperationOptions struct {
}

TagClientAssignToOperationOptions contains the optional parameters for the TagClient.AssignToOperation method.

type TagClientAssignToOperationResponse

type TagClientAssignToOperationResponse struct {
	// Tag Contract details.
	TagContract
}

TagClientAssignToOperationResponse contains the response from method TagClient.AssignToOperation.

type TagClientAssignToProductOptions

type TagClientAssignToProductOptions struct {
}

TagClientAssignToProductOptions contains the optional parameters for the TagClient.AssignToProduct method.

type TagClientAssignToProductResponse

type TagClientAssignToProductResponse struct {
	// Tag Contract details.
	TagContract
}

TagClientAssignToProductResponse contains the response from method TagClient.AssignToProduct.

type TagClientCreateOrUpdateOptions

type TagClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
}

TagClientCreateOrUpdateOptions contains the optional parameters for the TagClient.CreateOrUpdate method.

type TagClientCreateOrUpdateResponse

type TagClientCreateOrUpdateResponse struct {
	// Tag Contract details.
	TagContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

TagClientCreateOrUpdateResponse contains the response from method TagClient.CreateOrUpdate.

type TagClientDeleteOptions

type TagClientDeleteOptions struct {
}

TagClientDeleteOptions contains the optional parameters for the TagClient.Delete method.

type TagClientDeleteResponse

type TagClientDeleteResponse struct {
}

TagClientDeleteResponse contains the response from method TagClient.Delete.

type TagClientDetachFromAPIOptions

type TagClientDetachFromAPIOptions struct {
}

TagClientDetachFromAPIOptions contains the optional parameters for the TagClient.DetachFromAPI method.

type TagClientDetachFromAPIResponse

type TagClientDetachFromAPIResponse struct {
}

TagClientDetachFromAPIResponse contains the response from method TagClient.DetachFromAPI.

type TagClientDetachFromOperationOptions

type TagClientDetachFromOperationOptions struct {
}

TagClientDetachFromOperationOptions contains the optional parameters for the TagClient.DetachFromOperation method.

type TagClientDetachFromOperationResponse

type TagClientDetachFromOperationResponse struct {
}

TagClientDetachFromOperationResponse contains the response from method TagClient.DetachFromOperation.

type TagClientDetachFromProductOptions

type TagClientDetachFromProductOptions struct {
}

TagClientDetachFromProductOptions contains the optional parameters for the TagClient.DetachFromProduct method.

type TagClientDetachFromProductResponse

type TagClientDetachFromProductResponse struct {
}

TagClientDetachFromProductResponse contains the response from method TagClient.DetachFromProduct.

type TagClientGetByAPIOptions

type TagClientGetByAPIOptions struct {
}

TagClientGetByAPIOptions contains the optional parameters for the TagClient.GetByAPI method.

type TagClientGetByAPIResponse

type TagClientGetByAPIResponse struct {
	// Tag Contract details.
	TagContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

TagClientGetByAPIResponse contains the response from method TagClient.GetByAPI.

type TagClientGetByOperationOptions

type TagClientGetByOperationOptions struct {
}

TagClientGetByOperationOptions contains the optional parameters for the TagClient.GetByOperation method.

type TagClientGetByOperationResponse

type TagClientGetByOperationResponse struct {
	// Tag Contract details.
	TagContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

TagClientGetByOperationResponse contains the response from method TagClient.GetByOperation.

type TagClientGetByProductOptions

type TagClientGetByProductOptions struct {
}

TagClientGetByProductOptions contains the optional parameters for the TagClient.GetByProduct method.

type TagClientGetByProductResponse

type TagClientGetByProductResponse struct {
	// Tag Contract details.
	TagContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

TagClientGetByProductResponse contains the response from method TagClient.GetByProduct.

type TagClientGetEntityStateByAPIOptions

type TagClientGetEntityStateByAPIOptions struct {
}

TagClientGetEntityStateByAPIOptions contains the optional parameters for the TagClient.GetEntityStateByAPI method.

type TagClientGetEntityStateByAPIResponse

type TagClientGetEntityStateByAPIResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

TagClientGetEntityStateByAPIResponse contains the response from method TagClient.GetEntityStateByAPI.

type TagClientGetEntityStateByOperationOptions

type TagClientGetEntityStateByOperationOptions struct {
}

TagClientGetEntityStateByOperationOptions contains the optional parameters for the TagClient.GetEntityStateByOperation method.

type TagClientGetEntityStateByOperationResponse

type TagClientGetEntityStateByOperationResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

TagClientGetEntityStateByOperationResponse contains the response from method TagClient.GetEntityStateByOperation.

type TagClientGetEntityStateByProductOptions

type TagClientGetEntityStateByProductOptions struct {
}

TagClientGetEntityStateByProductOptions contains the optional parameters for the TagClient.GetEntityStateByProduct method.

type TagClientGetEntityStateByProductResponse

type TagClientGetEntityStateByProductResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

TagClientGetEntityStateByProductResponse contains the response from method TagClient.GetEntityStateByProduct.

type TagClientGetEntityStateOptions

type TagClientGetEntityStateOptions struct {
}

TagClientGetEntityStateOptions contains the optional parameters for the TagClient.GetEntityState method.

type TagClientGetEntityStateResponse

type TagClientGetEntityStateResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

TagClientGetEntityStateResponse contains the response from method TagClient.GetEntityState.

type TagClientGetOptions

type TagClientGetOptions struct {
}

TagClientGetOptions contains the optional parameters for the TagClient.Get method.

type TagClientGetResponse

type TagClientGetResponse struct {
	// Tag Contract details.
	TagContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

TagClientGetResponse contains the response from method TagClient.Get.

type TagClientListByAPIOptions

type TagClientListByAPIOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

TagClientListByAPIOptions contains the optional parameters for the TagClient.NewListByAPIPager method.

type TagClientListByAPIResponse

type TagClientListByAPIResponse struct {
	// Paged Tag list representation.
	TagCollection
}

TagClientListByAPIResponse contains the response from method TagClient.NewListByAPIPager.

type TagClientListByOperationOptions

type TagClientListByOperationOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

TagClientListByOperationOptions contains the optional parameters for the TagClient.NewListByOperationPager method.

type TagClientListByOperationResponse

type TagClientListByOperationResponse struct {
	// Paged Tag list representation.
	TagCollection
}

TagClientListByOperationResponse contains the response from method TagClient.NewListByOperationPager.

type TagClientListByProductOptions

type TagClientListByProductOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

TagClientListByProductOptions contains the optional parameters for the TagClient.NewListByProductPager method.

type TagClientListByProductResponse

type TagClientListByProductResponse struct {
	// Paged Tag list representation.
	TagCollection
}

TagClientListByProductResponse contains the response from method TagClient.NewListByProductPager.

type TagClientListByServiceOptions

type TagClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Scope like 'apis', 'products' or 'apis/{apiId}
	Scope *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

TagClientListByServiceOptions contains the optional parameters for the TagClient.NewListByServicePager method.

type TagClientListByServiceResponse

type TagClientListByServiceResponse struct {
	// Paged Tag list representation.
	TagCollection
}

TagClientListByServiceResponse contains the response from method TagClient.NewListByServicePager.

type TagClientUpdateOptions

type TagClientUpdateOptions struct {
}

TagClientUpdateOptions contains the optional parameters for the TagClient.Update method.

type TagClientUpdateResponse

type TagClientUpdateResponse struct {
	// Tag Contract details.
	TagContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

TagClientUpdateResponse contains the response from method TagClient.Update.

type TagCollection

type TagCollection struct {
	// Total record count number across all pages.
	Count *int64

	// Next page link if any.
	NextLink *string

	// Page values.
	Value []*TagContract
}

TagCollection - Paged Tag list representation.

func (TagCollection) MarshalJSON

func (t TagCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TagCollection.

func (*TagCollection) UnmarshalJSON

func (t *TagCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TagCollection.

type TagContract

type TagContract struct {
	// Tag entity contract properties.
	Properties *TagContractProperties

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

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

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

TagContract - Tag Contract details.

func (TagContract) MarshalJSON

func (t TagContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TagContract.

func (*TagContract) UnmarshalJSON

func (t *TagContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TagContract.

type TagContractProperties

type TagContractProperties struct {
	// REQUIRED; Tag name.
	DisplayName *string
}

TagContractProperties - Tag contract Properties.

func (TagContractProperties) MarshalJSON

func (t TagContractProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TagContractProperties.

func (*TagContractProperties) UnmarshalJSON

func (t *TagContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TagContractProperties.

type TagCreateUpdateParameters

type TagCreateUpdateParameters struct {
	// Properties supplied to Create Tag operation.
	Properties *TagContractProperties
}

TagCreateUpdateParameters - Parameters supplied to Create/Update Tag operations.

func (TagCreateUpdateParameters) MarshalJSON

func (t TagCreateUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TagCreateUpdateParameters.

func (*TagCreateUpdateParameters) UnmarshalJSON

func (t *TagCreateUpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TagCreateUpdateParameters.

type TagDescriptionBaseProperties

type TagDescriptionBaseProperties struct {
	// Description of the Tag.
	Description *string

	// Description of the external resources describing the tag.
	ExternalDocsDescription *string

	// Absolute URL of external resources describing the tag.
	ExternalDocsURL *string
}

TagDescriptionBaseProperties - Parameters supplied to the Create TagDescription operation.

func (TagDescriptionBaseProperties) MarshalJSON

func (t TagDescriptionBaseProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TagDescriptionBaseProperties.

func (*TagDescriptionBaseProperties) UnmarshalJSON

func (t *TagDescriptionBaseProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TagDescriptionBaseProperties.

type TagDescriptionCollection

type TagDescriptionCollection struct {
	// Total record count number across all pages.
	Count *int64

	// Next page link if any.
	NextLink *string

	// Page values.
	Value []*TagDescriptionContract
}

TagDescriptionCollection - Paged TagDescription list representation.

func (TagDescriptionCollection) MarshalJSON

func (t TagDescriptionCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TagDescriptionCollection.

func (*TagDescriptionCollection) UnmarshalJSON

func (t *TagDescriptionCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TagDescriptionCollection.

type TagDescriptionContract

type TagDescriptionContract struct {
	// TagDescription entity contract properties.
	Properties *TagDescriptionContractProperties

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

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

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

TagDescriptionContract - Contract details.

func (TagDescriptionContract) MarshalJSON

func (t TagDescriptionContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TagDescriptionContract.

func (*TagDescriptionContract) UnmarshalJSON

func (t *TagDescriptionContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TagDescriptionContract.

type TagDescriptionContractProperties

type TagDescriptionContractProperties struct {
	// Description of the Tag.
	Description *string

	// Tag name.
	DisplayName *string

	// Description of the external resources describing the tag.
	ExternalDocsDescription *string

	// Absolute URL of external resources describing the tag.
	ExternalDocsURL *string

	// Identifier of the tag in the form of /tags/{tagId}
	TagID *string
}

TagDescriptionContractProperties - TagDescription contract Properties.

func (TagDescriptionContractProperties) MarshalJSON

func (t TagDescriptionContractProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TagDescriptionContractProperties.

func (*TagDescriptionContractProperties) UnmarshalJSON

func (t *TagDescriptionContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TagDescriptionContractProperties.

type TagDescriptionCreateParameters

type TagDescriptionCreateParameters struct {
	// Properties supplied to Create TagDescription operation.
	Properties *TagDescriptionBaseProperties
}

TagDescriptionCreateParameters - Parameters supplied to the Create TagDescription operation.

func (TagDescriptionCreateParameters) MarshalJSON

func (t TagDescriptionCreateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TagDescriptionCreateParameters.

func (*TagDescriptionCreateParameters) UnmarshalJSON

func (t *TagDescriptionCreateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TagDescriptionCreateParameters.

type TagResourceClient

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

TagResourceClient contains the methods for the TagResource group. Don't use this type directly, use NewTagResourceClient() instead.

func NewTagResourceClient

func NewTagResourceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TagResourceClient, error)

NewTagResourceClient creates a new instance of TagResourceClient 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 (*TagResourceClient) NewListByServicePager

func (client *TagResourceClient) NewListByServicePager(resourceGroupName string, serviceName string, options *TagResourceClientListByServiceOptions) *runtime.Pager[TagResourceClientListByServiceResponse]

NewListByServicePager - Lists a collection of resources associated with tags.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - TagResourceClientListByServiceOptions contains the optional parameters for the TagResourceClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListTagResources.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewTagResourceClient().NewListByServicePager("rg1", "apimService1", &armapimanagement.TagResourceClientListByServiceOptions{Filter: nil,
	Top:  nil,
	Skip: 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.TagResourceCollection = armapimanagement.TagResourceCollection{
	// 	Value: []*armapimanagement.TagResourceContract{
	// 		{
	// 			Operation: &armapimanagement.OperationTagResourceContractProperties{
	// 				Name: to.Ptr("Create resource"),
	// 				Method: to.Ptr("POST"),
	// 				Description: to.Ptr("A demonstration of a POST call based on the echo backend above. The request body is expected to contain JSON-formatted data (see example below). A policy is used to automatically transform any request sent in JSON directly to XML. In a real-world scenario this could be used to enable modern clients to speak to a legacy backend."),
	// 				APIName: to.Ptr("Echo API"),
	// 				APIRevision: to.Ptr("1"),
	// 				ID: to.Ptr("/apis/echo-api/operations/create-resource"),
	// 				URLTemplate: to.Ptr("/resource"),
	// 			},
	// 			Tag: &armapimanagement.TagResourceContractProperties{
	// 				Name: to.Ptr("awesomeTag"),
	// 				ID: to.Ptr("/tags/apitag123"),
	// 			},
	// 		},
	// 		{
	// 			API: &armapimanagement.APITagResourceContractProperties{
	// 				APIRevision: to.Ptr("1"),
	// 				IsCurrent: to.Ptr(true),
	// 				Name: to.Ptr("Echo API"),
	// 				Path: to.Ptr("echo"),
	// 				ID: to.Ptr("/apis/echo-api"),
	// 				ServiceURL: to.Ptr("http://echoapi.cloudapp.net/api"),
	// 			},
	// 			Tag: &armapimanagement.TagResourceContractProperties{
	// 				Name: to.Ptr("awesomeTag"),
	// 				ID: to.Ptr("/tags/apitag123"),
	// 			},
	// 		},
	// 		{
	// 			Product: &armapimanagement.ProductTagResourceContractProperties{
	// 				Description: to.Ptr("Subscribers will be able to run 5 calls/minute up to a maximum of 100 calls/week."),
	// 				ApprovalRequired: to.Ptr(false),
	// 				State: to.Ptr(armapimanagement.ProductStatePublished),
	// 				SubscriptionRequired: to.Ptr(true),
	// 				SubscriptionsLimit: to.Ptr[int32](1),
	// 				Terms: to.Ptr(""),
	// 				Name: to.Ptr("Starter"),
	// 				ID: to.Ptr("/products/starter"),
	// 			},
	// 			Tag: &armapimanagement.TagResourceContractProperties{
	// 				Name: to.Ptr("awesomeTag"),
	// 				ID: to.Ptr("/tags/apitag123"),
	// 			},
	// 	}},
	// }
}
Output:

type TagResourceClientListByServiceOptions

type TagResourceClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | state | filter | eq | |
	// | isCurrent | filter | eq | |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

TagResourceClientListByServiceOptions contains the optional parameters for the TagResourceClient.NewListByServicePager method.

type TagResourceClientListByServiceResponse

type TagResourceClientListByServiceResponse struct {
	// Paged Tag list representation.
	TagResourceCollection
}

TagResourceClientListByServiceResponse contains the response from method TagResourceClient.NewListByServicePager.

type TagResourceCollection

type TagResourceCollection struct {
	// Total record count number across all pages.
	Count *int64

	// Next page link if any.
	NextLink *string

	// Page values.
	Value []*TagResourceContract
}

TagResourceCollection - Paged Tag list representation.

func (TagResourceCollection) MarshalJSON

func (t TagResourceCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TagResourceCollection.

func (*TagResourceCollection) UnmarshalJSON

func (t *TagResourceCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TagResourceCollection.

type TagResourceContract

type TagResourceContract struct {
	// REQUIRED; Tag associated with the resource.
	Tag *TagResourceContractProperties

	// API associated with the tag.
	API *APITagResourceContractProperties

	// Operation associated with the tag.
	Operation *OperationTagResourceContractProperties

	// Product associated with the tag.
	Product *ProductTagResourceContractProperties
}

TagResourceContract - TagResource contract properties.

func (TagResourceContract) MarshalJSON

func (t TagResourceContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TagResourceContract.

func (*TagResourceContract) UnmarshalJSON

func (t *TagResourceContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TagResourceContract.

type TagResourceContractProperties

type TagResourceContractProperties struct {
	// Tag identifier
	ID *string

	// Tag Name
	Name *string
}

TagResourceContractProperties - Contract defining the Tag property in the Tag Resource Contract

func (TagResourceContractProperties) MarshalJSON

func (t TagResourceContractProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TagResourceContractProperties.

func (*TagResourceContractProperties) UnmarshalJSON

func (t *TagResourceContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TagResourceContractProperties.

type TemplateName

type TemplateName string
const (
	TemplateNameAccountClosedDeveloper                            TemplateName = "accountClosedDeveloper"
	TemplateNameApplicationApprovedNotificationMessage            TemplateName = "applicationApprovedNotificationMessage"
	TemplateNameConfirmSignUpIdentityDefault                      TemplateName = "confirmSignUpIdentityDefault"
	TemplateNameEmailChangeIdentityDefault                        TemplateName = "emailChangeIdentityDefault"
	TemplateNameInviteUserNotificationMessage                     TemplateName = "inviteUserNotificationMessage"
	TemplateNameNewCommentNotificationMessage                     TemplateName = "newCommentNotificationMessage"
	TemplateNameNewDeveloperNotificationMessage                   TemplateName = "newDeveloperNotificationMessage"
	TemplateNameNewIssueNotificationMessage                       TemplateName = "newIssueNotificationMessage"
	TemplateNamePasswordResetByAdminNotificationMessage           TemplateName = "passwordResetByAdminNotificationMessage"
	TemplateNamePasswordResetIdentityDefault                      TemplateName = "passwordResetIdentityDefault"
	TemplateNamePurchaseDeveloperNotificationMessage              TemplateName = "purchaseDeveloperNotificationMessage"
	TemplateNameQuotaLimitApproachingDeveloperNotificationMessage TemplateName = "quotaLimitApproachingDeveloperNotificationMessage"
	TemplateNameRejectDeveloperNotificationMessage                TemplateName = "rejectDeveloperNotificationMessage"
	TemplateNameRequestDeveloperNotificationMessage               TemplateName = "requestDeveloperNotificationMessage"
)

func PossibleTemplateNameValues

func PossibleTemplateNameValues() []TemplateName

PossibleTemplateNameValues returns the possible values for the TemplateName const type.

type TenantAccessClient

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

TenantAccessClient contains the methods for the TenantAccess group. Don't use this type directly, use NewTenantAccessClient() instead.

func NewTenantAccessClient

func NewTenantAccessClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TenantAccessClient, error)

NewTenantAccessClient creates a new instance of TenantAccessClient 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 (*TenantAccessClient) Create

func (client *TenantAccessClient) Create(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, ifMatch string, parameters AccessInformationCreateParameters, options *TenantAccessClientCreateOptions) (TenantAccessClientCreateResponse, error)

Create - Update tenant access information details. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • accessName - The identifier of the Access configuration.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - Parameters supplied to retrieve the Tenant Access Information.
  • options - TenantAccessClientCreateOptions contains the optional parameters for the TenantAccessClient.Create method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateTenantAccess.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewTenantAccessClient().Create(ctx, "rg1", "apimService1", armapimanagement.AccessIDNameAccess, "*", armapimanagement.AccessInformationCreateParameters{
	Properties: &armapimanagement.AccessInformationCreateParameterProperties{
		Enabled: to.Ptr(true),
	},
}, 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.AccessInformationContract = armapimanagement.AccessInformationContract{
// 	Name: to.Ptr("access"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/tenant"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/access"),
// 	Properties: &armapimanagement.AccessInformationContractProperties{
// 		Enabled: to.Ptr(true),
// 	},
// }
Output:

func (*TenantAccessClient) Get

func (client *TenantAccessClient) Get(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, options *TenantAccessClientGetOptions) (TenantAccessClientGetResponse, error)

Get - Get tenant access information details without secrets. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • accessName - The identifier of the Access configuration.
  • options - TenantAccessClientGetOptions contains the optional parameters for the TenantAccessClient.Get method.
Example (ApiManagementGetTenantAccess)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantAccess.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewTenantAccessClient().Get(ctx, "rg1", "apimService1", armapimanagement.AccessIDNameAccess, 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.AccessInformationContract = armapimanagement.AccessInformationContract{
// 	Name: to.Ptr("access"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/tenant"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/access"),
// 	Properties: &armapimanagement.AccessInformationContractProperties{
// 		Enabled: to.Ptr(true),
// 	},
// }
Output:

Example (ApiManagementGetTenantGitAccess)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantGitAccess.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewTenantAccessClient().Get(ctx, "rg1", "apimService1", armapimanagement.AccessIDNameGitAccess, 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.AccessInformationContract = armapimanagement.AccessInformationContract{
// 	Name: to.Ptr("gitAccess"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/tenant"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/gitAccess"),
// 	Properties: &armapimanagement.AccessInformationContractProperties{
// 		Enabled: to.Ptr(true),
// 		PrincipalID: to.Ptr("git"),
// 	},
// }
Output:

func (*TenantAccessClient) GetEntityTag

func (client *TenantAccessClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, options *TenantAccessClientGetEntityTagOptions) (TenantAccessClientGetEntityTagResponse, error)

GetEntityTag - Tenant access metadata

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • accessName - The identifier of the Access configuration.
  • options - TenantAccessClientGetEntityTagOptions contains the optional parameters for the TenantAccessClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadTenantAccess.json

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

func (*TenantAccessClient) ListSecrets

func (client *TenantAccessClient) ListSecrets(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, options *TenantAccessClientListSecretsOptions) (TenantAccessClientListSecretsResponse, error)

ListSecrets - Get tenant access information details. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • accessName - The identifier of the Access configuration.
  • options - TenantAccessClientListSecretsOptions contains the optional parameters for the TenantAccessClient.ListSecrets method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSecretsTenantAccess.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewTenantAccessClient().ListSecrets(ctx, "rg1", "apimService1", armapimanagement.AccessIDNameAccess, 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.AccessInformationSecretsContract = armapimanagement.AccessInformationSecretsContract{
// 	Enabled: to.Ptr(true),
// 	ID: to.Ptr("5600b59375ff190048030003"),
// 	PrimaryKey: to.Ptr("<primaryKey>"),
// 	SecondaryKey: to.Ptr("<secondaryKey>"),
// }
Output:

func (*TenantAccessClient) NewListByServicePager

func (client *TenantAccessClient) NewListByServicePager(resourceGroupName string, serviceName string, options *TenantAccessClientListByServiceOptions) *runtime.Pager[TenantAccessClientListByServiceResponse]

NewListByServicePager - Returns list of access infos - for Git and Management endpoints.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - TenantAccessClientListByServiceOptions contains the optional parameters for the TenantAccessClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListTenantAccess.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewTenantAccessClient().NewListByServicePager("rg1", "apimService1", &armapimanagement.TenantAccessClientListByServiceOptions{Filter: 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.AccessInformationCollection = armapimanagement.AccessInformationCollection{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.AccessInformationContract{
	// 		{
	// 			Name: to.Ptr("access"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/tenant"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/access"),
	// 			Properties: &armapimanagement.AccessInformationContractProperties{
	// 				Enabled: to.Ptr(true),
	// 			},
	// 	}},
	// }
}
Output:

func (*TenantAccessClient) RegeneratePrimaryKey

func (client *TenantAccessClient) RegeneratePrimaryKey(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, options *TenantAccessClientRegeneratePrimaryKeyOptions) (TenantAccessClientRegeneratePrimaryKeyResponse, error)

RegeneratePrimaryKey - Regenerate primary access key If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • accessName - The identifier of the Access configuration.
  • options - TenantAccessClientRegeneratePrimaryKeyOptions contains the optional parameters for the TenantAccessClient.RegeneratePrimaryKey method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantAccessRegenerateKey.json

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

func (*TenantAccessClient) RegenerateSecondaryKey

func (client *TenantAccessClient) RegenerateSecondaryKey(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, options *TenantAccessClientRegenerateSecondaryKeyOptions) (TenantAccessClientRegenerateSecondaryKeyResponse, error)

RegenerateSecondaryKey - Regenerate secondary access key If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • accessName - The identifier of the Access configuration.
  • options - TenantAccessClientRegenerateSecondaryKeyOptions contains the optional parameters for the TenantAccessClient.RegenerateSecondaryKey method.

func (*TenantAccessClient) Update

func (client *TenantAccessClient) Update(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, ifMatch string, parameters AccessInformationUpdateParameters, options *TenantAccessClientUpdateOptions) (TenantAccessClientUpdateResponse, error)

Update - Update tenant access information details. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • accessName - The identifier of the Access configuration.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - Parameters supplied to retrieve the Tenant Access Information.
  • options - TenantAccessClientUpdateOptions contains the optional parameters for the TenantAccessClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateTenantAccess.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewTenantAccessClient().Update(ctx, "rg1", "apimService1", armapimanagement.AccessIDNameAccess, "*", armapimanagement.AccessInformationUpdateParameters{
	Properties: &armapimanagement.AccessInformationUpdateParameterProperties{
		Enabled: to.Ptr(true),
	},
}, 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.AccessInformationContract = armapimanagement.AccessInformationContract{
// 	Name: to.Ptr("access"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/tenant"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/access"),
// 	Properties: &armapimanagement.AccessInformationContractProperties{
// 		Enabled: to.Ptr(true),
// 	},
// }
Output:

type TenantAccessClientCreateOptions

type TenantAccessClientCreateOptions struct {
}

TenantAccessClientCreateOptions contains the optional parameters for the TenantAccessClient.Create method.

type TenantAccessClientCreateResponse

type TenantAccessClientCreateResponse struct {
	// Tenant Settings.
	AccessInformationContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

TenantAccessClientCreateResponse contains the response from method TenantAccessClient.Create.

type TenantAccessClientGetEntityTagOptions

type TenantAccessClientGetEntityTagOptions struct {
}

TenantAccessClientGetEntityTagOptions contains the optional parameters for the TenantAccessClient.GetEntityTag method.

type TenantAccessClientGetEntityTagResponse

type TenantAccessClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

TenantAccessClientGetEntityTagResponse contains the response from method TenantAccessClient.GetEntityTag.

type TenantAccessClientGetOptions

type TenantAccessClientGetOptions struct {
}

TenantAccessClientGetOptions contains the optional parameters for the TenantAccessClient.Get method.

type TenantAccessClientGetResponse

type TenantAccessClientGetResponse struct {
	// Tenant Settings.
	AccessInformationContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

TenantAccessClientGetResponse contains the response from method TenantAccessClient.Get.

type TenantAccessClientListByServiceOptions

type TenantAccessClientListByServiceOptions struct {
	// Not used
	Filter *string
}

TenantAccessClientListByServiceOptions contains the optional parameters for the TenantAccessClient.NewListByServicePager method.

type TenantAccessClientListByServiceResponse

type TenantAccessClientListByServiceResponse struct {
	// Paged AccessInformation list representation.
	AccessInformationCollection
}

TenantAccessClientListByServiceResponse contains the response from method TenantAccessClient.NewListByServicePager.

type TenantAccessClientListSecretsOptions

type TenantAccessClientListSecretsOptions struct {
}

TenantAccessClientListSecretsOptions contains the optional parameters for the TenantAccessClient.ListSecrets method.

type TenantAccessClientListSecretsResponse

type TenantAccessClientListSecretsResponse struct {
	// Tenant access information contract of the API Management service.
	AccessInformationSecretsContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

TenantAccessClientListSecretsResponse contains the response from method TenantAccessClient.ListSecrets.

type TenantAccessClientRegeneratePrimaryKeyOptions

type TenantAccessClientRegeneratePrimaryKeyOptions struct {
}

TenantAccessClientRegeneratePrimaryKeyOptions contains the optional parameters for the TenantAccessClient.RegeneratePrimaryKey method.

type TenantAccessClientRegeneratePrimaryKeyResponse

type TenantAccessClientRegeneratePrimaryKeyResponse struct {
}

TenantAccessClientRegeneratePrimaryKeyResponse contains the response from method TenantAccessClient.RegeneratePrimaryKey.

type TenantAccessClientRegenerateSecondaryKeyOptions

type TenantAccessClientRegenerateSecondaryKeyOptions struct {
}

TenantAccessClientRegenerateSecondaryKeyOptions contains the optional parameters for the TenantAccessClient.RegenerateSecondaryKey method.

type TenantAccessClientRegenerateSecondaryKeyResponse

type TenantAccessClientRegenerateSecondaryKeyResponse struct {
}

TenantAccessClientRegenerateSecondaryKeyResponse contains the response from method TenantAccessClient.RegenerateSecondaryKey.

type TenantAccessClientUpdateOptions

type TenantAccessClientUpdateOptions struct {
}

TenantAccessClientUpdateOptions contains the optional parameters for the TenantAccessClient.Update method.

type TenantAccessClientUpdateResponse

type TenantAccessClientUpdateResponse struct {
	// Tenant Settings.
	AccessInformationContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

TenantAccessClientUpdateResponse contains the response from method TenantAccessClient.Update.

type TenantAccessGitClient

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

TenantAccessGitClient contains the methods for the TenantAccessGit group. Don't use this type directly, use NewTenantAccessGitClient() instead.

func NewTenantAccessGitClient

func NewTenantAccessGitClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TenantAccessGitClient, error)

NewTenantAccessGitClient creates a new instance of TenantAccessGitClient 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 (*TenantAccessGitClient) RegeneratePrimaryKey

func (client *TenantAccessGitClient) RegeneratePrimaryKey(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, options *TenantAccessGitClientRegeneratePrimaryKeyOptions) (TenantAccessGitClientRegeneratePrimaryKeyResponse, error)

RegeneratePrimaryKey - Regenerate primary access key for GIT. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • accessName - The identifier of the Access configuration.
  • options - TenantAccessGitClientRegeneratePrimaryKeyOptions contains the optional parameters for the TenantAccessGitClient.RegeneratePrimaryKey method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantAccessRegenerateKey.json

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

func (*TenantAccessGitClient) RegenerateSecondaryKey

func (client *TenantAccessGitClient) RegenerateSecondaryKey(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, options *TenantAccessGitClientRegenerateSecondaryKeyOptions) (TenantAccessGitClientRegenerateSecondaryKeyResponse, error)

RegenerateSecondaryKey - Regenerate secondary access key for GIT. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • accessName - The identifier of the Access configuration.
  • options - TenantAccessGitClientRegenerateSecondaryKeyOptions contains the optional parameters for the TenantAccessGitClient.RegenerateSecondaryKey method.

type TenantAccessGitClientRegeneratePrimaryKeyOptions

type TenantAccessGitClientRegeneratePrimaryKeyOptions struct {
}

TenantAccessGitClientRegeneratePrimaryKeyOptions contains the optional parameters for the TenantAccessGitClient.RegeneratePrimaryKey method.

type TenantAccessGitClientRegeneratePrimaryKeyResponse

type TenantAccessGitClientRegeneratePrimaryKeyResponse struct {
}

TenantAccessGitClientRegeneratePrimaryKeyResponse contains the response from method TenantAccessGitClient.RegeneratePrimaryKey.

type TenantAccessGitClientRegenerateSecondaryKeyOptions

type TenantAccessGitClientRegenerateSecondaryKeyOptions struct {
}

TenantAccessGitClientRegenerateSecondaryKeyOptions contains the optional parameters for the TenantAccessGitClient.RegenerateSecondaryKey method.

type TenantAccessGitClientRegenerateSecondaryKeyResponse

type TenantAccessGitClientRegenerateSecondaryKeyResponse struct {
}

TenantAccessGitClientRegenerateSecondaryKeyResponse contains the response from method TenantAccessGitClient.RegenerateSecondaryKey.

type TenantConfigurationClient

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

TenantConfigurationClient contains the methods for the TenantConfiguration group. Don't use this type directly, use NewTenantConfigurationClient() instead.

func NewTenantConfigurationClient

func NewTenantConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TenantConfigurationClient, error)

NewTenantConfigurationClient creates a new instance of TenantConfigurationClient 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 (*TenantConfigurationClient) BeginDeploy

BeginDeploy - This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • configurationName - The identifier of the Git Configuration Operation.
  • parameters - Deploy Configuration parameters.
  • options - TenantConfigurationClientBeginDeployOptions contains the optional parameters for the TenantConfigurationClient.BeginDeploy method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantConfigurationDeploy.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewTenantConfigurationClient().BeginDeploy(ctx, "rg1", "apimService1", armapimanagement.ConfigurationIDNameConfiguration, armapimanagement.DeployConfigurationParameters{
	Properties: &armapimanagement.DeployConfigurationParameterProperties{
		Branch: to.Ptr("master"),
	},
}, 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.OperationResultContract = armapimanagement.OperationResultContract{
// 	Name: to.Ptr("6074e652093a9d0dac3d733c"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/tenant/operationResults"),
// 	ID: to.Ptr("6074e652093a9d0dac3d733c"),
// 	Properties: &armapimanagement.OperationResultContractProperties{
// 		Error: &armapimanagement.ErrorResponseBody{
// 			Code: to.Ptr("ValidationError"),
// 			Message: to.Ptr("File not found: 'api-management/configuration.json'"),
// 		},
// 		Started: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-26T17:06:54.303Z"); return t}()),
// 		Status: to.Ptr(armapimanagement.AsyncOperationStatusFailed),
// 		Updated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-26T17:07:21.777Z"); return t}()),
// 	},
// }
Output:

func (*TenantConfigurationClient) BeginSave

BeginSave - This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • configurationName - The identifier of the Git Configuration Operation.
  • parameters - Save Configuration parameters.
  • options - TenantConfigurationClientBeginSaveOptions contains the optional parameters for the TenantConfigurationClient.BeginSave method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantConfigurationSave.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewTenantConfigurationClient().BeginSave(ctx, "rg1", "apimService1", armapimanagement.ConfigurationIDNameConfiguration, armapimanagement.SaveConfigurationParameter{
	Properties: &armapimanagement.SaveConfigurationParameterProperties{
		Branch: to.Ptr("master"),
	},
}, 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.OperationResultContract = armapimanagement.OperationResultContract{
// 	Name: to.Ptr("6074e652093a9d0dac3d733c"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/tenant/operationResults"),
// 	ID: to.Ptr("6074e652093a9d0dac3d733c"),
// 	Properties: &armapimanagement.OperationResultContractProperties{
// 		ActionLog: []*armapimanagement.OperationResultLogItemContract{
// 		},
// 		ResultInfo: to.Ptr("The configuration was successfully saved to master as commit c0ae274f6046912107bad734834cbf65918668b6."),
// 		Started: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-13T00:31:14.940Z"); return t}()),
// 		Status: to.Ptr(armapimanagement.AsyncOperationStatusSucceeded),
// 		Updated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-13T00:31:27.590Z"); return t}()),
// 	},
// }
Output:

func (*TenantConfigurationClient) BeginValidate

BeginValidate - This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • configurationName - The identifier of the Git Configuration Operation.
  • parameters - Validate Configuration parameters.
  • options - TenantConfigurationClientBeginValidateOptions contains the optional parameters for the TenantConfigurationClient.BeginValidate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantConfigurationValidate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewTenantConfigurationClient().BeginValidate(ctx, "rg1", "apimService1", armapimanagement.ConfigurationIDNameConfiguration, armapimanagement.DeployConfigurationParameters{
	Properties: &armapimanagement.DeployConfigurationParameterProperties{
		Branch: to.Ptr("master"),
	},
}, 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.OperationResultContract = armapimanagement.OperationResultContract{
// 	Name: to.Ptr("6074ec02093a9d0dac3d7345"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/tenant/operationResults"),
// 	ID: to.Ptr("6074ec02093a9d0dac3d7345"),
// 	Properties: &armapimanagement.OperationResultContractProperties{
// 		ActionLog: []*armapimanagement.OperationResultLogItemContract{
// 		},
// 		ResultInfo: to.Ptr("Validation is successfull"),
// 		Started: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-13T00:55:30.620Z"); return t}()),
// 		Status: to.Ptr(armapimanagement.AsyncOperationStatusSucceeded),
// 		Updated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-13T00:55:39.857Z"); return t}()),
// 	},
// }
Output:

func (*TenantConfigurationClient) GetSyncState

GetSyncState - Gets the status of the most recent synchronization between the configuration database and the Git repository. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • configurationName - The identifier of the Git Configuration Operation.
  • options - TenantConfigurationClientGetSyncStateOptions contains the optional parameters for the TenantConfigurationClient.GetSyncState method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantAccessSyncState.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewTenantConfigurationClient().GetSyncState(ctx, "rg1", "apimService1", armapimanagement.ConfigurationIDNameConfiguration, 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.TenantConfigurationSyncStateContract = armapimanagement.TenantConfigurationSyncStateContract{
// 	Name: to.Ptr("syncState"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/tenant/syncState"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/configuration/syncState"),
// 	Properties: &armapimanagement.TenantConfigurationSyncStateContractProperties{
// 		Branch: to.Ptr("master"),
// 		CommitID: to.Ptr("de891c2342c7058dde45e5e624eae7e558c94683"),
// 		ConfigurationChangeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-13T00:11:43.862Z"); return t}()),
// 		IsExport: to.Ptr(true),
// 		IsGitEnabled: to.Ptr(true),
// 		IsSynced: to.Ptr(true),
// 		LastOperationID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/configuration/operationResults/6074f0bd093a9d0dac3d7347"),
// 		SyncDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-13T01:15:53.982Z"); return t}()),
// 	},
// }
Output:

type TenantConfigurationClientBeginDeployOptions

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

TenantConfigurationClientBeginDeployOptions contains the optional parameters for the TenantConfigurationClient.BeginDeploy method.

type TenantConfigurationClientBeginSaveOptions

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

TenantConfigurationClientBeginSaveOptions contains the optional parameters for the TenantConfigurationClient.BeginSave method.

type TenantConfigurationClientBeginValidateOptions

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

TenantConfigurationClientBeginValidateOptions contains the optional parameters for the TenantConfigurationClient.BeginValidate method.

type TenantConfigurationClientDeployResponse

type TenantConfigurationClientDeployResponse struct {
	// Long Running Git Operation Results.
	OperationResultContract
}

TenantConfigurationClientDeployResponse contains the response from method TenantConfigurationClient.BeginDeploy.

type TenantConfigurationClientGetSyncStateOptions

type TenantConfigurationClientGetSyncStateOptions struct {
}

TenantConfigurationClientGetSyncStateOptions contains the optional parameters for the TenantConfigurationClient.GetSyncState method.

type TenantConfigurationClientGetSyncStateResponse

type TenantConfigurationClientGetSyncStateResponse struct {
	// Result of Tenant Configuration Sync State.
	TenantConfigurationSyncStateContract
}

TenantConfigurationClientGetSyncStateResponse contains the response from method TenantConfigurationClient.GetSyncState.

type TenantConfigurationClientSaveResponse

type TenantConfigurationClientSaveResponse struct {
	// Long Running Git Operation Results.
	OperationResultContract
}

TenantConfigurationClientSaveResponse contains the response from method TenantConfigurationClient.BeginSave.

type TenantConfigurationClientValidateResponse

type TenantConfigurationClientValidateResponse struct {
	// Long Running Git Operation Results.
	OperationResultContract
}

TenantConfigurationClientValidateResponse contains the response from method TenantConfigurationClient.BeginValidate.

type TenantConfigurationSyncStateContract

type TenantConfigurationSyncStateContract struct {
	// Properties returned Tenant Configuration Sync State check.
	Properties *TenantConfigurationSyncStateContractProperties

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

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

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

TenantConfigurationSyncStateContract - Result of Tenant Configuration Sync State.

func (TenantConfigurationSyncStateContract) MarshalJSON

func (t TenantConfigurationSyncStateContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TenantConfigurationSyncStateContract.

func (*TenantConfigurationSyncStateContract) UnmarshalJSON

func (t *TenantConfigurationSyncStateContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TenantConfigurationSyncStateContract.

type TenantConfigurationSyncStateContractProperties

type TenantConfigurationSyncStateContractProperties struct {
	// The name of Git branch.
	Branch *string

	// The latest commit Id.
	CommitID *string

	// The date of the latest configuration change. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified
	// by the ISO 8601 standard.
	ConfigurationChangeDate *time.Time

	// value indicating if last sync was save (true) or deploy (false) operation.
	IsExport *bool

	// value indicating whether Git configuration access is enabled.
	IsGitEnabled *bool

	// value indicating if last synchronization was later than the configuration change.
	IsSynced *bool

	// Most recent tenant configuration operation identifier
	LastOperationID *string

	// The date of the latest synchronization. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by
	// the ISO 8601 standard.
	SyncDate *time.Time
}

TenantConfigurationSyncStateContractProperties - Tenant Configuration Synchronization State.

func (TenantConfigurationSyncStateContractProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type TenantConfigurationSyncStateContractProperties.

func (*TenantConfigurationSyncStateContractProperties) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type TenantConfigurationSyncStateContractProperties.

type TenantSettingsClient

type TenantSettingsClient struct {
	// contains filtered or unexported fields
}

TenantSettingsClient contains the methods for the TenantSettings group. Don't use this type directly, use NewTenantSettingsClient() instead.

func NewTenantSettingsClient

func NewTenantSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TenantSettingsClient, error)

NewTenantSettingsClient creates a new instance of TenantSettingsClient 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 (*TenantSettingsClient) Get

func (client *TenantSettingsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, settingsType SettingsTypeName, options *TenantSettingsClientGetOptions) (TenantSettingsClientGetResponse, error)

Get - Get tenant settings. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • settingsType - The identifier of the settings.
  • options - TenantSettingsClientGetOptions contains the optional parameters for the TenantSettingsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantSettings.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewTenantSettingsClient().Get(ctx, "rg1", "apimService1", armapimanagement.SettingsTypeNamePublic, 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.TenantSettingsContract = armapimanagement.TenantSettingsContract{
// 	Name: to.Ptr("public"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/settings"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/settings/public"),
// 	Properties: &armapimanagement.TenantSettingsContractProperties{
// 		Settings: map[string]*string{
// 			"CustomPortalSettings.DelegatedSubscriptionEnabled": to.Ptr("False"),
// 			"CustomPortalSettings.DelegationEnabled": to.Ptr("False"),
// 			"CustomPortalSettings.DelegationUrl": to.Ptr(""),
// 			"CustomPortalSettings.UserRegistrationTerms": nil,
// 			"CustomPortalSettings.UserRegistrationTermsConsentRequired": to.Ptr("False"),
// 			"CustomPortalSettings.UserRegistrationTermsEnabled": to.Ptr("False"),
// 		},
// 	},
// }
Output:

func (*TenantSettingsClient) NewListByServicePager

func (client *TenantSettingsClient) NewListByServicePager(resourceGroupName string, serviceName string, options *TenantSettingsClientListByServiceOptions) *runtime.Pager[TenantSettingsClientListByServiceResponse]

NewListByServicePager - Public settings.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - TenantSettingsClientListByServiceOptions contains the optional parameters for the TenantSettingsClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListTenantSettings.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewTenantSettingsClient().NewListByServicePager("rg1", "apimService1", &armapimanagement.TenantSettingsClientListByServiceOptions{Filter: 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.TenantSettingsCollection = armapimanagement.TenantSettingsCollection{
	// 	Value: []*armapimanagement.TenantSettingsContract{
	// 		{
	// 			Name: to.Ptr("public"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/settings"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/settings/public"),
	// 			Properties: &armapimanagement.TenantSettingsContractProperties{
	// 				Settings: map[string]*string{
	// 					"CustomPortalSettings.DelegatedSubscriptionEnabled": to.Ptr("False"),
	// 					"CustomPortalSettings.DelegationEnabled": to.Ptr("False"),
	// 					"CustomPortalSettings.DelegationUrl": to.Ptr(""),
	// 					"CustomPortalSettings.UserRegistrationTerms": nil,
	// 					"CustomPortalSettings.UserRegistrationTermsConsentRequired": to.Ptr("False"),
	// 					"CustomPortalSettings.UserRegistrationTermsEnabled": to.Ptr("False"),
	// 				},
	// 			},
	// 	}},
	// }
}
Output:

type TenantSettingsClientGetOptions

type TenantSettingsClientGetOptions struct {
}

TenantSettingsClientGetOptions contains the optional parameters for the TenantSettingsClient.Get method.

type TenantSettingsClientGetResponse

type TenantSettingsClientGetResponse struct {
	// Tenant Settings.
	TenantSettingsContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

TenantSettingsClientGetResponse contains the response from method TenantSettingsClient.Get.

type TenantSettingsClientListByServiceOptions

type TenantSettingsClientListByServiceOptions struct {
	// Not used
	Filter *string
}

TenantSettingsClientListByServiceOptions contains the optional parameters for the TenantSettingsClient.NewListByServicePager method.

type TenantSettingsClientListByServiceResponse

type TenantSettingsClientListByServiceResponse struct {
	// Paged AccessInformation list representation.
	TenantSettingsCollection
}

TenantSettingsClientListByServiceResponse contains the response from method TenantSettingsClient.NewListByServicePager.

type TenantSettingsCollection

type TenantSettingsCollection struct {
	// READ-ONLY; Next page link if any.
	NextLink *string

	// READ-ONLY; Page values.
	Value []*TenantSettingsContract
}

TenantSettingsCollection - Paged AccessInformation list representation.

func (TenantSettingsCollection) MarshalJSON

func (t TenantSettingsCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TenantSettingsCollection.

func (*TenantSettingsCollection) UnmarshalJSON

func (t *TenantSettingsCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TenantSettingsCollection.

type TenantSettingsContract

type TenantSettingsContract struct {
	// TenantSettings entity contract properties.
	Properties *TenantSettingsContractProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

TenantSettingsContract - Tenant Settings.

func (TenantSettingsContract) MarshalJSON

func (t TenantSettingsContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TenantSettingsContract.

func (*TenantSettingsContract) UnmarshalJSON

func (t *TenantSettingsContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TenantSettingsContract.

type TenantSettingsContractProperties

type TenantSettingsContractProperties struct {
	// Tenant settings
	Settings map[string]*string
}

TenantSettingsContractProperties - Tenant access information contract of the API Management service.

func (TenantSettingsContractProperties) MarshalJSON

func (t TenantSettingsContractProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TenantSettingsContractProperties.

func (*TenantSettingsContractProperties) UnmarshalJSON

func (t *TenantSettingsContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TenantSettingsContractProperties.

type TermsOfServiceProperties

type TermsOfServiceProperties struct {
	// Ask user for consent to the terms of service.
	ConsentRequired *bool

	// Display terms of service during a sign-up process.
	Enabled *bool

	// A terms of service text.
	Text *string
}

TermsOfServiceProperties - Terms of service contract properties.

func (TermsOfServiceProperties) MarshalJSON

func (t TermsOfServiceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TermsOfServiceProperties.

func (*TermsOfServiceProperties) UnmarshalJSON

func (t *TermsOfServiceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TermsOfServiceProperties.

type TokenBodyParameterContract

type TokenBodyParameterContract struct {
	// REQUIRED; body parameter name.
	Name *string

	// REQUIRED; body parameter value.
	Value *string
}

TokenBodyParameterContract - OAuth acquire token request body parameter (www-url-form-encoded).

func (TokenBodyParameterContract) MarshalJSON

func (t TokenBodyParameterContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TokenBodyParameterContract.

func (*TokenBodyParameterContract) UnmarshalJSON

func (t *TokenBodyParameterContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TokenBodyParameterContract.

type TranslateRequiredQueryParametersConduct

type TranslateRequiredQueryParametersConduct string

TranslateRequiredQueryParametersConduct - Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query'

const (
	// TranslateRequiredQueryParametersConductQuery - Leaves required query parameters as they are (no translation done).
	TranslateRequiredQueryParametersConductQuery TranslateRequiredQueryParametersConduct = "query"
	// TranslateRequiredQueryParametersConductTemplate - Translates required query parameters to template ones. Is a default value
	TranslateRequiredQueryParametersConductTemplate TranslateRequiredQueryParametersConduct = "template"
)

func PossibleTranslateRequiredQueryParametersConductValues

func PossibleTranslateRequiredQueryParametersConductValues() []TranslateRequiredQueryParametersConduct

PossibleTranslateRequiredQueryParametersConductValues returns the possible values for the TranslateRequiredQueryParametersConduct const type.

type UserClient

type UserClient struct {
	// contains filtered or unexported fields
}

UserClient contains the methods for the User group. Don't use this type directly, use NewUserClient() instead.

func NewUserClient

func NewUserClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UserClient, error)

NewUserClient creates a new instance of UserClient 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 (*UserClient) CreateOrUpdate

func (client *UserClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, userID string, parameters UserCreateParameters, options *UserClientCreateOrUpdateOptions) (UserClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or Updates a user. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • userID - User identifier. Must be unique in the current API Management service instance.
  • parameters - Create or update parameters.
  • options - UserClientCreateOrUpdateOptions contains the optional parameters for the UserClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateUser.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewUserClient().CreateOrUpdate(ctx, "rg1", "apimService1", "5931a75ae4bbd512288c680b", armapimanagement.UserCreateParameters{
	Properties: &armapimanagement.UserCreateParameterProperties{
		Confirmation: to.Ptr(armapimanagement.ConfirmationSignup),
		Email:        to.Ptr("foobar@outlook.com"),
		FirstName:    to.Ptr("foo"),
		LastName:     to.Ptr("bar"),
	},
}, &armapimanagement.UserClientCreateOrUpdateOptions{Notify: nil,
	IfMatch: 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.UserContract = armapimanagement.UserContract{
// 	Name: to.Ptr("5931a75ae4bbd512288c680b"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/users"),
// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512288c680b"),
// 	Properties: &armapimanagement.UserContractProperties{
// 		Identities: []*armapimanagement.UserIdentityContract{
// 			{
// 				ID: to.Ptr("foobar@outlook.com"),
// 				Provider: to.Ptr("Basic"),
// 		}},
// 		State: to.Ptr(armapimanagement.UserStateActive),
// 		Email: to.Ptr("foobar@outlook.com"),
// 		FirstName: to.Ptr("foo"),
// 		Groups: []*armapimanagement.GroupContractProperties{
// 		},
// 		LastName: to.Ptr("bar"),
// 		RegistrationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-07T21:21:29.160Z"); return t}()),
// 	},
// }
Output:

func (*UserClient) Delete

func (client *UserClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, userID string, ifMatch string, options *UserClientDeleteOptions) (UserClientDeleteResponse, error)

Delete - Deletes specific user. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • userID - User identifier. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • options - UserClientDeleteOptions contains the optional parameters for the UserClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteUser.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewUserClient().Delete(ctx, "rg1", "apimService1", "5931a75ae4bbd512288c680b", "*", &armapimanagement.UserClientDeleteOptions{DeleteSubscriptions: nil,
	Notify:  nil,
	AppType: nil,
})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*UserClient) GenerateSsoURL

func (client *UserClient) GenerateSsoURL(ctx context.Context, resourceGroupName string, serviceName string, userID string, options *UserClientGenerateSsoURLOptions) (UserClientGenerateSsoURLResponse, error)

GenerateSsoURL - Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • userID - User identifier. Must be unique in the current API Management service instance.
  • options - UserClientGenerateSsoURLOptions contains the optional parameters for the UserClient.GenerateSsoURL method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUserGenerateSsoUrl.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewUserClient().GenerateSsoURL(ctx, "rg1", "apimService1", "57127d485157a511ace86ae7", 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.GenerateSsoURLResult = armapimanagement.GenerateSsoURLResult{
// 	Value: to.Ptr("https://apimService1.portal.azure-api.net/signin-sso?token=57127d485157a511ace86ae7%26201706051624%267VY18MlwAom***********2bYr2bDQHg21OzQsNakExQ%3d%3d"),
// }
Output:

func (*UserClient) Get

func (client *UserClient) Get(ctx context.Context, resourceGroupName string, serviceName string, userID string, options *UserClientGetOptions) (UserClientGetResponse, error)

Get - Gets the details of the user specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • userID - User identifier. Must be unique in the current API Management service instance.
  • options - UserClientGetOptions contains the optional parameters for the UserClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetUser.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewUserClient().Get(ctx, "rg1", "apimService1", "5931a75ae4bbd512a88c680b", 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.UserContract = armapimanagement.UserContract{
// 	Name: to.Ptr("5931a75ae4bbd512a88c680b"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/users"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512a88c680b"),
// 	Properties: &armapimanagement.UserContractProperties{
// 		Identities: []*armapimanagement.UserIdentityContract{
// 			{
// 				ID: to.Ptr("*************"),
// 				Provider: to.Ptr("Microsoft"),
// 		}},
// 		State: to.Ptr(armapimanagement.UserStateActive),
// 		Email: to.Ptr("foobar@outlook.com"),
// 		FirstName: to.Ptr("foo"),
// 		LastName: to.Ptr("bar"),
// 		RegistrationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-02T17:58:50.357Z"); return t}()),
// 	},
// }
Output:

func (*UserClient) GetEntityTag

func (client *UserClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, userID string, options *UserClientGetEntityTagOptions) (UserClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the user specified by its identifier.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • userID - User identifier. Must be unique in the current API Management service instance.
  • options - UserClientGetEntityTagOptions contains the optional parameters for the UserClient.GetEntityTag method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadUser.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewUserClient().GetEntityTag(ctx, "rg1", "apimService1", "5931a75ae4bbd512a88c680b", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*UserClient) GetSharedAccessToken

func (client *UserClient) GetSharedAccessToken(ctx context.Context, resourceGroupName string, serviceName string, userID string, parameters UserTokenParameters, options *UserClientGetSharedAccessTokenOptions) (UserClientGetSharedAccessTokenResponse, error)

GetSharedAccessToken - Gets the Shared Access Authorization Token for the User. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • userID - User identifier. Must be unique in the current API Management service instance.
  • parameters - Create Authorization Token parameters.
  • options - UserClientGetSharedAccessTokenOptions contains the optional parameters for the UserClient.GetSharedAccessToken method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUserToken.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewUserClient().GetSharedAccessToken(ctx, "rg1", "apimService1", "userId1718", armapimanagement.UserTokenParameters{
	Properties: &armapimanagement.UserTokenParameterProperties{
		Expiry:  to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T00:44:24.284Z"); return t }()),
		KeyType: to.Ptr(armapimanagement.KeyTypePrimary),
	},
}, 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.UserTokenResult = armapimanagement.UserTokenResult{
// 	Value: to.Ptr("userId1718&201904210044&9A1GR1f5WIhFvFmzQG+xxxxxxxxxxx/kBeu87DWad3tkasUXuvPL+MgzlwUHyg=="),
// }
Output:

func (*UserClient) NewListByServicePager

func (client *UserClient) NewListByServicePager(resourceGroupName string, serviceName string, options *UserClientListByServiceOptions) *runtime.Pager[UserClientListByServiceResponse]

NewListByServicePager - Lists a collection of registered users in the specified service instance.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • options - UserClientListByServiceOptions contains the optional parameters for the UserClient.NewListByServicePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListUsers.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewUserClient().NewListByServicePager("rg1", "apimService1", &armapimanagement.UserClientListByServiceOptions{Filter: nil,
	Top:          nil,
	Skip:         nil,
	ExpandGroups: 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.UserCollection = armapimanagement.UserCollection{
	// 	Count: to.Ptr[int64](3),
	// 	Value: []*armapimanagement.UserContract{
	// 		{
	// 			Name: to.Ptr("1"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/users"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1"),
	// 			Properties: &armapimanagement.UserContractProperties{
	// 				Identities: []*armapimanagement.UserIdentityContract{
	// 					{
	// 						ID: to.Ptr("admin@live.com"),
	// 						Provider: to.Ptr("Azure"),
	// 				}},
	// 				State: to.Ptr(armapimanagement.UserStateActive),
	// 				Email: to.Ptr("admin@live.com"),
	// 				FirstName: to.Ptr("Administrator"),
	// 				LastName: to.Ptr(""),
	// 				RegistrationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-09-22T01:57:39.677Z"); return t}()),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("56eaec62baf08b06e46d27fd"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/users"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/56eaec62baf08b06e46d27fd"),
	// 			Properties: &armapimanagement.UserContractProperties{
	// 				Identities: []*armapimanagement.UserIdentityContract{
	// 					{
	// 						ID: to.Ptr("foo.bar.83@gmail.com"),
	// 						Provider: to.Ptr("Basic"),
	// 				}},
	// 				State: to.Ptr(armapimanagement.UserStateActive),
	// 				Email: to.Ptr("foo.bar.83@gmail.com"),
	// 				FirstName: to.Ptr("foo"),
	// 				LastName: to.Ptr("bar"),
	// 				RegistrationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-17T17:41:56.327Z"); return t}()),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("5931a75ae4bbd512a88c680b"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/users"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512a88c680b"),
	// 			Properties: &armapimanagement.UserContractProperties{
	// 				Identities: []*armapimanagement.UserIdentityContract{
	// 					{
	// 						ID: to.Ptr("*************"),
	// 						Provider: to.Ptr("Microsoft"),
	// 				}},
	// 				State: to.Ptr(armapimanagement.UserStateActive),
	// 				Email: to.Ptr("foobar@outlook.com"),
	// 				FirstName: to.Ptr("foo"),
	// 				LastName: to.Ptr("bar"),
	// 				RegistrationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-02T17:58:50.357Z"); return t}()),
	// 			},
	// 	}},
	// }
}
Output:

func (*UserClient) Update

func (client *UserClient) Update(ctx context.Context, resourceGroupName string, serviceName string, userID string, ifMatch string, parameters UserUpdateParameters, options *UserClientUpdateOptions) (UserClientUpdateResponse, error)

Update - Updates the details of the user specified by its identifier. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • userID - User identifier. Must be unique in the current API Management service instance.
  • ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
  • parameters - Update parameters.
  • options - UserClientUpdateOptions contains the optional parameters for the UserClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateUser.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewUserClient().Update(ctx, "rg1", "apimService1", "5931a75ae4bbd512a88c680b", "*", armapimanagement.UserUpdateParameters{
	Properties: &armapimanagement.UserUpdateParametersProperties{
		Email:     to.Ptr("foobar@outlook.com"),
		FirstName: to.Ptr("foo"),
		LastName:  to.Ptr("bar"),
	},
}, 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.UserContract = armapimanagement.UserContract{
// 	Name: to.Ptr("5931a75ae4bbd512a88c680b"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/users"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512a88c680b"),
// 	Properties: &armapimanagement.UserContractProperties{
// 		Identities: []*armapimanagement.UserIdentityContract{
// 			{
// 				ID: to.Ptr("*************"),
// 				Provider: to.Ptr("Microsoft"),
// 		}},
// 		State: to.Ptr(armapimanagement.UserStateActive),
// 		Email: to.Ptr("foobar@outlook.com"),
// 		FirstName: to.Ptr("foo"),
// 		LastName: to.Ptr("bar"),
// 		RegistrationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-02T17:58:50.357Z"); return t}()),
// 	},
// }
Output:

type UserClientCreateOrUpdateOptions

type UserClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string

	// Send an Email notification to the User.
	Notify *bool
}

UserClientCreateOrUpdateOptions contains the optional parameters for the UserClient.CreateOrUpdate method.

type UserClientCreateOrUpdateResponse

type UserClientCreateOrUpdateResponse struct {
	// User details.
	UserContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

UserClientCreateOrUpdateResponse contains the response from method UserClient.CreateOrUpdate.

type UserClientDeleteOptions

type UserClientDeleteOptions struct {
	// Determines the type of application which send the create user request. Default is legacy publisher portal.
	AppType *AppType

	// Whether to delete user's subscription or not.
	DeleteSubscriptions *bool

	// Send an Account Closed Email notification to the User.
	Notify *bool
}

UserClientDeleteOptions contains the optional parameters for the UserClient.Delete method.

type UserClientDeleteResponse

type UserClientDeleteResponse struct {
}

UserClientDeleteResponse contains the response from method UserClient.Delete.

type UserClientGenerateSsoURLOptions

type UserClientGenerateSsoURLOptions struct {
}

UserClientGenerateSsoURLOptions contains the optional parameters for the UserClient.GenerateSsoURL method.

type UserClientGenerateSsoURLResponse

type UserClientGenerateSsoURLResponse struct {
	// Generate SSO Url operations response details.
	GenerateSsoURLResult
}

UserClientGenerateSsoURLResponse contains the response from method UserClient.GenerateSsoURL.

type UserClientGetEntityTagOptions

type UserClientGetEntityTagOptions struct {
}

UserClientGetEntityTagOptions contains the optional parameters for the UserClient.GetEntityTag method.

type UserClientGetEntityTagResponse

type UserClientGetEntityTagResponse struct {
	// ETag contains the information returned from the ETag header response.
	ETag *string

	// Success indicates if the operation succeeded or failed.
	Success bool
}

UserClientGetEntityTagResponse contains the response from method UserClient.GetEntityTag.

type UserClientGetOptions

type UserClientGetOptions struct {
}

UserClientGetOptions contains the optional parameters for the UserClient.Get method.

type UserClientGetResponse

type UserClientGetResponse struct {
	// User details.
	UserContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

UserClientGetResponse contains the response from method UserClient.Get.

type UserClientGetSharedAccessTokenOptions

type UserClientGetSharedAccessTokenOptions struct {
}

UserClientGetSharedAccessTokenOptions contains the optional parameters for the UserClient.GetSharedAccessToken method.

type UserClientGetSharedAccessTokenResponse

type UserClientGetSharedAccessTokenResponse struct {
	// Get User Token response details.
	UserTokenResult
}

UserClientGetSharedAccessTokenResponse contains the response from method UserClient.GetSharedAccessToken.

type UserClientListByServiceOptions

type UserClientListByServiceOptions struct {
	// Detailed Group in response.
	ExpandGroups *bool

	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | state | filter | eq | |
	// | registrationDate | filter | ge, le, eq, ne, gt, lt | |
	// | note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | groups | expand | | |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

UserClientListByServiceOptions contains the optional parameters for the UserClient.NewListByServicePager method.

type UserClientListByServiceResponse

type UserClientListByServiceResponse struct {
	// Paged Users list representation.
	UserCollection
}

UserClientListByServiceResponse contains the response from method UserClient.NewListByServicePager.

type UserClientUpdateOptions

type UserClientUpdateOptions struct {
}

UserClientUpdateOptions contains the optional parameters for the UserClient.Update method.

type UserClientUpdateResponse

type UserClientUpdateResponse struct {
	// User details.
	UserContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

UserClientUpdateResponse contains the response from method UserClient.Update.

type UserCollection

type UserCollection struct {
	// Total record count number across all pages.
	Count *int64

	// Next page link if any.
	NextLink *string

	// Page values.
	Value []*UserContract
}

UserCollection - Paged Users list representation.

func (UserCollection) MarshalJSON

func (u UserCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserCollection.

func (*UserCollection) UnmarshalJSON

func (u *UserCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserCollection.

type UserConfirmationPasswordClient

type UserConfirmationPasswordClient struct {
	// contains filtered or unexported fields
}

UserConfirmationPasswordClient contains the methods for the UserConfirmationPassword group. Don't use this type directly, use NewUserConfirmationPasswordClient() instead.

func NewUserConfirmationPasswordClient

func NewUserConfirmationPasswordClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UserConfirmationPasswordClient, error)

NewUserConfirmationPasswordClient creates a new instance of UserConfirmationPasswordClient 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 (*UserConfirmationPasswordClient) Send

Send - Sends confirmation If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • userID - User identifier. Must be unique in the current API Management service instance.
  • options - UserConfirmationPasswordClientSendOptions contains the optional parameters for the UserConfirmationPasswordClient.Send method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUserConfirmationPasswordSend.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewUserConfirmationPasswordClient().Send(ctx, "rg1", "apimService1", "57127d485157a511ace86ae7", &armapimanagement.UserConfirmationPasswordClientSendOptions{AppType: nil})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

type UserConfirmationPasswordClientSendOptions

type UserConfirmationPasswordClientSendOptions struct {
	// Determines the type of application which send the create user request. Default is legacy publisher portal.
	AppType *AppType
}

UserConfirmationPasswordClientSendOptions contains the optional parameters for the UserConfirmationPasswordClient.Send method.

type UserConfirmationPasswordClientSendResponse

type UserConfirmationPasswordClientSendResponse struct {
}

UserConfirmationPasswordClientSendResponse contains the response from method UserConfirmationPasswordClient.Send.

type UserContract

type UserContract struct {
	// User entity contract properties.
	Properties *UserContractProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

UserContract - User details.

func (UserContract) MarshalJSON

func (u UserContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserContract.

func (*UserContract) UnmarshalJSON

func (u *UserContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserContract.

type UserContractProperties

type UserContractProperties struct {
	// Email address.
	Email *string

	// First name.
	FirstName *string

	// Collection of user identities.
	Identities []*UserIdentityContract

	// Last name.
	LastName *string

	// Optional note about a user set by the administrator.
	Note *string

	// Date of user registration. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601
	// standard.
	RegistrationDate *time.Time

	// Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal
	// or call any APIs of subscribed products. Default state is Active.
	State *UserState

	// READ-ONLY; Collection of groups user is part of.
	Groups []*GroupContractProperties
}

UserContractProperties - User profile.

func (UserContractProperties) MarshalJSON

func (u UserContractProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserContractProperties.

func (*UserContractProperties) UnmarshalJSON

func (u *UserContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserContractProperties.

type UserCreateParameterProperties

type UserCreateParameterProperties struct {
	// REQUIRED; Email address. Must not be empty and must be unique within the service instance.
	Email *string

	// REQUIRED; First name.
	FirstName *string

	// REQUIRED; Last name.
	LastName *string

	// Determines the type of application which send the create user request. Default is legacy portal.
	AppType *AppType

	// Determines the type of confirmation e-mail that will be sent to the newly created user.
	Confirmation *Confirmation

	// Collection of user identities.
	Identities []*UserIdentityContract

	// Optional note about a user set by the administrator.
	Note *string

	// User Password. If no value is provided, a default password is generated.
	Password *string

	// Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal
	// or call any APIs of subscribed products. Default state is Active.
	State *UserState
}

UserCreateParameterProperties - Parameters supplied to the Create User operation.

func (UserCreateParameterProperties) MarshalJSON

func (u UserCreateParameterProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserCreateParameterProperties.

func (*UserCreateParameterProperties) UnmarshalJSON

func (u *UserCreateParameterProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserCreateParameterProperties.

type UserCreateParameters

type UserCreateParameters struct {
	// User entity create contract properties.
	Properties *UserCreateParameterProperties
}

UserCreateParameters - User create details.

func (UserCreateParameters) MarshalJSON

func (u UserCreateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserCreateParameters.

func (*UserCreateParameters) UnmarshalJSON

func (u *UserCreateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserCreateParameters.

type UserEntityBaseParameters

type UserEntityBaseParameters struct {
	// Collection of user identities.
	Identities []*UserIdentityContract

	// Optional note about a user set by the administrator.
	Note *string

	// Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal
	// or call any APIs of subscribed products. Default state is Active.
	State *UserState
}

UserEntityBaseParameters - User Entity Base Parameters set.

func (UserEntityBaseParameters) MarshalJSON

func (u UserEntityBaseParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserEntityBaseParameters.

func (*UserEntityBaseParameters) UnmarshalJSON

func (u *UserEntityBaseParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserEntityBaseParameters.

type UserGroupClient

type UserGroupClient struct {
	// contains filtered or unexported fields
}

UserGroupClient contains the methods for the UserGroup group. Don't use this type directly, use NewUserGroupClient() instead.

func NewUserGroupClient

func NewUserGroupClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UserGroupClient, error)

NewUserGroupClient creates a new instance of UserGroupClient 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 (*UserGroupClient) NewListPager

func (client *UserGroupClient) NewListPager(resourceGroupName string, serviceName string, userID string, options *UserGroupClientListOptions) *runtime.Pager[UserGroupClientListResponse]

NewListPager - Lists all user groups.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • userID - User identifier. Must be unique in the current API Management service instance.
  • options - UserGroupClientListOptions contains the optional parameters for the UserGroupClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListUserGroups.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewUserGroupClient().NewListPager("rg1", "apimService1", "57681833a40f7eb6c49f6acf", &armapimanagement.UserGroupClientListOptions{Filter: nil,
	Top:  nil,
	Skip: 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.GroupCollection = armapimanagement.GroupCollection{
	// 	Count: to.Ptr[int64](1),
	// 	Value: []*armapimanagement.GroupContract{
	// 		{
	// 			Name: to.Ptr("5600b57e7e8880006a020002"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/users/groups"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57681833a40f7eb6c49f6acf/groups/5600b57e7e8880006a020002"),
	// 			Properties: &armapimanagement.GroupContractProperties{
	// 				Type: to.Ptr(armapimanagement.GroupTypeSystem),
	// 				Description: to.Ptr("Developers is a built-in group. Its membership is managed by the system. Signed-in users fall into this group."),
	// 				BuiltIn: to.Ptr(true),
	// 				DisplayName: to.Ptr("Developers"),
	// 			},
	// 	}},
	// }
}
Output:

type UserGroupClientListOptions

type UserGroupClientListOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|------------------------|-----------------------------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

UserGroupClientListOptions contains the optional parameters for the UserGroupClient.NewListPager method.

type UserGroupClientListResponse

type UserGroupClientListResponse struct {
	// Paged Group list representation.
	GroupCollection
}

UserGroupClientListResponse contains the response from method UserGroupClient.NewListPager.

type UserIdentitiesClient

type UserIdentitiesClient struct {
	// contains filtered or unexported fields
}

UserIdentitiesClient contains the methods for the UserIdentities group. Don't use this type directly, use NewUserIdentitiesClient() instead.

func NewUserIdentitiesClient

func NewUserIdentitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UserIdentitiesClient, error)

NewUserIdentitiesClient creates a new instance of UserIdentitiesClient 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 (*UserIdentitiesClient) NewListPager

func (client *UserIdentitiesClient) NewListPager(resourceGroupName string, serviceName string, userID string, options *UserIdentitiesClientListOptions) *runtime.Pager[UserIdentitiesClientListResponse]

NewListPager - List of all user identities.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • userID - User identifier. Must be unique in the current API Management service instance.
  • options - UserIdentitiesClientListOptions contains the optional parameters for the UserIdentitiesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListUserIdentities.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewUserIdentitiesClient().NewListPager("rg1", "apimService1", "57f2af53bb17172280f44057", 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.UserIdentityCollection = armapimanagement.UserIdentityCollection{
	// 	Value: []*armapimanagement.UserIdentityContract{
	// 		{
	// 			ID: to.Ptr("086cf9********55ab"),
	// 			Provider: to.Ptr("Microsoft"),
	// 	}},
	// }
}
Output:

type UserIdentitiesClientListOptions

type UserIdentitiesClientListOptions struct {
}

UserIdentitiesClientListOptions contains the optional parameters for the UserIdentitiesClient.NewListPager method.

type UserIdentitiesClientListResponse

type UserIdentitiesClientListResponse struct {
	// List of Users Identity list representation.
	UserIdentityCollection
}

UserIdentitiesClientListResponse contains the response from method UserIdentitiesClient.NewListPager.

type UserIdentityCollection

type UserIdentityCollection struct {
	// Total record count number across all pages.
	Count *int64

	// Next page link if any.
	NextLink *string

	// User Identity values.
	Value []*UserIdentityContract
}

UserIdentityCollection - List of Users Identity list representation.

func (UserIdentityCollection) MarshalJSON

func (u UserIdentityCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserIdentityCollection.

func (*UserIdentityCollection) UnmarshalJSON

func (u *UserIdentityCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserIdentityCollection.

type UserIdentityContract

type UserIdentityContract struct {
	// Identifier value within provider.
	ID *string

	// Identity provider name.
	Provider *string
}

UserIdentityContract - User identity details.

func (UserIdentityContract) MarshalJSON

func (u UserIdentityContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserIdentityContract.

func (*UserIdentityContract) UnmarshalJSON

func (u *UserIdentityContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserIdentityContract.

type UserIdentityProperties

type UserIdentityProperties struct {
	// The client id of user assigned identity.
	ClientID *string

	// The principal id of user assigned identity.
	PrincipalID *string
}

func (UserIdentityProperties) MarshalJSON

func (u UserIdentityProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserIdentityProperties.

func (*UserIdentityProperties) UnmarshalJSON

func (u *UserIdentityProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserIdentityProperties.

type UserState

type UserState string

UserState - Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active.

const (
	// UserStateActive - User state is active.
	UserStateActive UserState = "active"
	// UserStateBlocked - User is blocked. Blocked users cannot authenticate at developer portal or call API.
	UserStateBlocked UserState = "blocked"
	// UserStateDeleted - User account is closed. All identities and related entities are removed.
	UserStateDeleted UserState = "deleted"
	// UserStatePending - User account is pending. Requires identity confirmation before it can be made active.
	UserStatePending UserState = "pending"
)

func PossibleUserStateValues

func PossibleUserStateValues() []UserState

PossibleUserStateValues returns the possible values for the UserState const type.

type UserSubscriptionClient

type UserSubscriptionClient struct {
	// contains filtered or unexported fields
}

UserSubscriptionClient contains the methods for the UserSubscription group. Don't use this type directly, use NewUserSubscriptionClient() instead.

func NewUserSubscriptionClient

func NewUserSubscriptionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UserSubscriptionClient, error)

NewUserSubscriptionClient creates a new instance of UserSubscriptionClient 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 (*UserSubscriptionClient) Get

func (client *UserSubscriptionClient) Get(ctx context.Context, resourceGroupName string, serviceName string, userID string, sid string, options *UserSubscriptionClientGetOptions) (UserSubscriptionClientGetResponse, error)

Get - Gets the specified Subscription entity associated with a particular user. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • userID - User identifier. Must be unique in the current API Management service instance.
  • sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
  • options - UserSubscriptionClientGetOptions contains the optional parameters for the UserSubscriptionClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetUserSubscription.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewUserSubscriptionClient().Get(ctx, "rg1", "apimService1", "1", "5fa9b096f3df14003c070001", 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.SubscriptionContract = armapimanagement.SubscriptionContract{
// 	Name: to.Ptr("5fa9b096f3df14003c070001"),
// 	Type: to.Ptr("Microsoft.ApiManagement/service/users/subscriptions"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1/subscriptions/5fa9b096f3df14003c070001"),
// 	Properties: &armapimanagement.SubscriptionContractProperties{
// 		AllowTracing: to.Ptr(true),
// 		CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-09T21:11:50.580Z"); return t}()),
// 		OwnerID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1"),
// 		Scope: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/starter"),
// 		State: to.Ptr(armapimanagement.SubscriptionStateActive),
// 	},
// }
Output:

func (*UserSubscriptionClient) NewListPager

func (client *UserSubscriptionClient) NewListPager(resourceGroupName string, serviceName string, userID string, options *UserSubscriptionClientListOptions) *runtime.Pager[UserSubscriptionClientListResponse]

NewListPager - Lists the collection of subscriptions of the specified user.

Generated from API version 2022-08-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • serviceName - The name of the API Management service.
  • userID - User identifier. Must be unique in the current API Management service instance.
  • options - UserSubscriptionClientListOptions contains the optional parameters for the UserSubscriptionClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4cd95123fb961c68740565a1efcaa5e43bd35802/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListUserSubscriptions.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapimanagement.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewUserSubscriptionClient().NewListPager("rg1", "apimService1", "57681833a40f7eb6c49f6acf", &armapimanagement.UserSubscriptionClientListOptions{Filter: nil,
	Top:  nil,
	Skip: 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.SubscriptionCollection = armapimanagement.SubscriptionCollection{
	// 	Value: []*armapimanagement.SubscriptionContract{
	// 		{
	// 			Name: to.Ptr("57681850a40f7eb6c49f6ae3"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/users/subscriptions"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57681833a40f7eb6c49f6acf/subscriptions/57681850a40f7eb6c49f6ae3"),
	// 			Properties: &armapimanagement.SubscriptionContractProperties{
	// 				CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-06-20T16:22:39.547Z"); return t}()),
	// 				DisplayName: to.Ptr("57681850a40f7eb6c49f6ae5"),
	// 				OwnerID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57681833a40f7eb6c49f6acf"),
	// 				Scope: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5768181ea40f7eb6c49f6ac7"),
	// 				StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-06-20T00:00:00.000Z"); return t}()),
	// 				State: to.Ptr(armapimanagement.SubscriptionStateActive),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("57681850a40f7eb6c49f6b2b"),
	// 			Type: to.Ptr("Microsoft.ApiManagement/service/users/subscriptions"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57681833a40f7eb6c49f6acf/subscriptions/57681850a40f7eb6c49f6b2b"),
	// 			Properties: &armapimanagement.SubscriptionContractProperties{
	// 				CreatedDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-06-20T16:22:41.103Z"); return t}()),
	// 				DisplayName: to.Ptr("57681850a40f7eb6c49f6b2d"),
	// 				OwnerID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57681833a40f7eb6c49f6acf"),
	// 				Scope: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5768181ea40f7eb6c49f6ac7"),
	// 				StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-06-20T00:00:00.000Z"); return t}()),
	// 				State: to.Ptr(armapimanagement.SubscriptionStateActive),
	// 			},
	// 	}},
	// }
}
Output:

type UserSubscriptionClientGetOptions

type UserSubscriptionClientGetOptions struct {
}

UserSubscriptionClientGetOptions contains the optional parameters for the UserSubscriptionClient.Get method.

type UserSubscriptionClientGetResponse

type UserSubscriptionClientGetResponse struct {
	// Subscription details.
	SubscriptionContract

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

UserSubscriptionClientGetResponse contains the response from method UserSubscriptionClient.Get.

type UserSubscriptionClientListOptions

type UserSubscriptionClientListOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|------------------------|-----------------------------------|
	// |name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// |displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// |stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// |ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// |scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// |userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// |productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string

	// Number of records to skip.
	Skip *int32

	// Number of records to return.
	Top *int32
}

UserSubscriptionClientListOptions contains the optional parameters for the UserSubscriptionClient.NewListPager method.

type UserSubscriptionClientListResponse

type UserSubscriptionClientListResponse struct {
	// Paged Subscriptions list representation.
	SubscriptionCollection
}

UserSubscriptionClientListResponse contains the response from method UserSubscriptionClient.NewListPager.

type UserTokenParameterProperties

type UserTokenParameterProperties struct {
	// REQUIRED; The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following
	// format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
	Expiry *time.Time

	// REQUIRED; The Key to be used to generate token for user.
	KeyType *KeyType
}

UserTokenParameterProperties - Parameters supplied to the Get User Token operation.

func (UserTokenParameterProperties) MarshalJSON

func (u UserTokenParameterProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserTokenParameterProperties.

func (*UserTokenParameterProperties) UnmarshalJSON

func (u *UserTokenParameterProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserTokenParameterProperties.

type UserTokenParameters

type UserTokenParameters struct {
	// User Token Parameter contract properties.
	Properties *UserTokenParameterProperties
}

UserTokenParameters - Get User Token parameters.

func (UserTokenParameters) MarshalJSON

func (u UserTokenParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserTokenParameters.

func (*UserTokenParameters) UnmarshalJSON

func (u *UserTokenParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserTokenParameters.

type UserTokenResult

type UserTokenResult struct {
	// Shared Access Authorization token for the User.
	Value *string
}

UserTokenResult - Get User Token response details.

func (UserTokenResult) MarshalJSON

func (u UserTokenResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserTokenResult.

func (*UserTokenResult) UnmarshalJSON

func (u *UserTokenResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserTokenResult.

type UserUpdateParameters

type UserUpdateParameters struct {
	// User entity update contract properties.
	Properties *UserUpdateParametersProperties
}

UserUpdateParameters - User update parameters.

func (UserUpdateParameters) MarshalJSON

func (u UserUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserUpdateParameters.

func (*UserUpdateParameters) UnmarshalJSON

func (u *UserUpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserUpdateParameters.

type UserUpdateParametersProperties

type UserUpdateParametersProperties struct {
	// Email address. Must not be empty and must be unique within the service instance.
	Email *string

	// First name.
	FirstName *string

	// Collection of user identities.
	Identities []*UserIdentityContract

	// Last name.
	LastName *string

	// Optional note about a user set by the administrator.
	Note *string

	// User Password.
	Password *string

	// Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal
	// or call any APIs of subscribed products. Default state is Active.
	State *UserState
}

UserUpdateParametersProperties - Parameters supplied to the Update User operation.

func (UserUpdateParametersProperties) MarshalJSON

func (u UserUpdateParametersProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserUpdateParametersProperties.

func (*UserUpdateParametersProperties) UnmarshalJSON

func (u *UserUpdateParametersProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserUpdateParametersProperties.

type Verbosity

type Verbosity string

Verbosity - The verbosity level applied to traces emitted by trace policies.

const (
	// VerbosityError - Only traces with 'severity' set to 'error' will be sent to the logger attached to this diagnostic instance.
	VerbosityError Verbosity = "error"
	// VerbosityInformation - Traces with 'severity' set to 'information' and 'error' will be sent to the logger attached to this
	// diagnostic instance.
	VerbosityInformation Verbosity = "information"
	// VerbosityVerbose - All the traces emitted by trace policies will be sent to the logger attached to this diagnostic instance.
	VerbosityVerbose Verbosity = "verbose"
)

func PossibleVerbosityValues

func PossibleVerbosityValues() []Verbosity

PossibleVerbosityValues returns the possible values for the Verbosity const type.

type VersioningScheme

type VersioningScheme string

VersioningScheme - An value that determines where the API Version identifier will be located in a HTTP request.

const (
	// VersioningSchemeHeader - The API Version is passed in a HTTP header.
	VersioningSchemeHeader VersioningScheme = "Header"
	// VersioningSchemeQuery - The API Version is passed in a query parameter.
	VersioningSchemeQuery VersioningScheme = "Query"
	// VersioningSchemeSegment - The API Version is passed in a path segment.
	VersioningSchemeSegment VersioningScheme = "Segment"
)

func PossibleVersioningSchemeValues

func PossibleVersioningSchemeValues() []VersioningScheme

PossibleVersioningSchemeValues returns the possible values for the VersioningScheme const type.

type VirtualNetworkConfiguration

type VirtualNetworkConfiguration struct {
	// The full resource ID of a subnet in a virtual network to deploy the API Management service in.
	SubnetResourceID *string

	// READ-ONLY; The name of the subnet.
	Subnetname *string

	// READ-ONLY; The virtual network ID. This is typically a GUID. Expect a null GUID by default.
	Vnetid *string
}

VirtualNetworkConfiguration - Configuration of a virtual network to which API Management service is deployed.

func (VirtualNetworkConfiguration) MarshalJSON

func (v VirtualNetworkConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualNetworkConfiguration.

func (*VirtualNetworkConfiguration) UnmarshalJSON

func (v *VirtualNetworkConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkConfiguration.

type VirtualNetworkType

type VirtualNetworkType string

VirtualNetworkType - The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only.

const (
	// VirtualNetworkTypeExternal - The service is part of Virtual Network and it is accessible from Internet.
	VirtualNetworkTypeExternal VirtualNetworkType = "External"
	// VirtualNetworkTypeInternal - The service is part of Virtual Network and it is only accessible from within the virtual network.
	VirtualNetworkTypeInternal VirtualNetworkType = "Internal"
	// VirtualNetworkTypeNone - The service is not part of any Virtual Network.
	VirtualNetworkTypeNone VirtualNetworkType = "None"
)

func PossibleVirtualNetworkTypeValues

func PossibleVirtualNetworkTypeValues() []VirtualNetworkType

PossibleVirtualNetworkTypeValues returns the possible values for the VirtualNetworkType const type.

type WikiCollection

type WikiCollection struct {
	// READ-ONLY; Next page link if any.
	NextLink *string

	// READ-ONLY; Page values.
	Value []*WikiContract
}

WikiCollection - Paged Wiki list representation.

func (WikiCollection) MarshalJSON

func (w WikiCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WikiCollection.

func (*WikiCollection) UnmarshalJSON

func (w *WikiCollection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WikiCollection.

type WikiContract

type WikiContract struct {
	// Wiki details.
	Properties *WikiContractProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

WikiContract - Wiki properties

func (WikiContract) MarshalJSON

func (w WikiContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WikiContract.

func (*WikiContract) UnmarshalJSON

func (w *WikiContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WikiContract.

type WikiContractProperties

type WikiContractProperties struct {
	// Collection wiki documents included into this wiki.
	Documents []*WikiDocumentationContract
}

WikiContractProperties - Wiki contract details

func (WikiContractProperties) MarshalJSON

func (w WikiContractProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WikiContractProperties.

func (*WikiContractProperties) UnmarshalJSON

func (w *WikiContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WikiContractProperties.

type WikiDocumentationContract

type WikiDocumentationContract struct {
	// Documentation Identifier
	DocumentationID *string
}

WikiDocumentationContract - Wiki documentation details.

func (WikiDocumentationContract) MarshalJSON

func (w WikiDocumentationContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WikiDocumentationContract.

func (*WikiDocumentationContract) UnmarshalJSON

func (w *WikiDocumentationContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WikiDocumentationContract.

type WikiUpdateContract

type WikiUpdateContract struct {
	// Wiki details.
	Properties *WikiContractProperties
}

WikiUpdateContract - Wiki update contract details.

func (WikiUpdateContract) MarshalJSON

func (w WikiUpdateContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WikiUpdateContract.

func (*WikiUpdateContract) UnmarshalJSON

func (w *WikiUpdateContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WikiUpdateContract.

type X509CertificateName

type X509CertificateName struct {
	// Thumbprint for the Issuer of the Certificate.
	IssuerCertificateThumbprint *string

	// Common Name of the Certificate.
	Name *string
}

X509CertificateName - Properties of server X509Names.

func (X509CertificateName) MarshalJSON

func (x X509CertificateName) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type X509CertificateName.

func (*X509CertificateName) UnmarshalJSON

func (x *X509CertificateName) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type X509CertificateName.

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL