armapimanagement

package module
v2.0.0-...-45adee8 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: MIT Imports: 15 Imported by: 0

README

Azure API Management Module for Go

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/v2

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"),
// 		},
// 	}
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"),
// 		},
// 	}
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"),
// 		},
// 	}
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"),
// 		},
// 	}
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"),
// 		},
// 	}
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"),
// 		},
// 	}
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"),
// 		},
// 	}
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"),
// 		},
// 	}
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"),
// 		},
// 	}
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"),
// 		},
// 	}
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"),
// 					},
// 				}
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"),
// 			},
// 		}
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"),
// 		},
// 	}
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"),
// 		},
// 	}
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"),
// 		},
// 	}
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"),
// 		},
// 	}

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)
}

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"),
// 		},
// 	}
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"),
// 		},
// 	}

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)
}

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"),
	// 							},
	// 					}},
	// 				}
}

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"),
	// 			},
	// 	}},
	// }
}

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"),
// 		},
// 	}

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),
// 						},
// 					},
// 				}

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)
}

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),
// 		},
// 	},
// }

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)
}

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),
	// 				},
	// 			},
	// 	}},
	// }
}

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),
// 		},
// 	},
// }

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"),
// 	},
// }
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"),
// 	},
// }

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."),
// 	},
// }

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)
}

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."),
// 	},
// }

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)
}

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."),
	// 			},
	// 	}},
	// }
}

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"),
// 	},
// }

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)
}

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"),
// 	},
// }

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)
}

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"),
	// 			},
	// 	}},
	// }
}

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"),
// 	},
// }

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"),
// 	},
// }

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)
}

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"),
// 	},
// }

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)
}

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"),
	// 			},
	// 	}},
	// }
}

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"),
// 	},
// }

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)
}

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"),
// 	},
// }
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}"),
// 	},
// }

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)
}

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"),
	// 			},
	// 	}},
	// }
}

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"),
// 	},
// }

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>"),
// 	},
// }

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)
}

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>"),
// 	},
// }

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)
}

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>"),
// 			},
// 	}},
// }

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>"),
// 	},
// }
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>"),
// 	},
// }

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)
}

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>"),
// 	},
// }

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)
}

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>"),
// 			},
// 	}},
// }

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"),
	// 			},
	// 	}},
	// }
}

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}()),
// 	},
// }

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)
}

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}()),
// 	},
// }

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)
}

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}()),
	// 			},
	// 	}},
	// }
}

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}()),
// 	},
// }

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}()),
	// 	}},
	// }
}

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>"),
// 		},
// 	},
// }

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)
}

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>"),
// 		},
// 	},
// }

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)
}

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>"),
	// 				},
	// 			},
	// 	}},
	// }
}

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"),
// 	},
// }

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)
}

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"),
// 	},
// }

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)
}

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"),
	// 			},
	// 	}},
	// }
}

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),
// 	},
// }

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)
}

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),
// 	},
// }

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)
}

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),
	// 			},
	// 	}},
	// }
}

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),
// 	},
// }

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"),
// 		}},
// 	},
// }

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)
}

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"),
// 		}},
// 	},
// }

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)
}

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"),
// 		}},
// 	},
// }

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"),
	// 				}},
	// 			},
	// 	}},
	// }
}

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"),
// 	},
// }

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)
}

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"),
// 	},
// }

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"),
	// 			},
	// 	}},
	// }
}

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)
}

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"),
// 	},
// }
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"),
// 	},
// }

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)
}

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"),
// 	},
// }

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"),
	// 			},
	// 	}},
	// }
}
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"),
	// 			},
	// 	}},
	// }
}

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"),
// }

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"),
// 		},
// 	},
// }
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"),
// 		},
// 	},
// }
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"),
// 		},
// 	},
// }
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"),
// 		},
// 	},
// }

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)
}

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"),
// 		},
// 	},
// }

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"),
	// 				},
	// 			},
	// 	}},
	// }
}

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),
// 				},
// 			}

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)
}

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),
// 					},
// 				}

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)
}

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"),
// }

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),
	// 										},
	// 								}},
	// 							}
}

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),
// 					},
// 				}

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),
// 			},
// 		}
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),
// 		},
// 	}

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)
}

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),
// 		},
// 	}

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)
}

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),
	// 						},
	// 				}},
	// 			}
}

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)
}

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),
// 			},
// 		}

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"),
// 	},
// }

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)
}

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"),
// 	},
// }

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)
}

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"),
	// 			},
	// 	}},
	// }
}

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"),
// 	},
// }

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"),
// 	},
// }
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"),
// 	},
// }

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)
}

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"),
// 	},
// }
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"),
// 	},
// }

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)
}

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"),
	// 			},
	// 	}},
	// }
}

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"),
// 	},
// }

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),
// 	}
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),
// 	}

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",
// 		},
// 	},
// }

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)
}

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",
// 		},
// 	},
// }

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)
}

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",
	// 				},
	// 			},
	// 	}},
	// }
}

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"),
// 	},
// }

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)
}

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"),
// 	},
// }

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"),
	// 			},
	// 	}},
	// }
}

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),
// 		},
// 	},
// }

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),
// 		},
// 	},
// }

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)
}

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>"),
// }

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)
}

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)
}

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"),
// 	},
// }

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"),
	// 			},
	// 	}},
	// }
}

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),
// 						},
// 					},
// 				}

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)
}

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),
// 		},
// 	},
// }

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)
}

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),
	// 				},
	// 			},
	// 	}},
	// }
}

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),
// 						},
// 					},
// 				}

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"),
// 	},
// }

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)
}

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"),
// 	},
// }

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)
}

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"),
	// 			},
	// 	}},
	// }
}

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"),
// 	},
// }

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"),
// 	},
// }

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)
}

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"),
// 	},
// }

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)
}

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"),
	// 			},
	// 	}},
	// }
}

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"),
// 	},
// }

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"),
// 		},
// 	}

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)
}

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)
}

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"),
	// 				},
	// 		}},
	// 	}
}

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),
// 	},
// }

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)
}

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),
// 	},
// }

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)
}

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),
	// 			},
	// 	}},
	// }
}

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"),
// 		},
// 	},
// }

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)
}

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=="),
// }

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"),
// 		},
// 	},
// }

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)
}

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"),
// }

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"),
	// 				},
	// 			},
	// 	}},
	// }
}

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)
}

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"),
// 		},
// 	},
// }

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),
// 	},
// }

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)
}

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),
// 	},
// }

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)
}

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),
	// 			},
	// 	}},
	// }
}

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>",
// 	},
// }
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),
// 	},
// }

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)
}

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>",
// 	},
// }
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),
// 	},
// }

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)
}

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),
	// 			},
	// 	}},
	// }
}

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"),
// 	},
// }

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)
}

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"),
// 	},
// }

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)
}

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"),
	// 			},
	// 	}},
	// }
}

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"),
// 	},
// }

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>"),
// 	},
// }

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)
}

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>"),
// 	},
// }

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)
}

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>"),
	// 			},
	// 	}},
	// }
}

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"),
// 	},
// }
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"),
// 	},
// }

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)
}

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"),
// 	},
// }

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)
}

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"),
	// 			},
	// 	}},
	// }
}

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"),
// 	},
// }

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)
}

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}()),
// 	},
// }

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)
}

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}()),
	// 			},
	// 	}},
	// }
}

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"),
// 	},
// }

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)
}

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"),
// 		},
// 	}

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)
}

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"),
// }

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"),
	// 					},
	// 			}},
	// 		}
}

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"),
// 		},
// 	}

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"),
// 	},
// }

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"),
	// 			},
	// 	}},
	// }
}

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),
// 	},
// }
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),
// 	},
// }

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)
}

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"),
// 	},
// }

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)
}

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),
	// 			},
	// 	}},
	// }
}

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),
// 	},
// }

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"),
// 		},
// 	}
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}()),
// 				},
// 			},
// 		},
// 	}

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}()),
// 				},
// 			},
// 		},
// 	}

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"),
// 		},
// 	}

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)
}

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"),
// 		},
// 	}
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}()),
// 				},
// 			},
// 		},
// 	}

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)
}

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"),
// }

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}()),
	// 						},
	// 					},
	// 				},
	// 		}},
	// 	}
}

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")},
// 	}

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")},
// 			},
// 	}}

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)"),
// 			},
// 		}

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)"),
// 			},
// 		}

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"),
	// 											},
	// 									}},
	// 								}
}

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)
}

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"),
// 	},
// }

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)
}

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"),
// 			},
// 	}},
// }

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)
}

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"),
// 	},
// }

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)
}

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"),
// 			},
// 	}},
// }

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),
// 	},
// }

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)
}

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),
// 	},
// }

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)
}

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"),
// }

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),
	// 			},
	// 	}},
	// }
}

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),
// 	},
// }

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"),
	// 			},
	// 	}},
	// }
}

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"),
	// 			},
	// 	}},
	// }
}

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"),
// 					}},
// 			}},
// 	}},
// }

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>"),
// 	},
// }

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)
}

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>"),
// 	},
// }
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>"),
// 	},
// }

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)
}

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>"),
// 			},
// 	}},
// }

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),
// 			},
// 	}},
// }

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\" />"),
// 	},
// }

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)
}

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>"),
// 	},
// }
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>"),
// 	},
// }

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)
}

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>"),
// 			},
// 	}},
// }

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"),
// 	}},
// }

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."),
// 						},
// 					},
// 				},
// 			}

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."),
// 						},
// 					},
// 				},
// 			}

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)
}

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."),
// 								},
// 							},
// 						},
// 				}},
// 			}

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."),
// 						},
// 					},
// 				},
// 			}

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)
}

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}()),
// 	},
// }

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}()),
// 	},
// }

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)
}

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}()),
	// 			},
	// 	}},
	// }
}

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"),
// 				},
// 			},
// 	}},
// }

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),
// 	},
// }

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)
}

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),
// 	},
// }

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")},
// 			},
// 		}

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")},
// 					},
// 			}},
// 		}

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),
	// 			},
	// 	}},
	// }
}

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)
}

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"),
// 		},
// 	}

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)
}

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"),
	// 				},
	// 		}},
	// 	}
}

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"),
// 	},
// }

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)
}

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"),
// 	},
// }

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)
}

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"),
	// 			},
	// 	}},
	// }
}

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"),
	// 			},
	// 	}},
	// }
}

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"),
// 	},
// }

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 ProductC