armapimanagement

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: MIT Imports: 15 Imported by: 10

README

Azure API Management Module for Go

PkgGoDev

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

Source code

Getting started

Prerequisites

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure API Management module:

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

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure API Management. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Clients

Azure API Management modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential.

client := armapimanagement.NewTagClient(<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{
    Host: arm.AzureChina,
}
client := armapimanagement.NewTagClient(<subscription ID>, cred, &options)

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

NewAPIClient creates a new instance of APIClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*APIClient) BeginCreateOrUpdate

func (client *APIClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, parameters APICreateOrUpdateParameter, options *APIClientBeginCreateOrUpdateOptions) (APIClientCreateOrUpdatePollerResponse, 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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApi.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIClient("<subscription-id>", cred, nil)
	poller, err := client.BeginCreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		armapimanagement.APICreateOrUpdateParameter{
			Properties: &armapimanagement.APICreateOrUpdateProperties{
				Description: to.StringPtr("<description>"),
				AuthenticationSettings: &armapimanagement.AuthenticationSettingsContract{
					OAuth2: &armapimanagement.OAuth2AuthenticationSettingsContract{
						AuthorizationServerID: to.StringPtr("<authorization-server-id>"),
						Scope:                 to.StringPtr("<scope>"),
					},
				},
				SubscriptionKeyParameterNames: &armapimanagement.SubscriptionKeyParameterNamesContract{
					Header: to.StringPtr("<header>"),
					Query:  to.StringPtr("<query>"),
				},
				Path:        to.StringPtr("<path>"),
				DisplayName: to.StringPtr("<display-name>"),
				Protocols: []*armapimanagement.Protocol{
					armapimanagement.Protocol("https").ToPtr(),
					armapimanagement.Protocol("http").ToPtr()},
				ServiceURL: to.StringPtr("<service-url>"),
			},
		},
		&armapimanagement.APIClientBeginCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APIClientCreateOrUpdateResult)
}
Output:

func (*APIClient) Delete

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

Delete - Deletes the specified API of the API Management service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApi.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<if-match>",
		&armapimanagement.APIClientDeleteOptions{DeleteRevisions: nil})
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*APIClient) Get

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

Get - Gets the details of the API specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiContract.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APIClientGetResult)
}
Output:

func (*APIClient) GetEntityTag

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

GetEntityTag - Gets the entity state (Etag) version of the API specified by its identifier. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApi.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*APIClient) ListByService

func (client *APIClient) ListByService(resourceGroupName string, serviceName string, options *APIClientListByServiceOptions) *APIClientListByServicePager

ListByService - Lists all APIs of the API Management service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - APIClientListByServiceOptions contains the optional parameters for the APIClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApis.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		&armapimanagement.APIClientListByServiceOptions{Filter: nil,
			Top:                 nil,
			Skip:                nil,
			Tags:                nil,
			ExpandAPIVersionSet: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*APIClient) ListByTags

func (client *APIClient) ListByTags(resourceGroupName string, serviceName string, options *APIClientListByTagsOptions) *APIClientListByTagsPager

ListByTags - Lists a collection of apis associated with tags. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - APIClientListByTagsOptions contains the optional parameters for the APIClient.ListByTags method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApisByTags.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIClient("<subscription-id>", cred, nil)
	pager := client.ListByTags("<resource-group-name>",
		"<service-name>",
		&armapimanagement.APIClientListByTagsOptions{Filter: nil,
			Top:                  nil,
			Skip:                 nil,
			IncludeNotTaggedApis: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*APIClient) Update

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

Update - Updates the specified API of the API Management service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateApi.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<if-match>",
		armapimanagement.APIUpdateContract{
			Properties: &armapimanagement.APIContractUpdateProperties{
				Path:        to.StringPtr("<path>"),
				DisplayName: to.StringPtr("<display-name>"),
				ServiceURL:  to.StringPtr("<service-url>"),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APIClientUpdateResult)
}
Output:

type APIClientBeginCreateOrUpdateOptions added in v0.3.0

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

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

type APIClientCreateOrUpdatePoller added in v0.3.0

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

APIClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state.

func (*APIClientCreateOrUpdatePoller) Done added in v0.3.0

Done returns true if the LRO has reached a terminal state.

func (*APIClientCreateOrUpdatePoller) FinalResponse added in v0.3.0

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final APIClientCreateOrUpdateResponse will be returned.

func (*APIClientCreateOrUpdatePoller) Poll added in v0.3.0

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*APIClientCreateOrUpdatePoller) ResumeToken added in v0.3.0

func (p *APIClientCreateOrUpdatePoller) ResumeToken() (string, error)

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type APIClientCreateOrUpdatePollerResponse added in v0.3.0

type APIClientCreateOrUpdatePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *APIClientCreateOrUpdatePoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIClientCreateOrUpdatePollerResponse contains the response from method APIClient.CreateOrUpdate.

func (APIClientCreateOrUpdatePollerResponse) PollUntilDone added in v0.3.0

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*APIClientCreateOrUpdatePollerResponse) Resume added in v0.3.0

Resume rehydrates a APIClientCreateOrUpdatePollerResponse from the provided client and resume token.

type APIClientCreateOrUpdateResponse added in v0.3.0

type APIClientCreateOrUpdateResponse struct {
	APIClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIClientCreateOrUpdateResponse contains the response from method APIClient.CreateOrUpdate.

type APIClientCreateOrUpdateResult added in v0.3.0

type APIClientCreateOrUpdateResult struct {
	APIContract
}

APIClientCreateOrUpdateResult contains the result from method APIClient.CreateOrUpdate.

type APIClientDeleteOptions added in v0.3.0

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

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

type APIClientDeleteResponse added in v0.3.0

type APIClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIClientDeleteResponse contains the response from method APIClient.Delete.

type APIClientGetEntityTagOptions added in v0.3.0

type APIClientGetEntityTagOptions struct {
}

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

type APIClientGetEntityTagResponse added in v0.3.0

type APIClientGetEntityTagResponse struct {
	APIClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIClientGetEntityTagResponse contains the response from method APIClient.GetEntityTag.

type APIClientGetEntityTagResult added in v0.3.0

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

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

APIClientGetEntityTagResult contains the result from method APIClient.GetEntityTag.

type APIClientGetOptions added in v0.3.0

type APIClientGetOptions struct {
}

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

type APIClientGetResponse added in v0.3.0

type APIClientGetResponse struct {
	APIClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIClientGetResponse contains the response from method APIClient.Get.

type APIClientGetResult added in v0.3.0

type APIClientGetResult struct {
	APIContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIClientGetResult contains the result from method APIClient.Get.

type APIClientListByServiceOptions added in v0.3.0

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.ListByService method.

type APIClientListByServicePager added in v0.3.0

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

APIClientListByServicePager provides operations for iterating over paged responses.

func (*APIClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*APIClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*APIClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current APIClientListByServiceResponse page.

type APIClientListByServiceResponse added in v0.3.0

type APIClientListByServiceResponse struct {
	APIClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIClientListByServiceResponse contains the response from method APIClient.ListByService.

type APIClientListByServiceResult added in v0.3.0

type APIClientListByServiceResult struct {
	APICollection
}

APIClientListByServiceResult contains the result from method APIClient.ListByService.

type APIClientListByTagsOptions added in v0.3.0

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.ListByTags method.

type APIClientListByTagsPager added in v0.3.0

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

APIClientListByTagsPager provides operations for iterating over paged responses.

func (*APIClientListByTagsPager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*APIClientListByTagsPager) NextPage added in v0.3.0

func (p *APIClientListByTagsPager) NextPage(ctx context.Context) bool

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*APIClientListByTagsPager) PageResponse added in v0.3.0

PageResponse returns the current APIClientListByTagsResponse page.

type APIClientListByTagsResponse added in v0.3.0

type APIClientListByTagsResponse struct {
	APIClientListByTagsResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIClientListByTagsResponse contains the response from method APIClient.ListByTags.

type APIClientListByTagsResult added in v0.3.0

type APIClientListByTagsResult struct {
	TagResourceCollection
}

APIClientListByTagsResult contains the result from method APIClient.ListByTags.

type APIClientUpdateOptions added in v0.3.0

type APIClientUpdateOptions struct {
}

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

type APIClientUpdateResponse added in v0.3.0

type APIClientUpdateResponse struct {
	APIClientUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIClientUpdateResponse contains the response from method APIClient.Update.

type APIClientUpdateResult added in v0.3.0

type APIClientUpdateResult struct {
	APIContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIClientUpdateResult contains the result from method APIClient.Update.

type APICollection

type APICollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// READ-ONLY; Next page link if any.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; Page values.
	Value []*APIContract `json:"value,omitempty" azure:"ro"`
}

APICollection - Paged API list representation.

func (APICollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller 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 `json:"email,omitempty"`

	// The identifying name of the contact person/organization
	Name *string `json:"name,omitempty"`

	// The URL pointing to the contact information. MUST be in the format of a URL
	URL *string `json:"url,omitempty"`
}

APIContactInformation - API contact information

type APIContract

type APIContract struct {
	// API entity contract properties.
	Properties *APIContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

APIContract - API details.

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 `json:"path,omitempty"`

	// Describes the revision of the API. If no value is provided, default revision 1 is created
	APIRevision *string `json:"apiRevision,omitempty"`

	// Description of the API Revision.
	APIRevisionDescription *string `json:"apiRevisionDescription,omitempty"`

	// Type of API.
	APIType *APIType `json:"type,omitempty"`

	// Indicates the version identifier of the API if the API is versioned
	APIVersion *string `json:"apiVersion,omitempty"`

	// Description of the API Version.
	APIVersionDescription *string `json:"apiVersionDescription,omitempty"`

	// Version set details
	APIVersionSet *APIVersionSetContractDetails `json:"apiVersionSet,omitempty"`

	// A resource identifier for the related ApiVersionSet.
	APIVersionSetID *string `json:"apiVersionSetId,omitempty"`

	// Collection of authentication settings included into this API.
	AuthenticationSettings *AuthenticationSettingsContract `json:"authenticationSettings,omitempty"`

	// Contact information for the API.
	Contact *APIContactInformation `json:"contact,omitempty"`

	// Description of the API. May include HTML formatting tags.
	Description *string `json:"description,omitempty"`

	// API name. Must be 1 to 300 characters long.
	DisplayName *string `json:"displayName,omitempty"`

	// Indicates if API revision is current api revision.
	IsCurrent *bool `json:"isCurrent,omitempty"`

	// License information for the API.
	License *APILicenseInformation `json:"license,omitempty"`

	// Describes on which protocols the operations in this API can be invoked.
	Protocols []*Protocol `json:"protocols,omitempty"`

	// Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long.
	ServiceURL *string `json:"serviceUrl,omitempty"`

	// API identifier of the source API.
	SourceAPIID *string `json:"sourceApiId,omitempty"`

	// Protocols over which API is made available.
	SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract `json:"subscriptionKeyParameterNames,omitempty"`

	// Specifies whether an API or Product subscription is required for accessing the API.
	SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`

	// A URL to the Terms of Service for the API. MUST be in the format of a URL.
	TermsOfServiceURL *string `json:"termsOfServiceUrl,omitempty"`

	// READ-ONLY; Indicates if API revision is accessible via the gateway.
	IsOnline *bool `json:"isOnline,omitempty" azure:"ro"`
}

APIContractProperties - API Entity Properties

func (APIContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller 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 `json:"apiRevision,omitempty"`

	// Description of the API Revision.
	APIRevisionDescription *string `json:"apiRevisionDescription,omitempty"`

	// Type of API.
	APIType *APIType `json:"type,omitempty"`

	// Indicates the version identifier of the API if the API is versioned
	APIVersion *string `json:"apiVersion,omitempty"`

	// Description of the API Version.
	APIVersionDescription *string `json:"apiVersionDescription,omitempty"`

	// A resource identifier for the related ApiVersionSet.
	APIVersionSetID *string `json:"apiVersionSetId,omitempty"`

	// Collection of authentication settings included into this API.
	AuthenticationSettings *AuthenticationSettingsContract `json:"authenticationSettings,omitempty"`

	// Contact information for the API.
	Contact *APIContactInformation `json:"contact,omitempty"`

	// Description of the API. May include HTML formatting tags.
	Description *string `json:"description,omitempty"`

	// API name.
	DisplayName *string `json:"displayName,omitempty"`

	// Indicates if API revision is current api revision.
	IsCurrent *bool `json:"isCurrent,omitempty"`

	// License information for the API.
	License *APILicenseInformation `json:"license,omitempty"`

	// 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 `json:"path,omitempty"`

	// Describes on which protocols the operations in this API can be invoked.
	Protocols []*Protocol `json:"protocols,omitempty"`

	// Absolute URL of the backend service implementing this API.
	ServiceURL *string `json:"serviceUrl,omitempty"`

	// Protocols over which API is made available.
	SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract `json:"subscriptionKeyParameterNames,omitempty"`

	// Specifies whether an API or Product subscription is required for accessing the API.
	SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`

	// A URL to the Terms of Service for the API. MUST be in the format of a URL.
	TermsOfServiceURL *string `json:"termsOfServiceUrl,omitempty"`

	// READ-ONLY; Indicates if API revision is accessible via the gateway.
	IsOnline *bool `json:"isOnline,omitempty" azure:"ro"`
}

APIContractUpdateProperties - API update contract properties.

func (APIContractUpdateProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIContractUpdateProperties.

type APICreateOrUpdateParameter

type APICreateOrUpdateParameter struct {
	// API entity create of update properties.
	Properties *APICreateOrUpdateProperties `json:"properties,omitempty"`
}

APICreateOrUpdateParameter - API Create or Update Parameters.

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 `json:"path,omitempty"`

	// Describes the revision of the API. If no value is provided, default revision 1 is created
	APIRevision *string `json:"apiRevision,omitempty"`

	// Description of the API Revision.
	APIRevisionDescription *string `json:"apiRevisionDescription,omitempty"`

	// Type of API.
	APIType *APIType `json:"type,omitempty"`

	// Indicates the version identifier of the API if the API is versioned
	APIVersion *string `json:"apiVersion,omitempty"`

	// Description of the API Version.
	APIVersionDescription *string `json:"apiVersionDescription,omitempty"`

	// Version set details
	APIVersionSet *APIVersionSetContractDetails `json:"apiVersionSet,omitempty"`

	// A resource identifier for the related ApiVersionSet.
	APIVersionSetID *string `json:"apiVersionSetId,omitempty"`

	// Collection of authentication settings included into this API.
	AuthenticationSettings *AuthenticationSettingsContract `json:"authenticationSettings,omitempty"`

	// Contact information for the API.
	Contact *APIContactInformation `json:"contact,omitempty"`

	// Description of the API. May include HTML formatting tags.
	Description *string `json:"description,omitempty"`

	// API name. Must be 1 to 300 characters long.
	DisplayName *string `json:"displayName,omitempty"`

	// Format of the Content in which the API is getting imported.
	Format *ContentFormat `json:"format,omitempty"`

	// Indicates if API revision is current api revision.
	IsCurrent *bool `json:"isCurrent,omitempty"`

	// License information for the API.
	License *APILicenseInformation `json:"license,omitempty"`

	// Describes on which protocols the operations in this API can be invoked.
	Protocols []*Protocol `json:"protocols,omitempty"`

	// Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long.
	ServiceURL *string `json:"serviceUrl,omitempty"`

	// 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 `json:"apiType,omitempty"`

	// API identifier of the source API.
	SourceAPIID *string `json:"sourceApiId,omitempty"`

	// Protocols over which API is made available.
	SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract `json:"subscriptionKeyParameterNames,omitempty"`

	// Specifies whether an API or Product subscription is required for accessing the API.
	SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`

	// A URL to the Terms of Service for the API. MUST be in the format of a URL.
	TermsOfServiceURL *string `json:"termsOfServiceUrl,omitempty"`

	// Content value when Importing an API.
	Value *string `json:"value,omitempty"`

	// Criteria to limit import of WSDL to a subset of the document.
	WsdlSelector *APICreateOrUpdatePropertiesWsdlSelector `json:"wsdlSelector,omitempty"`

	// READ-ONLY; Indicates if API revision is accessible via the gateway.
	IsOnline *bool `json:"isOnline,omitempty" azure:"ro"`
}

APICreateOrUpdateProperties - API Create or Update Properties.

func (APICreateOrUpdateProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APICreateOrUpdateProperties.

type APICreateOrUpdatePropertiesWsdlSelector

type APICreateOrUpdatePropertiesWsdlSelector struct {
	// Name of endpoint(port) to import from WSDL
	WsdlEndpointName *string `json:"wsdlEndpointName,omitempty"`

	// Name of service to import from WSDL
	WsdlServiceName *string `json:"wsdlServiceName,omitempty"`
}

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

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

NewAPIDiagnosticClient creates a new instance of APIDiagnosticClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiDiagnostic.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIDiagnosticClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<diagnostic-id>",
		armapimanagement.DiagnosticContract{
			Properties: &armapimanagement.DiagnosticContractProperties{
				AlwaysLog: armapimanagement.AlwaysLog("allErrors").ToPtr(),
				Backend: &armapimanagement.PipelineDiagnosticSettings{
					Response: &armapimanagement.HTTPMessageDiagnostic{
						Body: &armapimanagement.BodyDiagnosticSettings{
							Bytes: to.Int32Ptr(512),
						},
						Headers: []*string{
							to.StringPtr("Content-type")},
					},
					Request: &armapimanagement.HTTPMessageDiagnostic{
						Body: &armapimanagement.BodyDiagnosticSettings{
							Bytes: to.Int32Ptr(512),
						},
						Headers: []*string{
							to.StringPtr("Content-type")},
					},
				},
				Frontend: &armapimanagement.PipelineDiagnosticSettings{
					Response: &armapimanagement.HTTPMessageDiagnostic{
						Body: &armapimanagement.BodyDiagnosticSettings{
							Bytes: to.Int32Ptr(512),
						},
						Headers: []*string{
							to.StringPtr("Content-type")},
					},
					Request: &armapimanagement.HTTPMessageDiagnostic{
						Body: &armapimanagement.BodyDiagnosticSettings{
							Bytes: to.Int32Ptr(512),
						},
						Headers: []*string{
							to.StringPtr("Content-type")},
					},
				},
				LoggerID: to.StringPtr("<logger-id>"),
				Sampling: &armapimanagement.SamplingSettings{
					Percentage:   to.Float64Ptr(50),
					SamplingType: armapimanagement.SamplingType("fixed").ToPtr(),
				},
			},
		},
		&armapimanagement.APIDiagnosticClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APIDiagnosticClientCreateOrUpdateResult)
}
Output:

func (*APIDiagnosticClient) Delete

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

Delete - Deletes the specified Diagnostic from an API. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiDiagnostic.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIDiagnosticClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<diagnostic-id>",
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*APIDiagnosticClient) Get

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

Get - Gets the details of the Diagnostic for an API specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiDiagnostic.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIDiagnosticClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<diagnostic-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APIDiagnosticClientGetResult)
}
Output:

func (*APIDiagnosticClient) GetEntityTag

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

GetEntityTag - Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiDiagnostic.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIDiagnosticClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<diagnostic-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*APIDiagnosticClient) ListByService

func (client *APIDiagnosticClient) ListByService(resourceGroupName string, serviceName string, apiID string, options *APIDiagnosticClientListByServiceOptions) *APIDiagnosticClientListByServicePager

ListByService - Lists all diagnostics of an API. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiDiagnostics.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIDiagnosticClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		"<api-id>",
		&armapimanagement.APIDiagnosticClientListByServiceOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*APIDiagnosticClient) Update

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

Update - Updates the details of the Diagnostic for an API specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateApiDiagnostic.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIDiagnosticClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<diagnostic-id>",
		"<if-match>",
		armapimanagement.DiagnosticContract{
			Properties: &armapimanagement.DiagnosticContractProperties{
				AlwaysLog: armapimanagement.AlwaysLog("allErrors").ToPtr(),
				Backend: &armapimanagement.PipelineDiagnosticSettings{
					Response: &armapimanagement.HTTPMessageDiagnostic{
						Body: &armapimanagement.BodyDiagnosticSettings{
							Bytes: to.Int32Ptr(512),
						},
						Headers: []*string{
							to.StringPtr("Content-type")},
					},
					Request: &armapimanagement.HTTPMessageDiagnostic{
						Body: &armapimanagement.BodyDiagnosticSettings{
							Bytes: to.Int32Ptr(512),
						},
						Headers: []*string{
							to.StringPtr("Content-type")},
					},
				},
				Frontend: &armapimanagement.PipelineDiagnosticSettings{
					Response: &armapimanagement.HTTPMessageDiagnostic{
						Body: &armapimanagement.BodyDiagnosticSettings{
							Bytes: to.Int32Ptr(512),
						},
						Headers: []*string{
							to.StringPtr("Content-type")},
					},
					Request: &armapimanagement.HTTPMessageDiagnostic{
						Body: &armapimanagement.BodyDiagnosticSettings{
							Bytes: to.Int32Ptr(512),
						},
						Headers: []*string{
							to.StringPtr("Content-type")},
					},
				},
				LoggerID: to.StringPtr("<logger-id>"),
				Sampling: &armapimanagement.SamplingSettings{
					Percentage:   to.Float64Ptr(50),
					SamplingType: armapimanagement.SamplingType("fixed").ToPtr(),
				},
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APIDiagnosticClientUpdateResult)
}
Output:

type APIDiagnosticClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type APIDiagnosticClientCreateOrUpdateResponse struct {
	APIDiagnosticClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIDiagnosticClientCreateOrUpdateResponse contains the response from method APIDiagnosticClient.CreateOrUpdate.

type APIDiagnosticClientCreateOrUpdateResult added in v0.3.0

type APIDiagnosticClientCreateOrUpdateResult struct {
	DiagnosticContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIDiagnosticClientCreateOrUpdateResult contains the result from method APIDiagnosticClient.CreateOrUpdate.

type APIDiagnosticClientDeleteOptions added in v0.3.0

type APIDiagnosticClientDeleteOptions struct {
}

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

type APIDiagnosticClientDeleteResponse added in v0.3.0

type APIDiagnosticClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIDiagnosticClientDeleteResponse contains the response from method APIDiagnosticClient.Delete.

type APIDiagnosticClientGetEntityTagOptions added in v0.3.0

type APIDiagnosticClientGetEntityTagOptions struct {
}

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

type APIDiagnosticClientGetEntityTagResponse added in v0.3.0

type APIDiagnosticClientGetEntityTagResponse struct {
	APIDiagnosticClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIDiagnosticClientGetEntityTagResponse contains the response from method APIDiagnosticClient.GetEntityTag.

type APIDiagnosticClientGetEntityTagResult added in v0.3.0

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

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

APIDiagnosticClientGetEntityTagResult contains the result from method APIDiagnosticClient.GetEntityTag.

type APIDiagnosticClientGetOptions added in v0.3.0

type APIDiagnosticClientGetOptions struct {
}

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

type APIDiagnosticClientGetResponse added in v0.3.0

type APIDiagnosticClientGetResponse struct {
	APIDiagnosticClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIDiagnosticClientGetResponse contains the response from method APIDiagnosticClient.Get.

type APIDiagnosticClientGetResult added in v0.3.0

type APIDiagnosticClientGetResult struct {
	DiagnosticContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIDiagnosticClientGetResult contains the result from method APIDiagnosticClient.Get.

type APIDiagnosticClientListByServiceOptions added in v0.3.0

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.ListByService method.

type APIDiagnosticClientListByServicePager added in v0.3.0

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

APIDiagnosticClientListByServicePager provides operations for iterating over paged responses.

func (*APIDiagnosticClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*APIDiagnosticClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*APIDiagnosticClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current APIDiagnosticClientListByServiceResponse page.

type APIDiagnosticClientListByServiceResponse added in v0.3.0

type APIDiagnosticClientListByServiceResponse struct {
	APIDiagnosticClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIDiagnosticClientListByServiceResponse contains the response from method APIDiagnosticClient.ListByService.

type APIDiagnosticClientListByServiceResult added in v0.3.0

type APIDiagnosticClientListByServiceResult struct {
	DiagnosticCollection
}

APIDiagnosticClientListByServiceResult contains the result from method APIDiagnosticClient.ListByService.

type APIDiagnosticClientUpdateOptions added in v0.3.0

type APIDiagnosticClientUpdateOptions struct {
}

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

type APIDiagnosticClientUpdateResponse added in v0.3.0

type APIDiagnosticClientUpdateResponse struct {
	APIDiagnosticClientUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIDiagnosticClientUpdateResponse contains the response from method APIDiagnosticClient.Update.

type APIDiagnosticClientUpdateResult added in v0.3.0

type APIDiagnosticClientUpdateResult struct {
	DiagnosticContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIDiagnosticClientUpdateResult contains the result 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 `json:"apiRevision,omitempty"`

	// Description of the API Revision.
	APIRevisionDescription *string `json:"apiRevisionDescription,omitempty"`

	// Type of API.
	APIType *APIType `json:"type,omitempty"`

	// Indicates the version identifier of the API if the API is versioned
	APIVersion *string `json:"apiVersion,omitempty"`

	// Description of the API Version.
	APIVersionDescription *string `json:"apiVersionDescription,omitempty"`

	// A resource identifier for the related ApiVersionSet.
	APIVersionSetID *string `json:"apiVersionSetId,omitempty"`

	// Collection of authentication settings included into this API.
	AuthenticationSettings *AuthenticationSettingsContract `json:"authenticationSettings,omitempty"`

	// Contact information for the API.
	Contact *APIContactInformation `json:"contact,omitempty"`

	// Description of the API. May include HTML formatting tags.
	Description *string `json:"description,omitempty"`

	// Indicates if API revision is current api revision.
	IsCurrent *bool `json:"isCurrent,omitempty"`

	// License information for the API.
	License *APILicenseInformation `json:"license,omitempty"`

	// Protocols over which API is made available.
	SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract `json:"subscriptionKeyParameterNames,omitempty"`

	// Specifies whether an API or Product subscription is required for accessing the API.
	SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`

	// A URL to the Terms of Service for the API. MUST be in the format of a URL.
	TermsOfServiceURL *string `json:"termsOfServiceUrl,omitempty"`

	// READ-ONLY; Indicates if API revision is accessible via the gateway.
	IsOnline *bool `json:"isOnline,omitempty" azure:"ro"`
}

APIEntityBaseContract - API base contract details.

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

NewAPIExportClient creates a new instance of APIExportClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiExportInOpenApi2dot0.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIExportClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		armapimanagement.ExportFormat("swagger-link"),
		armapimanagement.ExportAPI("true"),
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APIExportClientGetResult)
}
Output:

type APIExportClientGetOptions added in v0.3.0

type APIExportClientGetOptions struct {
}

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

type APIExportClientGetResponse added in v0.3.0

type APIExportClientGetResponse struct {
	APIExportClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIExportClientGetResponse contains the response from method APIExportClient.Get.

type APIExportClientGetResult added in v0.3.0

type APIExportClientGetResult struct {
	APIExportResult
}

APIExportClientGetResult contains the result 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 `json:"format,omitempty"`

	// ResourceId of the API which was exported.
	ID *string `json:"id,omitempty"`

	// The object defining the schema of the exported API Detail
	Value *APIExportResultValue `json:"value,omitempty"`
}

APIExportResult - API Export result.

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 `json:"link,omitempty"`
}

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

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

NewAPIIssueAttachmentClient creates a new instance of APIIssueAttachmentClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiIssueAttachment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIIssueAttachmentClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<issue-id>",
		"<attachment-id>",
		armapimanagement.IssueAttachmentContract{
			Properties: &armapimanagement.IssueAttachmentContractProperties{
				Content:       to.StringPtr("<content>"),
				ContentFormat: to.StringPtr("<content-format>"),
				Title:         to.StringPtr("<title>"),
			},
		},
		&armapimanagement.APIIssueAttachmentClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APIIssueAttachmentClientCreateOrUpdateResult)
}
Output:

func (*APIIssueAttachmentClient) Delete

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

Delete - Deletes the specified comment from an Issue. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiIssueAttachment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIIssueAttachmentClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<issue-id>",
		"<attachment-id>",
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*APIIssueAttachmentClient) Get

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

Get - Gets the details of the issue Attachment for an API specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiIssueAttachment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIIssueAttachmentClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<issue-id>",
		"<attachment-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APIIssueAttachmentClientGetResult)
}
Output:

func (*APIIssueAttachmentClient) GetEntityTag

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

GetEntityTag - Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiIssueAttachment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIIssueAttachmentClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<issue-id>",
		"<attachment-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*APIIssueAttachmentClient) ListByService

func (client *APIIssueAttachmentClient) ListByService(resourceGroupName string, serviceName string, apiID string, issueID string, options *APIIssueAttachmentClientListByServiceOptions) *APIIssueAttachmentClientListByServicePager

ListByService - Lists all attachments for the Issue associated with the specified API. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiIssueAttachments.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIIssueAttachmentClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<issue-id>",
		&armapimanagement.APIIssueAttachmentClientListByServiceOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type APIIssueAttachmentClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type APIIssueAttachmentClientCreateOrUpdateResponse struct {
	APIIssueAttachmentClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIIssueAttachmentClientCreateOrUpdateResponse contains the response from method APIIssueAttachmentClient.CreateOrUpdate.

type APIIssueAttachmentClientCreateOrUpdateResult added in v0.3.0

type APIIssueAttachmentClientCreateOrUpdateResult struct {
	IssueAttachmentContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIIssueAttachmentClientCreateOrUpdateResult contains the result from method APIIssueAttachmentClient.CreateOrUpdate.

type APIIssueAttachmentClientDeleteOptions added in v0.3.0

type APIIssueAttachmentClientDeleteOptions struct {
}

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

type APIIssueAttachmentClientDeleteResponse added in v0.3.0

type APIIssueAttachmentClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIIssueAttachmentClientDeleteResponse contains the response from method APIIssueAttachmentClient.Delete.

type APIIssueAttachmentClientGetEntityTagOptions added in v0.3.0

type APIIssueAttachmentClientGetEntityTagOptions struct {
}

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

type APIIssueAttachmentClientGetEntityTagResponse added in v0.3.0

type APIIssueAttachmentClientGetEntityTagResponse struct {
	APIIssueAttachmentClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIIssueAttachmentClientGetEntityTagResponse contains the response from method APIIssueAttachmentClient.GetEntityTag.

type APIIssueAttachmentClientGetEntityTagResult added in v0.3.0

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

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

APIIssueAttachmentClientGetEntityTagResult contains the result from method APIIssueAttachmentClient.GetEntityTag.

type APIIssueAttachmentClientGetOptions added in v0.3.0

type APIIssueAttachmentClientGetOptions struct {
}

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

type APIIssueAttachmentClientGetResponse added in v0.3.0

type APIIssueAttachmentClientGetResponse struct {
	APIIssueAttachmentClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIIssueAttachmentClientGetResponse contains the response from method APIIssueAttachmentClient.Get.

type APIIssueAttachmentClientGetResult added in v0.3.0

type APIIssueAttachmentClientGetResult struct {
	IssueAttachmentContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIIssueAttachmentClientGetResult contains the result from method APIIssueAttachmentClient.Get.

type APIIssueAttachmentClientListByServiceOptions added in v0.3.0

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.ListByService method.

type APIIssueAttachmentClientListByServicePager added in v0.3.0

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

APIIssueAttachmentClientListByServicePager provides operations for iterating over paged responses.

func (*APIIssueAttachmentClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*APIIssueAttachmentClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*APIIssueAttachmentClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current APIIssueAttachmentClientListByServiceResponse page.

type APIIssueAttachmentClientListByServiceResponse added in v0.3.0

type APIIssueAttachmentClientListByServiceResponse struct {
	APIIssueAttachmentClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIIssueAttachmentClientListByServiceResponse contains the response from method APIIssueAttachmentClient.ListByService.

type APIIssueAttachmentClientListByServiceResult added in v0.3.0

type APIIssueAttachmentClientListByServiceResult struct {
	IssueAttachmentCollection
}

APIIssueAttachmentClientListByServiceResult contains the result from method APIIssueAttachmentClient.ListByService.

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

NewAPIIssueClient creates a new instance of APIIssueClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiIssue.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIIssueClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<issue-id>",
		armapimanagement.IssueContract{
			Properties: &armapimanagement.IssueContractProperties{
				CreatedDate: to.TimePtr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-01T22:21:20.467Z"); return t }()),
				State:       armapimanagement.State("open").ToPtr(),
				Description: to.StringPtr("<description>"),
				Title:       to.StringPtr("<title>"),
				UserID:      to.StringPtr("<user-id>"),
			},
		},
		&armapimanagement.APIIssueClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APIIssueClientCreateOrUpdateResult)
}
Output:

func (*APIIssueClient) Delete

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

Delete - Deletes the specified Issue from an API. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiIssue.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIIssueClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<issue-id>",
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*APIIssueClient) Get

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

Get - Gets the details of the Issue for an API specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiIssue.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIIssueClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<issue-id>",
		&armapimanagement.APIIssueClientGetOptions{ExpandCommentsAttachments: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APIIssueClientGetResult)
}
Output:

func (*APIIssueClient) GetEntityTag

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

GetEntityTag - Gets the entity state (Etag) version of the Issue for an API specified by its identifier. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiIssue.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIIssueClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<issue-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*APIIssueClient) ListByService

func (client *APIIssueClient) ListByService(resourceGroupName string, serviceName string, apiID string, options *APIIssueClientListByServiceOptions) *APIIssueClientListByServicePager

ListByService - Lists all issues associated with the specified API. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiIssues.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIIssueClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		"<api-id>",
		&armapimanagement.APIIssueClientListByServiceOptions{Filter: nil,
			ExpandCommentsAttachments: nil,
			Top:                       nil,
			Skip:                      nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*APIIssueClient) Update

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

Update - Updates an existing issue for an API. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateApiIssue.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIIssueClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<issue-id>",
		"<if-match>",
		armapimanagement.IssueUpdateContract{
			Properties: &armapimanagement.IssueUpdateContractProperties{
				State: armapimanagement.State("closed").ToPtr(),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APIIssueClientUpdateResult)
}
Output:

type APIIssueClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type APIIssueClientCreateOrUpdateResponse struct {
	APIIssueClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIIssueClientCreateOrUpdateResponse contains the response from method APIIssueClient.CreateOrUpdate.

type APIIssueClientCreateOrUpdateResult added in v0.3.0

type APIIssueClientCreateOrUpdateResult struct {
	IssueContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIIssueClientCreateOrUpdateResult contains the result from method APIIssueClient.CreateOrUpdate.

type APIIssueClientDeleteOptions added in v0.3.0

type APIIssueClientDeleteOptions struct {
}

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

type APIIssueClientDeleteResponse added in v0.3.0

type APIIssueClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIIssueClientDeleteResponse contains the response from method APIIssueClient.Delete.

type APIIssueClientGetEntityTagOptions added in v0.3.0

type APIIssueClientGetEntityTagOptions struct {
}

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

type APIIssueClientGetEntityTagResponse added in v0.3.0

type APIIssueClientGetEntityTagResponse struct {
	APIIssueClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIIssueClientGetEntityTagResponse contains the response from method APIIssueClient.GetEntityTag.

type APIIssueClientGetEntityTagResult added in v0.3.0

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

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

APIIssueClientGetEntityTagResult contains the result from method APIIssueClient.GetEntityTag.

type APIIssueClientGetOptions added in v0.3.0

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

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

type APIIssueClientGetResponse added in v0.3.0

type APIIssueClientGetResponse struct {
	APIIssueClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIIssueClientGetResponse contains the response from method APIIssueClient.Get.

type APIIssueClientGetResult added in v0.3.0

type APIIssueClientGetResult struct {
	IssueContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIIssueClientGetResult contains the result from method APIIssueClient.Get.

type APIIssueClientListByServiceOptions added in v0.3.0

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.ListByService method.

type APIIssueClientListByServicePager added in v0.3.0

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

APIIssueClientListByServicePager provides operations for iterating over paged responses.

func (*APIIssueClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*APIIssueClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*APIIssueClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current APIIssueClientListByServiceResponse page.

type APIIssueClientListByServiceResponse added in v0.3.0

type APIIssueClientListByServiceResponse struct {
	APIIssueClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIIssueClientListByServiceResponse contains the response from method APIIssueClient.ListByService.

type APIIssueClientListByServiceResult added in v0.3.0

type APIIssueClientListByServiceResult struct {
	IssueCollection
}

APIIssueClientListByServiceResult contains the result from method APIIssueClient.ListByService.

type APIIssueClientUpdateOptions added in v0.3.0

type APIIssueClientUpdateOptions struct {
}

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

type APIIssueClientUpdateResponse added in v0.3.0

type APIIssueClientUpdateResponse struct {
	APIIssueClientUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIIssueClientUpdateResponse contains the response from method APIIssueClient.Update.

type APIIssueClientUpdateResult added in v0.3.0

type APIIssueClientUpdateResult struct {
	IssueContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIIssueClientUpdateResult contains the result 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

NewAPIIssueCommentClient creates a new instance of APIIssueCommentClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiIssueComment.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIIssueCommentClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<issue-id>",
		"<comment-id>",
		armapimanagement.IssueCommentContract{
			Properties: &armapimanagement.IssueCommentContractProperties{
				CreatedDate: to.TimePtr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-02-01T22:21:20.467Z"); return t }()),
				Text:        to.StringPtr("<text>"),
				UserID:      to.StringPtr("<user-id>"),
			},
		},
		&armapimanagement.APIIssueCommentClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APIIssueCommentClientCreateOrUpdateResult)
}
Output:

func (*APIIssueCommentClient) Delete

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

Delete - Deletes the specified comment from an Issue. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiIssueComment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIIssueCommentClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<issue-id>",
		"<comment-id>",
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*APIIssueCommentClient) Get

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

Get - Gets the details of the issue Comment for an API specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiIssueComment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIIssueCommentClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<issue-id>",
		"<comment-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APIIssueCommentClientGetResult)
}
Output:

func (*APIIssueCommentClient) GetEntityTag

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

GetEntityTag - Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiIssueComment.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIIssueCommentClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<issue-id>",
		"<comment-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*APIIssueCommentClient) ListByService

func (client *APIIssueCommentClient) ListByService(resourceGroupName string, serviceName string, apiID string, issueID string, options *APIIssueCommentClientListByServiceOptions) *APIIssueCommentClientListByServicePager

ListByService - Lists all comments for the Issue associated with the specified API. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiIssueComments.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIIssueCommentClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<issue-id>",
		&armapimanagement.APIIssueCommentClientListByServiceOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type APIIssueCommentClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type APIIssueCommentClientCreateOrUpdateResponse struct {
	APIIssueCommentClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIIssueCommentClientCreateOrUpdateResponse contains the response from method APIIssueCommentClient.CreateOrUpdate.

type APIIssueCommentClientCreateOrUpdateResult added in v0.3.0

type APIIssueCommentClientCreateOrUpdateResult struct {
	IssueCommentContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIIssueCommentClientCreateOrUpdateResult contains the result from method APIIssueCommentClient.CreateOrUpdate.

type APIIssueCommentClientDeleteOptions added in v0.3.0

type APIIssueCommentClientDeleteOptions struct {
}

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

type APIIssueCommentClientDeleteResponse added in v0.3.0

type APIIssueCommentClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIIssueCommentClientDeleteResponse contains the response from method APIIssueCommentClient.Delete.

type APIIssueCommentClientGetEntityTagOptions added in v0.3.0

type APIIssueCommentClientGetEntityTagOptions struct {
}

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

type APIIssueCommentClientGetEntityTagResponse added in v0.3.0

type APIIssueCommentClientGetEntityTagResponse struct {
	APIIssueCommentClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIIssueCommentClientGetEntityTagResponse contains the response from method APIIssueCommentClient.GetEntityTag.

type APIIssueCommentClientGetEntityTagResult added in v0.3.0

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

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

APIIssueCommentClientGetEntityTagResult contains the result from method APIIssueCommentClient.GetEntityTag.

type APIIssueCommentClientGetOptions added in v0.3.0

type APIIssueCommentClientGetOptions struct {
}

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

type APIIssueCommentClientGetResponse added in v0.3.0

type APIIssueCommentClientGetResponse struct {
	APIIssueCommentClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIIssueCommentClientGetResponse contains the response from method APIIssueCommentClient.Get.

type APIIssueCommentClientGetResult added in v0.3.0

type APIIssueCommentClientGetResult struct {
	IssueCommentContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIIssueCommentClientGetResult contains the result from method APIIssueCommentClient.Get.

type APIIssueCommentClientListByServiceOptions added in v0.3.0

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.ListByService method.

type APIIssueCommentClientListByServicePager added in v0.3.0

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

APIIssueCommentClientListByServicePager provides operations for iterating over paged responses.

func (*APIIssueCommentClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*APIIssueCommentClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*APIIssueCommentClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current APIIssueCommentClientListByServiceResponse page.

type APIIssueCommentClientListByServiceResponse added in v0.3.0

type APIIssueCommentClientListByServiceResponse struct {
	APIIssueCommentClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIIssueCommentClientListByServiceResponse contains the response from method APIIssueCommentClient.ListByService.

type APIIssueCommentClientListByServiceResult added in v0.3.0

type APIIssueCommentClientListByServiceResult struct {
	IssueCommentCollection
}

APIIssueCommentClientListByServiceResult contains the result from method APIIssueCommentClient.ListByService.

type APILicenseInformation

type APILicenseInformation struct {
	// The license name used for the API
	Name *string `json:"name,omitempty"`

	// A URL to the license used for the API. MUST be in the format of a URL
	URL *string `json:"url,omitempty"`
}

APILicenseInformation - API license information

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.

func (APIManagementSKUCapacityScaleType) ToPtr

ToPtr returns a *APIManagementSKUCapacityScaleType pointing to the current value.

type APIManagementSKURestrictionsReasonCode

type APIManagementSKURestrictionsReasonCode string

APIManagementSKURestrictionsReasonCode - The reason for restriction.

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

func PossibleAPIManagementSKURestrictionsReasonCodeValues

func PossibleAPIManagementSKURestrictionsReasonCodeValues() []APIManagementSKURestrictionsReasonCode

PossibleAPIManagementSKURestrictionsReasonCodeValues returns the possible values for the APIManagementSKURestrictionsReasonCode const type.

func (APIManagementSKURestrictionsReasonCode) ToPtr

ToPtr returns a *APIManagementSKURestrictionsReasonCode pointing to the current value.

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.

func (APIManagementSKURestrictionsType) ToPtr

ToPtr returns a *APIManagementSKURestrictionsType pointing to the current value.

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

NewAPIOperationClient creates a new instance of APIOperationClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiOperation.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIOperationClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<operation-id>",
		armapimanagement.OperationContract{
			Properties: &armapimanagement.OperationContractProperties{
				Description:        to.StringPtr("<description>"),
				TemplateParameters: []*armapimanagement.ParameterContract{},
				Request: &armapimanagement.RequestContract{
					Description:     to.StringPtr("<description>"),
					Headers:         []*armapimanagement.ParameterContract{},
					QueryParameters: []*armapimanagement.ParameterContract{},
					Representations: []*armapimanagement.RepresentationContract{
						{
							ContentType: to.StringPtr("<content-type>"),
							SchemaID:    to.StringPtr("<schema-id>"),
							TypeName:    to.StringPtr("<type-name>"),
						}},
				},
				Responses: []*armapimanagement.ResponseContract{
					{
						Description: to.StringPtr("<description>"),
						Headers:     []*armapimanagement.ParameterContract{},
						Representations: []*armapimanagement.RepresentationContract{
							{
								ContentType: to.StringPtr("<content-type>"),
							},
							{
								ContentType: to.StringPtr("<content-type>"),
							}},
						StatusCode: to.Int32Ptr(200),
					}},
				Method:      to.StringPtr("<method>"),
				DisplayName: to.StringPtr("<display-name>"),
				URLTemplate: to.StringPtr("<urltemplate>"),
			},
		},
		&armapimanagement.APIOperationClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APIOperationClientCreateOrUpdateResult)
}
Output:

func (*APIOperationClient) Delete

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

Delete - Deletes the specified operation in the API. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiOperation.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIOperationClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<operation-id>",
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*APIOperationClient) Get

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

Get - Gets the details of the API Operation specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperation.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIOperationClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<operation-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APIOperationClientGetResult)
}
Output:

func (*APIOperationClient) GetEntityTag

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

GetEntityTag - Gets the entity state (Etag) version of the API operation specified by its identifier. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiOperation.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIOperationClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<operation-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*APIOperationClient) ListByAPI

func (client *APIOperationClient) ListByAPI(resourceGroupName string, serviceName string, apiID string, options *APIOperationClientListByAPIOptions) *APIOperationClientListByAPIPager

ListByAPI - Lists a collection of the operations for the specified API. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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.ListByAPI method.

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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateApiOperation.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIOperationClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<operation-id>",
		"<if-match>",
		armapimanagement.OperationUpdateContract{
			Properties: &armapimanagement.OperationUpdateContractProperties{
				TemplateParameters: []*armapimanagement.ParameterContract{},
				Request: &armapimanagement.RequestContract{
					QueryParameters: []*armapimanagement.ParameterContract{
						{
							Name:         to.StringPtr("<name>"),
							Type:         to.StringPtr("<type>"),
							Description:  to.StringPtr("<description>"),
							DefaultValue: to.StringPtr("<default-value>"),
							Required:     to.BoolPtr(true),
							Values: []*string{
								to.StringPtr("sample")},
						}},
				},
				Responses: []*armapimanagement.ResponseContract{
					{
						Description:     to.StringPtr("<description>"),
						Headers:         []*armapimanagement.ParameterContract{},
						Representations: []*armapimanagement.RepresentationContract{},
						StatusCode:      to.Int32Ptr(200),
					},
					{
						Description:     to.StringPtr("<description>"),
						Headers:         []*armapimanagement.ParameterContract{},
						Representations: []*armapimanagement.RepresentationContract{},
						StatusCode:      to.Int32Ptr(500),
					}},
				Method:      to.StringPtr("<method>"),
				DisplayName: to.StringPtr("<display-name>"),
				URLTemplate: to.StringPtr("<urltemplate>"),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APIOperationClientUpdateResult)
}
Output:

type APIOperationClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type APIOperationClientCreateOrUpdateResponse struct {
	APIOperationClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIOperationClientCreateOrUpdateResponse contains the response from method APIOperationClient.CreateOrUpdate.

type APIOperationClientCreateOrUpdateResult added in v0.3.0

type APIOperationClientCreateOrUpdateResult struct {
	OperationContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIOperationClientCreateOrUpdateResult contains the result from method APIOperationClient.CreateOrUpdate.

type APIOperationClientDeleteOptions added in v0.3.0

type APIOperationClientDeleteOptions struct {
}

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

type APIOperationClientDeleteResponse added in v0.3.0

type APIOperationClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIOperationClientDeleteResponse contains the response from method APIOperationClient.Delete.

type APIOperationClientGetEntityTagOptions added in v0.3.0

type APIOperationClientGetEntityTagOptions struct {
}

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

type APIOperationClientGetEntityTagResponse added in v0.3.0

type APIOperationClientGetEntityTagResponse struct {
	APIOperationClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIOperationClientGetEntityTagResponse contains the response from method APIOperationClient.GetEntityTag.

type APIOperationClientGetEntityTagResult added in v0.3.0

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

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

APIOperationClientGetEntityTagResult contains the result from method APIOperationClient.GetEntityTag.

type APIOperationClientGetOptions added in v0.3.0

type APIOperationClientGetOptions struct {
}

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

type APIOperationClientGetResponse added in v0.3.0

type APIOperationClientGetResponse struct {
	APIOperationClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIOperationClientGetResponse contains the response from method APIOperationClient.Get.

type APIOperationClientGetResult added in v0.3.0

type APIOperationClientGetResult struct {
	OperationContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIOperationClientGetResult contains the result from method APIOperationClient.Get.

type APIOperationClientListByAPIOptions added in v0.3.0

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.ListByAPI method.

type APIOperationClientListByAPIPager added in v0.3.0

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

APIOperationClientListByAPIPager provides operations for iterating over paged responses.

func (*APIOperationClientListByAPIPager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*APIOperationClientListByAPIPager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*APIOperationClientListByAPIPager) PageResponse added in v0.3.0

PageResponse returns the current APIOperationClientListByAPIResponse page.

type APIOperationClientListByAPIResponse added in v0.3.0

type APIOperationClientListByAPIResponse struct {
	APIOperationClientListByAPIResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIOperationClientListByAPIResponse contains the response from method APIOperationClient.ListByAPI.

type APIOperationClientListByAPIResult added in v0.3.0

type APIOperationClientListByAPIResult struct {
	OperationCollection
}

APIOperationClientListByAPIResult contains the result from method APIOperationClient.ListByAPI.

type APIOperationClientUpdateOptions added in v0.3.0

type APIOperationClientUpdateOptions struct {
}

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

type APIOperationClientUpdateResponse added in v0.3.0

type APIOperationClientUpdateResponse struct {
	APIOperationClientUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIOperationClientUpdateResponse contains the response from method APIOperationClient.Update.

type APIOperationClientUpdateResult added in v0.3.0

type APIOperationClientUpdateResult struct {
	OperationContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIOperationClientUpdateResult contains the result 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

NewAPIOperationPolicyClient creates a new instance of APIOperationPolicyClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiOperationPolicy.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIOperationPolicyClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<operation-id>",
		armapimanagement.PolicyIDName("policy"),
		armapimanagement.PolicyContract{
			Properties: &armapimanagement.PolicyContractProperties{
				Format: armapimanagement.PolicyContentFormat("xml").ToPtr(),
				Value:  to.StringPtr("<value>"),
			},
		},
		&armapimanagement.APIOperationPolicyClientCreateOrUpdateOptions{IfMatch: to.StringPtr("<if-match>")})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APIOperationPolicyClientCreateOrUpdateResult)
}
Output:

func (*APIOperationPolicyClient) Delete

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

Delete - Deletes the policy configuration at the Api Operation. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiOperationPolicy.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIOperationPolicyClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<operation-id>",
		armapimanagement.PolicyIDName("policy"),
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*APIOperationPolicyClient) Get

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

Get - Get the policy configuration at the API Operation level. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperationPolicy.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIOperationPolicyClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<operation-id>",
		armapimanagement.PolicyIDName("policy"),
		&armapimanagement.APIOperationPolicyClientGetOptions{Format: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APIOperationPolicyClientGetResult)
}
Output:

func (*APIOperationPolicyClient) GetEntityTag

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

GetEntityTag - Gets the entity state (Etag) version of the API operation policy specified by its identifier. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiOperationPolicy.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIOperationPolicyClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<operation-id>",
		armapimanagement.PolicyIDName("policy"),
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*APIOperationPolicyClient) ListByOperation

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

ListByOperation - Get the list of policy configuration at the API Operation level. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiOperationPolicies.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIOperationPolicyClient("<subscription-id>", cred, nil)
	res, err := client.ListByOperation(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<operation-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APIOperationPolicyClientListByOperationResult)
}
Output:

type APIOperationPolicyClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type APIOperationPolicyClientCreateOrUpdateResponse struct {
	APIOperationPolicyClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIOperationPolicyClientCreateOrUpdateResponse contains the response from method APIOperationPolicyClient.CreateOrUpdate.

type APIOperationPolicyClientCreateOrUpdateResult added in v0.3.0

type APIOperationPolicyClientCreateOrUpdateResult struct {
	PolicyContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIOperationPolicyClientCreateOrUpdateResult contains the result from method APIOperationPolicyClient.CreateOrUpdate.

type APIOperationPolicyClientDeleteOptions added in v0.3.0

type APIOperationPolicyClientDeleteOptions struct {
}

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

type APIOperationPolicyClientDeleteResponse added in v0.3.0

type APIOperationPolicyClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIOperationPolicyClientDeleteResponse contains the response from method APIOperationPolicyClient.Delete.

type APIOperationPolicyClientGetEntityTagOptions added in v0.3.0

type APIOperationPolicyClientGetEntityTagOptions struct {
}

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

type APIOperationPolicyClientGetEntityTagResponse added in v0.3.0

type APIOperationPolicyClientGetEntityTagResponse struct {
	APIOperationPolicyClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIOperationPolicyClientGetEntityTagResponse contains the response from method APIOperationPolicyClient.GetEntityTag.

type APIOperationPolicyClientGetEntityTagResult added in v0.3.0

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

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

APIOperationPolicyClientGetEntityTagResult contains the result from method APIOperationPolicyClient.GetEntityTag.

type APIOperationPolicyClientGetOptions added in v0.3.0

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

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

type APIOperationPolicyClientGetResponse added in v0.3.0

type APIOperationPolicyClientGetResponse struct {
	APIOperationPolicyClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIOperationPolicyClientGetResponse contains the response from method APIOperationPolicyClient.Get.

type APIOperationPolicyClientGetResult added in v0.3.0

type APIOperationPolicyClientGetResult struct {
	PolicyContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIOperationPolicyClientGetResult contains the result from method APIOperationPolicyClient.Get.

type APIOperationPolicyClientListByOperationOptions added in v0.3.0

type APIOperationPolicyClientListByOperationOptions struct {
}

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

type APIOperationPolicyClientListByOperationResponse added in v0.3.0

type APIOperationPolicyClientListByOperationResponse struct {
	APIOperationPolicyClientListByOperationResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIOperationPolicyClientListByOperationResponse contains the response from method APIOperationPolicyClient.ListByOperation.

type APIOperationPolicyClientListByOperationResult added in v0.3.0

type APIOperationPolicyClientListByOperationResult struct {
	PolicyCollection
}

APIOperationPolicyClientListByOperationResult contains the result 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

NewAPIPolicyClient creates a new instance of APIPolicyClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiPolicy.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIPolicyClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		armapimanagement.PolicyIDName("policy"),
		armapimanagement.PolicyContract{
			Properties: &armapimanagement.PolicyContractProperties{
				Format: armapimanagement.PolicyContentFormat("xml").ToPtr(),
				Value:  to.StringPtr("<value>"),
			},
		},
		&armapimanagement.APIPolicyClientCreateOrUpdateOptions{IfMatch: to.StringPtr("<if-match>")})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APIPolicyClientCreateOrUpdateResult)
}
Output:

func (*APIPolicyClient) Delete

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

Delete - Deletes the policy configuration at the Api. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiPolicy.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIPolicyClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		armapimanagement.PolicyIDName("policy"),
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*APIPolicyClient) Get

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

Get - Get the policy configuration at the API level. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiPolicy.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIPolicyClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		armapimanagement.PolicyIDName("policy"),
		&armapimanagement.APIPolicyClientGetOptions{Format: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APIPolicyClientGetResult)
}
Output:

func (*APIPolicyClient) GetEntityTag

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

GetEntityTag - Gets the entity state (Etag) version of the API policy specified by its identifier. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiPolicy.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIPolicyClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		armapimanagement.PolicyIDName("policy"),
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*APIPolicyClient) ListByAPI

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

ListByAPI - Get the policy configuration at the API level. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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.

type APIPolicyClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type APIPolicyClientCreateOrUpdateResponse struct {
	APIPolicyClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIPolicyClientCreateOrUpdateResponse contains the response from method APIPolicyClient.CreateOrUpdate.

type APIPolicyClientCreateOrUpdateResult added in v0.3.0

type APIPolicyClientCreateOrUpdateResult struct {
	PolicyContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIPolicyClientCreateOrUpdateResult contains the result from method APIPolicyClient.CreateOrUpdate.

type APIPolicyClientDeleteOptions added in v0.3.0

type APIPolicyClientDeleteOptions struct {
}

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

type APIPolicyClientDeleteResponse added in v0.3.0

type APIPolicyClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIPolicyClientDeleteResponse contains the response from method APIPolicyClient.Delete.

type APIPolicyClientGetEntityTagOptions added in v0.3.0

type APIPolicyClientGetEntityTagOptions struct {
}

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

type APIPolicyClientGetEntityTagResponse added in v0.3.0

type APIPolicyClientGetEntityTagResponse struct {
	APIPolicyClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIPolicyClientGetEntityTagResponse contains the response from method APIPolicyClient.GetEntityTag.

type APIPolicyClientGetEntityTagResult added in v0.3.0

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

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

APIPolicyClientGetEntityTagResult contains the result from method APIPolicyClient.GetEntityTag.

type APIPolicyClientGetOptions added in v0.3.0

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

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

type APIPolicyClientGetResponse added in v0.3.0

type APIPolicyClientGetResponse struct {
	APIPolicyClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIPolicyClientGetResponse contains the response from method APIPolicyClient.Get.

type APIPolicyClientGetResult added in v0.3.0

type APIPolicyClientGetResult struct {
	PolicyContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIPolicyClientGetResult contains the result from method APIPolicyClient.Get.

type APIPolicyClientListByAPIOptions added in v0.3.0

type APIPolicyClientListByAPIOptions struct {
}

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

type APIPolicyClientListByAPIResponse added in v0.3.0

type APIPolicyClientListByAPIResponse struct {
	APIPolicyClientListByAPIResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIPolicyClientListByAPIResponse contains the response from method APIPolicyClient.ListByAPI.

type APIPolicyClientListByAPIResult added in v0.3.0

type APIPolicyClientListByAPIResult struct {
	PolicyCollection
}

APIPolicyClientListByAPIResult contains the result 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

NewAPIProductClient creates a new instance of APIProductClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*APIProductClient) ListByApis

func (client *APIProductClient) ListByApis(resourceGroupName string, serviceName string, apiID string, options *APIProductClientListByApisOptions) *APIProductClientListByApisPager

ListByApis - Lists all Products, which the API is part of. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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.ListByApis method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiProducts.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIProductClient("<subscription-id>", cred, nil)
	pager := client.ListByApis("<resource-group-name>",
		"<service-name>",
		"<api-id>",
		&armapimanagement.APIProductClientListByApisOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type APIProductClientListByApisOptions added in v0.3.0

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.ListByApis method.

type APIProductClientListByApisPager added in v0.3.0

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

APIProductClientListByApisPager provides operations for iterating over paged responses.

func (*APIProductClientListByApisPager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*APIProductClientListByApisPager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*APIProductClientListByApisPager) PageResponse added in v0.3.0

PageResponse returns the current APIProductClientListByApisResponse page.

type APIProductClientListByApisResponse added in v0.3.0

type APIProductClientListByApisResponse struct {
	APIProductClientListByApisResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIProductClientListByApisResponse contains the response from method APIProductClient.ListByApis.

type APIProductClientListByApisResult added in v0.3.0

type APIProductClientListByApisResult struct {
	ProductCollection
}

APIProductClientListByApisResult contains the result from method APIProductClient.ListByApis.

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

NewAPIReleaseClient creates a new instance of APIReleaseClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiRelease.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIReleaseClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<release-id>",
		armapimanagement.APIReleaseContract{
			Properties: &armapimanagement.APIReleaseContractProperties{
				APIID: to.StringPtr("<apiid>"),
				Notes: to.StringPtr("<notes>"),
			},
		},
		&armapimanagement.APIReleaseClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APIReleaseClientCreateOrUpdateResult)
}
Output:

func (*APIReleaseClient) Delete

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

Delete - Deletes the specified release in the API. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiRelease.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIReleaseClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<release-id>",
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*APIReleaseClient) Get

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

Get - Returns the details of an API release. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiRelease.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIReleaseClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<release-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APIReleaseClientGetResult)
}
Output:

func (*APIReleaseClient) GetEntityTag

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

GetEntityTag - Returns the etag of an API release. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiRelease.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIReleaseClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<release-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*APIReleaseClient) ListByService

func (client *APIReleaseClient) ListByService(resourceGroupName string, serviceName string, apiID string, options *APIReleaseClientListByServiceOptions) *APIReleaseClientListByServicePager

ListByService - 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. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiReleases.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIReleaseClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		"<api-id>",
		&armapimanagement.APIReleaseClientListByServiceOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*APIReleaseClient) Update

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

Update - Updates the details of the release of the API specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateApiRelease.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIReleaseClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<release-id>",
		"<if-match>",
		armapimanagement.APIReleaseContract{
			Properties: &armapimanagement.APIReleaseContractProperties{
				APIID: to.StringPtr("<apiid>"),
				Notes: to.StringPtr("<notes>"),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APIReleaseClientUpdateResult)
}
Output:

type APIReleaseClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type APIReleaseClientCreateOrUpdateResponse struct {
	APIReleaseClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIReleaseClientCreateOrUpdateResponse contains the response from method APIReleaseClient.CreateOrUpdate.

type APIReleaseClientCreateOrUpdateResult added in v0.3.0

type APIReleaseClientCreateOrUpdateResult struct {
	APIReleaseContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIReleaseClientCreateOrUpdateResult contains the result from method APIReleaseClient.CreateOrUpdate.

type APIReleaseClientDeleteOptions added in v0.3.0

type APIReleaseClientDeleteOptions struct {
}

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

type APIReleaseClientDeleteResponse added in v0.3.0

type APIReleaseClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIReleaseClientDeleteResponse contains the response from method APIReleaseClient.Delete.

type APIReleaseClientGetEntityTagOptions added in v0.3.0

type APIReleaseClientGetEntityTagOptions struct {
}

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

type APIReleaseClientGetEntityTagResponse added in v0.3.0

type APIReleaseClientGetEntityTagResponse struct {
	APIReleaseClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIReleaseClientGetEntityTagResponse contains the response from method APIReleaseClient.GetEntityTag.

type APIReleaseClientGetEntityTagResult added in v0.3.0

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

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

APIReleaseClientGetEntityTagResult contains the result from method APIReleaseClient.GetEntityTag.

type APIReleaseClientGetOptions added in v0.3.0

type APIReleaseClientGetOptions struct {
}

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

type APIReleaseClientGetResponse added in v0.3.0

type APIReleaseClientGetResponse struct {
	APIReleaseClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIReleaseClientGetResponse contains the response from method APIReleaseClient.Get.

type APIReleaseClientGetResult added in v0.3.0

type APIReleaseClientGetResult struct {
	APIReleaseContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIReleaseClientGetResult contains the result from method APIReleaseClient.Get.

type APIReleaseClientListByServiceOptions added in v0.3.0

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.ListByService method.

type APIReleaseClientListByServicePager added in v0.3.0

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

APIReleaseClientListByServicePager provides operations for iterating over paged responses.

func (*APIReleaseClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*APIReleaseClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*APIReleaseClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current APIReleaseClientListByServiceResponse page.

type APIReleaseClientListByServiceResponse added in v0.3.0

type APIReleaseClientListByServiceResponse struct {
	APIReleaseClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIReleaseClientListByServiceResponse contains the response from method APIReleaseClient.ListByService.

type APIReleaseClientListByServiceResult added in v0.3.0

type APIReleaseClientListByServiceResult struct {
	APIReleaseCollection
}

APIReleaseClientListByServiceResult contains the result from method APIReleaseClient.ListByService.

type APIReleaseClientUpdateOptions added in v0.3.0

type APIReleaseClientUpdateOptions struct {
}

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

type APIReleaseClientUpdateResponse added in v0.3.0

type APIReleaseClientUpdateResponse struct {
	APIReleaseClientUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIReleaseClientUpdateResponse contains the response from method APIReleaseClient.Update.

type APIReleaseClientUpdateResult added in v0.3.0

type APIReleaseClientUpdateResult struct {
	APIReleaseContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIReleaseClientUpdateResult contains the result from method APIReleaseClient.Update.

type APIReleaseCollection

type APIReleaseCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// READ-ONLY; Next page link if any.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; Page values.
	Value []*APIReleaseContract `json:"value,omitempty" azure:"ro"`
}

APIReleaseCollection - Paged ApiRelease list representation.

func (APIReleaseCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIReleaseCollection.

type APIReleaseContract

type APIReleaseContract struct {
	// ApiRelease entity contract properties.
	Properties *APIReleaseContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

APIReleaseContract - ApiRelease details.

func (APIReleaseContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIReleaseContract.

type APIReleaseContractProperties

type APIReleaseContractProperties struct {
	// Identifier of the API the release belongs to.
	APIID *string `json:"apiId,omitempty"`

	// Release Notes
	Notes *string `json:"notes,omitempty"`

	// 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 `json:"createdDateTime,omitempty" azure:"ro"`

	// READ-ONLY; The time the API release was updated.
	UpdatedDateTime *time.Time `json:"updatedDateTime,omitempty" azure:"ro"`
}

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

NewAPIRevisionClient creates a new instance of APIRevisionClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*APIRevisionClient) ListByService

func (client *APIRevisionClient) ListByService(resourceGroupName string, serviceName string, apiID string, options *APIRevisionClientListByServiceOptions) *APIRevisionClientListByServicePager

ListByService - Lists all revisions of an API. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiRevisions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIRevisionClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		"<api-id>",
		&armapimanagement.APIRevisionClientListByServiceOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type APIRevisionClientListByServiceOptions added in v0.3.0

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.ListByService method.

type APIRevisionClientListByServicePager added in v0.3.0

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

APIRevisionClientListByServicePager provides operations for iterating over paged responses.

func (*APIRevisionClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*APIRevisionClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*APIRevisionClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current APIRevisionClientListByServiceResponse page.

type APIRevisionClientListByServiceResponse added in v0.3.0

type APIRevisionClientListByServiceResponse struct {
	APIRevisionClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIRevisionClientListByServiceResponse contains the response from method APIRevisionClient.ListByService.

type APIRevisionClientListByServiceResult added in v0.3.0

type APIRevisionClientListByServiceResult struct {
	APIRevisionCollection
}

APIRevisionClientListByServiceResult contains the result from method APIRevisionClient.ListByService.

type APIRevisionCollection

type APIRevisionCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// READ-ONLY; Next page link if any.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; Page values.
	Value []*APIRevisionContract `json:"value,omitempty" azure:"ro"`
}

APIRevisionCollection - Paged API Revision list representation.

func (APIRevisionCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIRevisionCollection.

type APIRevisionContract

type APIRevisionContract struct {
	// READ-ONLY; Identifier of the API Revision.
	APIID *string `json:"apiId,omitempty" azure:"ro"`

	// READ-ONLY; Revision number of API.
	APIRevision *string `json:"apiRevision,omitempty" azure:"ro"`

	// 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 `json:"createdDateTime,omitempty" azure:"ro"`

	// READ-ONLY; Description of the API Revision.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; Indicates if API revision is accessible via the gateway.
	IsCurrent *bool `json:"isCurrent,omitempty" azure:"ro"`

	// READ-ONLY; Indicates if API revision is the current api revision.
	IsOnline *bool `json:"isOnline,omitempty" azure:"ro"`

	// READ-ONLY; Gateway URL for accessing the non-current API Revision.
	PrivateURL *string `json:"privateUrl,omitempty" azure:"ro"`

	// 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 `json:"updatedDateTime,omitempty" azure:"ro"`
}

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 `json:"apiRevisionDescription,omitempty"`

	// Version identifier for the new API Version.
	APIVersionName *string `json:"apiVersionName,omitempty"`

	// Version set details
	APIVersionSet *APIVersionSetContractDetails `json:"apiVersionSet,omitempty"`

	// Resource identifier of API to be used to create the revision from.
	SourceAPIID *string `json:"sourceApiId,omitempty"`
}

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

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

NewAPISchemaClient creates a new instance of APISchemaClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*APISchemaClient) BeginCreateOrUpdate

func (client *APISchemaClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, schemaID string, parameters SchemaContract, options *APISchemaClientBeginCreateOrUpdateOptions) (APISchemaClientCreateOrUpdatePollerResponse, error)

BeginCreateOrUpdate - Creates or updates schema configuration for the API. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiSchema.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPISchemaClient("<subscription-id>", cred, nil)
	poller, err := client.BeginCreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<schema-id>",
		armapimanagement.SchemaContract{
			Properties: &armapimanagement.SchemaContractProperties{
				ContentType: to.StringPtr("<content-type>"),
				Document: &armapimanagement.SchemaDocumentProperties{
					Value: to.StringPtr("<value>"),
				},
			},
		},
		&armapimanagement.APISchemaClientBeginCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APISchemaClientCreateOrUpdateResult)
}
Output:

func (*APISchemaClient) Delete

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

Delete - Deletes the schema configuration at the Api. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiSchema.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPISchemaClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<schema-id>",
		"<if-match>",
		&armapimanagement.APISchemaClientDeleteOptions{Force: nil})
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*APISchemaClient) Get

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

Get - Get the schema configuration at the API level. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiSchema.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPISchemaClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<schema-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APISchemaClientGetResult)
}
Output:

func (*APISchemaClient) GetEntityTag

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

GetEntityTag - Gets the entity state (Etag) version of the schema specified by its identifier. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiSchema.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPISchemaClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<schema-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*APISchemaClient) ListByAPI

func (client *APISchemaClient) ListByAPI(resourceGroupName string, serviceName string, apiID string, options *APISchemaClientListByAPIOptions) *APISchemaClientListByAPIPager

ListByAPI - Get the schema configuration at the API level. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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.ListByAPI method.

type APISchemaClientBeginCreateOrUpdateOptions added in v0.3.0

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

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

type APISchemaClientCreateOrUpdatePoller added in v0.3.0

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

APISchemaClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state.

func (*APISchemaClientCreateOrUpdatePoller) Done added in v0.3.0

Done returns true if the LRO has reached a terminal state.

func (*APISchemaClientCreateOrUpdatePoller) FinalResponse added in v0.3.0

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final APISchemaClientCreateOrUpdateResponse will be returned.

func (*APISchemaClientCreateOrUpdatePoller) Poll added in v0.3.0

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*APISchemaClientCreateOrUpdatePoller) ResumeToken added in v0.3.0

func (p *APISchemaClientCreateOrUpdatePoller) ResumeToken() (string, error)

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type APISchemaClientCreateOrUpdatePollerResponse added in v0.3.0

type APISchemaClientCreateOrUpdatePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *APISchemaClientCreateOrUpdatePoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APISchemaClientCreateOrUpdatePollerResponse contains the response from method APISchemaClient.CreateOrUpdate.

func (APISchemaClientCreateOrUpdatePollerResponse) PollUntilDone added in v0.3.0

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*APISchemaClientCreateOrUpdatePollerResponse) Resume added in v0.3.0

Resume rehydrates a APISchemaClientCreateOrUpdatePollerResponse from the provided client and resume token.

type APISchemaClientCreateOrUpdateResponse added in v0.3.0

type APISchemaClientCreateOrUpdateResponse struct {
	APISchemaClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APISchemaClientCreateOrUpdateResponse contains the response from method APISchemaClient.CreateOrUpdate.

type APISchemaClientCreateOrUpdateResult added in v0.3.0

type APISchemaClientCreateOrUpdateResult struct {
	SchemaContract
}

APISchemaClientCreateOrUpdateResult contains the result from method APISchemaClient.CreateOrUpdate.

type APISchemaClientDeleteOptions added in v0.3.0

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 added in v0.3.0

type APISchemaClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APISchemaClientDeleteResponse contains the response from method APISchemaClient.Delete.

type APISchemaClientGetEntityTagOptions added in v0.3.0

type APISchemaClientGetEntityTagOptions struct {
}

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

type APISchemaClientGetEntityTagResponse added in v0.3.0

type APISchemaClientGetEntityTagResponse struct {
	APISchemaClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APISchemaClientGetEntityTagResponse contains the response from method APISchemaClient.GetEntityTag.

type APISchemaClientGetEntityTagResult added in v0.3.0

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

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

APISchemaClientGetEntityTagResult contains the result from method APISchemaClient.GetEntityTag.

type APISchemaClientGetOptions added in v0.3.0

type APISchemaClientGetOptions struct {
}

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

type APISchemaClientGetResponse added in v0.3.0

type APISchemaClientGetResponse struct {
	APISchemaClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APISchemaClientGetResponse contains the response from method APISchemaClient.Get.

type APISchemaClientGetResult added in v0.3.0

type APISchemaClientGetResult struct {
	SchemaContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APISchemaClientGetResult contains the result from method APISchemaClient.Get.

type APISchemaClientListByAPIOptions added in v0.3.0

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.ListByAPI method.

type APISchemaClientListByAPIPager added in v0.3.0

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

APISchemaClientListByAPIPager provides operations for iterating over paged responses.

func (*APISchemaClientListByAPIPager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*APISchemaClientListByAPIPager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*APISchemaClientListByAPIPager) PageResponse added in v0.3.0

PageResponse returns the current APISchemaClientListByAPIResponse page.

type APISchemaClientListByAPIResponse added in v0.3.0

type APISchemaClientListByAPIResponse struct {
	APISchemaClientListByAPIResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APISchemaClientListByAPIResponse contains the response from method APISchemaClient.ListByAPI.

type APISchemaClientListByAPIResult added in v0.3.0

type APISchemaClientListByAPIResult struct {
	SchemaCollection
}

APISchemaClientListByAPIResult contains the result from method APISchemaClient.ListByAPI.

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

NewAPITagDescriptionClient creates a new instance of APITagDescriptionClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiTagDescription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPITagDescriptionClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<tag-description-id>",
		armapimanagement.TagDescriptionCreateParameters{
			Properties: &armapimanagement.TagDescriptionBaseProperties{
				Description:             to.StringPtr("<description>"),
				ExternalDocsDescription: to.StringPtr("<external-docs-description>"),
				ExternalDocsURL:         to.StringPtr("<external-docs-url>"),
			},
		},
		&armapimanagement.APITagDescriptionClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APITagDescriptionClientCreateOrUpdateResult)
}
Output:

func (*APITagDescriptionClient) Delete

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

Delete - Delete tag description for the Api. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiTagDescription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPITagDescriptionClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<tag-description-id>",
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*APITagDescriptionClient) Get

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

Get - Get Tag description in scope of API If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiTagDescription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPITagDescriptionClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<tag-description-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APITagDescriptionClientGetResult)
}
Output:

func (*APITagDescriptionClient) GetEntityTag

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

GetEntityTag - Gets the entity state version of the tag specified by its identifier. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiTagDescription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPITagDescriptionClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<tag-description-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*APITagDescriptionClient) ListByService

func (client *APITagDescriptionClient) ListByService(resourceGroupName string, serviceName string, apiID string, options *APITagDescriptionClientListByServiceOptions) *APITagDescriptionClientListByServicePager

ListByService - 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 If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiTagDescriptions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPITagDescriptionClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		"<api-id>",
		&armapimanagement.APITagDescriptionClientListByServiceOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type APITagDescriptionClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type APITagDescriptionClientCreateOrUpdateResponse struct {
	APITagDescriptionClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APITagDescriptionClientCreateOrUpdateResponse contains the response from method APITagDescriptionClient.CreateOrUpdate.

type APITagDescriptionClientCreateOrUpdateResult added in v0.3.0

type APITagDescriptionClientCreateOrUpdateResult struct {
	TagDescriptionContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APITagDescriptionClientCreateOrUpdateResult contains the result from method APITagDescriptionClient.CreateOrUpdate.

type APITagDescriptionClientDeleteOptions added in v0.3.0

type APITagDescriptionClientDeleteOptions struct {
}

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

type APITagDescriptionClientDeleteResponse added in v0.3.0

type APITagDescriptionClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APITagDescriptionClientDeleteResponse contains the response from method APITagDescriptionClient.Delete.

type APITagDescriptionClientGetEntityTagOptions added in v0.3.0

type APITagDescriptionClientGetEntityTagOptions struct {
}

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

type APITagDescriptionClientGetEntityTagResponse added in v0.3.0

type APITagDescriptionClientGetEntityTagResponse struct {
	APITagDescriptionClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APITagDescriptionClientGetEntityTagResponse contains the response from method APITagDescriptionClient.GetEntityTag.

type APITagDescriptionClientGetEntityTagResult added in v0.3.0

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

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

APITagDescriptionClientGetEntityTagResult contains the result from method APITagDescriptionClient.GetEntityTag.

type APITagDescriptionClientGetOptions added in v0.3.0

type APITagDescriptionClientGetOptions struct {
}

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

type APITagDescriptionClientGetResponse added in v0.3.0

type APITagDescriptionClientGetResponse struct {
	APITagDescriptionClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APITagDescriptionClientGetResponse contains the response from method APITagDescriptionClient.Get.

type APITagDescriptionClientGetResult added in v0.3.0

type APITagDescriptionClientGetResult struct {
	TagDescriptionContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APITagDescriptionClientGetResult contains the result from method APITagDescriptionClient.Get.

type APITagDescriptionClientListByServiceOptions added in v0.3.0

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.ListByService method.

type APITagDescriptionClientListByServicePager added in v0.3.0

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

APITagDescriptionClientListByServicePager provides operations for iterating over paged responses.

func (*APITagDescriptionClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*APITagDescriptionClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*APITagDescriptionClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current APITagDescriptionClientListByServiceResponse page.

type APITagDescriptionClientListByServiceResponse added in v0.3.0

type APITagDescriptionClientListByServiceResponse struct {
	APITagDescriptionClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APITagDescriptionClientListByServiceResponse contains the response from method APITagDescriptionClient.ListByService.

type APITagDescriptionClientListByServiceResult added in v0.3.0

type APITagDescriptionClientListByServiceResult struct {
	TagDescriptionCollection
}

APITagDescriptionClientListByServiceResult contains the result from method APITagDescriptionClient.ListByService.

type APITagResourceContractProperties

type APITagResourceContractProperties struct {
	// Describes the revision of the API. If no value is provided, default revision 1 is created
	APIRevision *string `json:"apiRevision,omitempty"`

	// Description of the API Revision.
	APIRevisionDescription *string `json:"apiRevisionDescription,omitempty"`

	// Type of API.
	APIType *APIType `json:"type,omitempty"`

	// Indicates the version identifier of the API if the API is versioned
	APIVersion *string `json:"apiVersion,omitempty"`

	// Description of the API Version.
	APIVersionDescription *string `json:"apiVersionDescription,omitempty"`

	// A resource identifier for the related ApiVersionSet.
	APIVersionSetID *string `json:"apiVersionSetId,omitempty"`

	// Collection of authentication settings included into this API.
	AuthenticationSettings *AuthenticationSettingsContract `json:"authenticationSettings,omitempty"`

	// Contact information for the API.
	Contact *APIContactInformation `json:"contact,omitempty"`

	// Description of the API. May include HTML formatting tags.
	Description *string `json:"description,omitempty"`

	// API identifier in the form /apis/{apiId}.
	ID *string `json:"id,omitempty"`

	// Indicates if API revision is current api revision.
	IsCurrent *bool `json:"isCurrent,omitempty"`

	// License information for the API.
	License *APILicenseInformation `json:"license,omitempty"`

	// API name.
	Name *string `json:"name,omitempty"`

	// 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 `json:"path,omitempty"`

	// Describes on which protocols the operations in this API can be invoked.
	Protocols []*Protocol `json:"protocols,omitempty"`

	// Absolute URL of the backend service implementing this API.
	ServiceURL *string `json:"serviceUrl,omitempty"`

	// Protocols over which API is made available.
	SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract `json:"subscriptionKeyParameterNames,omitempty"`

	// Specifies whether an API or Product subscription is required for accessing the API.
	SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`

	// A URL to the Terms of Service for the API. MUST be in the format of a URL.
	TermsOfServiceURL *string `json:"termsOfServiceUrl,omitempty"`

	// READ-ONLY; Indicates if API revision is accessible via the gateway.
	IsOnline *bool `json:"isOnline,omitempty" azure:"ro"`
}

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.

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.

func (APIType) ToPtr

func (c APIType) ToPtr() *APIType

ToPtr returns a *APIType pointing to the current value.

type APIUpdateContract

type APIUpdateContract struct {
	// Properties of the API entity that can be updated.
	Properties *APIContractUpdateProperties `json:"properties,omitempty"`
}

APIUpdateContract - API update contract details.

func (APIUpdateContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller 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 `json:"minApiVersion,omitempty"`
}

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

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

NewAPIVersionSetClient creates a new instance of APIVersionSetClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiVersionSet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIVersionSetClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<version-set-id>",
		armapimanagement.APIVersionSetContract{
			Properties: &armapimanagement.APIVersionSetContractProperties{
				Description:      to.StringPtr("<description>"),
				DisplayName:      to.StringPtr("<display-name>"),
				VersioningScheme: armapimanagement.VersioningScheme("Segment").ToPtr(),
			},
		},
		&armapimanagement.APIVersionSetClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APIVersionSetClientCreateOrUpdateResult)
}
Output:

func (*APIVersionSetClient) Delete

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

Delete - Deletes specific Api Version Set. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiVersionSet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIVersionSetClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<version-set-id>",
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*APIVersionSetClient) Get

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

Get - Gets the details of the Api Version Set specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiVersionSet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIVersionSetClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<version-set-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APIVersionSetClientGetResult)
}
Output:

func (*APIVersionSetClient) GetEntityTag

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

GetEntityTag - Gets the entity state (Etag) version of the Api Version Set specified by its identifier. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiVersionSet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIVersionSetClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<version-set-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*APIVersionSetClient) ListByService

func (client *APIVersionSetClient) ListByService(resourceGroupName string, serviceName string, options *APIVersionSetClientListByServiceOptions) *APIVersionSetClientListByServicePager

ListByService - Lists a collection of API Version Sets in the specified service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - APIVersionSetClientListByServiceOptions contains the optional parameters for the APIVersionSetClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiVersionSets.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIVersionSetClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		&armapimanagement.APIVersionSetClientListByServiceOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*APIVersionSetClient) Update

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

Update - Updates the details of the Api VersionSet specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateApiVersionSet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAPIVersionSetClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<version-set-id>",
		"<if-match>",
		armapimanagement.APIVersionSetUpdateParameters{
			Properties: &armapimanagement.APIVersionSetUpdateParametersProperties{
				Description:      to.StringPtr("<description>"),
				DisplayName:      to.StringPtr("<display-name>"),
				VersioningScheme: armapimanagement.VersioningScheme("Segment").ToPtr(),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.APIVersionSetClientUpdateResult)
}
Output:

type APIVersionSetClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type APIVersionSetClientCreateOrUpdateResponse struct {
	APIVersionSetClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIVersionSetClientCreateOrUpdateResponse contains the response from method APIVersionSetClient.CreateOrUpdate.

type APIVersionSetClientCreateOrUpdateResult added in v0.3.0

type APIVersionSetClientCreateOrUpdateResult struct {
	APIVersionSetContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIVersionSetClientCreateOrUpdateResult contains the result from method APIVersionSetClient.CreateOrUpdate.

type APIVersionSetClientDeleteOptions added in v0.3.0

type APIVersionSetClientDeleteOptions struct {
}

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

type APIVersionSetClientDeleteResponse added in v0.3.0

type APIVersionSetClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIVersionSetClientDeleteResponse contains the response from method APIVersionSetClient.Delete.

type APIVersionSetClientGetEntityTagOptions added in v0.3.0

type APIVersionSetClientGetEntityTagOptions struct {
}

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

type APIVersionSetClientGetEntityTagResponse added in v0.3.0

type APIVersionSetClientGetEntityTagResponse struct {
	APIVersionSetClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIVersionSetClientGetEntityTagResponse contains the response from method APIVersionSetClient.GetEntityTag.

type APIVersionSetClientGetEntityTagResult added in v0.3.0

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

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

APIVersionSetClientGetEntityTagResult contains the result from method APIVersionSetClient.GetEntityTag.

type APIVersionSetClientGetOptions added in v0.3.0

type APIVersionSetClientGetOptions struct {
}

APIVersionSetClientGetOptions contains the optional parameters for the APIVersionSetClient.Get method.

type APIVersionSetClientGetResponse added in v0.3.0

type APIVersionSetClientGetResponse struct {
	APIVersionSetClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIVersionSetClientGetResponse contains the response from method APIVersionSetClient.Get.

type APIVersionSetClientGetResult added in v0.3.0

type APIVersionSetClientGetResult struct {
	APIVersionSetContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIVersionSetClientGetResult contains the result from method APIVersionSetClient.Get.

type APIVersionSetClientListByServiceOptions added in v0.3.0

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.ListByService method.

type APIVersionSetClientListByServicePager added in v0.3.0

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

APIVersionSetClientListByServicePager provides operations for iterating over paged responses.

func (*APIVersionSetClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*APIVersionSetClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*APIVersionSetClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current APIVersionSetClientListByServiceResponse page.

type APIVersionSetClientListByServiceResponse added in v0.3.0

type APIVersionSetClientListByServiceResponse struct {
	APIVersionSetClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIVersionSetClientListByServiceResponse contains the response from method APIVersionSetClient.ListByService.

type APIVersionSetClientListByServiceResult added in v0.3.0

type APIVersionSetClientListByServiceResult struct {
	APIVersionSetCollection
}

APIVersionSetClientListByServiceResult contains the result from method APIVersionSetClient.ListByService.

type APIVersionSetClientUpdateOptions added in v0.3.0

type APIVersionSetClientUpdateOptions struct {
}

APIVersionSetClientUpdateOptions contains the optional parameters for the APIVersionSetClient.Update method.

type APIVersionSetClientUpdateResponse added in v0.3.0

type APIVersionSetClientUpdateResponse struct {
	APIVersionSetClientUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

APIVersionSetClientUpdateResponse contains the response from method APIVersionSetClient.Update.

type APIVersionSetClientUpdateResult added in v0.3.0

type APIVersionSetClientUpdateResult struct {
	APIVersionSetContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

APIVersionSetClientUpdateResult contains the result from method APIVersionSetClient.Update.

type APIVersionSetCollection

type APIVersionSetCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// Next page link if any.
	NextLink *string `json:"nextLink,omitempty"`

	// Page values.
	Value []*APIVersionSetContract `json:"value,omitempty"`
}

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.

type APIVersionSetContract

type APIVersionSetContract struct {
	// API VersionSet contract properties.
	Properties *APIVersionSetContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

APIVersionSetContract - API Version Set Contract details.

type APIVersionSetContractDetails

type APIVersionSetContractDetails struct {
	// Description of API Version Set.
	Description *string `json:"description,omitempty"`

	// Identifier for existing API Version Set. Omit this value to create a new Version Set.
	ID *string `json:"id,omitempty"`

	// The display Name of the API Version Set.
	Name *string `json:"name,omitempty"`

	// Name of HTTP header parameter that indicates the API Version if versioningScheme is set to header.
	VersionHeaderName *string `json:"versionHeaderName,omitempty"`

	// Name of query parameter that indicates the API Version if versioningScheme is set to query.
	VersionQueryName *string `json:"versionQueryName,omitempty"`

	// An value that determines where the API Version identifier will be located in a HTTP request.
	VersioningScheme *APIVersionSetContractDetailsVersioningScheme `json:"versioningScheme,omitempty"`
}

APIVersionSetContractDetails - An API Version Set contains the common configuration for a set of API Versions relating

type APIVersionSetContractDetailsVersioningScheme

type APIVersionSetContractDetailsVersioningScheme string

APIVersionSetContractDetailsVersioningScheme - An value that determines where the API Version identifier will be located in a HTTP request.

const (
	APIVersionSetContractDetailsVersioningSchemeHeader  APIVersionSetContractDetailsVersioningScheme = "Header"
	APIVersionSetContractDetailsVersioningSchemeQuery   APIVersionSetContractDetailsVersioningScheme = "Query"
	APIVersionSetContractDetailsVersioningSchemeSegment APIVersionSetContractDetailsVersioningScheme = "Segment"
)

func PossibleAPIVersionSetContractDetailsVersioningSchemeValues

func PossibleAPIVersionSetContractDetailsVersioningSchemeValues() []APIVersionSetContractDetailsVersioningScheme

PossibleAPIVersionSetContractDetailsVersioningSchemeValues returns the possible values for the APIVersionSetContractDetailsVersioningScheme const type.

func (APIVersionSetContractDetailsVersioningScheme) ToPtr

ToPtr returns a *APIVersionSetContractDetailsVersioningScheme pointing to the current value.

type APIVersionSetContractProperties

type APIVersionSetContractProperties struct {
	// REQUIRED; Name of API Version Set
	DisplayName *string `json:"displayName,omitempty"`

	// REQUIRED; An value that determines where the API Version identifier will be located in a HTTP request.
	VersioningScheme *VersioningScheme `json:"versioningScheme,omitempty"`

	// Description of API Version Set.
	Description *string `json:"description,omitempty"`

	// Name of HTTP header parameter that indicates the API Version if versioningScheme is set to header.
	VersionHeaderName *string `json:"versionHeaderName,omitempty"`

	// Name of query parameter that indicates the API Version if versioningScheme is set to query.
	VersionQueryName *string `json:"versionQueryName,omitempty"`
}

APIVersionSetContractProperties - Properties of an API Version Set.

type APIVersionSetEntityBase

type APIVersionSetEntityBase struct {
	// Description of API Version Set.
	Description *string `json:"description,omitempty"`

	// Name of HTTP header parameter that indicates the API Version if versioningScheme is set to header.
	VersionHeaderName *string `json:"versionHeaderName,omitempty"`

	// Name of query parameter that indicates the API Version if versioningScheme is set to query.
	VersionQueryName *string `json:"versionQueryName,omitempty"`
}

APIVersionSetEntityBase - API Version set base parameters

type APIVersionSetUpdateParameters

type APIVersionSetUpdateParameters struct {
	// Parameters to update or create an API Version Set Contract.
	Properties *APIVersionSetUpdateParametersProperties `json:"properties,omitempty"`
}

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.

type APIVersionSetUpdateParametersProperties

type APIVersionSetUpdateParametersProperties struct {
	// Description of API Version Set.
	Description *string `json:"description,omitempty"`

	// Name of API Version Set
	DisplayName *string `json:"displayName,omitempty"`

	// Name of HTTP header parameter that indicates the API Version if versioningScheme is set to header.
	VersionHeaderName *string `json:"versionHeaderName,omitempty"`

	// Name of query parameter that indicates the API Version if versioningScheme is set to query.
	VersionQueryName *string `json:"versionQueryName,omitempty"`

	// An value that determines where the API Version identifier will be located in a HTTP request.
	VersioningScheme *VersioningScheme `json:"versioningScheme,omitempty"`
}

APIVersionSetUpdateParametersProperties - Properties used to create or update an API Version Set.

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.

func (AccessIDName) ToPtr

func (c AccessIDName) ToPtr() *AccessIDName

ToPtr returns a *AccessIDName pointing to the current value.

type AccessInformationCollection

type AccessInformationCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// READ-ONLY; Next page link if any.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; Page values.
	Value []*AccessInformationContract `json:"value,omitempty" azure:"ro"`
}

AccessInformationCollection - Paged AccessInformation list representation.

func (AccessInformationCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AccessInformationCollection.

type AccessInformationContract

type AccessInformationContract struct {
	// AccessInformation entity contract properties.
	Properties *AccessInformationContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

AccessInformationContract - Tenant Settings.

type AccessInformationContractProperties

type AccessInformationContractProperties struct {
	// Determines whether direct access is enabled.
	Enabled *bool `json:"enabled,omitempty"`

	// Access Information type ('access' or 'gitAccess')
	ID *string `json:"id,omitempty"`

	// Principal (User) Identifier.
	PrincipalID *string `json:"principalId,omitempty"`
}

AccessInformationContractProperties - Tenant access information contract of the API Management service.

type AccessInformationCreateParameterProperties

type AccessInformationCreateParameterProperties struct {
	// Determines whether direct access is enabled.
	Enabled *bool `json:"enabled,omitempty"`

	// Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.
	PrimaryKey *string `json:"primaryKey,omitempty"`

	// Principal (User) Identifier.
	PrincipalID *string `json:"principalId,omitempty"`

	// Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the
	// value.
	SecondaryKey *string `json:"secondaryKey,omitempty"`
}

AccessInformationCreateParameterProperties - Tenant access information update parameters of the API Management service

type AccessInformationCreateParameters

type AccessInformationCreateParameters struct {
	// Tenant access information update parameter properties.
	Properties *AccessInformationCreateParameterProperties `json:"properties,omitempty"`
}

AccessInformationCreateParameters - Tenant access information update parameters.

type AccessInformationSecretsContract

type AccessInformationSecretsContract struct {
	// Determines whether direct access is enabled.
	Enabled *bool `json:"enabled,omitempty"`

	// Access Information type ('access' or 'gitAccess')
	ID *string `json:"id,omitempty"`

	// Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.
	PrimaryKey *string `json:"primaryKey,omitempty"`

	// Principal (User) Identifier.
	PrincipalID *string `json:"principalId,omitempty"`

	// Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the
	// value.
	SecondaryKey *string `json:"secondaryKey,omitempty"`
}

AccessInformationSecretsContract - Tenant access information contract of the API Management service.

type AccessInformationUpdateParameterProperties

type AccessInformationUpdateParameterProperties struct {
	// Determines whether direct access is enabled.
	Enabled *bool `json:"enabled,omitempty"`
}

AccessInformationUpdateParameterProperties - Tenant access information update parameters of the API Management service

type AccessInformationUpdateParameters

type AccessInformationUpdateParameters struct {
	// Tenant access information update parameter properties.
	Properties *AccessInformationUpdateParameterProperties `json:"properties,omitempty"`
}

AccessInformationUpdateParameters - Tenant access information update parameters.

func (AccessInformationUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller 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.

func (AccessType) ToPtr

func (c AccessType) ToPtr() *AccessType

ToPtr returns a *AccessType pointing to the current value.

type AdditionalLocation

type AdditionalLocation struct {
	// REQUIRED; The location name of the additional region among Azure Data center regions.
	Location *string `json:"location,omitempty"`

	// REQUIRED; SKU properties of the API Management service.
	SKU *ServiceSKUProperties `json:"sku,omitempty"`

	// 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 `json:"disableGateway,omitempty"`

	// 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 `json:"publicIpAddressId,omitempty"`

	// Virtual network configuration for the location.
	VirtualNetworkConfiguration *VirtualNetworkConfiguration `json:"virtualNetworkConfiguration,omitempty"`

	// A list of availability zones denoting where the resource needs to come from.
	Zones []*string `json:"zones,omitempty"`

	// READ-ONLY; Gateway URL of the API Management service in the Region.
	GatewayRegionalURL *string `json:"gatewayRegionalUrl,omitempty" azure:"ro"`

	// READ-ONLY; Compute Platform Version running the service.
	PlatformVersion *PlatformVersion `json:"platformVersion,omitempty" azure:"ro"`

	// 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 `json:"privateIPAddresses,omitempty" azure:"ro"`

	// 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 `json:"publicIPAddresses,omitempty" azure:"ro"`
}

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.

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.

func (AlwaysLog) ToPtr

func (c AlwaysLog) ToPtr() *AlwaysLog

ToPtr returns a *AlwaysLog pointing to the current value.

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.

func (ApimIdentityType) ToPtr

ToPtr returns a *ApimIdentityType pointing to the current value.

type ApimResource

type ApimResource struct {
	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource ID.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type for API Management resource is set to Microsoft.ApiManagement.
	Type *string `json:"type,omitempty" azure:"ro"`
}

ApimResource - The Resource definition.

func (ApimResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller 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.

func (AppType) ToPtr

func (c AppType) ToPtr() *AppType

ToPtr returns a *AppType pointing to the current value.

type ArmIDWrapper

type ArmIDWrapper struct {
	// READ-ONLY
	ID *string `json:"id,omitempty" azure:"ro"`
}

ArmIDWrapper - A wrapper for an ARM resource id

type AssociationContract

type AssociationContract struct {
	// Association entity contract properties.
	Properties *AssociationContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

AssociationContract - Association entity details.

type AssociationContractProperties

type AssociationContractProperties struct {
	// Provisioning state.
	ProvisioningState *string `json:"provisioningState,omitempty"`
}

AssociationContractProperties - Association entity contract properties.

type AsyncOperationStatus

type AsyncOperationStatus string

AsyncOperationStatus - Status of an async operation.

const (
	AsyncOperationStatusStarted    AsyncOperationStatus = "Started"
	AsyncOperationStatusInProgress AsyncOperationStatus = "InProgress"
	AsyncOperationStatusSucceeded  AsyncOperationStatus = "Succeeded"
	AsyncOperationStatusFailed     AsyncOperationStatus = "Failed"
)

func PossibleAsyncOperationStatusValues

func PossibleAsyncOperationStatusValues() []AsyncOperationStatus

PossibleAsyncOperationStatusValues returns the possible values for the AsyncOperationStatus const type.

func (AsyncOperationStatus) ToPtr

ToPtr returns a *AsyncOperationStatus pointing to the current value.

type AuthenticationSettingsContract

type AuthenticationSettingsContract struct {
	// OAuth2 Authentication settings
	OAuth2 *OAuth2AuthenticationSettingsContract `json:"oAuth2,omitempty"`

	// OpenID Connect Authentication Settings
	Openid *OpenIDAuthenticationSettingsContract `json:"openid,omitempty"`
}

AuthenticationSettingsContract - API Authentication Settings.

type AuthorizationMethod

type AuthorizationMethod string
const (
	AuthorizationMethodHEAD    AuthorizationMethod = "HEAD"
	AuthorizationMethodOPTIONS AuthorizationMethod = "OPTIONS"
	AuthorizationMethodTRACE   AuthorizationMethod = "TRACE"
	AuthorizationMethodGET     AuthorizationMethod = "GET"
	AuthorizationMethodPOST    AuthorizationMethod = "POST"
	AuthorizationMethodPUT     AuthorizationMethod = "PUT"
	AuthorizationMethodPATCH   AuthorizationMethod = "PATCH"
	AuthorizationMethodDELETE  AuthorizationMethod = "DELETE"
)

func PossibleAuthorizationMethodValues

func PossibleAuthorizationMethodValues() []AuthorizationMethod

PossibleAuthorizationMethodValues returns the possible values for the AuthorizationMethod const type.

func (AuthorizationMethod) ToPtr

ToPtr returns a *AuthorizationMethod pointing to the current value.

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

NewAuthorizationServerClient creates a new instance of AuthorizationServerClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*AuthorizationServerClient) CreateOrUpdate

CreateOrUpdate - Creates new authorization server or updates an existing authorization server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateAuthorizationServer.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAuthorizationServerClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<authsid>",
		armapimanagement.AuthorizationServerContract{
			Properties: &armapimanagement.AuthorizationServerContractProperties{
				Description: to.StringPtr("<description>"),
				AuthorizationMethods: []*armapimanagement.AuthorizationMethod{
					armapimanagement.AuthorizationMethodGET.ToPtr()},
				BearerTokenSendingMethods: []*armapimanagement.BearerTokenSendingMethod{
					armapimanagement.BearerTokenSendingMethod("authorizationHeader").ToPtr()},
				DefaultScope:               to.StringPtr("<default-scope>"),
				ResourceOwnerPassword:      to.StringPtr("<resource-owner-password>"),
				ResourceOwnerUsername:      to.StringPtr("<resource-owner-username>"),
				SupportState:               to.BoolPtr(true),
				TokenEndpoint:              to.StringPtr("<token-endpoint>"),
				AuthorizationEndpoint:      to.StringPtr("<authorization-endpoint>"),
				ClientID:                   to.StringPtr("<client-id>"),
				ClientRegistrationEndpoint: to.StringPtr("<client-registration-endpoint>"),
				ClientSecret:               to.StringPtr("<client-secret>"),
				DisplayName:                to.StringPtr("<display-name>"),
				GrantTypes: []*armapimanagement.GrantType{
					armapimanagement.GrantType("authorizationCode").ToPtr(),
					armapimanagement.GrantType("implicit").ToPtr()},
			},
		},
		&armapimanagement.AuthorizationServerClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.AuthorizationServerClientCreateOrUpdateResult)
}
Output:

func (*AuthorizationServerClient) Delete

func (client *AuthorizationServerClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, authsid string, ifMatch string, options *AuthorizationServerClientDeleteOptions) (AuthorizationServerClientDeleteResponse, error)

Delete - Deletes specific authorization server instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteAuthorizationServer.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAuthorizationServerClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<authsid>",
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*AuthorizationServerClient) Get

Get - Gets the details of the authorization server specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetAuthorizationServer.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAuthorizationServerClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<authsid>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.AuthorizationServerClientGetResult)
}
Output:

func (*AuthorizationServerClient) GetEntityTag

GetEntityTag - Gets the entity state (Etag) version of the authorizationServer specified by its identifier. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadAuthorizationServer.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAuthorizationServerClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<authsid>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*AuthorizationServerClient) ListByService

ListByService - Lists a collection of authorization servers defined within a service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - AuthorizationServerClientListByServiceOptions contains the optional parameters for the AuthorizationServerClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListAuthorizationServers.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAuthorizationServerClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		&armapimanagement.AuthorizationServerClientListByServiceOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*AuthorizationServerClient) ListSecrets

ListSecrets - Gets the client secret details of the authorization server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementAuthorizationServerListSecrets.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAuthorizationServerClient("<subscription-id>", cred, nil)
	res, err := client.ListSecrets(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<authsid>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.AuthorizationServerClientListSecretsResult)
}
Output:

func (*AuthorizationServerClient) Update

Update - Updates the details of the authorization server specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateAuthorizationServer.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewAuthorizationServerClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<authsid>",
		"<if-match>",
		armapimanagement.AuthorizationServerUpdateContract{
			Properties: &armapimanagement.AuthorizationServerUpdateContractProperties{
				ClientID:     to.StringPtr("<client-id>"),
				ClientSecret: to.StringPtr("<client-secret>"),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.AuthorizationServerClientUpdateResult)
}
Output:

type AuthorizationServerClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type AuthorizationServerClientCreateOrUpdateResponse struct {
	AuthorizationServerClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

AuthorizationServerClientCreateOrUpdateResponse contains the response from method AuthorizationServerClient.CreateOrUpdate.

type AuthorizationServerClientCreateOrUpdateResult added in v0.3.0

type AuthorizationServerClientCreateOrUpdateResult struct {
	AuthorizationServerContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

AuthorizationServerClientCreateOrUpdateResult contains the result from method AuthorizationServerClient.CreateOrUpdate.

type AuthorizationServerClientDeleteOptions added in v0.3.0

type AuthorizationServerClientDeleteOptions struct {
}

AuthorizationServerClientDeleteOptions contains the optional parameters for the AuthorizationServerClient.Delete method.

type AuthorizationServerClientDeleteResponse added in v0.3.0

type AuthorizationServerClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

AuthorizationServerClientDeleteResponse contains the response from method AuthorizationServerClient.Delete.

type AuthorizationServerClientGetEntityTagOptions added in v0.3.0

type AuthorizationServerClientGetEntityTagOptions struct {
}

AuthorizationServerClientGetEntityTagOptions contains the optional parameters for the AuthorizationServerClient.GetEntityTag method.

type AuthorizationServerClientGetEntityTagResponse added in v0.3.0

type AuthorizationServerClientGetEntityTagResponse struct {
	AuthorizationServerClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

AuthorizationServerClientGetEntityTagResponse contains the response from method AuthorizationServerClient.GetEntityTag.

type AuthorizationServerClientGetEntityTagResult added in v0.3.0

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

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

AuthorizationServerClientGetEntityTagResult contains the result from method AuthorizationServerClient.GetEntityTag.

type AuthorizationServerClientGetOptions added in v0.3.0

type AuthorizationServerClientGetOptions struct {
}

AuthorizationServerClientGetOptions contains the optional parameters for the AuthorizationServerClient.Get method.

type AuthorizationServerClientGetResponse added in v0.3.0

type AuthorizationServerClientGetResponse struct {
	AuthorizationServerClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

AuthorizationServerClientGetResponse contains the response from method AuthorizationServerClient.Get.

type AuthorizationServerClientGetResult added in v0.3.0

type AuthorizationServerClientGetResult struct {
	AuthorizationServerContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

AuthorizationServerClientGetResult contains the result from method AuthorizationServerClient.Get.

type AuthorizationServerClientListByServiceOptions added in v0.3.0

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.ListByService method.

type AuthorizationServerClientListByServicePager added in v0.3.0

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

AuthorizationServerClientListByServicePager provides operations for iterating over paged responses.

func (*AuthorizationServerClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*AuthorizationServerClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*AuthorizationServerClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current AuthorizationServerClientListByServiceResponse page.

type AuthorizationServerClientListByServiceResponse added in v0.3.0

type AuthorizationServerClientListByServiceResponse struct {
	AuthorizationServerClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

AuthorizationServerClientListByServiceResponse contains the response from method AuthorizationServerClient.ListByService.

type AuthorizationServerClientListByServiceResult added in v0.3.0

type AuthorizationServerClientListByServiceResult struct {
	AuthorizationServerCollection
}

AuthorizationServerClientListByServiceResult contains the result from method AuthorizationServerClient.ListByService.

type AuthorizationServerClientListSecretsOptions added in v0.3.0

type AuthorizationServerClientListSecretsOptions struct {
}

AuthorizationServerClientListSecretsOptions contains the optional parameters for the AuthorizationServerClient.ListSecrets method.

type AuthorizationServerClientListSecretsResponse added in v0.3.0

type AuthorizationServerClientListSecretsResponse struct {
	AuthorizationServerClientListSecretsResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

AuthorizationServerClientListSecretsResponse contains the response from method AuthorizationServerClient.ListSecrets.

type AuthorizationServerClientListSecretsResult added in v0.3.0

type AuthorizationServerClientListSecretsResult struct {
	AuthorizationServerSecretsContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

AuthorizationServerClientListSecretsResult contains the result from method AuthorizationServerClient.ListSecrets.

type AuthorizationServerClientUpdateOptions added in v0.3.0

type AuthorizationServerClientUpdateOptions struct {
}

AuthorizationServerClientUpdateOptions contains the optional parameters for the AuthorizationServerClient.Update method.

type AuthorizationServerClientUpdateResponse added in v0.3.0

type AuthorizationServerClientUpdateResponse struct {
	AuthorizationServerClientUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

AuthorizationServerClientUpdateResponse contains the response from method AuthorizationServerClient.Update.

type AuthorizationServerClientUpdateResult added in v0.3.0

type AuthorizationServerClientUpdateResult struct {
	AuthorizationServerContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

AuthorizationServerClientUpdateResult contains the result from method AuthorizationServerClient.Update.

type AuthorizationServerCollection

type AuthorizationServerCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// Next page link if any.
	NextLink *string `json:"nextLink,omitempty"`

	// Page values.
	Value []*AuthorizationServerContract `json:"value,omitempty"`
}

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.

type AuthorizationServerContract

type AuthorizationServerContract struct {
	// Properties of the External OAuth authorization server Contract.
	Properties *AuthorizationServerContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

AuthorizationServerContract - External OAuth authorization server settings.

type AuthorizationServerContractBaseProperties

type AuthorizationServerContractBaseProperties struct {
	// HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
	AuthorizationMethods []*AuthorizationMethod `json:"authorizationMethods,omitempty"`

	// Specifies the mechanism by which access token is passed to the API.
	BearerTokenSendingMethods []*BearerTokenSendingMethod `json:"bearerTokenSendingMethods,omitempty"`

	// 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 `json:"clientAuthenticationMethod,omitempty"`

	// 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 `json:"defaultScope,omitempty"`

	// Description of the authorization server. Can contain HTML formatting tags.
	Description *string `json:"description,omitempty"`

	// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default
	// resource owner password.
	ResourceOwnerPassword *string `json:"resourceOwnerPassword,omitempty"`

	// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default
	// resource owner username.
	ResourceOwnerUsername *string `json:"resourceOwnerUsername,omitempty"`

	// 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 `json:"supportState,omitempty"`

	// 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 `json:"tokenBodyParameters,omitempty"`

	// OAuth token endpoint. Contains absolute URI to entity being referenced.
	TokenEndpoint *string `json:"tokenEndpoint,omitempty"`
}

AuthorizationServerContractBaseProperties - External OAuth authorization server Update settings contract.

func (AuthorizationServerContractBaseProperties) MarshalJSON

MarshalJSON implements the json.Marshaller 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 `json:"authorizationEndpoint,omitempty"`

	// REQUIRED; Client or app id registered with this authorization server.
	ClientID *string `json:"clientId,omitempty"`

	// 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 `json:"clientRegistrationEndpoint,omitempty"`

	// REQUIRED; User-friendly authorization server name.
	DisplayName *string `json:"displayName,omitempty"`

	// REQUIRED; Form of an authorization grant, which the client uses to request the access token.
	GrantTypes []*GrantType `json:"grantTypes,omitempty"`

	// HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
	AuthorizationMethods []*AuthorizationMethod `json:"authorizationMethods,omitempty"`

	// Specifies the mechanism by which access token is passed to the API.
	BearerTokenSendingMethods []*BearerTokenSendingMethod `json:"bearerTokenSendingMethods,omitempty"`

	// 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 `json:"clientAuthenticationMethod,omitempty"`

	// 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 `json:"clientSecret,omitempty"`

	// 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 `json:"defaultScope,omitempty"`

	// Description of the authorization server. Can contain HTML formatting tags.
	Description *string `json:"description,omitempty"`

	// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default
	// resource owner password.
	ResourceOwnerPassword *string `json:"resourceOwnerPassword,omitempty"`

	// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default
	// resource owner username.
	ResourceOwnerUsername *string `json:"resourceOwnerUsername,omitempty"`

	// 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 `json:"supportState,omitempty"`

	// 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 `json:"tokenBodyParameters,omitempty"`

	// OAuth token endpoint. Contains absolute URI to entity being referenced.
	TokenEndpoint *string `json:"tokenEndpoint,omitempty"`
}

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.

type AuthorizationServerSecretsContract

type AuthorizationServerSecretsContract struct {
	// oAuth Authorization Server Secrets.
	ClientSecret *string `json:"clientSecret,omitempty"`

	// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default
	// resource owner password.
	ResourceOwnerPassword *string `json:"resourceOwnerPassword,omitempty"`

	// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default
	// resource owner username.
	ResourceOwnerUsername *string `json:"resourceOwnerUsername,omitempty"`
}

AuthorizationServerSecretsContract - OAuth Server Secrets Contract.

type AuthorizationServerUpdateContract

type AuthorizationServerUpdateContract struct {
	// Properties of the External OAuth authorization server update Contract.
	Properties *AuthorizationServerUpdateContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

AuthorizationServerUpdateContract - External OAuth authorization server settings.

func (AuthorizationServerUpdateContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AuthorizationServerUpdateContract.

type AuthorizationServerUpdateContractProperties

type AuthorizationServerUpdateContractProperties struct {
	// OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.
	AuthorizationEndpoint *string `json:"authorizationEndpoint,omitempty"`

	// HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
	AuthorizationMethods []*AuthorizationMethod `json:"authorizationMethods,omitempty"`

	// Specifies the mechanism by which access token is passed to the API.
	BearerTokenSendingMethods []*BearerTokenSendingMethod `json:"bearerTokenSendingMethods,omitempty"`

	// 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 `json:"clientAuthenticationMethod,omitempty"`

	// Client or app id registered with this authorization server.
	ClientID *string `json:"clientId,omitempty"`

	// 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 `json:"clientRegistrationEndpoint,omitempty"`

	// 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 `json:"clientSecret,omitempty"`

	// 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 `json:"defaultScope,omitempty"`

	// Description of the authorization server. Can contain HTML formatting tags.
	Description *string `json:"description,omitempty"`

	// User-friendly authorization server name.
	DisplayName *string `json:"displayName,omitempty"`

	// Form of an authorization grant, which the client uses to request the access token.
	GrantTypes []*GrantType `json:"grantTypes,omitempty"`

	// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default
	// resource owner password.
	ResourceOwnerPassword *string `json:"resourceOwnerPassword,omitempty"`

	// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default
	// resource owner username.
	ResourceOwnerUsername *string `json:"resourceOwnerUsername,omitempty"`

	// 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 `json:"supportState,omitempty"`

	// 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 `json:"tokenBodyParameters,omitempty"`

	// OAuth token endpoint. Contains absolute URI to entity being referenced.
	TokenEndpoint *string `json:"tokenEndpoint,omitempty"`
}

AuthorizationServerUpdateContractProperties - External OAuth authorization server Update settings contract.

func (AuthorizationServerUpdateContractProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type AuthorizationServerUpdateContractProperties.

type BackendAuthorizationHeaderCredentials

type BackendAuthorizationHeaderCredentials struct {
	// REQUIRED; Authentication Parameter value.
	Parameter *string `json:"parameter,omitempty"`

	// REQUIRED; Authentication Scheme name.
	Scheme *string `json:"scheme,omitempty"`
}

BackendAuthorizationHeaderCredentials - Authorization header information.

type BackendBaseParameters

type BackendBaseParameters struct {
	// Backend Credentials Contract Properties
	Credentials *BackendCredentialsContract `json:"credentials,omitempty"`

	// Backend Description.
	Description *string `json:"description,omitempty"`

	// Backend Properties contract
	Properties *BackendProperties `json:"properties,omitempty"`

	// Backend Proxy Contract Properties
	Proxy *BackendProxyContract `json:"proxy,omitempty"`

	// 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 `json:"resourceId,omitempty"`

	// Backend TLS Properties
	TLS *BackendTLSProperties `json:"tls,omitempty"`

	// Backend Title.
	Title *string `json:"title,omitempty"`
}

BackendBaseParameters - Backend entity base Parameter set.

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

NewBackendClient creates a new instance of BackendClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateBackendProxyBackend.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewBackendClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<backend-id>",
		armapimanagement.BackendContract{
			Properties: &armapimanagement.BackendContractProperties{
				Description: to.StringPtr("<description>"),
				Credentials: &armapimanagement.BackendCredentialsContract{
					Authorization: &armapimanagement.BackendAuthorizationHeaderCredentials{
						Parameter: to.StringPtr("<parameter>"),
						Scheme:    to.StringPtr("<scheme>"),
					},
					Header: map[string][]*string{
						"x-my-1": {
							to.StringPtr("val1"),
							to.StringPtr("val2")},
					},
					Query: map[string][]*string{
						"sv": {
							to.StringPtr("xx"),
							to.StringPtr("bb"),
							to.StringPtr("cc")},
					},
				},
				Proxy: &armapimanagement.BackendProxyContract{
					Password: to.StringPtr("<password>"),
					URL:      to.StringPtr("<url>"),
					Username: to.StringPtr("<username>"),
				},
				TLS: &armapimanagement.BackendTLSProperties{
					ValidateCertificateChain: to.BoolPtr(true),
					ValidateCertificateName:  to.BoolPtr(true),
				},
				URL:      to.StringPtr("<url>"),
				Protocol: armapimanagement.BackendProtocol("http").ToPtr(),
			},
		},
		&armapimanagement.BackendClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.BackendClientCreateOrUpdateResult)
}
Output:

func (*BackendClient) Delete

func (client *BackendClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, backendID string, ifMatch string, options *BackendClientDeleteOptions) (BackendClientDeleteResponse, error)

Delete - Deletes the specified backend. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteBackend.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewBackendClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<backend-id>",
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*BackendClient) Get

func (client *BackendClient) Get(ctx context.Context, resourceGroupName string, serviceName string, backendID string, options *BackendClientGetOptions) (BackendClientGetResponse, error)

Get - Gets the details of the backend specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetBackend.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewBackendClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<backend-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.BackendClientGetResult)
}
Output:

func (*BackendClient) GetEntityTag

func (client *BackendClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, backendID string, options *BackendClientGetEntityTagOptions) (BackendClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the backend specified by its identifier. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadBackend.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewBackendClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<backend-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*BackendClient) ListByService

func (client *BackendClient) ListByService(resourceGroupName string, serviceName string, options *BackendClientListByServiceOptions) *BackendClientListByServicePager

ListByService - Lists a collection of backends in the specified service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - BackendClientListByServiceOptions contains the optional parameters for the BackendClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListBackends.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewBackendClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		&armapimanagement.BackendClientListByServiceOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*BackendClient) Reconnect

func (client *BackendClient) Reconnect(ctx context.Context, resourceGroupName string, serviceName string, backendID string, options *BackendClientReconnectOptions) (BackendClientReconnectResponse, error)

Reconnect - Notifies the APIM proxy 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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementBackendReconnect.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewBackendClient("<subscription-id>", cred, nil)
	_, err = client.Reconnect(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<backend-id>",
		&armapimanagement.BackendClientReconnectOptions{Parameters: &armapimanagement.BackendReconnectContract{
			Properties: &armapimanagement.BackendReconnectProperties{
				After: to.StringPtr("<after>"),
			},
		},
		})
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*BackendClient) Update

func (client *BackendClient) Update(ctx context.Context, resourceGroupName string, serviceName string, backendID string, ifMatch string, parameters BackendUpdateParameters, options *BackendClientUpdateOptions) (BackendClientUpdateResponse, error)

Update - Updates an existing backend. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateBackend.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewBackendClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<backend-id>",
		"<if-match>",
		armapimanagement.BackendUpdateParameters{
			Properties: &armapimanagement.BackendUpdateParameterProperties{
				Description: to.StringPtr("<description>"),
				TLS: &armapimanagement.BackendTLSProperties{
					ValidateCertificateChain: to.BoolPtr(false),
					ValidateCertificateName:  to.BoolPtr(true),
				},
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.BackendClientUpdateResult)
}
Output:

type BackendClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type BackendClientCreateOrUpdateResponse struct {
	BackendClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

BackendClientCreateOrUpdateResponse contains the response from method BackendClient.CreateOrUpdate.

type BackendClientCreateOrUpdateResult added in v0.3.0

type BackendClientCreateOrUpdateResult struct {
	BackendContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

BackendClientCreateOrUpdateResult contains the result from method BackendClient.CreateOrUpdate.

type BackendClientDeleteOptions added in v0.3.0

type BackendClientDeleteOptions struct {
}

BackendClientDeleteOptions contains the optional parameters for the BackendClient.Delete method.

type BackendClientDeleteResponse added in v0.3.0

type BackendClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

BackendClientDeleteResponse contains the response from method BackendClient.Delete.

type BackendClientGetEntityTagOptions added in v0.3.0

type BackendClientGetEntityTagOptions struct {
}

BackendClientGetEntityTagOptions contains the optional parameters for the BackendClient.GetEntityTag method.

type BackendClientGetEntityTagResponse added in v0.3.0

type BackendClientGetEntityTagResponse struct {
	BackendClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

BackendClientGetEntityTagResponse contains the response from method BackendClient.GetEntityTag.

type BackendClientGetEntityTagResult added in v0.3.0

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

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

BackendClientGetEntityTagResult contains the result from method BackendClient.GetEntityTag.

type BackendClientGetOptions added in v0.3.0

type BackendClientGetOptions struct {
}

BackendClientGetOptions contains the optional parameters for the BackendClient.Get method.

type BackendClientGetResponse added in v0.3.0

type BackendClientGetResponse struct {
	BackendClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

BackendClientGetResponse contains the response from method BackendClient.Get.

type BackendClientGetResult added in v0.3.0

type BackendClientGetResult struct {
	BackendContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

BackendClientGetResult contains the result from method BackendClient.Get.

type BackendClientListByServiceOptions added in v0.3.0

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.ListByService method.

type BackendClientListByServicePager added in v0.3.0

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

BackendClientListByServicePager provides operations for iterating over paged responses.

func (*BackendClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*BackendClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*BackendClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current BackendClientListByServiceResponse page.

type BackendClientListByServiceResponse added in v0.3.0

type BackendClientListByServiceResponse struct {
	BackendClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

BackendClientListByServiceResponse contains the response from method BackendClient.ListByService.

type BackendClientListByServiceResult added in v0.3.0

type BackendClientListByServiceResult struct {
	BackendCollection
}

BackendClientListByServiceResult contains the result from method BackendClient.ListByService.

type BackendClientReconnectOptions added in v0.3.0

type BackendClientReconnectOptions struct {
	// Reconnect request parameters.
	Parameters *BackendReconnectContract
}

BackendClientReconnectOptions contains the optional parameters for the BackendClient.Reconnect method.

type BackendClientReconnectResponse added in v0.3.0

type BackendClientReconnectResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

BackendClientReconnectResponse contains the response from method BackendClient.Reconnect.

type BackendClientUpdateOptions added in v0.3.0

type BackendClientUpdateOptions struct {
}

BackendClientUpdateOptions contains the optional parameters for the BackendClient.Update method.

type BackendClientUpdateResponse added in v0.3.0

type BackendClientUpdateResponse struct {
	BackendClientUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

BackendClientUpdateResponse contains the response from method BackendClient.Update.

type BackendClientUpdateResult added in v0.3.0

type BackendClientUpdateResult struct {
	BackendContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

BackendClientUpdateResult contains the result from method BackendClient.Update.

type BackendCollection

type BackendCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// Next page link if any.
	NextLink *string `json:"nextLink,omitempty"`

	// Backend values.
	Value []*BackendContract `json:"value,omitempty"`
}

BackendCollection - Paged Backend list representation.

func (BackendCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type BackendCollection.

type BackendContract

type BackendContract struct {
	// Backend entity contract properties.
	Properties *BackendContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

BackendContract - Backend details.

type BackendContractProperties

type BackendContractProperties struct {
	// REQUIRED; Backend communication protocol.
	Protocol *BackendProtocol `json:"protocol,omitempty"`

	// REQUIRED; Runtime Url of the Backend.
	URL *string `json:"url,omitempty"`

	// Backend Credentials Contract Properties
	Credentials *BackendCredentialsContract `json:"credentials,omitempty"`

	// Backend Description.
	Description *string `json:"description,omitempty"`

	// Backend Properties contract
	Properties *BackendProperties `json:"properties,omitempty"`

	// Backend Proxy Contract Properties
	Proxy *BackendProxyContract `json:"proxy,omitempty"`

	// 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 `json:"resourceId,omitempty"`

	// Backend TLS Properties
	TLS *BackendTLSProperties `json:"tls,omitempty"`

	// Backend Title.
	Title *string `json:"title,omitempty"`
}

BackendContractProperties - Parameters supplied to the Create Backend operation.

type BackendCredentialsContract

type BackendCredentialsContract struct {
	// Authorization header authentication
	Authorization *BackendAuthorizationHeaderCredentials `json:"authorization,omitempty"`

	// List of Client Certificate Thumbprints. Will be ignored if certificatesIds are provided.
	Certificate []*string `json:"certificate,omitempty"`

	// List of Client Certificate Ids.
	CertificateIDs []*string `json:"certificateIds,omitempty"`

	// Header Parameter description.
	Header map[string][]*string `json:"header,omitempty"`

	// Query Parameter description.
	Query map[string][]*string `json:"query,omitempty"`
}

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.

type BackendProperties

type BackendProperties struct {
	// Backend Service Fabric Cluster Properties
	ServiceFabricCluster *BackendServiceFabricClusterProperties `json:"serviceFabricCluster,omitempty"`
}

BackendProperties - Properties specific to the Backend Type.

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.

func (BackendProtocol) ToPtr

func (c BackendProtocol) ToPtr() *BackendProtocol

ToPtr returns a *BackendProtocol pointing to the current value.

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 `json:"url,omitempty"`

	// Password to connect to the WebProxy Server
	Password *string `json:"password,omitempty"`

	// Username to connect to the WebProxy server
	Username *string `json:"username,omitempty"`
}

BackendProxyContract - Details of the Backend WebProxy Server to use in the Request to Backend.

type BackendReconnectContract

type BackendReconnectContract struct {
	// Reconnect request properties.
	Properties *BackendReconnectProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

BackendReconnectContract - Reconnect request parameters.

type BackendReconnectProperties

type BackendReconnectProperties struct {
	// Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconnect is PT2M.
	After *string `json:"after,omitempty"`
}

BackendReconnectProperties - Properties to control reconnect requests.

type BackendServiceFabricClusterProperties

type BackendServiceFabricClusterProperties struct {
	// REQUIRED; The cluster management endpoint.
	ManagementEndpoints []*string `json:"managementEndpoints,omitempty"`

	// The client certificate id for the management endpoint.
	ClientCertificateID *string `json:"clientCertificateId,omitempty"`

	// The client certificate thumbprint for the management endpoint. Will be ignored if certificatesIds are provided
	ClientCertificatethumbprint *string `json:"clientCertificatethumbprint,omitempty"`

	// Maximum number of retries while attempting resolve the partition.
	MaxPartitionResolutionRetries *int32 `json:"maxPartitionResolutionRetries,omitempty"`

	// Thumbprints of certificates cluster management service uses for tls communication
	ServerCertificateThumbprints []*string `json:"serverCertificateThumbprints,omitempty"`

	// Server X509 Certificate Names Collection
	ServerX509Names []*X509CertificateName `json:"serverX509Names,omitempty"`
}

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.

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 `json:"validateCertificateChain,omitempty"`

	// Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for this backend
	// host.
	ValidateCertificateName *bool `json:"validateCertificateName,omitempty"`
}

BackendTLSProperties - Properties controlling TLS Certificate Validation.

type BackendUpdateParameterProperties

type BackendUpdateParameterProperties struct {
	// Backend Credentials Contract Properties
	Credentials *BackendCredentialsContract `json:"credentials,omitempty"`

	// Backend Description.
	Description *string `json:"description,omitempty"`

	// Backend Properties contract
	Properties *BackendProperties `json:"properties,omitempty"`

	// Backend communication protocol.
	Protocol *BackendProtocol `json:"protocol,omitempty"`

	// Backend Proxy Contract Properties
	Proxy *BackendProxyContract `json:"proxy,omitempty"`

	// 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 `json:"resourceId,omitempty"`

	// Backend TLS Properties
	TLS *BackendTLSProperties `json:"tls,omitempty"`

	// Backend Title.
	Title *string `json:"title,omitempty"`

	// Runtime Url of the Backend.
	URL *string `json:"url,omitempty"`
}

BackendUpdateParameterProperties - Parameters supplied to the Update Backend operation.

type BackendUpdateParameters

type BackendUpdateParameters struct {
	// Backend entity update contract properties.
	Properties *BackendUpdateParameterProperties `json:"properties,omitempty"`
}

BackendUpdateParameters - Backend update parameters.

func (BackendUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller 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.

func (BearerTokenSendingMethod) ToPtr

ToPtr returns a *BearerTokenSendingMethod pointing to the current value.

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.

func (BearerTokenSendingMethods) ToPtr

ToPtr returns a *BearerTokenSendingMethods pointing to the current value.

type BodyDiagnosticSettings

type BodyDiagnosticSettings struct {
	// Number of request body bytes to log.
	Bytes *int32 `json:"bytes,omitempty"`
}

BodyDiagnosticSettings - Body logging settings.

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

NewCacheClient creates a new instance of CacheClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateCache.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewCacheClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<cache-id>",
		armapimanagement.CacheContract{
			Properties: &armapimanagement.CacheContractProperties{
				Description:      to.StringPtr("<description>"),
				ConnectionString: to.StringPtr("<connection-string>"),
				ResourceID:       to.StringPtr("<resource-id>"),
				UseFromLocation:  to.StringPtr("<use-from-location>"),
			},
		},
		&armapimanagement.CacheClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.CacheClientCreateOrUpdateResult)
}
Output:

func (*CacheClient) Delete

func (client *CacheClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, ifMatch string, options *CacheClientDeleteOptions) (CacheClientDeleteResponse, error)

Delete - Deletes specific Cache. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteCache.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewCacheClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<cache-id>",
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*CacheClient) Get

func (client *CacheClient) Get(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, options *CacheClientGetOptions) (CacheClientGetResponse, error)

Get - Gets the details of the Cache specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetCache.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewCacheClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<cache-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.CacheClientGetResult)
}
Output:

func (*CacheClient) GetEntityTag

func (client *CacheClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, options *CacheClientGetEntityTagOptions) (CacheClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the Cache specified by its identifier. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadCache.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewCacheClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<cache-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*CacheClient) ListByService

func (client *CacheClient) ListByService(resourceGroupName string, serviceName string, options *CacheClientListByServiceOptions) *CacheClientListByServicePager

ListByService - Lists a collection of all external Caches in the specified service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - CacheClientListByServiceOptions contains the optional parameters for the CacheClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListCaches.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewCacheClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		&armapimanagement.CacheClientListByServiceOptions{Top: nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*CacheClient) Update

func (client *CacheClient) Update(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, ifMatch string, parameters CacheUpdateParameters, options *CacheClientUpdateOptions) (CacheClientUpdateResponse, error)

Update - Updates the details of the cache specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateCache.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewCacheClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<cache-id>",
		"<if-match>",
		armapimanagement.CacheUpdateParameters{
			Properties: &armapimanagement.CacheUpdateProperties{
				UseFromLocation: to.StringPtr("<use-from-location>"),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.CacheClientUpdateResult)
}
Output:

type CacheClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type CacheClientCreateOrUpdateResponse struct {
	CacheClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

CacheClientCreateOrUpdateResponse contains the response from method CacheClient.CreateOrUpdate.

type CacheClientCreateOrUpdateResult added in v0.3.0

type CacheClientCreateOrUpdateResult struct {
	CacheContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

CacheClientCreateOrUpdateResult contains the result from method CacheClient.CreateOrUpdate.

type CacheClientDeleteOptions added in v0.3.0

type CacheClientDeleteOptions struct {
}

CacheClientDeleteOptions contains the optional parameters for the CacheClient.Delete method.

type CacheClientDeleteResponse added in v0.3.0

type CacheClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

CacheClientDeleteResponse contains the response from method CacheClient.Delete.

type CacheClientGetEntityTagOptions added in v0.3.0

type CacheClientGetEntityTagOptions struct {
}

CacheClientGetEntityTagOptions contains the optional parameters for the CacheClient.GetEntityTag method.

type CacheClientGetEntityTagResponse added in v0.3.0

type CacheClientGetEntityTagResponse struct {
	CacheClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

CacheClientGetEntityTagResponse contains the response from method CacheClient.GetEntityTag.

type CacheClientGetEntityTagResult added in v0.3.0

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

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

CacheClientGetEntityTagResult contains the result from method CacheClient.GetEntityTag.

type CacheClientGetOptions added in v0.3.0

type CacheClientGetOptions struct {
}

CacheClientGetOptions contains the optional parameters for the CacheClient.Get method.

type CacheClientGetResponse added in v0.3.0

type CacheClientGetResponse struct {
	CacheClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

CacheClientGetResponse contains the response from method CacheClient.Get.

type CacheClientGetResult added in v0.3.0

type CacheClientGetResult struct {
	CacheContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

CacheClientGetResult contains the result from method CacheClient.Get.

type CacheClientListByServiceOptions added in v0.3.0

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.ListByService method.

type CacheClientListByServicePager added in v0.3.0

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

CacheClientListByServicePager provides operations for iterating over paged responses.

func (*CacheClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*CacheClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*CacheClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current CacheClientListByServiceResponse page.

type CacheClientListByServiceResponse added in v0.3.0

type CacheClientListByServiceResponse struct {
	CacheClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

CacheClientListByServiceResponse contains the response from method CacheClient.ListByService.

type CacheClientListByServiceResult added in v0.3.0

type CacheClientListByServiceResult struct {
	CacheCollection
}

CacheClientListByServiceResult contains the result from method CacheClient.ListByService.

type CacheClientUpdateOptions added in v0.3.0

type CacheClientUpdateOptions struct {
}

CacheClientUpdateOptions contains the optional parameters for the CacheClient.Update method.

type CacheClientUpdateResponse added in v0.3.0

type CacheClientUpdateResponse struct {
	CacheClientUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

CacheClientUpdateResponse contains the response from method CacheClient.Update.

type CacheClientUpdateResult added in v0.3.0

type CacheClientUpdateResult struct {
	CacheContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

CacheClientUpdateResult contains the result from method CacheClient.Update.

type CacheCollection

type CacheCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// Next page link if any.
	NextLink *string `json:"nextLink,omitempty"`

	// Page values.
	Value []*CacheContract `json:"value,omitempty"`
}

CacheCollection - Paged Caches list representation.

func (CacheCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CacheCollection.

type CacheContract

type CacheContract struct {
	// Cache properties details.
	Properties *CacheContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

CacheContract - Cache details.

type CacheContractProperties

type CacheContractProperties struct {
	// REQUIRED; Runtime connection string to cache
	ConnectionString *string `json:"connectionString,omitempty"`

	// REQUIRED; Location identifier to use cache from (should be either 'default' or valid Azure region identifier)
	UseFromLocation *string `json:"useFromLocation,omitempty"`

	// Cache description
	Description *string `json:"description,omitempty"`

	// Original uri of entity in external system cache points to
	ResourceID *string `json:"resourceId,omitempty"`
}

CacheContractProperties - Properties of the Cache contract.

type CacheUpdateParameters

type CacheUpdateParameters struct {
	// Cache update properties details.
	Properties *CacheUpdateProperties `json:"properties,omitempty"`
}

CacheUpdateParameters - Cache update details.

func (CacheUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CacheUpdateParameters.

type CacheUpdateProperties

type CacheUpdateProperties struct {
	// Runtime connection string to cache
	ConnectionString *string `json:"connectionString,omitempty"`

	// Cache description
	Description *string `json:"description,omitempty"`

	// Original uri of entity in external system cache points to
	ResourceID *string `json:"resourceId,omitempty"`

	// Location identifier to use cache from (should be either 'default' or valid Azure region identifier)
	UseFromLocation *string `json:"useFromLocation,omitempty"`
}

CacheUpdateProperties - Parameters supplied to the Update Cache operation.

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

NewCertificateClient creates a new instance of CertificateClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateCertificate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewCertificateClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<certificate-id>",
		armapimanagement.CertificateCreateOrUpdateParameters{
			Properties: &armapimanagement.CertificateCreateOrUpdateProperties{
				Data:     to.StringPtr("<data>"),
				Password: to.StringPtr("<password>"),
			},
		},
		&armapimanagement.CertificateClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.CertificateClientCreateOrUpdateResult)
}
Output:

func (*CertificateClient) Delete

func (client *CertificateClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, certificateID string, ifMatch string, options *CertificateClientDeleteOptions) (CertificateClientDeleteResponse, error)

Delete - Deletes specific certificate. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteCertificate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewCertificateClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<certificate-id>",
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*CertificateClient) Get

func (client *CertificateClient) Get(ctx context.Context, resourceGroupName string, serviceName string, certificateID string, options *CertificateClientGetOptions) (CertificateClientGetResponse, error)

Get - Gets the details of the certificate specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetCertificate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewCertificateClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<certificate-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.CertificateClientGetResult)
}
Output:

func (*CertificateClient) GetEntityTag

func (client *CertificateClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, certificateID string, options *CertificateClientGetEntityTagOptions) (CertificateClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the certificate specified by its identifier. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadCertificate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewCertificateClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<certificate-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*CertificateClient) ListByService

func (client *CertificateClient) ListByService(resourceGroupName string, serviceName string, options *CertificateClientListByServiceOptions) *CertificateClientListByServicePager

ListByService - Lists a collection of all certificates in the specified service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - CertificateClientListByServiceOptions contains the optional parameters for the CertificateClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListCertificates.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewCertificateClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		&armapimanagement.CertificateClientListByServiceOptions{Filter: nil,
			Top:                     nil,
			Skip:                    nil,
			IsKeyVaultRefreshFailed: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*CertificateClient) RefreshSecret

func (client *CertificateClient) RefreshSecret(ctx context.Context, resourceGroupName string, serviceName string, certificateID string, options *CertificateClientRefreshSecretOptions) (CertificateClientRefreshSecretResponse, error)

RefreshSecret - From KeyVault, Refresh the certificate being used for authentication with the backend. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementRefreshCertificate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewCertificateClient("<subscription-id>", cred, nil)
	res, err := client.RefreshSecret(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<certificate-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.CertificateClientRefreshSecretResult)
}
Output:

type CertificateClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type CertificateClientCreateOrUpdateResponse struct {
	CertificateClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

CertificateClientCreateOrUpdateResponse contains the response from method CertificateClient.CreateOrUpdate.

type CertificateClientCreateOrUpdateResult added in v0.3.0

type CertificateClientCreateOrUpdateResult struct {
	CertificateContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

CertificateClientCreateOrUpdateResult contains the result from method CertificateClient.CreateOrUpdate.

type CertificateClientDeleteOptions added in v0.3.0

type CertificateClientDeleteOptions struct {
}

CertificateClientDeleteOptions contains the optional parameters for the CertificateClient.Delete method.

type CertificateClientDeleteResponse added in v0.3.0

type CertificateClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

CertificateClientDeleteResponse contains the response from method CertificateClient.Delete.

type CertificateClientGetEntityTagOptions added in v0.3.0

type CertificateClientGetEntityTagOptions struct {
}

CertificateClientGetEntityTagOptions contains the optional parameters for the CertificateClient.GetEntityTag method.

type CertificateClientGetEntityTagResponse added in v0.3.0

type CertificateClientGetEntityTagResponse struct {
	CertificateClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

CertificateClientGetEntityTagResponse contains the response from method CertificateClient.GetEntityTag.

type CertificateClientGetEntityTagResult added in v0.3.0

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

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

CertificateClientGetEntityTagResult contains the result from method CertificateClient.GetEntityTag.

type CertificateClientGetOptions added in v0.3.0

type CertificateClientGetOptions struct {
}

CertificateClientGetOptions contains the optional parameters for the CertificateClient.Get method.

type CertificateClientGetResponse added in v0.3.0

type CertificateClientGetResponse struct {
	CertificateClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

CertificateClientGetResponse contains the response from method CertificateClient.Get.

type CertificateClientGetResult added in v0.3.0

type CertificateClientGetResult struct {
	CertificateContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

CertificateClientGetResult contains the result from method CertificateClient.Get.

type CertificateClientListByServiceOptions added in v0.3.0

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.ListByService method.

type CertificateClientListByServicePager added in v0.3.0

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

CertificateClientListByServicePager provides operations for iterating over paged responses.

func (*CertificateClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*CertificateClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*CertificateClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current CertificateClientListByServiceResponse page.

type CertificateClientListByServiceResponse added in v0.3.0

type CertificateClientListByServiceResponse struct {
	CertificateClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

CertificateClientListByServiceResponse contains the response from method CertificateClient.ListByService.

type CertificateClientListByServiceResult added in v0.3.0

type CertificateClientListByServiceResult struct {
	CertificateCollection
}

CertificateClientListByServiceResult contains the result from method CertificateClient.ListByService.

type CertificateClientRefreshSecretOptions added in v0.3.0

type CertificateClientRefreshSecretOptions struct {
}

CertificateClientRefreshSecretOptions contains the optional parameters for the CertificateClient.RefreshSecret method.

type CertificateClientRefreshSecretResponse added in v0.3.0

type CertificateClientRefreshSecretResponse struct {
	CertificateClientRefreshSecretResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

CertificateClientRefreshSecretResponse contains the response from method CertificateClient.RefreshSecret.

type CertificateClientRefreshSecretResult added in v0.3.0

type CertificateClientRefreshSecretResult struct {
	CertificateContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

CertificateClientRefreshSecretResult contains the result from method CertificateClient.RefreshSecret.

type CertificateCollection

type CertificateCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// Next page link if any.
	NextLink *string `json:"nextLink,omitempty"`

	// Page values.
	Value []*CertificateContract `json:"value,omitempty"`
}

CertificateCollection - Paged Certificates list representation.

func (CertificateCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller 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 `json:"storeName,omitempty"`

	// Certificate information.
	Certificate *CertificateInformation `json:"certificate,omitempty"`

	// Certificate Password.
	CertificatePassword *string `json:"certificatePassword,omitempty"`

	// Base64 Encoded certificate.
	EncodedCertificate *string `json:"encodedCertificate,omitempty"`
}

CertificateConfiguration - Certificate configuration which consist of non-trusted intermediates and root certificates.

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.

func (CertificateConfigurationStoreName) ToPtr

ToPtr returns a *CertificateConfigurationStoreName pointing to the current value.

type CertificateContract

type CertificateContract struct {
	// Certificate properties details.
	Properties *CertificateContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

CertificateContract - Certificate details.

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 `json:"expirationDate,omitempty"`

	// REQUIRED; Subject attribute of the certificate.
	Subject *string `json:"subject,omitempty"`

	// REQUIRED; Thumbprint of the certificate.
	Thumbprint *string `json:"thumbprint,omitempty"`

	// KeyVault location details of the certificate.
	KeyVault *KeyVaultContractProperties `json:"keyVault,omitempty"`
}

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 `json:"properties,omitempty"`
}

CertificateCreateOrUpdateParameters - Certificate create or update details.

type CertificateCreateOrUpdateProperties

type CertificateCreateOrUpdateProperties struct {
	// Base 64 encoded certificate using the application/x-pkcs12 representation.
	Data *string `json:"data,omitempty"`

	// KeyVault location details of the certificate.
	KeyVault *KeyVaultContractCreateProperties `json:"keyVault,omitempty"`

	// Password for the Certificate
	Password *string `json:"password,omitempty"`
}

CertificateCreateOrUpdateProperties - Parameters supplied to the CreateOrUpdate certificate operation.

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 `json:"expiry,omitempty"`

	// REQUIRED; Subject of the certificate.
	Subject *string `json:"subject,omitempty"`

	// REQUIRED; Thumbprint of the certificate.
	Thumbprint *string `json:"thumbprint,omitempty"`
}

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.

func (CertificateSource) ToPtr

ToPtr returns a *CertificateSource pointing to the current value.

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.

func (CertificateStatus) ToPtr

ToPtr returns a *CertificateStatus pointing to the current value.

type Client added in v0.3.0

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 added in v0.3.0

func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *Client

NewClient creates a new instance of Client with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*Client) BeginPerformConnectivityCheckAsync added in v0.3.0

func (client *Client) BeginPerformConnectivityCheckAsync(ctx context.Context, resourceGroupName string, serviceName string, connectivityCheckRequestParams ConnectivityCheckRequest, options *ClientBeginPerformConnectivityCheckAsyncOptions) (ClientPerformConnectivityCheckAsyncPollerResponse, 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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPerformConnectivityCheckHttpConnect.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewClient("<subscription-id>", cred, nil)
	poller, err := client.BeginPerformConnectivityCheckAsync(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.ConnectivityCheckRequest{
			Destination: &armapimanagement.ConnectivityCheckRequestDestination{
				Address: to.StringPtr("<address>"),
				Port:    to.Int64Ptr(3306),
			},
			ProtocolConfiguration: &armapimanagement.ConnectivityCheckRequestProtocolConfiguration{
				HTTPConfiguration: &armapimanagement.ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration{
					Method: armapimanagement.Method("GET").ToPtr(),
					Headers: []*armapimanagement.HTTPHeader{
						{
							Name:  to.StringPtr("<name>"),
							Value: to.StringPtr("<value>"),
						}},
					ValidStatusCodes: []*int64{
						to.Int64Ptr(200),
						to.Int64Ptr(204)},
				},
			},
			Source: &armapimanagement.ConnectivityCheckRequestSource{
				Region: to.StringPtr("<region>"),
			},
			Protocol: armapimanagement.ConnectivityCheckProtocol("HTTPS").ToPtr(),
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ClientPerformConnectivityCheckAsyncResult)
}
Output:

type ClientAuthenticationMethod

type ClientAuthenticationMethod string
const (
	// ClientAuthenticationMethodBasic - Basic Client Authentication method.
	ClientAuthenticationMethodBasic ClientAuthenticationMethod = "Basic"
	// ClientAuthenticationMethodBody - Body based Authentication method.
	ClientAuthenticationMethodBody ClientAuthenticationMethod = "Body"
)

func PossibleClientAuthenticationMethodValues

func PossibleClientAuthenticationMethodValues() []ClientAuthenticationMethod

PossibleClientAuthenticationMethodValues returns the possible values for the ClientAuthenticationMethod const type.

func (ClientAuthenticationMethod) ToPtr

ToPtr returns a *ClientAuthenticationMethod pointing to the current value.

type ClientBeginPerformConnectivityCheckAsyncOptions added in v0.3.0

type ClientBeginPerformConnectivityCheckAsyncOptions struct {
}

ClientBeginPerformConnectivityCheckAsyncOptions contains the optional parameters for the Client.BeginPerformConnectivityCheckAsync method.

type ClientPerformConnectivityCheckAsyncPoller added in v0.3.0

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

ClientPerformConnectivityCheckAsyncPoller provides polling facilities until the operation reaches a terminal state.

func (*ClientPerformConnectivityCheckAsyncPoller) Done added in v0.3.0

Done returns true if the LRO has reached a terminal state.

func (*ClientPerformConnectivityCheckAsyncPoller) FinalResponse added in v0.3.0

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final ClientPerformConnectivityCheckAsyncResponse will be returned.

func (*ClientPerformConnectivityCheckAsyncPoller) Poll added in v0.3.0

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*ClientPerformConnectivityCheckAsyncPoller) ResumeToken added in v0.3.0

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type ClientPerformConnectivityCheckAsyncPollerResponse added in v0.3.0

type ClientPerformConnectivityCheckAsyncPollerResponse struct {
	// Poller contains an initialized poller.
	Poller *ClientPerformConnectivityCheckAsyncPoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ClientPerformConnectivityCheckAsyncPollerResponse contains the response from method Client.PerformConnectivityCheckAsync.

func (ClientPerformConnectivityCheckAsyncPollerResponse) PollUntilDone added in v0.3.0

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*ClientPerformConnectivityCheckAsyncPollerResponse) Resume added in v0.3.0

Resume rehydrates a ClientPerformConnectivityCheckAsyncPollerResponse from the provided client and resume token.

type ClientPerformConnectivityCheckAsyncResponse added in v0.3.0

type ClientPerformConnectivityCheckAsyncResponse struct {
	ClientPerformConnectivityCheckAsyncResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ClientPerformConnectivityCheckAsyncResponse contains the response from method Client.PerformConnectivityCheckAsync.

type ClientPerformConnectivityCheckAsyncResult added in v0.3.0

type ClientPerformConnectivityCheckAsyncResult struct {
	ConnectivityCheckResponse
}

ClientPerformConnectivityCheckAsyncResult contains the result from method Client.PerformConnectivityCheckAsync.

type ClientSecretContract

type ClientSecretContract struct {
	// Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.
	ClientSecret *string `json:"clientSecret,omitempty"`
}

ClientSecretContract - Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.

type ConfigurationIDName

type ConfigurationIDName string
const (
	ConfigurationIDNameConfiguration ConfigurationIDName = "configuration"
)

func PossibleConfigurationIDNameValues

func PossibleConfigurationIDNameValues() []ConfigurationIDName

PossibleConfigurationIDNameValues returns the possible values for the ConfigurationIDName const type.

func (ConfigurationIDName) ToPtr

ToPtr returns a *ConfigurationIDName pointing to the current value.

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.

func (Confirmation) ToPtr

func (c Confirmation) ToPtr() *Confirmation

ToPtr returns a *Confirmation pointing to the current value.

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.

func (ConnectionStatus) ToPtr

ToPtr returns a *ConnectionStatus pointing to the current value.

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.

func (ConnectivityCheckProtocol) ToPtr

ToPtr returns a *ConnectivityCheckProtocol pointing to the current value.

type ConnectivityCheckRequest

type ConnectivityCheckRequest struct {
	// REQUIRED; The connectivity check operation destination.
	Destination *ConnectivityCheckRequestDestination `json:"destination,omitempty"`

	// REQUIRED; Definitions about the connectivity check origin.
	Source *ConnectivityCheckRequestSource `json:"source,omitempty"`

	// The IP version to be used. Only IPv4 is supported for now.
	PreferredIPVersion *PreferredIPVersion `json:"preferredIPVersion,omitempty"`

	// 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 `json:"protocol,omitempty"`

	// Protocol-specific configuration.
	ProtocolConfiguration *ConnectivityCheckRequestProtocolConfiguration `json:"protocolConfiguration,omitempty"`
}

ConnectivityCheckRequest - A request to perform the connectivity check operation on a API Management service.

type ConnectivityCheckRequestDestination

type ConnectivityCheckRequestDestination struct {
	// REQUIRED; Destination address. Can either be an IP address or a FQDN.
	Address *string `json:"address,omitempty"`

	// REQUIRED; Destination port.
	Port *int64 `json:"port,omitempty"`
}

ConnectivityCheckRequestDestination - The connectivity check operation destination.

type ConnectivityCheckRequestProtocolConfiguration

type ConnectivityCheckRequestProtocolConfiguration struct {
	// Configuration for HTTP or HTTPS requests.
	HTTPConfiguration *ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration `json:"HTTPConfiguration,omitempty"`
}

ConnectivityCheckRequestProtocolConfiguration - Protocol-specific configuration.

type ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration

type ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration struct {
	// List of headers to be included in the request.
	Headers []*HTTPHeader `json:"headers,omitempty"`

	// The HTTP method to be used.
	Method *Method `json:"method,omitempty"`

	// List of HTTP status codes considered valid for the request response.
	ValidStatusCodes []*int64 `json:"validStatusCodes,omitempty"`
}

ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration - Configuration for HTTP or HTTPS requests.

func (ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration) MarshalJSON

MarshalJSON implements the json.Marshaller 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 `json:"region,omitempty"`

	// The particular VMSS instance from which to fire the request.
	Instance *int64 `json:"instance,omitempty"`
}

ConnectivityCheckRequestSource - Definitions about the connectivity check origin.

type ConnectivityCheckResponse

type ConnectivityCheckResponse struct {
	// READ-ONLY; Average latency in milliseconds.
	AvgLatencyInMs *int64 `json:"avgLatencyInMs,omitempty" azure:"ro"`

	// READ-ONLY; The connection status.
	ConnectionStatus *ConnectionStatus `json:"connectionStatus,omitempty" azure:"ro"`

	// READ-ONLY; List of hops between the source and the destination.
	Hops []*ConnectivityHop `json:"hops,omitempty" azure:"ro"`

	// READ-ONLY; Maximum latency in milliseconds.
	MaxLatencyInMs *int64 `json:"maxLatencyInMs,omitempty" azure:"ro"`

	// READ-ONLY; Minimum latency in milliseconds.
	MinLatencyInMs *int64 `json:"minLatencyInMs,omitempty" azure:"ro"`

	// READ-ONLY; Number of failed probes.
	ProbesFailed *int64 `json:"probesFailed,omitempty" azure:"ro"`

	// READ-ONLY; Total number of probes sent.
	ProbesSent *int64 `json:"probesSent,omitempty" azure:"ro"`
}

ConnectivityCheckResponse - Information on the connectivity status.

func (ConnectivityCheckResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ConnectivityCheckResponse.

type ConnectivityHop

type ConnectivityHop struct {
	// READ-ONLY; The IP address of the hop.
	Address *string `json:"address,omitempty" azure:"ro"`

	// READ-ONLY; The ID of the hop.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; List of issues.
	Issues []*ConnectivityIssue `json:"issues,omitempty" azure:"ro"`

	// READ-ONLY; List of next hop identifiers.
	NextHopIDs []*string `json:"nextHopIds,omitempty" azure:"ro"`

	// READ-ONLY; The ID of the resource corresponding to this hop.
	ResourceID *string `json:"resourceId,omitempty" azure:"ro"`

	// READ-ONLY; The type of the hop.
	Type *string `json:"type,omitempty" azure:"ro"`
}

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.

type ConnectivityIssue

type ConnectivityIssue struct {
	// READ-ONLY; Provides additional context on the issue.
	Context []map[string]*string `json:"context,omitempty" azure:"ro"`

	// READ-ONLY; The origin of the issue.
	Origin *Origin `json:"origin,omitempty" azure:"ro"`

	// READ-ONLY; The severity of the issue.
	Severity *Severity `json:"severity,omitempty" azure:"ro"`

	// READ-ONLY; The type of issue.
	Type *IssueType `json:"type,omitempty" azure:"ro"`
}

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.

type ConnectivityStatusContract

type ConnectivityStatusContract struct {
	// REQUIRED; Whether this is optional.
	IsOptional *bool `json:"isOptional,omitempty"`

	// 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 `json:"lastStatusChange,omitempty"`

	// 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 `json:"lastUpdated,omitempty"`

	// 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 `json:"name,omitempty"`

	// REQUIRED; Resource Type.
	ResourceType *string `json:"resourceType,omitempty"`

	// REQUIRED; Resource Connectivity Status Type identifier.
	Status *ConnectivityStatusType `json:"status,omitempty"`

	// Error details of the connectivity to the resource.
	Error *string `json:"error,omitempty"`
}

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.

func (ConnectivityStatusType) ToPtr

ToPtr returns a *ConnectivityStatusType pointing to the current value.

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.

func (ContentFormat) ToPtr

func (c ContentFormat) ToPtr() *ContentFormat

ToPtr returns a *ContentFormat pointing to the current value.

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

NewContentItemClient creates a new instance of ContentItemClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ContentItemClient) CreateOrUpdate

func (client *ContentItemClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, contentItemID string, 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. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. contentTypeID - Content type identifier. contentItemID - Content item identifier. options - ContentItemClientCreateOrUpdateOptions contains the optional parameters for the ContentItemClient.CreateOrUpdate method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateContentTypeContentItem.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewContentItemClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<content-type-id>",
		"<content-item-id>",
		&armapimanagement.ContentItemClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ContentItemClientCreateOrUpdateResult)
}
Output:

func (*ContentItemClient) Delete

func (client *ContentItemClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, contentItemID string, ifMatch string, options *ContentItemClientDeleteOptions) (ContentItemClientDeleteResponse, error)

Delete - Removes the specified developer portal's content item. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteContentTypeContentItem.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewContentItemClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<content-type-id>",
		"<content-item-id>",
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*ContentItemClient) Get

func (client *ContentItemClient) Get(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, contentItemID string, options *ContentItemClientGetOptions) (ContentItemClientGetResponse, error)

Get - Returns the developer portal's content item specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetContentTypeContentItem.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewContentItemClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<content-type-id>",
		"<content-item-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ContentItemClientGetResult)
}
Output:

func (*ContentItemClient) GetEntityTag

func (client *ContentItemClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, contentItemID string, options *ContentItemClientGetEntityTagOptions) (ContentItemClientGetEntityTagResponse, error)

GetEntityTag - Returns the entity state (ETag) version of the developer portal's content item specified by its identifier. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadContentTypeContentItem.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewContentItemClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<content-type-id>",
		"<content-item-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*ContentItemClient) ListByService

func (client *ContentItemClient) ListByService(resourceGroupName string, serviceName string, contentTypeID string, options *ContentItemClientListByServiceOptions) *ContentItemClientListByServicePager

ListByService - Lists developer portal's content items specified by the provided content type. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. contentTypeID - Content type identifier. options - ContentItemClientListByServiceOptions contains the optional parameters for the ContentItemClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListContentTypeContentItems.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewContentItemClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		"<content-type-id>",
		nil)
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type ContentItemClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type ContentItemClientCreateOrUpdateResponse struct {
	ContentItemClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ContentItemClientCreateOrUpdateResponse contains the response from method ContentItemClient.CreateOrUpdate.

type ContentItemClientCreateOrUpdateResult added in v0.3.0

type ContentItemClientCreateOrUpdateResult struct {
	ContentItemContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

ContentItemClientCreateOrUpdateResult contains the result from method ContentItemClient.CreateOrUpdate.

type ContentItemClientDeleteOptions added in v0.3.0

type ContentItemClientDeleteOptions struct {
}

ContentItemClientDeleteOptions contains the optional parameters for the ContentItemClient.Delete method.

type ContentItemClientDeleteResponse added in v0.3.0

type ContentItemClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ContentItemClientDeleteResponse contains the response from method ContentItemClient.Delete.

type ContentItemClientGetEntityTagOptions added in v0.3.0

type ContentItemClientGetEntityTagOptions struct {
}

ContentItemClientGetEntityTagOptions contains the optional parameters for the ContentItemClient.GetEntityTag method.

type ContentItemClientGetEntityTagResponse added in v0.3.0

type ContentItemClientGetEntityTagResponse struct {
	ContentItemClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ContentItemClientGetEntityTagResponse contains the response from method ContentItemClient.GetEntityTag.

type ContentItemClientGetEntityTagResult added in v0.3.0

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

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

ContentItemClientGetEntityTagResult contains the result from method ContentItemClient.GetEntityTag.

type ContentItemClientGetOptions added in v0.3.0

type ContentItemClientGetOptions struct {
}

ContentItemClientGetOptions contains the optional parameters for the ContentItemClient.Get method.

type ContentItemClientGetResponse added in v0.3.0

type ContentItemClientGetResponse struct {
	ContentItemClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ContentItemClientGetResponse contains the response from method ContentItemClient.Get.

type ContentItemClientGetResult added in v0.3.0

type ContentItemClientGetResult struct {
	ContentItemContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

ContentItemClientGetResult contains the result from method ContentItemClient.Get.

type ContentItemClientListByServiceOptions added in v0.3.0

type ContentItemClientListByServiceOptions struct {
}

ContentItemClientListByServiceOptions contains the optional parameters for the ContentItemClient.ListByService method.

type ContentItemClientListByServicePager added in v0.3.0

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

ContentItemClientListByServicePager provides operations for iterating over paged responses.

func (*ContentItemClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*ContentItemClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*ContentItemClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current ContentItemClientListByServiceResponse page.

type ContentItemClientListByServiceResponse added in v0.3.0

type ContentItemClientListByServiceResponse struct {
	ContentItemClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ContentItemClientListByServiceResponse contains the response from method ContentItemClient.ListByService.

type ContentItemClientListByServiceResult added in v0.3.0

type ContentItemClientListByServiceResult struct {
	ContentItemCollection
}

ContentItemClientListByServiceResult contains the result from method ContentItemClient.ListByService.

type ContentItemCollection

type ContentItemCollection struct {
	// READ-ONLY; Next page link, if any.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; Collection of content items.
	Value []*ContentItemContract `json:"value,omitempty" azure:"ro"`
}

ContentItemCollection - Paged list of content items.

func (ContentItemCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ContentItemCollection.

type ContentItemContract

type ContentItemContract struct {
	// Properties of the content item.
	Properties map[string]interface{} `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

ContentItemContract - Content type contract details.

func (ContentItemContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller 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

NewContentTypeClient creates a new instance of ContentTypeClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ContentTypeClient) CreateOrUpdate

func (client *ContentTypeClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, 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. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. contentTypeID - Content type identifier. options - ContentTypeClientCreateOrUpdateOptions contains the optional parameters for the ContentTypeClient.CreateOrUpdate method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateContentType.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewContentTypeClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<content-type-id>",
		&armapimanagement.ContentTypeClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ContentTypeClientCreateOrUpdateResult)
}
Output:

func (*ContentTypeClient) Delete

func (client *ContentTypeClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, ifMatch string, options *ContentTypeClientDeleteOptions) (ContentTypeClientDeleteResponse, error)

Delete - Removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the c- prefix) can't be removed. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteContentType.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewContentTypeClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<content-type-id>",
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*ContentTypeClient) Get

func (client *ContentTypeClient) Get(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, options *ContentTypeClientGetOptions) (ContentTypeClientGetResponse, error)

Get - Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. contentTypeID - Content type identifier. options - ContentTypeClientGetOptions contains the optional parameters for the ContentTypeClient.Get method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetContentType.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewContentTypeClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<content-type-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ContentTypeClientGetResult)
}
Output:

func (*ContentTypeClient) ListByService

func (client *ContentTypeClient) ListByService(resourceGroupName string, serviceName string, options *ContentTypeClientListByServiceOptions) *ContentTypeClientListByServicePager

ListByService - Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - ContentTypeClientListByServiceOptions contains the optional parameters for the ContentTypeClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListContentTypes.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewContentTypeClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		nil)
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type ContentTypeClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type ContentTypeClientCreateOrUpdateResponse struct {
	ContentTypeClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ContentTypeClientCreateOrUpdateResponse contains the response from method ContentTypeClient.CreateOrUpdate.

type ContentTypeClientCreateOrUpdateResult added in v0.3.0

type ContentTypeClientCreateOrUpdateResult struct {
	ContentTypeContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

ContentTypeClientCreateOrUpdateResult contains the result from method ContentTypeClient.CreateOrUpdate.

type ContentTypeClientDeleteOptions added in v0.3.0

type ContentTypeClientDeleteOptions struct {
}

ContentTypeClientDeleteOptions contains the optional parameters for the ContentTypeClient.Delete method.

type ContentTypeClientDeleteResponse added in v0.3.0

type ContentTypeClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ContentTypeClientDeleteResponse contains the response from method ContentTypeClient.Delete.

type ContentTypeClientGetOptions added in v0.3.0

type ContentTypeClientGetOptions struct {
}

ContentTypeClientGetOptions contains the optional parameters for the ContentTypeClient.Get method.

type ContentTypeClientGetResponse added in v0.3.0

type ContentTypeClientGetResponse struct {
	ContentTypeClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ContentTypeClientGetResponse contains the response from method ContentTypeClient.Get.

type ContentTypeClientGetResult added in v0.3.0

type ContentTypeClientGetResult struct {
	ContentTypeContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

ContentTypeClientGetResult contains the result from method ContentTypeClient.Get.

type ContentTypeClientListByServiceOptions added in v0.3.0

type ContentTypeClientListByServiceOptions struct {
}

ContentTypeClientListByServiceOptions contains the optional parameters for the ContentTypeClient.ListByService method.

type ContentTypeClientListByServicePager added in v0.3.0

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

ContentTypeClientListByServicePager provides operations for iterating over paged responses.

func (*ContentTypeClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*ContentTypeClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*ContentTypeClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current ContentTypeClientListByServiceResponse page.

type ContentTypeClientListByServiceResponse added in v0.3.0

type ContentTypeClientListByServiceResponse struct {
	ContentTypeClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ContentTypeClientListByServiceResponse contains the response from method ContentTypeClient.ListByService.

type ContentTypeClientListByServiceResult added in v0.3.0

type ContentTypeClientListByServiceResult struct {
	ContentTypeCollection
}

ContentTypeClientListByServiceResult contains the result from method ContentTypeClient.ListByService.

type ContentTypeCollection

type ContentTypeCollection struct {
	// READ-ONLY; Next page link, if any.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; Collection of content types.
	Value []*ContentTypeContract `json:"value,omitempty" azure:"ro"`
}

ContentTypeCollection - Paged list of content types.

func (ContentTypeCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ContentTypeCollection.

type ContentTypeContract

type ContentTypeContract struct {
	// Properties of the content type.
	Properties *ContentTypeContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

ContentTypeContract - Content type contract details.

type ContentTypeContractProperties

type ContentTypeContractProperties struct {
	// Content type description.
	Description *string `json:"description,omitempty"`

	// Content type identifier
	ID *string `json:"id,omitempty"`

	// Content type name. Must be 1 to 250 characters long.
	Name *string `json:"name,omitempty"`

	// Content type schema.
	Schema map[string]interface{} `json:"schema,omitempty"`

	// Content type version.
	Version *string `json:"version,omitempty"`
}

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.

func (CreatedByType) ToPtr

func (c CreatedByType) ToPtr() *CreatedByType

ToPtr returns a *CreatedByType pointing to the current value.

type DataMasking

type DataMasking struct {
	// Masking settings for headers
	Headers []*DataMaskingEntity `json:"headers,omitempty"`

	// Masking settings for Url query parameters
	QueryParams []*DataMaskingEntity `json:"queryParams,omitempty"`
}

func (DataMasking) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DataMasking.

type DataMaskingEntity

type DataMaskingEntity struct {
	// Data masking mode.
	Mode *DataMaskingMode `json:"mode,omitempty"`

	// The name of an entity to mask (e.g. a name of a header or a query parameter).
	Value *string `json:"value,omitempty"`
}

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.

func (DataMaskingMode) ToPtr

func (c DataMaskingMode) ToPtr() *DataMaskingMode

ToPtr returns a *DataMaskingMode pointing to the current value.

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

NewDelegationSettingsClient creates a new instance of DelegationSettingsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*DelegationSettingsClient) CreateOrUpdate

CreateOrUpdate - Create or Update Delegation settings. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPortalSettingsPutDelegation.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewDelegationSettingsClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.PortalDelegationSettings{
			Properties: &armapimanagement.PortalDelegationSettingsProperties{
				Subscriptions: &armapimanagement.SubscriptionsDelegationSettingsProperties{
					Enabled: to.BoolPtr(true),
				},
				URL: to.StringPtr("<url>"),
				UserRegistration: &armapimanagement.RegistrationDelegationSettingsProperties{
					Enabled: to.BoolPtr(true),
				},
				ValidationKey: to.StringPtr("<validation-key>"),
			},
		},
		&armapimanagement.DelegationSettingsClientCreateOrUpdateOptions{IfMatch: to.StringPtr("<if-match>")})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.DelegationSettingsClientCreateOrUpdateResult)
}
Output:

func (*DelegationSettingsClient) Get

Get - Get Delegation Settings for the Portal. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - DelegationSettingsClientGetOptions contains the optional parameters for the DelegationSettingsClient.Get method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPortalSettingsGetDelegation.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewDelegationSettingsClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.DelegationSettingsClientGetResult)
}
Output:

func (*DelegationSettingsClient) GetEntityTag

GetEntityTag - Gets the entity state (Etag) version of the DelegationSettings. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - DelegationSettingsClientGetEntityTagOptions contains the optional parameters for the DelegationSettingsClient.GetEntityTag method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadDelegationSettings.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewDelegationSettingsClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*DelegationSettingsClient) ListSecrets

ListSecrets - Gets the secret validation key of the DelegationSettings. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - DelegationSettingsClientListSecretsOptions contains the optional parameters for the DelegationSettingsClient.ListSecrets method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListSecretsPortalSettingsValidationKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewDelegationSettingsClient("<subscription-id>", cred, nil)
	res, err := client.ListSecrets(ctx,
		"<resource-group-name>",
		"<service-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.DelegationSettingsClientListSecretsResult)
}
Output:

func (*DelegationSettingsClient) Update

Update - Update Delegation settings. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPortalSettingsUpdateDelegation.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewDelegationSettingsClient("<subscription-id>", cred, nil)
	_, err = client.Update(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<if-match>",
		armapimanagement.PortalDelegationSettings{
			Properties: &armapimanagement.PortalDelegationSettingsProperties{
				Subscriptions: &armapimanagement.SubscriptionsDelegationSettingsProperties{
					Enabled: to.BoolPtr(true),
				},
				URL: to.StringPtr("<url>"),
				UserRegistration: &armapimanagement.RegistrationDelegationSettingsProperties{
					Enabled: to.BoolPtr(true),
				},
				ValidationKey: to.StringPtr("<validation-key>"),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

type DelegationSettingsClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type DelegationSettingsClientCreateOrUpdateResponse struct {
	DelegationSettingsClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DelegationSettingsClientCreateOrUpdateResponse contains the response from method DelegationSettingsClient.CreateOrUpdate.

type DelegationSettingsClientCreateOrUpdateResult added in v0.3.0

type DelegationSettingsClientCreateOrUpdateResult struct {
	PortalDelegationSettings
}

DelegationSettingsClientCreateOrUpdateResult contains the result from method DelegationSettingsClient.CreateOrUpdate.

type DelegationSettingsClientGetEntityTagOptions added in v0.3.0

type DelegationSettingsClientGetEntityTagOptions struct {
}

DelegationSettingsClientGetEntityTagOptions contains the optional parameters for the DelegationSettingsClient.GetEntityTag method.

type DelegationSettingsClientGetEntityTagResponse added in v0.3.0

type DelegationSettingsClientGetEntityTagResponse struct {
	DelegationSettingsClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DelegationSettingsClientGetEntityTagResponse contains the response from method DelegationSettingsClient.GetEntityTag.

type DelegationSettingsClientGetEntityTagResult added in v0.3.0

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

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

DelegationSettingsClientGetEntityTagResult contains the result from method DelegationSettingsClient.GetEntityTag.

type DelegationSettingsClientGetOptions added in v0.3.0

type DelegationSettingsClientGetOptions struct {
}

DelegationSettingsClientGetOptions contains the optional parameters for the DelegationSettingsClient.Get method.

type DelegationSettingsClientGetResponse added in v0.3.0

type DelegationSettingsClientGetResponse struct {
	DelegationSettingsClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DelegationSettingsClientGetResponse contains the response from method DelegationSettingsClient.Get.

type DelegationSettingsClientGetResult added in v0.3.0

type DelegationSettingsClientGetResult struct {
	PortalDelegationSettings
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

DelegationSettingsClientGetResult contains the result from method DelegationSettingsClient.Get.

type DelegationSettingsClientListSecretsOptions added in v0.3.0

type DelegationSettingsClientListSecretsOptions struct {
}

DelegationSettingsClientListSecretsOptions contains the optional parameters for the DelegationSettingsClient.ListSecrets method.

type DelegationSettingsClientListSecretsResponse added in v0.3.0

type DelegationSettingsClientListSecretsResponse struct {
	DelegationSettingsClientListSecretsResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DelegationSettingsClientListSecretsResponse contains the response from method DelegationSettingsClient.ListSecrets.

type DelegationSettingsClientListSecretsResult added in v0.3.0

type DelegationSettingsClientListSecretsResult struct {
	PortalSettingValidationKeyContract
}

DelegationSettingsClientListSecretsResult contains the result from method DelegationSettingsClient.ListSecrets.

type DelegationSettingsClientUpdateOptions added in v0.3.0

type DelegationSettingsClientUpdateOptions struct {
}

DelegationSettingsClientUpdateOptions contains the optional parameters for the DelegationSettingsClient.Update method.

type DelegationSettingsClientUpdateResponse added in v0.3.0

type DelegationSettingsClientUpdateResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DelegationSettingsClientUpdateResponse contains the response from method DelegationSettingsClient.Update.

type DeletedServiceContract

type DeletedServiceContract struct {
	// Deleted API Management Service details.
	Properties *DeletedServiceContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; API Management Service Master Location.
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

DeletedServiceContract - Deleted API Management Service information.

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 `json:"deletionDate,omitempty"`

	// 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 `json:"scheduledPurgeDate,omitempty"`

	// Fully-qualified API Management Service Resource ID
	ServiceID *string `json:"serviceId,omitempty"`
}

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

NewDeletedServicesClient creates a new instance of DeletedServicesClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*DeletedServicesClient) BeginPurge

BeginPurge - Purges Api Management Service (deletes it with no option to undelete). If the operation fails it returns an *azcore.ResponseError type. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeletedServicesPurge.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewDeletedServicesClient("<subscription-id>", cred, nil)
	poller, err := client.BeginPurge(ctx,
		"<service-name>",
		"<location>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	_, err = poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*DeletedServicesClient) GetByName

GetByName - Get soft-deleted Api Management Service by name. If the operation fails it returns an *azcore.ResponseError type. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetDeletedServiceByName.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewDeletedServicesClient("<subscription-id>", cred, nil)
	res, err := client.GetByName(ctx,
		"<service-name>",
		"<location>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.DeletedServicesClientGetByNameResult)
}
Output:

func (*DeletedServicesClient) ListBySubscription

ListBySubscription - Lists all soft-deleted services available for undelete for the given subscription. If the operation fails it returns an *azcore.ResponseError type. options - DeletedServicesClientListBySubscriptionOptions contains the optional parameters for the DeletedServicesClient.ListBySubscription method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeletedServicesListBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewDeletedServicesClient("<subscription-id>", cred, nil)
	pager := client.ListBySubscription(nil)
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type DeletedServicesClientBeginPurgeOptions added in v0.3.0

type DeletedServicesClientBeginPurgeOptions struct {
}

DeletedServicesClientBeginPurgeOptions contains the optional parameters for the DeletedServicesClient.BeginPurge method.

type DeletedServicesClientGetByNameOptions added in v0.3.0

type DeletedServicesClientGetByNameOptions struct {
}

DeletedServicesClientGetByNameOptions contains the optional parameters for the DeletedServicesClient.GetByName method.

type DeletedServicesClientGetByNameResponse added in v0.3.0

type DeletedServicesClientGetByNameResponse struct {
	DeletedServicesClientGetByNameResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DeletedServicesClientGetByNameResponse contains the response from method DeletedServicesClient.GetByName.

type DeletedServicesClientGetByNameResult added in v0.3.0

type DeletedServicesClientGetByNameResult struct {
	DeletedServiceContract
}

DeletedServicesClientGetByNameResult contains the result from method DeletedServicesClient.GetByName.

type DeletedServicesClientListBySubscriptionOptions added in v0.3.0

type DeletedServicesClientListBySubscriptionOptions struct {
}

DeletedServicesClientListBySubscriptionOptions contains the optional parameters for the DeletedServicesClient.ListBySubscription method.

type DeletedServicesClientListBySubscriptionPager added in v0.3.0

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

DeletedServicesClientListBySubscriptionPager provides operations for iterating over paged responses.

func (*DeletedServicesClientListBySubscriptionPager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*DeletedServicesClientListBySubscriptionPager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*DeletedServicesClientListBySubscriptionPager) PageResponse added in v0.3.0

PageResponse returns the current DeletedServicesClientListBySubscriptionResponse page.

type DeletedServicesClientListBySubscriptionResponse added in v0.3.0

type DeletedServicesClientListBySubscriptionResponse struct {
	DeletedServicesClientListBySubscriptionResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DeletedServicesClientListBySubscriptionResponse contains the response from method DeletedServicesClient.ListBySubscription.

type DeletedServicesClientListBySubscriptionResult added in v0.3.0

type DeletedServicesClientListBySubscriptionResult struct {
	DeletedServicesCollection
}

DeletedServicesClientListBySubscriptionResult contains the result from method DeletedServicesClient.ListBySubscription.

type DeletedServicesClientPurgePoller added in v0.3.0

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

DeletedServicesClientPurgePoller provides polling facilities until the operation reaches a terminal state.

func (*DeletedServicesClientPurgePoller) Done added in v0.3.0

Done returns true if the LRO has reached a terminal state.

func (*DeletedServicesClientPurgePoller) FinalResponse added in v0.3.0

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final DeletedServicesClientPurgeResponse will be returned.

func (*DeletedServicesClientPurgePoller) Poll added in v0.3.0

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*DeletedServicesClientPurgePoller) ResumeToken added in v0.3.0

func (p *DeletedServicesClientPurgePoller) ResumeToken() (string, error)

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type DeletedServicesClientPurgePollerResponse added in v0.3.0

type DeletedServicesClientPurgePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *DeletedServicesClientPurgePoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DeletedServicesClientPurgePollerResponse contains the response from method DeletedServicesClient.Purge.

func (DeletedServicesClientPurgePollerResponse) PollUntilDone added in v0.3.0

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*DeletedServicesClientPurgePollerResponse) Resume added in v0.3.0

Resume rehydrates a DeletedServicesClientPurgePollerResponse from the provided client and resume token.

type DeletedServicesClientPurgeResponse added in v0.3.0

type DeletedServicesClientPurgeResponse struct {
	DeletedServicesClientPurgeResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DeletedServicesClientPurgeResponse contains the response from method DeletedServicesClient.Purge.

type DeletedServicesClientPurgeResult added in v0.3.0

type DeletedServicesClientPurgeResult struct {
	DeletedServiceContract
}

DeletedServicesClientPurgeResult contains the result from method DeletedServicesClient.Purge.

type DeletedServicesCollection

type DeletedServicesCollection struct {
	// READ-ONLY; Next page link if any.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; Page values.
	Value []*DeletedServiceContract `json:"value,omitempty" azure:"ro"`
}

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.

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 `json:"branch,omitempty"`

	// The value enforcing deleting subscriptions to products that are deleted in this update.
	Force *bool `json:"force,omitempty"`
}

DeployConfigurationParameterProperties - Parameters supplied to the Deploy Configuration operation.

type DeployConfigurationParameters

type DeployConfigurationParameters struct {
	// Deploy Configuration Parameter contract properties.
	Properties *DeployConfigurationParameterProperties `json:"properties,omitempty"`
}

DeployConfigurationParameters - Deploy Tenant Configuration Contract.

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

NewDiagnosticClient creates a new instance of DiagnosticClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateDiagnostic.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewDiagnosticClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<diagnostic-id>",
		armapimanagement.DiagnosticContract{
			Properties: &armapimanagement.DiagnosticContractProperties{
				AlwaysLog: armapimanagement.AlwaysLog("allErrors").ToPtr(),
				Backend: &armapimanagement.PipelineDiagnosticSettings{
					Response: &armapimanagement.HTTPMessageDiagnostic{
						Body: &armapimanagement.BodyDiagnosticSettings{
							Bytes: to.Int32Ptr(512),
						},
						Headers: []*string{
							to.StringPtr("Content-type")},
					},
					Request: &armapimanagement.HTTPMessageDiagnostic{
						Body: &armapimanagement.BodyDiagnosticSettings{
							Bytes: to.Int32Ptr(512),
						},
						Headers: []*string{
							to.StringPtr("Content-type")},
					},
				},
				Frontend: &armapimanagement.PipelineDiagnosticSettings{
					Response: &armapimanagement.HTTPMessageDiagnostic{
						Body: &armapimanagement.BodyDiagnosticSettings{
							Bytes: to.Int32Ptr(512),
						},
						Headers: []*string{
							to.StringPtr("Content-type")},
					},
					Request: &armapimanagement.HTTPMessageDiagnostic{
						Body: &armapimanagement.BodyDiagnosticSettings{
							Bytes: to.Int32Ptr(512),
						},
						Headers: []*string{
							to.StringPtr("Content-type")},
					},
				},
				LoggerID: to.StringPtr("<logger-id>"),
				Sampling: &armapimanagement.SamplingSettings{
					Percentage:   to.Float64Ptr(50),
					SamplingType: armapimanagement.SamplingType("fixed").ToPtr(),
				},
			},
		},
		&armapimanagement.DiagnosticClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.DiagnosticClientCreateOrUpdateResult)
}
Output:

func (*DiagnosticClient) Delete

func (client *DiagnosticClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, ifMatch string, options *DiagnosticClientDeleteOptions) (DiagnosticClientDeleteResponse, error)

Delete - Deletes the specified Diagnostic. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteDiagnostic.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewDiagnosticClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<diagnostic-id>",
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*DiagnosticClient) Get

func (client *DiagnosticClient) Get(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, options *DiagnosticClientGetOptions) (DiagnosticClientGetResponse, error)

Get - Gets the details of the Diagnostic specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetDiagnostic.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewDiagnosticClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<diagnostic-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.DiagnosticClientGetResult)
}
Output:

func (*DiagnosticClient) GetEntityTag

func (client *DiagnosticClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, options *DiagnosticClientGetEntityTagOptions) (DiagnosticClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the Diagnostic specified by its identifier. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadDiagnostic.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewDiagnosticClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<diagnostic-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*DiagnosticClient) ListByService

func (client *DiagnosticClient) ListByService(resourceGroupName string, serviceName string, options *DiagnosticClientListByServiceOptions) *DiagnosticClientListByServicePager

ListByService - Lists all diagnostics of the API Management service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - DiagnosticClientListByServiceOptions contains the optional parameters for the DiagnosticClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListDiagnostics.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewDiagnosticClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		&armapimanagement.DiagnosticClientListByServiceOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*DiagnosticClient) Update

func (client *DiagnosticClient) Update(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, ifMatch string, parameters DiagnosticContract, options *DiagnosticClientUpdateOptions) (DiagnosticClientUpdateResponse, error)

Update - Updates the details of the Diagnostic specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateDiagnostic.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewDiagnosticClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<diagnostic-id>",
		"<if-match>",
		armapimanagement.DiagnosticContract{
			Properties: &armapimanagement.DiagnosticContractProperties{
				AlwaysLog: armapimanagement.AlwaysLog("allErrors").ToPtr(),
				Backend: &armapimanagement.PipelineDiagnosticSettings{
					Response: &armapimanagement.HTTPMessageDiagnostic{
						Body: &armapimanagement.BodyDiagnosticSettings{
							Bytes: to.Int32Ptr(512),
						},
						Headers: []*string{
							to.StringPtr("Content-type")},
					},
					Request: &armapimanagement.HTTPMessageDiagnostic{
						Body: &armapimanagement.BodyDiagnosticSettings{
							Bytes: to.Int32Ptr(512),
						},
						Headers: []*string{
							to.StringPtr("Content-type")},
					},
				},
				Frontend: &armapimanagement.PipelineDiagnosticSettings{
					Response: &armapimanagement.HTTPMessageDiagnostic{
						Body: &armapimanagement.BodyDiagnosticSettings{
							Bytes: to.Int32Ptr(512),
						},
						Headers: []*string{
							to.StringPtr("Content-type")},
					},
					Request: &armapimanagement.HTTPMessageDiagnostic{
						Body: &armapimanagement.BodyDiagnosticSettings{
							Bytes: to.Int32Ptr(512),
						},
						Headers: []*string{
							to.StringPtr("Content-type")},
					},
				},
				LoggerID: to.StringPtr("<logger-id>"),
				Sampling: &armapimanagement.SamplingSettings{
					Percentage:   to.Float64Ptr(50),
					SamplingType: armapimanagement.SamplingType("fixed").ToPtr(),
				},
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.DiagnosticClientUpdateResult)
}
Output:

type DiagnosticClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type DiagnosticClientCreateOrUpdateResponse struct {
	DiagnosticClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DiagnosticClientCreateOrUpdateResponse contains the response from method DiagnosticClient.CreateOrUpdate.

type DiagnosticClientCreateOrUpdateResult added in v0.3.0

type DiagnosticClientCreateOrUpdateResult struct {
	DiagnosticContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

DiagnosticClientCreateOrUpdateResult contains the result from method DiagnosticClient.CreateOrUpdate.

type DiagnosticClientDeleteOptions added in v0.3.0

type DiagnosticClientDeleteOptions struct {
}

DiagnosticClientDeleteOptions contains the optional parameters for the DiagnosticClient.Delete method.

type DiagnosticClientDeleteResponse added in v0.3.0

type DiagnosticClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DiagnosticClientDeleteResponse contains the response from method DiagnosticClient.Delete.

type DiagnosticClientGetEntityTagOptions added in v0.3.0

type DiagnosticClientGetEntityTagOptions struct {
}

DiagnosticClientGetEntityTagOptions contains the optional parameters for the DiagnosticClient.GetEntityTag method.

type DiagnosticClientGetEntityTagResponse added in v0.3.0

type DiagnosticClientGetEntityTagResponse struct {
	DiagnosticClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DiagnosticClientGetEntityTagResponse contains the response from method DiagnosticClient.GetEntityTag.

type DiagnosticClientGetEntityTagResult added in v0.3.0

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

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

DiagnosticClientGetEntityTagResult contains the result from method DiagnosticClient.GetEntityTag.

type DiagnosticClientGetOptions added in v0.3.0

type DiagnosticClientGetOptions struct {
}

DiagnosticClientGetOptions contains the optional parameters for the DiagnosticClient.Get method.

type DiagnosticClientGetResponse added in v0.3.0

type DiagnosticClientGetResponse struct {
	DiagnosticClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DiagnosticClientGetResponse contains the response from method DiagnosticClient.Get.

type DiagnosticClientGetResult added in v0.3.0

type DiagnosticClientGetResult struct {
	DiagnosticContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

DiagnosticClientGetResult contains the result from method DiagnosticClient.Get.

type DiagnosticClientListByServiceOptions added in v0.3.0

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.ListByService method.

type DiagnosticClientListByServicePager added in v0.3.0

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

DiagnosticClientListByServicePager provides operations for iterating over paged responses.

func (*DiagnosticClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*DiagnosticClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*DiagnosticClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current DiagnosticClientListByServiceResponse page.

type DiagnosticClientListByServiceResponse added in v0.3.0

type DiagnosticClientListByServiceResponse struct {
	DiagnosticClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DiagnosticClientListByServiceResponse contains the response from method DiagnosticClient.ListByService.

type DiagnosticClientListByServiceResult added in v0.3.0

type DiagnosticClientListByServiceResult struct {
	DiagnosticCollection
}

DiagnosticClientListByServiceResult contains the result from method DiagnosticClient.ListByService.

type DiagnosticClientUpdateOptions added in v0.3.0

type DiagnosticClientUpdateOptions struct {
}

DiagnosticClientUpdateOptions contains the optional parameters for the DiagnosticClient.Update method.

type DiagnosticClientUpdateResponse added in v0.3.0

type DiagnosticClientUpdateResponse struct {
	DiagnosticClientUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

DiagnosticClientUpdateResponse contains the response from method DiagnosticClient.Update.

type DiagnosticClientUpdateResult added in v0.3.0

type DiagnosticClientUpdateResult struct {
	DiagnosticContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

DiagnosticClientUpdateResult contains the result from method DiagnosticClient.Update.

type DiagnosticCollection

type DiagnosticCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// Next page link if any.
	NextLink *string `json:"nextLink,omitempty"`

	// Page values.
	Value []*DiagnosticContract `json:"value,omitempty"`
}

DiagnosticCollection - Paged Diagnostic list representation.

func (DiagnosticCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DiagnosticCollection.

type DiagnosticContract

type DiagnosticContract struct {
	// Diagnostic entity contract properties.
	Properties *DiagnosticContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

DiagnosticContract - Diagnostic details.

func (DiagnosticContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DiagnosticContract.

type DiagnosticContractProperties

type DiagnosticContractProperties struct {
	// REQUIRED; Resource Id of a target logger.
	LoggerID *string `json:"loggerId,omitempty"`

	// Specifies for what type of messages sampling settings should not apply.
	AlwaysLog *AlwaysLog `json:"alwaysLog,omitempty"`

	// Diagnostic settings for incoming/outgoing HTTP messages to the Backend
	Backend *PipelineDiagnosticSettings `json:"backend,omitempty"`

	// Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.
	Frontend *PipelineDiagnosticSettings `json:"frontend,omitempty"`

	// Sets correlation protocol to use for Application Insights diagnostics.
	HTTPCorrelationProtocol *HTTPCorrelationProtocol `json:"httpCorrelationProtocol,omitempty"`

	// Log the ClientIP. Default is false.
	LogClientIP *bool `json:"logClientIp,omitempty"`

	// The format of the Operation Name for Application Insights telemetries. Default is Name.
	OperationNameFormat *OperationNameFormat `json:"operationNameFormat,omitempty"`

	// Sampling settings for Diagnostic.
	Sampling *SamplingSettings `json:"sampling,omitempty"`

	// The verbosity level applied to traces emitted by trace policies.
	Verbosity *Verbosity `json:"verbosity,omitempty"`
}

DiagnosticContractProperties - Diagnostic Entity Properties

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

NewEmailTemplateClient creates a new instance of EmailTemplateClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateTemplate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewEmailTemplateClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.TemplateName("newIssueNotificationMessage"),
		armapimanagement.EmailTemplateUpdateParameters{
			Properties: &armapimanagement.EmailTemplateUpdateParameterProperties{
				Subject: to.StringPtr("<subject>"),
			},
		},
		&armapimanagement.EmailTemplateClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.EmailTemplateClientCreateOrUpdateResult)
}
Output:

func (*EmailTemplateClient) Delete

func (client *EmailTemplateClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, ifMatch string, options *EmailTemplateClientDeleteOptions) (EmailTemplateClientDeleteResponse, error)

Delete - Reset the Email Template to default template provided by the API Management service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteTemplate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewEmailTemplateClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.TemplateName("newIssueNotificationMessage"),
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*EmailTemplateClient) Get

func (client *EmailTemplateClient) Get(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, options *EmailTemplateClientGetOptions) (EmailTemplateClientGetResponse, error)

Get - Gets the details of the email template specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTemplate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewEmailTemplateClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.TemplateName("newIssueNotificationMessage"),
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.EmailTemplateClientGetResult)
}
Output:

func (*EmailTemplateClient) GetEntityTag

func (client *EmailTemplateClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, options *EmailTemplateClientGetEntityTagOptions) (EmailTemplateClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the email template specified by its identifier. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadEmailTemplate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewEmailTemplateClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.TemplateName("newIssueNotificationMessage"),
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*EmailTemplateClient) ListByService

func (client *EmailTemplateClient) ListByService(resourceGroupName string, serviceName string, options *EmailTemplateClientListByServiceOptions) *EmailTemplateClientListByServicePager

ListByService - Gets all email templates If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - EmailTemplateClientListByServiceOptions contains the optional parameters for the EmailTemplateClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListTemplates.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewEmailTemplateClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		&armapimanagement.EmailTemplateClientListByServiceOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*EmailTemplateClient) Update

func (client *EmailTemplateClient) Update(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, ifMatch string, parameters EmailTemplateUpdateParameters, options *EmailTemplateClientUpdateOptions) (EmailTemplateClientUpdateResponse, error)

Update - Updates API Management email template If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateTemplate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewEmailTemplateClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.TemplateName("newIssueNotificationMessage"),
		"<if-match>",
		armapimanagement.EmailTemplateUpdateParameters{
			Properties: &armapimanagement.EmailTemplateUpdateParameterProperties{
				Body:    to.StringPtr("<body>"),
				Subject: to.StringPtr("<subject>"),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.EmailTemplateClientUpdateResult)
}
Output:

type EmailTemplateClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type EmailTemplateClientCreateOrUpdateResponse struct {
	EmailTemplateClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

EmailTemplateClientCreateOrUpdateResponse contains the response from method EmailTemplateClient.CreateOrUpdate.

type EmailTemplateClientCreateOrUpdateResult added in v0.3.0

type EmailTemplateClientCreateOrUpdateResult struct {
	EmailTemplateContract
}

EmailTemplateClientCreateOrUpdateResult contains the result from method EmailTemplateClient.CreateOrUpdate.

type EmailTemplateClientDeleteOptions added in v0.3.0

type EmailTemplateClientDeleteOptions struct {
}

EmailTemplateClientDeleteOptions contains the optional parameters for the EmailTemplateClient.Delete method.

type EmailTemplateClientDeleteResponse added in v0.3.0

type EmailTemplateClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

EmailTemplateClientDeleteResponse contains the response from method EmailTemplateClient.Delete.

type EmailTemplateClientGetEntityTagOptions added in v0.3.0

type EmailTemplateClientGetEntityTagOptions struct {
}

EmailTemplateClientGetEntityTagOptions contains the optional parameters for the EmailTemplateClient.GetEntityTag method.

type EmailTemplateClientGetEntityTagResponse added in v0.3.0

type EmailTemplateClientGetEntityTagResponse struct {
	EmailTemplateClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

EmailTemplateClientGetEntityTagResponse contains the response from method EmailTemplateClient.GetEntityTag.

type EmailTemplateClientGetEntityTagResult added in v0.3.0

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

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

EmailTemplateClientGetEntityTagResult contains the result from method EmailTemplateClient.GetEntityTag.

type EmailTemplateClientGetOptions added in v0.3.0

type EmailTemplateClientGetOptions struct {
}

EmailTemplateClientGetOptions contains the optional parameters for the EmailTemplateClient.Get method.

type EmailTemplateClientGetResponse added in v0.3.0

type EmailTemplateClientGetResponse struct {
	EmailTemplateClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

EmailTemplateClientGetResponse contains the response from method EmailTemplateClient.Get.

type EmailTemplateClientGetResult added in v0.3.0

type EmailTemplateClientGetResult struct {
	EmailTemplateContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

EmailTemplateClientGetResult contains the result from method EmailTemplateClient.Get.

type EmailTemplateClientListByServiceOptions added in v0.3.0

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.ListByService method.

type EmailTemplateClientListByServicePager added in v0.3.0

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

EmailTemplateClientListByServicePager provides operations for iterating over paged responses.

func (*EmailTemplateClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*EmailTemplateClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*EmailTemplateClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current EmailTemplateClientListByServiceResponse page.

type EmailTemplateClientListByServiceResponse added in v0.3.0

type EmailTemplateClientListByServiceResponse struct {
	EmailTemplateClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

EmailTemplateClientListByServiceResponse contains the response from method EmailTemplateClient.ListByService.

type EmailTemplateClientListByServiceResult added in v0.3.0

type EmailTemplateClientListByServiceResult struct {
	EmailTemplateCollection
}

EmailTemplateClientListByServiceResult contains the result from method EmailTemplateClient.ListByService.

type EmailTemplateClientUpdateOptions added in v0.3.0

type EmailTemplateClientUpdateOptions struct {
}

EmailTemplateClientUpdateOptions contains the optional parameters for the EmailTemplateClient.Update method.

type EmailTemplateClientUpdateResponse added in v0.3.0

type EmailTemplateClientUpdateResponse struct {
	EmailTemplateClientUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

EmailTemplateClientUpdateResponse contains the response from method EmailTemplateClient.Update.

type EmailTemplateClientUpdateResult added in v0.3.0

type EmailTemplateClientUpdateResult struct {
	EmailTemplateContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

EmailTemplateClientUpdateResult contains the result from method EmailTemplateClient.Update.

type EmailTemplateCollection

type EmailTemplateCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// Next page link if any.
	NextLink *string `json:"nextLink,omitempty"`

	// Page values.
	Value []*EmailTemplateContract `json:"value,omitempty"`
}

EmailTemplateCollection - Paged email template list representation.

func (EmailTemplateCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EmailTemplateCollection.

type EmailTemplateContract

type EmailTemplateContract struct {
	// Email Template entity contract properties.
	Properties *EmailTemplateContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

EmailTemplateContract - Email Template details.

type EmailTemplateContractProperties

type EmailTemplateContractProperties struct {
	// REQUIRED; Email Template Body. This should be a valid XDocument
	Body *string `json:"body,omitempty"`

	// REQUIRED; Subject of the Template.
	Subject *string `json:"subject,omitempty"`

	// Description of the Email Template.
	Description *string `json:"description,omitempty"`

	// Email Template Parameter values.
	Parameters []*EmailTemplateParametersContractProperties `json:"parameters,omitempty"`

	// Title of the Template.
	Title *string `json:"title,omitempty"`

	// READ-ONLY; Whether the template is the default template provided by API Management or has been edited.
	IsDefault *bool `json:"isDefault,omitempty" azure:"ro"`
}

EmailTemplateContractProperties - Email Template Contract properties.

func (EmailTemplateContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EmailTemplateContractProperties.

type EmailTemplateParametersContractProperties

type EmailTemplateParametersContractProperties struct {
	// Template parameter description.
	Description *string `json:"description,omitempty"`

	// Template parameter name.
	Name *string `json:"name,omitempty"`

	// Template parameter title.
	Title *string `json:"title,omitempty"`
}

EmailTemplateParametersContractProperties - Email Template Parameter contract.

type EmailTemplateUpdateParameterProperties

type EmailTemplateUpdateParameterProperties struct {
	// Email Template Body. This should be a valid XDocument
	Body *string `json:"body,omitempty"`

	// Description of the Email Template.
	Description *string `json:"description,omitempty"`

	// Email Template Parameter values.
	Parameters []*EmailTemplateParametersContractProperties `json:"parameters,omitempty"`

	// Subject of the Template.
	Subject *string `json:"subject,omitempty"`

	// Title of the Template.
	Title *string `json:"title,omitempty"`
}

EmailTemplateUpdateParameterProperties - Email Template Update Contract properties.

func (EmailTemplateUpdateParameterProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EmailTemplateUpdateParameterProperties.

type EmailTemplateUpdateParameters

type EmailTemplateUpdateParameters struct {
	// Email Template Update contract properties.
	Properties *EmailTemplateUpdateParameterProperties `json:"properties,omitempty"`
}

EmailTemplateUpdateParameters - Email Template update Parameters.

func (EmailTemplateUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EmailTemplateUpdateParameters.

type EndpointDependency

type EndpointDependency struct {
	// The domain name of the dependency.
	DomainName *string `json:"domainName,omitempty"`

	// The Ports used when connecting to DomainName.
	EndpointDetails []*EndpointDetail `json:"endpointDetails,omitempty"`
}

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.

type EndpointDetail

type EndpointDetail struct {
	// The port an endpoint is connected to.
	Port *int32 `json:"port,omitempty"`

	// The region of the dependency.
	Region *string `json:"region,omitempty"`
}

EndpointDetail - Current TCP connectivity information from the Api Management Service to a single endpoint.

type ErrorFieldContract

type ErrorFieldContract struct {
	// Property level error code.
	Code *string `json:"code,omitempty"`

	// Human-readable representation of property-level error.
	Message *string `json:"message,omitempty"`

	// Property name.
	Target *string `json:"target,omitempty"`
}

ErrorFieldContract - Error Field contract.

type ErrorResponse

type ErrorResponse struct {
	// Properties of the Error Response.
	Error *ErrorResponseBody `json:"error,omitempty"`
}

ErrorResponse - Error Response.

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 `json:"code,omitempty"`

	// The list of invalid fields send in request, in case of validation error.
	Details []*ErrorFieldContract `json:"details,omitempty"`

	// Human-readable representation of the error.
	Message *string `json:"message,omitempty"`
}

ErrorResponseBody - Error Body contract.

func (ErrorResponseBody) MarshalJSON

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

MarshalJSON implements the json.Marshaller 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.

func (ExportAPI) ToPtr

func (c ExportAPI) ToPtr() *ExportAPI

ToPtr returns a *ExportAPI pointing to the current value.

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.

func (ExportFormat) ToPtr

func (c ExportFormat) ToPtr() *ExportFormat

ToPtr returns a *ExportFormat pointing to the current value.

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.

func (ExportResultFormat) ToPtr

ToPtr returns a *ExportResultFormat pointing to the current value.

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

NewGatewayAPIClient creates a new instance of GatewayAPIClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGatewayApi.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGatewayAPIClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<gateway-id>",
		"<api-id>",
		&armapimanagement.GatewayAPIClientCreateOrUpdateOptions{Parameters: &armapimanagement.AssociationContract{
			Properties: &armapimanagement.AssociationContractProperties{
				ProvisioningState: to.StringPtr("<provisioning-state>"),
			},
		},
		})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.GatewayAPIClientCreateOrUpdateResult)
}
Output:

func (*GatewayAPIClient) Delete

func (client *GatewayAPIClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, apiID string, options *GatewayAPIClientDeleteOptions) (GatewayAPIClientDeleteResponse, error)

Delete - Deletes the specified API from the specified Gateway. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteGatewayApi.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGatewayAPIClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<gateway-id>",
		"<api-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*GatewayAPIClient) GetEntityTag

func (client *GatewayAPIClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, apiID string, options *GatewayAPIClientGetEntityTagOptions) (GatewayAPIClientGetEntityTagResponse, error)

GetEntityTag - Checks that API entity specified by identifier is associated with the Gateway entity. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadGatewayApi.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGatewayAPIClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<gateway-id>",
		"<api-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*GatewayAPIClient) ListByService

func (client *GatewayAPIClient) ListByService(resourceGroupName string, serviceName string, gatewayID string, options *GatewayAPIClientListByServiceOptions) *GatewayAPIClientListByServicePager

ListByService - Lists a collection of the APIs associated with a gateway. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListGatewayApis.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGatewayAPIClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		"<gateway-id>",
		&armapimanagement.GatewayAPIClientListByServiceOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type GatewayAPIClientCreateOrUpdateOptions added in v0.3.0

type GatewayAPIClientCreateOrUpdateOptions struct {
	Parameters *AssociationContract
}

GatewayAPIClientCreateOrUpdateOptions contains the optional parameters for the GatewayAPIClient.CreateOrUpdate method.

type GatewayAPIClientCreateOrUpdateResponse added in v0.3.0

type GatewayAPIClientCreateOrUpdateResponse struct {
	GatewayAPIClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GatewayAPIClientCreateOrUpdateResponse contains the response from method GatewayAPIClient.CreateOrUpdate.

type GatewayAPIClientCreateOrUpdateResult added in v0.3.0

type GatewayAPIClientCreateOrUpdateResult struct {
	APIContract
}

GatewayAPIClientCreateOrUpdateResult contains the result from method GatewayAPIClient.CreateOrUpdate.

type GatewayAPIClientDeleteOptions added in v0.3.0

type GatewayAPIClientDeleteOptions struct {
}

GatewayAPIClientDeleteOptions contains the optional parameters for the GatewayAPIClient.Delete method.

type GatewayAPIClientDeleteResponse added in v0.3.0

type GatewayAPIClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GatewayAPIClientDeleteResponse contains the response from method GatewayAPIClient.Delete.

type GatewayAPIClientGetEntityTagOptions added in v0.3.0

type GatewayAPIClientGetEntityTagOptions struct {
}

GatewayAPIClientGetEntityTagOptions contains the optional parameters for the GatewayAPIClient.GetEntityTag method.

type GatewayAPIClientGetEntityTagResponse added in v0.3.0

type GatewayAPIClientGetEntityTagResponse struct {
	GatewayAPIClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GatewayAPIClientGetEntityTagResponse contains the response from method GatewayAPIClient.GetEntityTag.

type GatewayAPIClientGetEntityTagResult added in v0.3.0

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

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

GatewayAPIClientGetEntityTagResult contains the result from method GatewayAPIClient.GetEntityTag.

type GatewayAPIClientListByServiceOptions added in v0.3.0

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.ListByService method.

type GatewayAPIClientListByServicePager added in v0.3.0

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

GatewayAPIClientListByServicePager provides operations for iterating over paged responses.

func (*GatewayAPIClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*GatewayAPIClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*GatewayAPIClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current GatewayAPIClientListByServiceResponse page.

type GatewayAPIClientListByServiceResponse added in v0.3.0

type GatewayAPIClientListByServiceResponse struct {
	GatewayAPIClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GatewayAPIClientListByServiceResponse contains the response from method GatewayAPIClient.ListByService.

type GatewayAPIClientListByServiceResult added in v0.3.0

type GatewayAPIClientListByServiceResult struct {
	APICollection
}

GatewayAPIClientListByServiceResult contains the result from method GatewayAPIClient.ListByService.

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

NewGatewayCertificateAuthorityClient creates a new instance of GatewayCertificateAuthorityClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*GatewayCertificateAuthorityClient) CreateOrUpdate

CreateOrUpdate - Assign Certificate entity to Gateway entity as Certificate Authority. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGatewayCertificateAuthority.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGatewayCertificateAuthorityClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<gateway-id>",
		"<certificate-id>",
		armapimanagement.GatewayCertificateAuthorityContract{
			Properties: &armapimanagement.GatewayCertificateAuthorityContractProperties{
				IsTrusted: to.BoolPtr(false),
			},
		},
		&armapimanagement.GatewayCertificateAuthorityClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.GatewayCertificateAuthorityClientCreateOrUpdateResult)
}
Output:

func (*GatewayCertificateAuthorityClient) Delete

func (client *GatewayCertificateAuthorityClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, certificateID string, ifMatch string, options *GatewayCertificateAuthorityClientDeleteOptions) (GatewayCertificateAuthorityClientDeleteResponse, error)

Delete - Remove relationship between Certificate Authority and Gateway entity. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteGatewayCertificateAuthority.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGatewayCertificateAuthorityClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<gateway-id>",
		"<certificate-id>",
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*GatewayCertificateAuthorityClient) Get

Get - Get assigned Gateway Certificate Authority details. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGatewayCertificateAuthority.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGatewayCertificateAuthorityClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<gateway-id>",
		"<certificate-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.GatewayCertificateAuthorityClientGetResult)
}
Output:

func (*GatewayCertificateAuthorityClient) GetEntityTag

GetEntityTag - Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadGatewayCertificateAuthority.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGatewayCertificateAuthorityClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<gateway-id>",
		"<certificate-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*GatewayCertificateAuthorityClient) ListByService

ListByService - Lists the collection of Certificate Authorities for the specified Gateway entity. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListGatewayCertificateAuthorities.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGatewayCertificateAuthorityClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		"<gateway-id>",
		&armapimanagement.GatewayCertificateAuthorityClientListByServiceOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type GatewayCertificateAuthorityClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type GatewayCertificateAuthorityClientCreateOrUpdateResponse struct {
	GatewayCertificateAuthorityClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GatewayCertificateAuthorityClientCreateOrUpdateResponse contains the response from method GatewayCertificateAuthorityClient.CreateOrUpdate.

type GatewayCertificateAuthorityClientCreateOrUpdateResult added in v0.3.0

type GatewayCertificateAuthorityClientCreateOrUpdateResult struct {
	GatewayCertificateAuthorityContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GatewayCertificateAuthorityClientCreateOrUpdateResult contains the result from method GatewayCertificateAuthorityClient.CreateOrUpdate.

type GatewayCertificateAuthorityClientDeleteOptions added in v0.3.0

type GatewayCertificateAuthorityClientDeleteOptions struct {
}

GatewayCertificateAuthorityClientDeleteOptions contains the optional parameters for the GatewayCertificateAuthorityClient.Delete method.

type GatewayCertificateAuthorityClientDeleteResponse added in v0.3.0

type GatewayCertificateAuthorityClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GatewayCertificateAuthorityClientDeleteResponse contains the response from method GatewayCertificateAuthorityClient.Delete.

type GatewayCertificateAuthorityClientGetEntityTagOptions added in v0.3.0

type GatewayCertificateAuthorityClientGetEntityTagOptions struct {
}

GatewayCertificateAuthorityClientGetEntityTagOptions contains the optional parameters for the GatewayCertificateAuthorityClient.GetEntityTag method.

type GatewayCertificateAuthorityClientGetEntityTagResponse added in v0.3.0

type GatewayCertificateAuthorityClientGetEntityTagResponse struct {
	GatewayCertificateAuthorityClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GatewayCertificateAuthorityClientGetEntityTagResponse contains the response from method GatewayCertificateAuthorityClient.GetEntityTag.

type GatewayCertificateAuthorityClientGetEntityTagResult added in v0.3.0

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

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

GatewayCertificateAuthorityClientGetEntityTagResult contains the result from method GatewayCertificateAuthorityClient.GetEntityTag.

type GatewayCertificateAuthorityClientGetOptions added in v0.3.0

type GatewayCertificateAuthorityClientGetOptions struct {
}

GatewayCertificateAuthorityClientGetOptions contains the optional parameters for the GatewayCertificateAuthorityClient.Get method.

type GatewayCertificateAuthorityClientGetResponse added in v0.3.0

type GatewayCertificateAuthorityClientGetResponse struct {
	GatewayCertificateAuthorityClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GatewayCertificateAuthorityClientGetResponse contains the response from method GatewayCertificateAuthorityClient.Get.

type GatewayCertificateAuthorityClientGetResult added in v0.3.0

type GatewayCertificateAuthorityClientGetResult struct {
	GatewayCertificateAuthorityContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GatewayCertificateAuthorityClientGetResult contains the result from method GatewayCertificateAuthorityClient.Get.

type GatewayCertificateAuthorityClientListByServiceOptions added in v0.3.0

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.ListByService method.

type GatewayCertificateAuthorityClientListByServicePager added in v0.3.0

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

GatewayCertificateAuthorityClientListByServicePager provides operations for iterating over paged responses.

func (*GatewayCertificateAuthorityClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*GatewayCertificateAuthorityClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*GatewayCertificateAuthorityClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current GatewayCertificateAuthorityClientListByServiceResponse page.

type GatewayCertificateAuthorityClientListByServiceResponse added in v0.3.0

type GatewayCertificateAuthorityClientListByServiceResponse struct {
	GatewayCertificateAuthorityClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GatewayCertificateAuthorityClientListByServiceResponse contains the response from method GatewayCertificateAuthorityClient.ListByService.

type GatewayCertificateAuthorityClientListByServiceResult added in v0.3.0

type GatewayCertificateAuthorityClientListByServiceResult struct {
	GatewayCertificateAuthorityCollection
}

GatewayCertificateAuthorityClientListByServiceResult contains the result from method GatewayCertificateAuthorityClient.ListByService.

type GatewayCertificateAuthorityCollection

type GatewayCertificateAuthorityCollection struct {
	// READ-ONLY; Next page link if any.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; Page values.
	Value []*GatewayCertificateAuthorityContract `json:"value,omitempty" azure:"ro"`
}

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.

type GatewayCertificateAuthorityContract

type GatewayCertificateAuthorityContract struct {
	// Gateway certificate authority details.
	Properties *GatewayCertificateAuthorityContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

GatewayCertificateAuthorityContract - Gateway certificate authority details.

type GatewayCertificateAuthorityContractProperties

type GatewayCertificateAuthorityContractProperties struct {
	// Determines whether certificate authority is trusted.
	IsTrusted *bool `json:"isTrusted,omitempty"`
}

GatewayCertificateAuthorityContractProperties - Gateway certificate authority details.

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

NewGatewayClient creates a new instance of GatewayClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGateway.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGatewayClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<gateway-id>",
		armapimanagement.GatewayContract{
			Properties: &armapimanagement.GatewayContractProperties{
				Description: to.StringPtr("<description>"),
				LocationData: &armapimanagement.ResourceLocationDataContract{
					Name: to.StringPtr("<name>"),
				},
			},
		},
		&armapimanagement.GatewayClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.GatewayClientCreateOrUpdateResult)
}
Output:

func (*GatewayClient) Delete

func (client *GatewayClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, ifMatch string, options *GatewayClientDeleteOptions) (GatewayClientDeleteResponse, error)

Delete - Deletes specific Gateway. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteGateway.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGatewayClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<gateway-id>",
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*GatewayClient) GenerateToken

func (client *GatewayClient) GenerateToken(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, parameters GatewayTokenRequestContract, options *GatewayClientGenerateTokenOptions) (GatewayClientGenerateTokenResponse, error)

GenerateToken - Gets the Shared Access Authorization Token for the gateway. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGatewayGenerateToken.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGatewayClient("<subscription-id>", cred, nil)
	res, err := client.GenerateToken(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<gateway-id>",
		armapimanagement.GatewayTokenRequestContract{
			Expiry:  to.TimePtr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-21T00:44:24.2845269Z"); return t }()),
			KeyType: armapimanagement.KeyTypePrimary.ToPtr(),
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.GatewayClientGenerateTokenResult)
}
Output:

func (*GatewayClient) Get

func (client *GatewayClient) Get(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, options *GatewayClientGetOptions) (GatewayClientGetResponse, error)

Get - Gets the details of the Gateway specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGateway.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGatewayClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<gateway-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.GatewayClientGetResult)
}
Output:

func (*GatewayClient) GetEntityTag

func (client *GatewayClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, options *GatewayClientGetEntityTagOptions) (GatewayClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the Gateway specified by its identifier. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadGateway.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGatewayClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<gateway-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*GatewayClient) ListByService

func (client *GatewayClient) ListByService(resourceGroupName string, serviceName string, options *GatewayClientListByServiceOptions) *GatewayClientListByServicePager

ListByService - Lists a collection of gateways registered with service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - GatewayClientListByServiceOptions contains the optional parameters for the GatewayClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListGateways.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGatewayClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		&armapimanagement.GatewayClientListByServiceOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*GatewayClient) ListKeys

func (client *GatewayClient) ListKeys(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, options *GatewayClientListKeysOptions) (GatewayClientListKeysResponse, error)

ListKeys - Retrieves gateway keys. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGatewayListKeys.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGatewayClient("<subscription-id>", cred, nil)
	res, err := client.ListKeys(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<gateway-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.GatewayClientListKeysResult)
}
Output:

func (*GatewayClient) RegenerateKey

func (client *GatewayClient) RegenerateKey(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, parameters GatewayKeyRegenerationRequestContract, options *GatewayClientRegenerateKeyOptions) (GatewayClientRegenerateKeyResponse, error)

RegenerateKey - Regenerates specified gateway key invalidating any tokens created with it. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGatewayRegenerateKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGatewayClient("<subscription-id>", cred, nil)
	_, err = client.RegenerateKey(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<gateway-id>",
		armapimanagement.GatewayKeyRegenerationRequestContract{
			KeyType: armapimanagement.KeyTypePrimary.ToPtr(),
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*GatewayClient) Update

func (client *GatewayClient) Update(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, ifMatch string, parameters GatewayContract, options *GatewayClientUpdateOptions) (GatewayClientUpdateResponse, error)

Update - Updates the details of the gateway specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateGateway.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGatewayClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<gateway-id>",
		"<if-match>",
		armapimanagement.GatewayContract{
			Properties: &armapimanagement.GatewayContractProperties{
				Description: to.StringPtr("<description>"),
				LocationData: &armapimanagement.ResourceLocationDataContract{
					Name: to.StringPtr("<name>"),
				},
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.GatewayClientUpdateResult)
}
Output:

type GatewayClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type GatewayClientCreateOrUpdateResponse struct {
	GatewayClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GatewayClientCreateOrUpdateResponse contains the response from method GatewayClient.CreateOrUpdate.

type GatewayClientCreateOrUpdateResult added in v0.3.0

type GatewayClientCreateOrUpdateResult struct {
	GatewayContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GatewayClientCreateOrUpdateResult contains the result from method GatewayClient.CreateOrUpdate.

type GatewayClientDeleteOptions added in v0.3.0

type GatewayClientDeleteOptions struct {
}

GatewayClientDeleteOptions contains the optional parameters for the GatewayClient.Delete method.

type GatewayClientDeleteResponse added in v0.3.0

type GatewayClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GatewayClientDeleteResponse contains the response from method GatewayClient.Delete.

type GatewayClientGenerateTokenOptions added in v0.3.0

type GatewayClientGenerateTokenOptions struct {
}

GatewayClientGenerateTokenOptions contains the optional parameters for the GatewayClient.GenerateToken method.

type GatewayClientGenerateTokenResponse added in v0.3.0

type GatewayClientGenerateTokenResponse struct {
	GatewayClientGenerateTokenResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GatewayClientGenerateTokenResponse contains the response from method GatewayClient.GenerateToken.

type GatewayClientGenerateTokenResult added in v0.3.0

type GatewayClientGenerateTokenResult struct {
	GatewayTokenContract
}

GatewayClientGenerateTokenResult contains the result from method GatewayClient.GenerateToken.

type GatewayClientGetEntityTagOptions added in v0.3.0

type GatewayClientGetEntityTagOptions struct {
}

GatewayClientGetEntityTagOptions contains the optional parameters for the GatewayClient.GetEntityTag method.

type GatewayClientGetEntityTagResponse added in v0.3.0

type GatewayClientGetEntityTagResponse struct {
	GatewayClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GatewayClientGetEntityTagResponse contains the response from method GatewayClient.GetEntityTag.

type GatewayClientGetEntityTagResult added in v0.3.0

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

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

GatewayClientGetEntityTagResult contains the result from method GatewayClient.GetEntityTag.

type GatewayClientGetOptions added in v0.3.0

type GatewayClientGetOptions struct {
}

GatewayClientGetOptions contains the optional parameters for the GatewayClient.Get method.

type GatewayClientGetResponse added in v0.3.0

type GatewayClientGetResponse struct {
	GatewayClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GatewayClientGetResponse contains the response from method GatewayClient.Get.

type GatewayClientGetResult added in v0.3.0

type GatewayClientGetResult struct {
	GatewayContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GatewayClientGetResult contains the result from method GatewayClient.Get.

type GatewayClientListByServiceOptions added in v0.3.0

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.ListByService method.

type GatewayClientListByServicePager added in v0.3.0

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

GatewayClientListByServicePager provides operations for iterating over paged responses.

func (*GatewayClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*GatewayClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*GatewayClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current GatewayClientListByServiceResponse page.

type GatewayClientListByServiceResponse added in v0.3.0

type GatewayClientListByServiceResponse struct {
	GatewayClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GatewayClientListByServiceResponse contains the response from method GatewayClient.ListByService.

type GatewayClientListByServiceResult added in v0.3.0

type GatewayClientListByServiceResult struct {
	GatewayCollection
}

GatewayClientListByServiceResult contains the result from method GatewayClient.ListByService.

type GatewayClientListKeysOptions added in v0.3.0

type GatewayClientListKeysOptions struct {
}

GatewayClientListKeysOptions contains the optional parameters for the GatewayClient.ListKeys method.

type GatewayClientListKeysResponse added in v0.3.0

type GatewayClientListKeysResponse struct {
	GatewayClientListKeysResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GatewayClientListKeysResponse contains the response from method GatewayClient.ListKeys.

type GatewayClientListKeysResult added in v0.3.0

type GatewayClientListKeysResult struct {
	GatewayKeysContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GatewayClientListKeysResult contains the result from method GatewayClient.ListKeys.

type GatewayClientRegenerateKeyOptions added in v0.3.0

type GatewayClientRegenerateKeyOptions struct {
}

GatewayClientRegenerateKeyOptions contains the optional parameters for the GatewayClient.RegenerateKey method.

type GatewayClientRegenerateKeyResponse added in v0.3.0

type GatewayClientRegenerateKeyResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GatewayClientRegenerateKeyResponse contains the response from method GatewayClient.RegenerateKey.

type GatewayClientUpdateOptions added in v0.3.0

type GatewayClientUpdateOptions struct {
}

GatewayClientUpdateOptions contains the optional parameters for the GatewayClient.Update method.

type GatewayClientUpdateResponse added in v0.3.0

type GatewayClientUpdateResponse struct {
	GatewayClientUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GatewayClientUpdateResponse contains the response from method GatewayClient.Update.

type GatewayClientUpdateResult added in v0.3.0

type GatewayClientUpdateResult struct {
	GatewayContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GatewayClientUpdateResult contains the result from method GatewayClient.Update.

type GatewayCollection

type GatewayCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// READ-ONLY; Next page link if any.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; Page values.
	Value []*GatewayContract `json:"value,omitempty" azure:"ro"`
}

GatewayCollection - Paged Gateway list representation.

func (GatewayCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GatewayCollection.

type GatewayContract

type GatewayContract struct {
	// Gateway details.
	Properties *GatewayContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

GatewayContract - Gateway details.

func (GatewayContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GatewayContract.

type GatewayContractProperties

type GatewayContractProperties struct {
	// Gateway description
	Description *string `json:"description,omitempty"`

	// Gateway location.
	LocationData *ResourceLocationDataContract `json:"locationData,omitempty"`
}

GatewayContractProperties - Properties of the Gateway contract.

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

NewGatewayHostnameConfigurationClient creates a new instance of GatewayHostnameConfigurationClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*GatewayHostnameConfigurationClient) CreateOrUpdate

CreateOrUpdate - Creates of updates hostname configuration for a Gateway. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGatewayHostnameConfiguration.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGatewayHostnameConfigurationClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<gateway-id>",
		"<hc-id>",
		armapimanagement.GatewayHostnameConfigurationContract{
			Properties: &armapimanagement.GatewayHostnameConfigurationContractProperties{
				CertificateID:              to.StringPtr("<certificate-id>"),
				Hostname:                   to.StringPtr("<hostname>"),
				HTTP2Enabled:               to.BoolPtr(true),
				NegotiateClientCertificate: to.BoolPtr(false),
				Tls10Enabled:               to.BoolPtr(false),
				Tls11Enabled:               to.BoolPtr(false),
			},
		},
		&armapimanagement.GatewayHostnameConfigurationClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.GatewayHostnameConfigurationClientCreateOrUpdateResult)
}
Output:

func (*GatewayHostnameConfigurationClient) Delete

Delete - Deletes the specified hostname configuration from the specified Gateway. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteGatewayHostnameConfiguration.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGatewayHostnameConfigurationClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<gateway-id>",
		"<hc-id>",
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*GatewayHostnameConfigurationClient) Get

Get - Get details of a hostname configuration If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGatewayHostnameConfiguration.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGatewayHostnameConfigurationClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<gateway-id>",
		"<hc-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.GatewayHostnameConfigurationClientGetResult)
}
Output:

func (*GatewayHostnameConfigurationClient) GetEntityTag

GetEntityTag - Checks that hostname configuration entity specified by identifier exists for specified Gateway entity. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadGatewayHostnameConfiguration.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGatewayHostnameConfigurationClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<gateway-id>",
		"<hc-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*GatewayHostnameConfigurationClient) ListByService

ListByService - Lists the collection of hostname configurations for the specified gateway. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListGatewayHostnameConfigurations.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGatewayHostnameConfigurationClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		"<gateway-id>",
		&armapimanagement.GatewayHostnameConfigurationClientListByServiceOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type GatewayHostnameConfigurationClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type GatewayHostnameConfigurationClientCreateOrUpdateResponse struct {
	GatewayHostnameConfigurationClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GatewayHostnameConfigurationClientCreateOrUpdateResponse contains the response from method GatewayHostnameConfigurationClient.CreateOrUpdate.

type GatewayHostnameConfigurationClientCreateOrUpdateResult added in v0.3.0

type GatewayHostnameConfigurationClientCreateOrUpdateResult struct {
	GatewayHostnameConfigurationContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GatewayHostnameConfigurationClientCreateOrUpdateResult contains the result from method GatewayHostnameConfigurationClient.CreateOrUpdate.

type GatewayHostnameConfigurationClientDeleteOptions added in v0.3.0

type GatewayHostnameConfigurationClientDeleteOptions struct {
}

GatewayHostnameConfigurationClientDeleteOptions contains the optional parameters for the GatewayHostnameConfigurationClient.Delete method.

type GatewayHostnameConfigurationClientDeleteResponse added in v0.3.0

type GatewayHostnameConfigurationClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GatewayHostnameConfigurationClientDeleteResponse contains the response from method GatewayHostnameConfigurationClient.Delete.

type GatewayHostnameConfigurationClientGetEntityTagOptions added in v0.3.0

type GatewayHostnameConfigurationClientGetEntityTagOptions struct {
}

GatewayHostnameConfigurationClientGetEntityTagOptions contains the optional parameters for the GatewayHostnameConfigurationClient.GetEntityTag method.

type GatewayHostnameConfigurationClientGetEntityTagResponse added in v0.3.0

type GatewayHostnameConfigurationClientGetEntityTagResponse struct {
	GatewayHostnameConfigurationClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GatewayHostnameConfigurationClientGetEntityTagResponse contains the response from method GatewayHostnameConfigurationClient.GetEntityTag.

type GatewayHostnameConfigurationClientGetEntityTagResult added in v0.3.0

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

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

GatewayHostnameConfigurationClientGetEntityTagResult contains the result from method GatewayHostnameConfigurationClient.GetEntityTag.

type GatewayHostnameConfigurationClientGetOptions added in v0.3.0

type GatewayHostnameConfigurationClientGetOptions struct {
}

GatewayHostnameConfigurationClientGetOptions contains the optional parameters for the GatewayHostnameConfigurationClient.Get method.

type GatewayHostnameConfigurationClientGetResponse added in v0.3.0

type GatewayHostnameConfigurationClientGetResponse struct {
	GatewayHostnameConfigurationClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GatewayHostnameConfigurationClientGetResponse contains the response from method GatewayHostnameConfigurationClient.Get.

type GatewayHostnameConfigurationClientGetResult added in v0.3.0

type GatewayHostnameConfigurationClientGetResult struct {
	GatewayHostnameConfigurationContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GatewayHostnameConfigurationClientGetResult contains the result from method GatewayHostnameConfigurationClient.Get.

type GatewayHostnameConfigurationClientListByServiceOptions added in v0.3.0

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.ListByService method.

type GatewayHostnameConfigurationClientListByServicePager added in v0.3.0

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

GatewayHostnameConfigurationClientListByServicePager provides operations for iterating over paged responses.

func (*GatewayHostnameConfigurationClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*GatewayHostnameConfigurationClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*GatewayHostnameConfigurationClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current GatewayHostnameConfigurationClientListByServiceResponse page.

type GatewayHostnameConfigurationClientListByServiceResponse added in v0.3.0

type GatewayHostnameConfigurationClientListByServiceResponse struct {
	GatewayHostnameConfigurationClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GatewayHostnameConfigurationClientListByServiceResponse contains the response from method GatewayHostnameConfigurationClient.ListByService.

type GatewayHostnameConfigurationClientListByServiceResult added in v0.3.0

type GatewayHostnameConfigurationClientListByServiceResult struct {
	GatewayHostnameConfigurationCollection
}

GatewayHostnameConfigurationClientListByServiceResult contains the result from method GatewayHostnameConfigurationClient.ListByService.

type GatewayHostnameConfigurationCollection

type GatewayHostnameConfigurationCollection struct {
	// READ-ONLY; Next page link if any.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; Page values.
	Value []*GatewayHostnameConfigurationContract `json:"value,omitempty" azure:"ro"`
}

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.

type GatewayHostnameConfigurationContract

type GatewayHostnameConfigurationContract struct {
	// Gateway hostname configuration details.
	Properties *GatewayHostnameConfigurationContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

GatewayHostnameConfigurationContract - Gateway hostname configuration details.

type GatewayHostnameConfigurationContractProperties

type GatewayHostnameConfigurationContractProperties struct {
	// Identifier of Certificate entity that will be used for TLS connection establishment
	CertificateID *string `json:"certificateId,omitempty"`

	// Specifies if HTTP/2.0 is supported
	HTTP2Enabled *bool `json:"http2Enabled,omitempty"`

	// Hostname value. Supports valid domain name, partial or full wildcard
	Hostname *string `json:"hostname,omitempty"`

	// Determines whether gateway requests client certificate
	NegotiateClientCertificate *bool `json:"negotiateClientCertificate,omitempty"`

	// Specifies if TLS 1.0 is supported
	Tls10Enabled *bool `json:"tls10Enabled,omitempty"`

	// Specifies if TLS 1.1 is supported
	Tls11Enabled *bool `json:"tls11Enabled,omitempty"`
}

GatewayHostnameConfigurationContractProperties - Gateway hostname configuration details.

type GatewayKeyRegenerationRequestContract

type GatewayKeyRegenerationRequestContract struct {
	// REQUIRED; The Key being regenerated.
	KeyType *KeyType `json:"keyType,omitempty"`
}

GatewayKeyRegenerationRequestContract - Gateway key regeneration request contract properties.

type GatewayKeysContract

type GatewayKeysContract struct {
	// Primary gateway key.
	Primary *string `json:"primary,omitempty"`

	// Secondary gateway key.
	Secondary *string `json:"secondary,omitempty"`
}

GatewayKeysContract - Gateway authentication keys.

type GatewayTokenContract

type GatewayTokenContract struct {
	// Shared Access Authentication token value for the Gateway.
	Value *string `json:"value,omitempty"`
}

GatewayTokenContract - Gateway access token.

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 `json:"expiry,omitempty"`

	// REQUIRED; The Key to be used to generate gateway token.
	KeyType *KeyType `json:"keyType,omitempty"`
}

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 `json:"value,omitempty"`
}

GenerateSsoURLResult - Generate SSO Url operations response details.

type GlobalSchemaClient added in v0.3.0

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 added in v0.3.0

func NewGlobalSchemaClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *GlobalSchemaClient

NewGlobalSchemaClient creates a new instance of GlobalSchemaClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*GlobalSchemaClient) BeginCreateOrUpdate added in v0.3.0

func (client *GlobalSchemaClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, schemaID string, parameters GlobalSchemaContract, options *GlobalSchemaClientBeginCreateOrUpdateOptions) (GlobalSchemaClientCreateOrUpdatePollerResponse, 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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGlobalSchema1.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGlobalSchemaClient("<subscription-id>", cred, nil)
	poller, err := client.BeginCreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<schema-id>",
		armapimanagement.GlobalSchemaContract{
			Properties: &armapimanagement.GlobalSchemaContractProperties{
				Description: to.StringPtr("<description>"),
				SchemaType:  armapimanagement.SchemaType("xml").ToPtr(),
				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.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.GlobalSchemaClientCreateOrUpdateResult)
}
Output:

func (*GlobalSchemaClient) Delete added in v0.3.0

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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteGlobalSchema.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGlobalSchemaClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<schema-id>",
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*GlobalSchemaClient) Get added in v0.3.0

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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGlobalSchema1.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGlobalSchemaClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<schema-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.GlobalSchemaClientGetResult)
}
Output:

func (*GlobalSchemaClient) GetEntityTag added in v0.3.0

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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadGlobalSchema.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGlobalSchemaClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<schema-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*GlobalSchemaClient) ListByService added in v0.3.0

func (client *GlobalSchemaClient) ListByService(resourceGroupName string, serviceName string, options *GlobalSchemaClientListByServiceOptions) *GlobalSchemaClientListByServicePager

ListByService - Lists a collection of schemas registered with service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - GlobalSchemaClientListByServiceOptions contains the optional parameters for the GlobalSchemaClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListGlobalSchemas.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGlobalSchemaClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		&armapimanagement.GlobalSchemaClientListByServiceOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type GlobalSchemaClientBeginCreateOrUpdateOptions added in v0.3.0

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

GlobalSchemaClientBeginCreateOrUpdateOptions contains the optional parameters for the GlobalSchemaClient.BeginCreateOrUpdate method.

type GlobalSchemaClientCreateOrUpdatePoller added in v0.3.0

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

GlobalSchemaClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state.

func (*GlobalSchemaClientCreateOrUpdatePoller) Done added in v0.3.0

Done returns true if the LRO has reached a terminal state.

func (*GlobalSchemaClientCreateOrUpdatePoller) FinalResponse added in v0.3.0

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final GlobalSchemaClientCreateOrUpdateResponse will be returned.

func (*GlobalSchemaClientCreateOrUpdatePoller) Poll added in v0.3.0

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*GlobalSchemaClientCreateOrUpdatePoller) ResumeToken added in v0.3.0

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type GlobalSchemaClientCreateOrUpdatePollerResponse added in v0.3.0

type GlobalSchemaClientCreateOrUpdatePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *GlobalSchemaClientCreateOrUpdatePoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GlobalSchemaClientCreateOrUpdatePollerResponse contains the response from method GlobalSchemaClient.CreateOrUpdate.

func (GlobalSchemaClientCreateOrUpdatePollerResponse) PollUntilDone added in v0.3.0

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*GlobalSchemaClientCreateOrUpdatePollerResponse) Resume added in v0.3.0

Resume rehydrates a GlobalSchemaClientCreateOrUpdatePollerResponse from the provided client and resume token.

type GlobalSchemaClientCreateOrUpdateResponse added in v0.3.0

type GlobalSchemaClientCreateOrUpdateResponse struct {
	GlobalSchemaClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GlobalSchemaClientCreateOrUpdateResponse contains the response from method GlobalSchemaClient.CreateOrUpdate.

type GlobalSchemaClientCreateOrUpdateResult added in v0.3.0

type GlobalSchemaClientCreateOrUpdateResult struct {
	GlobalSchemaContract
}

GlobalSchemaClientCreateOrUpdateResult contains the result from method GlobalSchemaClient.CreateOrUpdate.

type GlobalSchemaClientDeleteOptions added in v0.3.0

type GlobalSchemaClientDeleteOptions struct {
}

GlobalSchemaClientDeleteOptions contains the optional parameters for the GlobalSchemaClient.Delete method.

type GlobalSchemaClientDeleteResponse added in v0.3.0

type GlobalSchemaClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GlobalSchemaClientDeleteResponse contains the response from method GlobalSchemaClient.Delete.

type GlobalSchemaClientGetEntityTagOptions added in v0.3.0

type GlobalSchemaClientGetEntityTagOptions struct {
}

GlobalSchemaClientGetEntityTagOptions contains the optional parameters for the GlobalSchemaClient.GetEntityTag method.

type GlobalSchemaClientGetEntityTagResponse added in v0.3.0

type GlobalSchemaClientGetEntityTagResponse struct {
	GlobalSchemaClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GlobalSchemaClientGetEntityTagResponse contains the response from method GlobalSchemaClient.GetEntityTag.

type GlobalSchemaClientGetEntityTagResult added in v0.3.0

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

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

GlobalSchemaClientGetEntityTagResult contains the result from method GlobalSchemaClient.GetEntityTag.

type GlobalSchemaClientGetOptions added in v0.3.0

type GlobalSchemaClientGetOptions struct {
}

GlobalSchemaClientGetOptions contains the optional parameters for the GlobalSchemaClient.Get method.

type GlobalSchemaClientGetResponse added in v0.3.0

type GlobalSchemaClientGetResponse struct {
	GlobalSchemaClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GlobalSchemaClientGetResponse contains the response from method GlobalSchemaClient.Get.

type GlobalSchemaClientGetResult added in v0.3.0

type GlobalSchemaClientGetResult struct {
	GlobalSchemaContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GlobalSchemaClientGetResult contains the result from method GlobalSchemaClient.Get.

type GlobalSchemaClientListByServiceOptions added in v0.3.0

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.ListByService method.

type GlobalSchemaClientListByServicePager added in v0.3.0

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

GlobalSchemaClientListByServicePager provides operations for iterating over paged responses.

func (*GlobalSchemaClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*GlobalSchemaClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*GlobalSchemaClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current GlobalSchemaClientListByServiceResponse page.

type GlobalSchemaClientListByServiceResponse added in v0.3.0

type GlobalSchemaClientListByServiceResponse struct {
	GlobalSchemaClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GlobalSchemaClientListByServiceResponse contains the response from method GlobalSchemaClient.ListByService.

type GlobalSchemaClientListByServiceResult added in v0.3.0

type GlobalSchemaClientListByServiceResult struct {
	GlobalSchemaCollection
}

GlobalSchemaClientListByServiceResult contains the result from method GlobalSchemaClient.ListByService.

type GlobalSchemaCollection added in v0.3.0

type GlobalSchemaCollection struct {
	// Total record count number.
	Count *int64 `json:"count,omitempty"`

	// READ-ONLY; Next page link if any.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; Global Schema Contract value.
	Value []*GlobalSchemaContract `json:"value,omitempty" azure:"ro"`
}

GlobalSchemaCollection - The response of the list schema operation.

func (GlobalSchemaCollection) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type GlobalSchemaCollection.

type GlobalSchemaContract added in v0.3.0

type GlobalSchemaContract struct {
	// Properties of the Global Schema.
	Properties *GlobalSchemaContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

GlobalSchemaContract - Global Schema Contract details.

type GlobalSchemaContractProperties added in v0.3.0

type GlobalSchemaContractProperties struct {
	// REQUIRED; Schema Type. Immutable.
	SchemaType *SchemaType `json:"schemaType,omitempty"`

	// Free-form schema entity description.
	Description *string `json:"description,omitempty"`

	// Global Schema document object for json-based schema formats(e.g. json schema).
	Document map[string]interface{} `json:"document,omitempty"`

	// Json-encoded string for non json-based schema.
	Value interface{} `json:"value,omitempty"`
}

GlobalSchemaContractProperties - Schema create or update contract Properties.

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.

func (GrantType) ToPtr

func (c GrantType) ToPtr() *GrantType

ToPtr returns a *GrantType pointing to the current value.

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

NewGroupClient creates a new instance of GroupClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGroupClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<group-id>",
		armapimanagement.GroupCreateParameters{
			Properties: &armapimanagement.GroupCreateParametersProperties{
				DisplayName: to.StringPtr("<display-name>"),
			},
		},
		&armapimanagement.GroupClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.GroupClientCreateOrUpdateResult)
}
Output:

func (*GroupClient) Delete

func (client *GroupClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, groupID string, ifMatch string, options *GroupClientDeleteOptions) (GroupClientDeleteResponse, error)

Delete - Deletes specific group of the API Management service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGroupClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<group-id>",
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*GroupClient) Get

func (client *GroupClient) Get(ctx context.Context, resourceGroupName string, serviceName string, groupID string, options *GroupClientGetOptions) (GroupClientGetResponse, error)

Get - Gets the details of the group specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGroupClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<group-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.GroupClientGetResult)
}
Output:

func (*GroupClient) GetEntityTag

func (client *GroupClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, groupID string, options *GroupClientGetEntityTagOptions) (GroupClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the group specified by its identifier. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGroupClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<group-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*GroupClient) ListByService

func (client *GroupClient) ListByService(resourceGroupName string, serviceName string, options *GroupClientListByServiceOptions) *GroupClientListByServicePager

ListByService - Lists a collection of groups defined within a service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - GroupClientListByServiceOptions contains the optional parameters for the GroupClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListGroups.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGroupClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		&armapimanagement.GroupClientListByServiceOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*GroupClient) Update

func (client *GroupClient) Update(ctx context.Context, resourceGroupName string, serviceName string, groupID string, ifMatch string, parameters GroupUpdateParameters, options *GroupClientUpdateOptions) (GroupClientUpdateResponse, error)

Update - Updates the details of the group specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGroupClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<group-id>",
		"<if-match>",
		armapimanagement.GroupUpdateParameters{
			Properties: &armapimanagement.GroupUpdateParametersProperties{
				DisplayName: to.StringPtr("<display-name>"),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.GroupClientUpdateResult)
}
Output:

type GroupClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type GroupClientCreateOrUpdateResponse struct {
	GroupClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GroupClientCreateOrUpdateResponse contains the response from method GroupClient.CreateOrUpdate.

type GroupClientCreateOrUpdateResult added in v0.3.0

type GroupClientCreateOrUpdateResult struct {
	GroupContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GroupClientCreateOrUpdateResult contains the result from method GroupClient.CreateOrUpdate.

type GroupClientDeleteOptions added in v0.3.0

type GroupClientDeleteOptions struct {
}

GroupClientDeleteOptions contains the optional parameters for the GroupClient.Delete method.

type GroupClientDeleteResponse added in v0.3.0

type GroupClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GroupClientDeleteResponse contains the response from method GroupClient.Delete.

type GroupClientGetEntityTagOptions added in v0.3.0

type GroupClientGetEntityTagOptions struct {
}

GroupClientGetEntityTagOptions contains the optional parameters for the GroupClient.GetEntityTag method.

type GroupClientGetEntityTagResponse added in v0.3.0

type GroupClientGetEntityTagResponse struct {
	GroupClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GroupClientGetEntityTagResponse contains the response from method GroupClient.GetEntityTag.

type GroupClientGetEntityTagResult added in v0.3.0

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

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

GroupClientGetEntityTagResult contains the result from method GroupClient.GetEntityTag.

type GroupClientGetOptions added in v0.3.0

type GroupClientGetOptions struct {
}

GroupClientGetOptions contains the optional parameters for the GroupClient.Get method.

type GroupClientGetResponse added in v0.3.0

type GroupClientGetResponse struct {
	GroupClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GroupClientGetResponse contains the response from method GroupClient.Get.

type GroupClientGetResult added in v0.3.0

type GroupClientGetResult struct {
	GroupContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GroupClientGetResult contains the result from method GroupClient.Get.

type GroupClientListByServiceOptions added in v0.3.0

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.ListByService method.

type GroupClientListByServicePager added in v0.3.0

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

GroupClientListByServicePager provides operations for iterating over paged responses.

func (*GroupClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*GroupClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*GroupClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current GroupClientListByServiceResponse page.

type GroupClientListByServiceResponse added in v0.3.0

type GroupClientListByServiceResponse struct {
	GroupClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GroupClientListByServiceResponse contains the response from method GroupClient.ListByService.

type GroupClientListByServiceResult added in v0.3.0

type GroupClientListByServiceResult struct {
	GroupCollection
}

GroupClientListByServiceResult contains the result from method GroupClient.ListByService.

type GroupClientUpdateOptions added in v0.3.0

type GroupClientUpdateOptions struct {
}

GroupClientUpdateOptions contains the optional parameters for the GroupClient.Update method.

type GroupClientUpdateResponse added in v0.3.0

type GroupClientUpdateResponse struct {
	GroupClientUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GroupClientUpdateResponse contains the response from method GroupClient.Update.

type GroupClientUpdateResult added in v0.3.0

type GroupClientUpdateResult struct {
	GroupContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

GroupClientUpdateResult contains the result from method GroupClient.Update.

type GroupCollection

type GroupCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// Next page link if any.
	NextLink *string `json:"nextLink,omitempty"`

	// Page values.
	Value []*GroupContract `json:"value,omitempty"`
}

GroupCollection - Paged Group list representation.

func (GroupCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type GroupCollection.

type GroupContract

type GroupContract struct {
	// Group entity contract properties.
	Properties *GroupContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

GroupContract - Contract details.

type GroupContractProperties

type GroupContractProperties struct {
	// REQUIRED; Group name.
	DisplayName *string `json:"displayName,omitempty"`

	// Group description. Can contain HTML formatting tags.
	Description *string `json:"description,omitempty"`

	// 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 `json:"externalId,omitempty"`

	// Group type.
	Type *GroupType `json:"type,omitempty"`

	// READ-ONLY; true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false.
	BuiltIn *bool `json:"builtIn,omitempty" azure:"ro"`
}

GroupContractProperties - Group contract Properties.

type GroupCreateParameters

type GroupCreateParameters struct {
	// Properties supplied to Create Group operation.
	Properties *GroupCreateParametersProperties `json:"properties,omitempty"`
}

GroupCreateParameters - Parameters supplied to the Create Group operation.

type GroupCreateParametersProperties

type GroupCreateParametersProperties struct {
	// REQUIRED; Group name.
	DisplayName *string `json:"displayName,omitempty"`

	// Group description.
	Description *string `json:"description,omitempty"`

	// 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 `json:"externalId,omitempty"`

	// Group type.
	Type *GroupType `json:"type,omitempty"`
}

GroupCreateParametersProperties - Parameters supplied to the Create Group operation.

type GroupType

type GroupType string

GroupType - Group type.

const (
	GroupTypeCustom   GroupType = "custom"
	GroupTypeSystem   GroupType = "system"
	GroupTypeExternal GroupType = "external"
)

func PossibleGroupTypeValues

func PossibleGroupTypeValues() []GroupType

PossibleGroupTypeValues returns the possible values for the GroupType const type.

func (GroupType) ToPtr

func (c GroupType) ToPtr() *GroupType

ToPtr returns a *GroupType pointing to the current value.

type GroupUpdateParameters

type GroupUpdateParameters struct {
	// Group entity update contract properties.
	Properties *GroupUpdateParametersProperties `json:"properties,omitempty"`
}

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.

type GroupUpdateParametersProperties

type GroupUpdateParametersProperties struct {
	// Group description.
	Description *string `json:"description,omitempty"`

	// Group name.
	DisplayName *string `json:"displayName,omitempty"`

	// 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 `json:"externalId,omitempty"`

	// Group type.
	Type *GroupType `json:"type,omitempty"`
}

GroupUpdateParametersProperties - Parameters supplied to the Update Group operation.

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

NewGroupUserClient creates a new instance of GroupUserClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadGroupUser.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGroupUserClient("<subscription-id>", cred, nil)
	_, err = client.CheckEntityExists(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<group-id>",
		"<user-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*GroupUserClient) Create

func (client *GroupUserClient) Create(ctx context.Context, resourceGroupName string, serviceName string, groupID string, userID string, options *GroupUserClientCreateOptions) (GroupUserClientCreateResponse, error)

Create - Add existing user to existing group If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGroupUser.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGroupUserClient("<subscription-id>", cred, nil)
	res, err := client.Create(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<group-id>",
		"<user-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.GroupUserClientCreateResult)
}
Output:

func (*GroupUserClient) Delete

func (client *GroupUserClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, groupID string, userID string, options *GroupUserClientDeleteOptions) (GroupUserClientDeleteResponse, error)

Delete - Remove existing user from existing group. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteGroupUser.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGroupUserClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<group-id>",
		"<user-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*GroupUserClient) List

func (client *GroupUserClient) List(resourceGroupName string, serviceName string, groupID string, options *GroupUserClientListOptions) *GroupUserClientListPager

List - Lists a collection of user entities associated with the group. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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.List method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListGroupUsers.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewGroupUserClient("<subscription-id>", cred, nil)
	pager := client.List("<resource-group-name>",
		"<service-name>",
		"<group-id>",
		&armapimanagement.GroupUserClientListOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type GroupUserClientCheckEntityExistsOptions added in v0.3.0

type GroupUserClientCheckEntityExistsOptions struct {
}

GroupUserClientCheckEntityExistsOptions contains the optional parameters for the GroupUserClient.CheckEntityExists method.

type GroupUserClientCheckEntityExistsResponse added in v0.3.0

type GroupUserClientCheckEntityExistsResponse struct {
	GroupUserClientCheckEntityExistsResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GroupUserClientCheckEntityExistsResponse contains the response from method GroupUserClient.CheckEntityExists.

type GroupUserClientCheckEntityExistsResult added in v0.3.0

type GroupUserClientCheckEntityExistsResult struct {
	// Success indicates if the operation succeeded or failed.
	Success bool
}

GroupUserClientCheckEntityExistsResult contains the result from method GroupUserClient.CheckEntityExists.

type GroupUserClientCreateOptions added in v0.3.0

type GroupUserClientCreateOptions struct {
}

GroupUserClientCreateOptions contains the optional parameters for the GroupUserClient.Create method.

type GroupUserClientCreateResponse added in v0.3.0

type GroupUserClientCreateResponse struct {
	GroupUserClientCreateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GroupUserClientCreateResponse contains the response from method GroupUserClient.Create.

type GroupUserClientCreateResult added in v0.3.0

type GroupUserClientCreateResult struct {
	UserContract
}

GroupUserClientCreateResult contains the result from method GroupUserClient.Create.

type GroupUserClientDeleteOptions added in v0.3.0

type GroupUserClientDeleteOptions struct {
}

GroupUserClientDeleteOptions contains the optional parameters for the GroupUserClient.Delete method.

type GroupUserClientDeleteResponse added in v0.3.0

type GroupUserClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GroupUserClientDeleteResponse contains the response from method GroupUserClient.Delete.

type GroupUserClientListOptions added in v0.3.0

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.List method.

type GroupUserClientListPager added in v0.3.0

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

GroupUserClientListPager provides operations for iterating over paged responses.

func (*GroupUserClientListPager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*GroupUserClientListPager) NextPage added in v0.3.0

func (p *GroupUserClientListPager) NextPage(ctx context.Context) bool

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*GroupUserClientListPager) PageResponse added in v0.3.0

PageResponse returns the current GroupUserClientListResponse page.

type GroupUserClientListResponse added in v0.3.0

type GroupUserClientListResponse struct {
	GroupUserClientListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

GroupUserClientListResponse contains the response from method GroupUserClient.List.

type GroupUserClientListResult added in v0.3.0

type GroupUserClientListResult struct {
	UserCollection
}

GroupUserClientListResult contains the result from method GroupUserClient.List.

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.

func (HTTPCorrelationProtocol) ToPtr

ToPtr returns a *HTTPCorrelationProtocol pointing to the current value.

type HTTPHeader

type HTTPHeader struct {
	// REQUIRED; Header name.
	Name *string `json:"name,omitempty"`

	// REQUIRED; Header value.
	Value *string `json:"value,omitempty"`
}

HTTPHeader - HTTP header and it's value.

type HTTPMessageDiagnostic

type HTTPMessageDiagnostic struct {
	// Body logging settings.
	Body *BodyDiagnosticSettings `json:"body,omitempty"`

	// Data masking settings.
	DataMasking *DataMasking `json:"dataMasking,omitempty"`

	// Array of HTTP Headers to log.
	Headers []*string `json:"headers,omitempty"`
}

HTTPMessageDiagnostic - Http message diagnostic settings.

func (HTTPMessageDiagnostic) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type HTTPMessageDiagnostic.

type HostnameConfiguration

type HostnameConfiguration struct {
	// REQUIRED; Hostname to configure on the Api Management service.
	HostName *string `json:"hostName,omitempty"`

	// REQUIRED; Hostname type.
	Type *HostnameType `json:"type,omitempty"`

	// Certificate information.
	Certificate *CertificateInformation `json:"certificate,omitempty"`

	// Certificate Password.
	CertificatePassword *string `json:"certificatePassword,omitempty"`

	// Certificate Source.
	CertificateSource *CertificateSource `json:"certificateSource,omitempty"`

	// Certificate Status.
	CertificateStatus *CertificateStatus `json:"certificateStatus,omitempty"`

	// 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 Proxy Hostname Type.
	DefaultSSLBinding *bool `json:"defaultSslBinding,omitempty"`

	// Base64 Encoded certificate.
	EncodedCertificate *string `json:"encodedCertificate,omitempty"`

	// 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 `json:"identityClientId,omitempty"`

	// 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 `json:"keyVaultId,omitempty"`

	// Specify true to always negotiate client certificate on the hostname. Default Value is false.
	NegotiateClientCertificate *bool `json:"negotiateClientCertificate,omitempty"`
}

HostnameConfiguration - Custom hostname configuration.

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.

func (HostnameType) ToPtr

func (c HostnameType) ToPtr() *HostnameType

ToPtr returns a *HostnameType pointing to the current value.

type IdentityProviderBaseParameters

type IdentityProviderBaseParameters struct {
	// List of Allowed Tenants when configuring Azure Active Directory login.
	AllowedTenants []*string `json:"allowedTenants,omitempty"`

	// OpenID Connect discovery endpoint hostname for AAD or AAD B2C.
	Authority *string `json:"authority,omitempty"`

	// Password Reset Policy Name. Only applies to AAD B2C Identity Provider.
	PasswordResetPolicyName *string `json:"passwordResetPolicyName,omitempty"`

	// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider.
	ProfileEditingPolicyName *string `json:"profileEditingPolicyName,omitempty"`

	// Signin Policy Name. Only applies to AAD B2C Identity Provider.
	SigninPolicyName *string `json:"signinPolicyName,omitempty"`

	// The TenantId to use instead of Common when logging into Active Directory
	SigninTenant *string `json:"signinTenant,omitempty"`

	// Signup Policy Name. Only applies to AAD B2C Identity Provider.
	SignupPolicyName *string `json:"signupPolicyName,omitempty"`

	// Identity Provider Type identifier.
	Type *IdentityProviderType `json:"type,omitempty"`
}

IdentityProviderBaseParameters - Identity Provider Base Parameter Properties.

func (IdentityProviderBaseParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller 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

NewIdentityProviderClient creates a new instance of IdentityProviderClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*IdentityProviderClient) CreateOrUpdate

CreateOrUpdate - Creates or Updates the IdentityProvider configuration. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateIdentityProvider.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewIdentityProviderClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.IdentityProviderType("facebook"),
		armapimanagement.IdentityProviderCreateContract{
			Properties: &armapimanagement.IdentityProviderCreateContractProperties{
				ClientID:     to.StringPtr("<client-id>"),
				ClientSecret: to.StringPtr("<client-secret>"),
			},
		},
		&armapimanagement.IdentityProviderClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.IdentityProviderClientCreateOrUpdateResult)
}
Output:

func (*IdentityProviderClient) Delete

func (client *IdentityProviderClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, ifMatch string, options *IdentityProviderClientDeleteOptions) (IdentityProviderClientDeleteResponse, error)

Delete - Deletes the specified identity provider configuration. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteIdentityProvider.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewIdentityProviderClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.IdentityProviderType("aad"),
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*IdentityProviderClient) Get

func (client *IdentityProviderClient) Get(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, options *IdentityProviderClientGetOptions) (IdentityProviderClientGetResponse, error)

Get - Gets the configuration details of the identity Provider configured in specified service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetIdentityProvider.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewIdentityProviderClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.IdentityProviderType("aadB2C"),
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.IdentityProviderClientGetResult)
}
Output:

func (*IdentityProviderClient) GetEntityTag

func (client *IdentityProviderClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, options *IdentityProviderClientGetEntityTagOptions) (IdentityProviderClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the identityProvider specified by its identifier. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadIdentityProvider.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewIdentityProviderClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.IdentityProviderType("aadB2C"),
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*IdentityProviderClient) ListByService

func (client *IdentityProviderClient) ListByService(resourceGroupName string, serviceName string, options *IdentityProviderClientListByServiceOptions) *IdentityProviderClientListByServicePager

ListByService - Lists a collection of Identity Provider configured in the specified service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - IdentityProviderClientListByServiceOptions contains the optional parameters for the IdentityProviderClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListIdentityProviders.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewIdentityProviderClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		nil)
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*IdentityProviderClient) ListSecrets

func (client *IdentityProviderClient) ListSecrets(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, options *IdentityProviderClientListSecretsOptions) (IdentityProviderClientListSecretsResponse, error)

ListSecrets - Gets the client secret details of the Identity Provider. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementIdentityProviderListSecrets.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewIdentityProviderClient("<subscription-id>", cred, nil)
	res, err := client.ListSecrets(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.IdentityProviderType("aadB2C"),
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.IdentityProviderClientListSecretsResult)
}
Output:

func (*IdentityProviderClient) Update

func (client *IdentityProviderClient) Update(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, ifMatch string, parameters IdentityProviderUpdateParameters, options *IdentityProviderClientUpdateOptions) (IdentityProviderClientUpdateResponse, error)

Update - Updates an existing IdentityProvider configuration. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateIdentityProvider.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewIdentityProviderClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.IdentityProviderType("facebook"),
		"<if-match>",
		armapimanagement.IdentityProviderUpdateParameters{
			Properties: &armapimanagement.IdentityProviderUpdateProperties{
				ClientID:     to.StringPtr("<client-id>"),
				ClientSecret: to.StringPtr("<client-secret>"),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.IdentityProviderClientUpdateResult)
}
Output:

type IdentityProviderClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type IdentityProviderClientCreateOrUpdateResponse struct {
	IdentityProviderClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

IdentityProviderClientCreateOrUpdateResponse contains the response from method IdentityProviderClient.CreateOrUpdate.

type IdentityProviderClientCreateOrUpdateResult added in v0.3.0

type IdentityProviderClientCreateOrUpdateResult struct {
	IdentityProviderContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

IdentityProviderClientCreateOrUpdateResult contains the result from method IdentityProviderClient.CreateOrUpdate.

type IdentityProviderClientDeleteOptions added in v0.3.0

type IdentityProviderClientDeleteOptions struct {
}

IdentityProviderClientDeleteOptions contains the optional parameters for the IdentityProviderClient.Delete method.

type IdentityProviderClientDeleteResponse added in v0.3.0

type IdentityProviderClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

IdentityProviderClientDeleteResponse contains the response from method IdentityProviderClient.Delete.

type IdentityProviderClientGetEntityTagOptions added in v0.3.0

type IdentityProviderClientGetEntityTagOptions struct {
}

IdentityProviderClientGetEntityTagOptions contains the optional parameters for the IdentityProviderClient.GetEntityTag method.

type IdentityProviderClientGetEntityTagResponse added in v0.3.0

type IdentityProviderClientGetEntityTagResponse struct {
	IdentityProviderClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

IdentityProviderClientGetEntityTagResponse contains the response from method IdentityProviderClient.GetEntityTag.

type IdentityProviderClientGetEntityTagResult added in v0.3.0

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

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

IdentityProviderClientGetEntityTagResult contains the result from method IdentityProviderClient.GetEntityTag.

type IdentityProviderClientGetOptions added in v0.3.0

type IdentityProviderClientGetOptions struct {
}

IdentityProviderClientGetOptions contains the optional parameters for the IdentityProviderClient.Get method.

type IdentityProviderClientGetResponse added in v0.3.0

type IdentityProviderClientGetResponse struct {
	IdentityProviderClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

IdentityProviderClientGetResponse contains the response from method IdentityProviderClient.Get.

type IdentityProviderClientGetResult added in v0.3.0

type IdentityProviderClientGetResult struct {
	IdentityProviderContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

IdentityProviderClientGetResult contains the result from method IdentityProviderClient.Get.

type IdentityProviderClientListByServiceOptions added in v0.3.0

type IdentityProviderClientListByServiceOptions struct {
}

IdentityProviderClientListByServiceOptions contains the optional parameters for the IdentityProviderClient.ListByService method.

type IdentityProviderClientListByServicePager added in v0.3.0

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

IdentityProviderClientListByServicePager provides operations for iterating over paged responses.

func (*IdentityProviderClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*IdentityProviderClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*IdentityProviderClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current IdentityProviderClientListByServiceResponse page.

type IdentityProviderClientListByServiceResponse added in v0.3.0

type IdentityProviderClientListByServiceResponse struct {
	IdentityProviderClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

IdentityProviderClientListByServiceResponse contains the response from method IdentityProviderClient.ListByService.

type IdentityProviderClientListByServiceResult added in v0.3.0

type IdentityProviderClientListByServiceResult struct {
	IdentityProviderList
}

IdentityProviderClientListByServiceResult contains the result from method IdentityProviderClient.ListByService.

type IdentityProviderClientListSecretsOptions added in v0.3.0

type IdentityProviderClientListSecretsOptions struct {
}

IdentityProviderClientListSecretsOptions contains the optional parameters for the IdentityProviderClient.ListSecrets method.

type IdentityProviderClientListSecretsResponse added in v0.3.0

type IdentityProviderClientListSecretsResponse struct {
	IdentityProviderClientListSecretsResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

IdentityProviderClientListSecretsResponse contains the response from method IdentityProviderClient.ListSecrets.

type IdentityProviderClientListSecretsResult added in v0.3.0

type IdentityProviderClientListSecretsResult struct {
	ClientSecretContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

IdentityProviderClientListSecretsResult contains the result from method IdentityProviderClient.ListSecrets.

type IdentityProviderClientUpdateOptions added in v0.3.0

type IdentityProviderClientUpdateOptions struct {
}

IdentityProviderClientUpdateOptions contains the optional parameters for the IdentityProviderClient.Update method.

type IdentityProviderClientUpdateResponse added in v0.3.0

type IdentityProviderClientUpdateResponse struct {
	IdentityProviderClientUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

IdentityProviderClientUpdateResponse contains the response from method IdentityProviderClient.Update.

type IdentityProviderClientUpdateResult added in v0.3.0

type IdentityProviderClientUpdateResult struct {
	IdentityProviderContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

IdentityProviderClientUpdateResult contains the result from method IdentityProviderClient.Update.

type IdentityProviderContract

type IdentityProviderContract struct {
	// Identity Provider contract properties.
	Properties *IdentityProviderContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

IdentityProviderContract - Identity Provider details.

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 `json:"clientId,omitempty"`

	// List of Allowed Tenants when configuring Azure Active Directory login.
	AllowedTenants []*string `json:"allowedTenants,omitempty"`

	// OpenID Connect discovery endpoint hostname for AAD or AAD B2C.
	Authority *string `json:"authority,omitempty"`

	// 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 `json:"clientSecret,omitempty"`

	// Password Reset Policy Name. Only applies to AAD B2C Identity Provider.
	PasswordResetPolicyName *string `json:"passwordResetPolicyName,omitempty"`

	// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider.
	ProfileEditingPolicyName *string `json:"profileEditingPolicyName,omitempty"`

	// Signin Policy Name. Only applies to AAD B2C Identity Provider.
	SigninPolicyName *string `json:"signinPolicyName,omitempty"`

	// The TenantId to use instead of Common when logging into Active Directory
	SigninTenant *string `json:"signinTenant,omitempty"`

	// Signup Policy Name. Only applies to AAD B2C Identity Provider.
	SignupPolicyName *string `json:"signupPolicyName,omitempty"`

	// Identity Provider Type identifier.
	Type *IdentityProviderType `json:"type,omitempty"`
}

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.

type IdentityProviderCreateContract

type IdentityProviderCreateContract struct {
	// Identity Provider contract properties.
	Properties *IdentityProviderCreateContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

IdentityProviderCreateContract - Identity Provider details.

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 `json:"clientId,omitempty"`

	// 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 `json:"clientSecret,omitempty"`

	// List of Allowed Tenants when configuring Azure Active Directory login.
	AllowedTenants []*string `json:"allowedTenants,omitempty"`

	// OpenID Connect discovery endpoint hostname for AAD or AAD B2C.
	Authority *string `json:"authority,omitempty"`

	// Password Reset Policy Name. Only applies to AAD B2C Identity Provider.
	PasswordResetPolicyName *string `json:"passwordResetPolicyName,omitempty"`

	// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider.
	ProfileEditingPolicyName *string `json:"profileEditingPolicyName,omitempty"`

	// Signin Policy Name. Only applies to AAD B2C Identity Provider.
	SigninPolicyName *string `json:"signinPolicyName,omitempty"`

	// The TenantId to use instead of Common when logging into Active Directory
	SigninTenant *string `json:"signinTenant,omitempty"`

	// Signup Policy Name. Only applies to AAD B2C Identity Provider.
	SignupPolicyName *string `json:"signupPolicyName,omitempty"`

	// Identity Provider Type identifier.
	Type *IdentityProviderType `json:"type,omitempty"`
}

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.

type IdentityProviderList

type IdentityProviderList struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// Next page link if any.
	NextLink *string `json:"nextLink,omitempty"`

	// Identity Provider configuration values.
	Value []*IdentityProviderContract `json:"value,omitempty"`
}

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.

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.

func (IdentityProviderType) ToPtr

ToPtr returns a *IdentityProviderType pointing to the current value.

type IdentityProviderUpdateParameters

type IdentityProviderUpdateParameters struct {
	// Identity Provider update properties.
	Properties *IdentityProviderUpdateProperties `json:"properties,omitempty"`
}

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.

type IdentityProviderUpdateProperties

type IdentityProviderUpdateProperties struct {
	// List of Allowed Tenants when configuring Azure Active Directory login.
	AllowedTenants []*string `json:"allowedTenants,omitempty"`

	// OpenID Connect discovery endpoint hostname for AAD or AAD B2C.
	Authority *string `json:"authority,omitempty"`

	// 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 `json:"clientId,omitempty"`

	// 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 `json:"clientSecret,omitempty"`

	// Password Reset Policy Name. Only applies to AAD B2C Identity Provider.
	PasswordResetPolicyName *string `json:"passwordResetPolicyName,omitempty"`

	// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider.
	ProfileEditingPolicyName *string `json:"profileEditingPolicyName,omitempty"`

	// Signin Policy Name. Only applies to AAD B2C Identity Provider.
	SigninPolicyName *string `json:"signinPolicyName,omitempty"`

	// The TenantId to use instead of Common when logging into Active Directory
	SigninTenant *string `json:"signinTenant,omitempty"`

	// Signup Policy Name. Only applies to AAD B2C Identity Provider.
	SignupPolicyName *string `json:"signupPolicyName,omitempty"`

	// Identity Provider Type identifier.
	Type *IdentityProviderType `json:"type,omitempty"`
}

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.

type IssueAttachmentCollection

type IssueAttachmentCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// READ-ONLY; Next page link if any.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; Issue Attachment values.
	Value []*IssueAttachmentContract `json:"value,omitempty" azure:"ro"`
}

IssueAttachmentCollection - Paged Issue Attachment list representation.

func (IssueAttachmentCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type IssueAttachmentCollection.

type IssueAttachmentContract

type IssueAttachmentContract struct {
	// Properties of the Issue Attachment.
	Properties *IssueAttachmentContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

IssueAttachmentContract - Issue Attachment Contract details.

type IssueAttachmentContractProperties

type IssueAttachmentContractProperties struct {
	// REQUIRED; An HTTP link or Base64-encoded binary data.
	Content *string `json:"content,omitempty"`

	// 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 `json:"contentFormat,omitempty"`

	// REQUIRED; Filename by which the binary data will be saved.
	Title *string `json:"title,omitempty"`
}

IssueAttachmentContractProperties - Issue Attachment contract Properties.

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

NewIssueClient creates a new instance of IssueClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetIssue.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewIssueClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<issue-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.IssueClientGetResult)
}
Output:

func (*IssueClient) ListByService

func (client *IssueClient) ListByService(resourceGroupName string, serviceName string, options *IssueClientListByServiceOptions) *IssueClientListByServicePager

ListByService - Lists a collection of issues in the specified service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - IssueClientListByServiceOptions contains the optional parameters for the IssueClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListIssues.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewIssueClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		&armapimanagement.IssueClientListByServiceOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type IssueClientGetOptions added in v0.3.0

type IssueClientGetOptions struct {
}

IssueClientGetOptions contains the optional parameters for the IssueClient.Get method.

type IssueClientGetResponse added in v0.3.0

type IssueClientGetResponse struct {
	IssueClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

IssueClientGetResponse contains the response from method IssueClient.Get.

type IssueClientGetResult added in v0.3.0

type IssueClientGetResult struct {
	IssueContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

IssueClientGetResult contains the result from method IssueClient.Get.

type IssueClientListByServiceOptions added in v0.3.0

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.ListByService method.

type IssueClientListByServicePager added in v0.3.0

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

IssueClientListByServicePager provides operations for iterating over paged responses.

func (*IssueClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*IssueClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*IssueClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current IssueClientListByServiceResponse page.

type IssueClientListByServiceResponse added in v0.3.0

type IssueClientListByServiceResponse struct {
	IssueClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

IssueClientListByServiceResponse contains the response from method IssueClient.ListByService.

type IssueClientListByServiceResult added in v0.3.0

type IssueClientListByServiceResult struct {
	IssueCollection
}

IssueClientListByServiceResult contains the result from method IssueClient.ListByService.

type IssueCollection

type IssueCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// READ-ONLY; Next page link if any.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; Issue values.
	Value []*IssueContract `json:"value,omitempty" azure:"ro"`
}

IssueCollection - Paged Issue list representation.

func (IssueCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type IssueCollection.

type IssueCommentCollection

type IssueCommentCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// READ-ONLY; Next page link if any.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; Issue Comment values.
	Value []*IssueCommentContract `json:"value,omitempty" azure:"ro"`
}

IssueCommentCollection - Paged Issue Comment list representation.

func (IssueCommentCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type IssueCommentCollection.

type IssueCommentContract

type IssueCommentContract struct {
	// Properties of the Issue Comment.
	Properties *IssueCommentContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

IssueCommentContract - Issue Comment Contract details.

type IssueCommentContractProperties

type IssueCommentContractProperties struct {
	// REQUIRED; Comment text.
	Text *string `json:"text,omitempty"`

	// REQUIRED; A resource identifier for the user who left the comment.
	UserID *string `json:"userId,omitempty"`

	// Date and time when the comment was created.
	CreatedDate *time.Time `json:"createdDate,omitempty"`
}

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 `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

IssueContract - Issue Contract details.

type IssueContractBaseProperties

type IssueContractBaseProperties struct {
	// A resource identifier for the API the issue was created for.
	APIID *string `json:"apiId,omitempty"`

	// Date and time when the issue was created.
	CreatedDate *time.Time `json:"createdDate,omitempty"`

	// Status of the issue.
	State *State `json:"state,omitempty"`
}

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 `json:"description,omitempty"`

	// REQUIRED; The issue title.
	Title *string `json:"title,omitempty"`

	// REQUIRED; A resource identifier for the user created the issue.
	UserID *string `json:"userId,omitempty"`

	// A resource identifier for the API the issue was created for.
	APIID *string `json:"apiId,omitempty"`

	// Date and time when the issue was created.
	CreatedDate *time.Time `json:"createdDate,omitempty"`

	// Status of the issue.
	State *State `json:"state,omitempty"`
}

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.

func (IssueType) ToPtr

func (c IssueType) ToPtr() *IssueType

ToPtr returns a *IssueType pointing to the current value.

type IssueUpdateContract

type IssueUpdateContract struct {
	// Issue entity Update contract properties.
	Properties *IssueUpdateContractProperties `json:"properties,omitempty"`
}

IssueUpdateContract - Issue update Parameters.

func (IssueUpdateContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type IssueUpdateContract.

type IssueUpdateContractProperties

type IssueUpdateContractProperties struct {
	// A resource identifier for the API the issue was created for.
	APIID *string `json:"apiId,omitempty"`

	// Date and time when the issue was created.
	CreatedDate *time.Time `json:"createdDate,omitempty"`

	// Text describing the issue.
	Description *string `json:"description,omitempty"`

	// Status of the issue.
	State *State `json:"state,omitempty"`

	// The issue title.
	Title *string `json:"title,omitempty"`

	// A resource identifier for the user created the issue.
	UserID *string `json:"userId,omitempty"`
}

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.

func (KeyType) ToPtr

func (c KeyType) ToPtr() *KeyType

ToPtr returns a *KeyType pointing to the current value.

type KeyVaultContractCreateProperties

type KeyVaultContractCreateProperties struct {
	// SystemAssignedIdentity or UserAssignedIdentity Client Id which will be used to access key vault secret.
	IdentityClientID *string `json:"identityClientId,omitempty"`

	// 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 `json:"secretIdentifier,omitempty"`
}

KeyVaultContractCreateProperties - Create keyVault contract details.

type KeyVaultContractProperties

type KeyVaultContractProperties struct {
	// SystemAssignedIdentity or UserAssignedIdentity Client Id which will be used to access key vault secret.
	IdentityClientID *string `json:"identityClientId,omitempty"`

	// Last time sync and refresh status of secret from key vault.
	LastStatus *KeyVaultLastAccessStatusContractProperties `json:"lastStatus,omitempty"`

	// 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 `json:"secretIdentifier,omitempty"`
}

KeyVaultContractProperties - KeyVault contract details.

type KeyVaultLastAccessStatusContractProperties

type KeyVaultLastAccessStatusContractProperties struct {
	// Last status code for sync and refresh of secret from key vault.
	Code *string `json:"code,omitempty"`

	// Details of the error else empty.
	Message *string `json:"message,omitempty"`

	// 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 `json:"timeStampUtc,omitempty"`
}

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

NewLoggerClient creates a new instance of LoggerClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateAILogger.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewLoggerClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<logger-id>",
		armapimanagement.LoggerContract{
			Properties: &armapimanagement.LoggerContractProperties{
				Description: to.StringPtr("<description>"),
				Credentials: map[string]*string{
					"instrumentationKey": to.StringPtr("11................a1"),
				},
				LoggerType: armapimanagement.LoggerType("applicationInsights").ToPtr(),
			},
		},
		&armapimanagement.LoggerClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.LoggerClientCreateOrUpdateResult)
}
Output:

func (*LoggerClient) Delete

func (client *LoggerClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, ifMatch string, options *LoggerClientDeleteOptions) (LoggerClientDeleteResponse, error)

Delete - Deletes the specified logger. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteLogger.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewLoggerClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<logger-id>",
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*LoggerClient) Get

func (client *LoggerClient) Get(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, options *LoggerClientGetOptions) (LoggerClientGetResponse, error)

Get - Gets the details of the logger specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetLogger.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewLoggerClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<logger-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.LoggerClientGetResult)
}
Output:

func (*LoggerClient) GetEntityTag

func (client *LoggerClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, options *LoggerClientGetEntityTagOptions) (LoggerClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the logger specified by its identifier. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadLogger.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewLoggerClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<logger-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*LoggerClient) ListByService

func (client *LoggerClient) ListByService(resourceGroupName string, serviceName string, options *LoggerClientListByServiceOptions) *LoggerClientListByServicePager

ListByService - Lists a collection of loggers in the specified service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - LoggerClientListByServiceOptions contains the optional parameters for the LoggerClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListLoggers.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewLoggerClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		&armapimanagement.LoggerClientListByServiceOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*LoggerClient) Update

func (client *LoggerClient) Update(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, ifMatch string, parameters LoggerUpdateContract, options *LoggerClientUpdateOptions) (LoggerClientUpdateResponse, error)

Update - Updates an existing logger. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateLogger.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewLoggerClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<logger-id>",
		"<if-match>",
		armapimanagement.LoggerUpdateContract{
			Properties: &armapimanagement.LoggerUpdateParameters{
				Description: to.StringPtr("<description>"),
				LoggerType:  armapimanagement.LoggerType("azureEventHub").ToPtr(),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.LoggerClientUpdateResult)
}
Output:

type LoggerClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type LoggerClientCreateOrUpdateResponse struct {
	LoggerClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

LoggerClientCreateOrUpdateResponse contains the response from method LoggerClient.CreateOrUpdate.

type LoggerClientCreateOrUpdateResult added in v0.3.0

type LoggerClientCreateOrUpdateResult struct {
	LoggerContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

LoggerClientCreateOrUpdateResult contains the result from method LoggerClient.CreateOrUpdate.

type LoggerClientDeleteOptions added in v0.3.0

type LoggerClientDeleteOptions struct {
}

LoggerClientDeleteOptions contains the optional parameters for the LoggerClient.Delete method.

type LoggerClientDeleteResponse added in v0.3.0

type LoggerClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

LoggerClientDeleteResponse contains the response from method LoggerClient.Delete.

type LoggerClientGetEntityTagOptions added in v0.3.0

type LoggerClientGetEntityTagOptions struct {
}

LoggerClientGetEntityTagOptions contains the optional parameters for the LoggerClient.GetEntityTag method.

type LoggerClientGetEntityTagResponse added in v0.3.0

type LoggerClientGetEntityTagResponse struct {
	LoggerClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

LoggerClientGetEntityTagResponse contains the response from method LoggerClient.GetEntityTag.

type LoggerClientGetEntityTagResult added in v0.3.0

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

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

LoggerClientGetEntityTagResult contains the result from method LoggerClient.GetEntityTag.

type LoggerClientGetOptions added in v0.3.0

type LoggerClientGetOptions struct {
}

LoggerClientGetOptions contains the optional parameters for the LoggerClient.Get method.

type LoggerClientGetResponse added in v0.3.0

type LoggerClientGetResponse struct {
	LoggerClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

LoggerClientGetResponse contains the response from method LoggerClient.Get.

type LoggerClientGetResult added in v0.3.0

type LoggerClientGetResult struct {
	LoggerContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

LoggerClientGetResult contains the result from method LoggerClient.Get.

type LoggerClientListByServiceOptions added in v0.3.0

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.ListByService method.

type LoggerClientListByServicePager added in v0.3.0

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

LoggerClientListByServicePager provides operations for iterating over paged responses.

func (*LoggerClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*LoggerClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*LoggerClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current LoggerClientListByServiceResponse page.

type LoggerClientListByServiceResponse added in v0.3.0

type LoggerClientListByServiceResponse struct {
	LoggerClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

LoggerClientListByServiceResponse contains the response from method LoggerClient.ListByService.

type LoggerClientListByServiceResult added in v0.3.0

type LoggerClientListByServiceResult struct {
	LoggerCollection
}

LoggerClientListByServiceResult contains the result from method LoggerClient.ListByService.

type LoggerClientUpdateOptions added in v0.3.0

type LoggerClientUpdateOptions struct {
}

LoggerClientUpdateOptions contains the optional parameters for the LoggerClient.Update method.

type LoggerClientUpdateResponse added in v0.3.0

type LoggerClientUpdateResponse struct {
	LoggerClientUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

LoggerClientUpdateResponse contains the response from method LoggerClient.Update.

type LoggerClientUpdateResult added in v0.3.0

type LoggerClientUpdateResult struct {
	LoggerContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

LoggerClientUpdateResult contains the result from method LoggerClient.Update.

type LoggerCollection

type LoggerCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// Next page link if any.
	NextLink *string `json:"nextLink,omitempty"`

	// Logger values.
	Value []*LoggerContract `json:"value,omitempty"`
}

LoggerCollection - Paged Logger list representation.

func (LoggerCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type LoggerCollection.

type LoggerContract

type LoggerContract struct {
	// Logger entity contract properties.
	Properties *LoggerContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

LoggerContract - Logger details.

type LoggerContractProperties

type LoggerContractProperties struct {
	// REQUIRED; Logger type.
	LoggerType *LoggerType `json:"loggerType,omitempty"`

	// The name and SendRule connection string of the event hub for azureEventHub logger. Instrumentation key for applicationInsights
	// logger.
	Credentials map[string]*string `json:"credentials,omitempty"`

	// Logger description.
	Description *string `json:"description,omitempty"`

	// Whether records are buffered in the logger before publishing. Default is assumed to be true.
	IsBuffered *bool `json:"isBuffered,omitempty"`

	// Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource).
	ResourceID *string `json:"resourceId,omitempty"`
}

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.

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.

func (LoggerType) ToPtr

func (c LoggerType) ToPtr() *LoggerType

ToPtr returns a *LoggerType pointing to the current value.

type LoggerUpdateContract

type LoggerUpdateContract struct {
	// Logger entity update contract properties.
	Properties *LoggerUpdateParameters `json:"properties,omitempty"`
}

LoggerUpdateContract - Logger update contract.

func (LoggerUpdateContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type LoggerUpdateContract.

type LoggerUpdateParameters

type LoggerUpdateParameters struct {
	// Logger credentials.
	Credentials map[string]*string `json:"credentials,omitempty"`

	// Logger description.
	Description *string `json:"description,omitempty"`

	// Whether records are buffered in the logger before publishing. Default is assumed to be true.
	IsBuffered *bool `json:"isBuffered,omitempty"`

	// Logger type.
	LoggerType *LoggerType `json:"loggerType,omitempty"`
}

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.

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.

func (Method) ToPtr

func (c Method) ToPtr() *Method

ToPtr returns a *Method pointing to the current value.

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 (
	NameAvailabilityReasonValid         NameAvailabilityReason = "Valid"
	NameAvailabilityReasonInvalid       NameAvailabilityReason = "Invalid"
	NameAvailabilityReasonAlreadyExists NameAvailabilityReason = "AlreadyExists"
)

func PossibleNameAvailabilityReasonValues

func PossibleNameAvailabilityReasonValues() []NameAvailabilityReason

PossibleNameAvailabilityReasonValues returns the possible values for the NameAvailabilityReason const type.

func (NameAvailabilityReason) ToPtr

ToPtr returns a *NameAvailabilityReason pointing to the current value.

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

NewNamedValueClient creates a new instance of NamedValueClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*NamedValueClient) BeginCreateOrUpdate

func (client *NamedValueClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, parameters NamedValueCreateContract, options *NamedValueClientBeginCreateOrUpdateOptions) (NamedValueClientCreateOrUpdatePollerResponse, error)

BeginCreateOrUpdate - Creates or updates named value. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateNamedValue.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewNamedValueClient("<subscription-id>", cred, nil)
	poller, err := client.BeginCreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<named-value-id>",
		armapimanagement.NamedValueCreateContract{
			Properties: &armapimanagement.NamedValueCreateContractProperties{
				Secret: to.BoolPtr(false),
				Tags: []*string{
					to.StringPtr("foo"),
					to.StringPtr("bar")},
				DisplayName: to.StringPtr("<display-name>"),
				Value:       to.StringPtr("<value>"),
			},
		},
		&armapimanagement.NamedValueClientBeginCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.NamedValueClientCreateOrUpdateResult)
}
Output:

func (*NamedValueClient) BeginRefreshSecret

func (client *NamedValueClient) BeginRefreshSecret(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, options *NamedValueClientBeginRefreshSecretOptions) (NamedValueClientRefreshSecretPollerResponse, error)

BeginRefreshSecret - Refresh the secret of the named value specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementRefreshNamedValue.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewNamedValueClient("<subscription-id>", cred, nil)
	poller, err := client.BeginRefreshSecret(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<named-value-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.NamedValueClientRefreshSecretResult)
}
Output:

func (*NamedValueClient) BeginUpdate

func (client *NamedValueClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, ifMatch string, parameters NamedValueUpdateParameters, options *NamedValueClientBeginUpdateOptions) (NamedValueClientUpdatePollerResponse, error)

BeginUpdate - Updates the specific named value. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateNamedValue.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewNamedValueClient("<subscription-id>", cred, nil)
	poller, err := client.BeginUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<named-value-id>",
		"<if-match>",
		armapimanagement.NamedValueUpdateParameters{
			Properties: &armapimanagement.NamedValueUpdateParameterProperties{
				Secret: to.BoolPtr(false),
				Tags: []*string{
					to.StringPtr("foo"),
					to.StringPtr("bar2")},
				DisplayName: to.StringPtr("<display-name>"),
				Value:       to.StringPtr("<value>"),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.NamedValueClientUpdateResult)
}
Output:

func (*NamedValueClient) Delete

func (client *NamedValueClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, ifMatch string, options *NamedValueClientDeleteOptions) (NamedValueClientDeleteResponse, error)

Delete - Deletes specific named value from the API Management service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteNamedValue.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewNamedValueClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<named-value-id>",
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*NamedValueClient) Get

func (client *NamedValueClient) Get(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, options *NamedValueClientGetOptions) (NamedValueClientGetResponse, error)

Get - Gets the details of the named value specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetNamedValue.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewNamedValueClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<named-value-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.NamedValueClientGetResult)
}
Output:

func (*NamedValueClient) GetEntityTag

func (client *NamedValueClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, options *NamedValueClientGetEntityTagOptions) (NamedValueClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the named value specified by its identifier. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadNamedValue.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewNamedValueClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<named-value-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*NamedValueClient) ListByService

func (client *NamedValueClient) ListByService(resourceGroupName string, serviceName string, options *NamedValueClientListByServiceOptions) *NamedValueClientListByServicePager

ListByService - Lists a collection of named values defined within a service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - NamedValueClientListByServiceOptions contains the optional parameters for the NamedValueClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListNamedValues.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewNamedValueClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		&armapimanagement.NamedValueClientListByServiceOptions{Filter: nil,
			Top:                     nil,
			Skip:                    nil,
			IsKeyVaultRefreshFailed: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*NamedValueClient) ListValue

func (client *NamedValueClient) ListValue(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, options *NamedValueClientListValueOptions) (NamedValueClientListValueResponse, error)

ListValue - Gets the secret of the named value specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementNamedValueListValue.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewNamedValueClient("<subscription-id>", cred, nil)
	res, err := client.ListValue(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<named-value-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.NamedValueClientListValueResult)
}
Output:

type NamedValueClientBeginCreateOrUpdateOptions added in v0.3.0

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

NamedValueClientBeginCreateOrUpdateOptions contains the optional parameters for the NamedValueClient.BeginCreateOrUpdate method.

type NamedValueClientBeginRefreshSecretOptions added in v0.3.0

type NamedValueClientBeginRefreshSecretOptions struct {
}

NamedValueClientBeginRefreshSecretOptions contains the optional parameters for the NamedValueClient.BeginRefreshSecret method.

type NamedValueClientBeginUpdateOptions added in v0.3.0

type NamedValueClientBeginUpdateOptions struct {
}

NamedValueClientBeginUpdateOptions contains the optional parameters for the NamedValueClient.BeginUpdate method.

type NamedValueClientCreateOrUpdatePoller added in v0.3.0

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

NamedValueClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state.

func (*NamedValueClientCreateOrUpdatePoller) Done added in v0.3.0

Done returns true if the LRO has reached a terminal state.

func (*NamedValueClientCreateOrUpdatePoller) FinalResponse added in v0.3.0

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final NamedValueClientCreateOrUpdateResponse will be returned.

func (*NamedValueClientCreateOrUpdatePoller) Poll added in v0.3.0

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*NamedValueClientCreateOrUpdatePoller) ResumeToken added in v0.3.0

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type NamedValueClientCreateOrUpdatePollerResponse added in v0.3.0

type NamedValueClientCreateOrUpdatePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *NamedValueClientCreateOrUpdatePoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

NamedValueClientCreateOrUpdatePollerResponse contains the response from method NamedValueClient.CreateOrUpdate.

func (NamedValueClientCreateOrUpdatePollerResponse) PollUntilDone added in v0.3.0

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*NamedValueClientCreateOrUpdatePollerResponse) Resume added in v0.3.0

Resume rehydrates a NamedValueClientCreateOrUpdatePollerResponse from the provided client and resume token.

type NamedValueClientCreateOrUpdateResponse added in v0.3.0

type NamedValueClientCreateOrUpdateResponse struct {
	NamedValueClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

NamedValueClientCreateOrUpdateResponse contains the response from method NamedValueClient.CreateOrUpdate.

type NamedValueClientCreateOrUpdateResult added in v0.3.0

type NamedValueClientCreateOrUpdateResult struct {
	NamedValueContract
}

NamedValueClientCreateOrUpdateResult contains the result from method NamedValueClient.CreateOrUpdate.

type NamedValueClientDeleteOptions added in v0.3.0

type NamedValueClientDeleteOptions struct {
}

NamedValueClientDeleteOptions contains the optional parameters for the NamedValueClient.Delete method.

type NamedValueClientDeleteResponse added in v0.3.0

type NamedValueClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

NamedValueClientDeleteResponse contains the response from method NamedValueClient.Delete.

type NamedValueClientGetEntityTagOptions added in v0.3.0

type NamedValueClientGetEntityTagOptions struct {
}

NamedValueClientGetEntityTagOptions contains the optional parameters for the NamedValueClient.GetEntityTag method.

type NamedValueClientGetEntityTagResponse added in v0.3.0

type NamedValueClientGetEntityTagResponse struct {
	NamedValueClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

NamedValueClientGetEntityTagResponse contains the response from method NamedValueClient.GetEntityTag.

type NamedValueClientGetEntityTagResult added in v0.3.0

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

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

NamedValueClientGetEntityTagResult contains the result from method NamedValueClient.GetEntityTag.

type NamedValueClientGetOptions added in v0.3.0

type NamedValueClientGetOptions struct {
}

NamedValueClientGetOptions contains the optional parameters for the NamedValueClient.Get method.

type NamedValueClientGetResponse added in v0.3.0

type NamedValueClientGetResponse struct {
	NamedValueClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

NamedValueClientGetResponse contains the response from method NamedValueClient.Get.

type NamedValueClientGetResult added in v0.3.0

type NamedValueClientGetResult struct {
	NamedValueContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

NamedValueClientGetResult contains the result from method NamedValueClient.Get.

type NamedValueClientListByServiceOptions added in v0.3.0

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.ListByService method.

type NamedValueClientListByServicePager added in v0.3.0

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

NamedValueClientListByServicePager provides operations for iterating over paged responses.

func (*NamedValueClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*NamedValueClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*NamedValueClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current NamedValueClientListByServiceResponse page.

type NamedValueClientListByServiceResponse added in v0.3.0

type NamedValueClientListByServiceResponse struct {
	NamedValueClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

NamedValueClientListByServiceResponse contains the response from method NamedValueClient.ListByService.

type NamedValueClientListByServiceResult added in v0.3.0

type NamedValueClientListByServiceResult struct {
	NamedValueCollection
}

NamedValueClientListByServiceResult contains the result from method NamedValueClient.ListByService.

type NamedValueClientListValueOptions added in v0.3.0

type NamedValueClientListValueOptions struct {
}

NamedValueClientListValueOptions contains the optional parameters for the NamedValueClient.ListValue method.

type NamedValueClientListValueResponse added in v0.3.0

type NamedValueClientListValueResponse struct {
	NamedValueClientListValueResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

NamedValueClientListValueResponse contains the response from method NamedValueClient.ListValue.

type NamedValueClientListValueResult added in v0.3.0

type NamedValueClientListValueResult struct {
	NamedValueSecretContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

NamedValueClientListValueResult contains the result from method NamedValueClient.ListValue.

type NamedValueClientRefreshSecretPoller added in v0.3.0

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

NamedValueClientRefreshSecretPoller provides polling facilities until the operation reaches a terminal state.

func (*NamedValueClientRefreshSecretPoller) Done added in v0.3.0

Done returns true if the LRO has reached a terminal state.

func (*NamedValueClientRefreshSecretPoller) FinalResponse added in v0.3.0

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final NamedValueClientRefreshSecretResponse will be returned.

func (*NamedValueClientRefreshSecretPoller) Poll added in v0.3.0

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*NamedValueClientRefreshSecretPoller) ResumeToken added in v0.3.0

func (p *NamedValueClientRefreshSecretPoller) ResumeToken() (string, error)

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type NamedValueClientRefreshSecretPollerResponse added in v0.3.0

type NamedValueClientRefreshSecretPollerResponse struct {
	// Poller contains an initialized poller.
	Poller *NamedValueClientRefreshSecretPoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

NamedValueClientRefreshSecretPollerResponse contains the response from method NamedValueClient.RefreshSecret.

func (NamedValueClientRefreshSecretPollerResponse) PollUntilDone added in v0.3.0

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*NamedValueClientRefreshSecretPollerResponse) Resume added in v0.3.0

Resume rehydrates a NamedValueClientRefreshSecretPollerResponse from the provided client and resume token.

type NamedValueClientRefreshSecretResponse added in v0.3.0

type NamedValueClientRefreshSecretResponse struct {
	NamedValueClientRefreshSecretResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

NamedValueClientRefreshSecretResponse contains the response from method NamedValueClient.RefreshSecret.

type NamedValueClientRefreshSecretResult added in v0.3.0

type NamedValueClientRefreshSecretResult struct {
	NamedValueContract
}

NamedValueClientRefreshSecretResult contains the result from method NamedValueClient.RefreshSecret.

type NamedValueClientUpdatePoller added in v0.3.0

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

NamedValueClientUpdatePoller provides polling facilities until the operation reaches a terminal state.

func (*NamedValueClientUpdatePoller) Done added in v0.3.0

Done returns true if the LRO has reached a terminal state.

func (*NamedValueClientUpdatePoller) FinalResponse added in v0.3.0

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final NamedValueClientUpdateResponse will be returned.

func (*NamedValueClientUpdatePoller) Poll added in v0.3.0

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*NamedValueClientUpdatePoller) ResumeToken added in v0.3.0

func (p *NamedValueClientUpdatePoller) ResumeToken() (string, error)

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type NamedValueClientUpdatePollerResponse added in v0.3.0

type NamedValueClientUpdatePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *NamedValueClientUpdatePoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

NamedValueClientUpdatePollerResponse contains the response from method NamedValueClient.Update.

func (NamedValueClientUpdatePollerResponse) PollUntilDone added in v0.3.0

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*NamedValueClientUpdatePollerResponse) Resume added in v0.3.0

Resume rehydrates a NamedValueClientUpdatePollerResponse from the provided client and resume token.

type NamedValueClientUpdateResponse added in v0.3.0

type NamedValueClientUpdateResponse struct {
	NamedValueClientUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

NamedValueClientUpdateResponse contains the response from method NamedValueClient.Update.

type NamedValueClientUpdateResult added in v0.3.0

type NamedValueClientUpdateResult struct {
	NamedValueContract
}

NamedValueClientUpdateResult contains the result from method NamedValueClient.Update.

type NamedValueCollection

type NamedValueCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// Next page link if any.
	NextLink *string `json:"nextLink,omitempty"`

	// Page values.
	Value []*NamedValueContract `json:"value,omitempty"`
}

NamedValueCollection - Paged NamedValue list representation.

func (NamedValueCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NamedValueCollection.

type NamedValueContract

type NamedValueContract struct {
	// NamedValue entity contract properties.
	Properties *NamedValueContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

NamedValueContract - NamedValue details.

type NamedValueContractProperties

type NamedValueContractProperties struct {
	// REQUIRED; Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters.
	DisplayName *string `json:"displayName,omitempty"`

	// KeyVault location details of the namedValue.
	KeyVault *KeyVaultContractProperties `json:"keyVault,omitempty"`

	// Determines whether the value is a secret and should be encrypted or not. Default value is false.
	Secret *bool `json:"secret,omitempty"`

	// Optional tags that when provided can be used to filter the NamedValue list.
	Tags []*string `json:"tags,omitempty"`

	// 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 `json:"value,omitempty"`
}

NamedValueContractProperties - NamedValue Contract properties.

func (NamedValueContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NamedValueContractProperties.

type NamedValueCreateContract

type NamedValueCreateContract struct {
	// NamedValue entity contract properties for PUT operation.
	Properties *NamedValueCreateContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

NamedValueCreateContract - NamedValue details.

type NamedValueCreateContractProperties

type NamedValueCreateContractProperties struct {
	// REQUIRED; Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters.
	DisplayName *string `json:"displayName,omitempty"`

	// KeyVault location details of the namedValue.
	KeyVault *KeyVaultContractCreateProperties `json:"keyVault,omitempty"`

	// Determines whether the value is a secret and should be encrypted or not. Default value is false.
	Secret *bool `json:"secret,omitempty"`

	// Optional tags that when provided can be used to filter the NamedValue list.
	Tags []*string `json:"tags,omitempty"`

	// 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 `json:"value,omitempty"`
}

NamedValueCreateContractProperties - NamedValue Contract properties.

func (NamedValueCreateContractProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller 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 `json:"secret,omitempty"`

	// Optional tags that when provided can be used to filter the NamedValue list.
	Tags []*string `json:"tags,omitempty"`
}

NamedValueEntityBaseParameters - NamedValue Entity Base Parameters set.

func (NamedValueEntityBaseParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NamedValueEntityBaseParameters.

type NamedValueSecretContract

type NamedValueSecretContract struct {
	// This is secret value of the NamedValue entity.
	Value *string `json:"value,omitempty"`
}

NamedValueSecretContract - Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.

type NamedValueUpdateParameterProperties

type NamedValueUpdateParameterProperties struct {
	// Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters.
	DisplayName *string `json:"displayName,omitempty"`

	// KeyVault location details of the namedValue.
	KeyVault *KeyVaultContractCreateProperties `json:"keyVault,omitempty"`

	// Determines whether the value is a secret and should be encrypted or not. Default value is false.
	Secret *bool `json:"secret,omitempty"`

	// Optional tags that when provided can be used to filter the NamedValue list.
	Tags []*string `json:"tags,omitempty"`

	// Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace.
	Value *string `json:"value,omitempty"`
}

NamedValueUpdateParameterProperties - NamedValue Contract properties.

func (NamedValueUpdateParameterProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NamedValueUpdateParameterProperties.

type NamedValueUpdateParameters

type NamedValueUpdateParameters struct {
	// NamedValue entity Update contract properties.
	Properties *NamedValueUpdateParameterProperties `json:"properties,omitempty"`
}

NamedValueUpdateParameters - NamedValue update Parameters.

func (NamedValueUpdateParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NamedValueUpdateParameters.

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

NewNetworkStatusClient creates a new instance of NetworkStatusClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetNetworkStatusByLocation.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewNetworkStatusClient("<subscription-id>", cred, nil)
	res, err := client.ListByLocation(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<location-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.NetworkStatusClientListByLocationResult)
}
Output:

func (*NetworkStatusClient) ListByService

func (client *NetworkStatusClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, options *NetworkStatusClientListByServiceOptions) (NetworkStatusClientListByServiceResponse, error)

ListByService - Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - NetworkStatusClientListByServiceOptions contains the optional parameters for the NetworkStatusClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetNetworkStatus.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewNetworkStatusClient("<subscription-id>", cred, nil)
	res, err := client.ListByService(ctx,
		"<resource-group-name>",
		"<service-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.NetworkStatusClientListByServiceResult)
}
Output:

type NetworkStatusClientListByLocationOptions added in v0.3.0

type NetworkStatusClientListByLocationOptions struct {
}

NetworkStatusClientListByLocationOptions contains the optional parameters for the NetworkStatusClient.ListByLocation method.

type NetworkStatusClientListByLocationResponse added in v0.3.0

type NetworkStatusClientListByLocationResponse struct {
	NetworkStatusClientListByLocationResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

NetworkStatusClientListByLocationResponse contains the response from method NetworkStatusClient.ListByLocation.

type NetworkStatusClientListByLocationResult added in v0.3.0

type NetworkStatusClientListByLocationResult struct {
	NetworkStatusContract
}

NetworkStatusClientListByLocationResult contains the result from method NetworkStatusClient.ListByLocation.

type NetworkStatusClientListByServiceOptions added in v0.3.0

type NetworkStatusClientListByServiceOptions struct {
}

NetworkStatusClientListByServiceOptions contains the optional parameters for the NetworkStatusClient.ListByService method.

type NetworkStatusClientListByServiceResponse added in v0.3.0

type NetworkStatusClientListByServiceResponse struct {
	NetworkStatusClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

NetworkStatusClientListByServiceResponse contains the response from method NetworkStatusClient.ListByService.

type NetworkStatusClientListByServiceResult added in v0.3.0

type NetworkStatusClientListByServiceResult struct {
	// List of Network Status values.
	NetworkStatusContractByLocationArray []*NetworkStatusContractByLocation
}

NetworkStatusClientListByServiceResult contains the result 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 `json:"connectivityStatus,omitempty"`

	// REQUIRED; Gets the list of DNS servers IPV4 addresses.
	DNSServers []*string `json:"dnsServers,omitempty"`
}

NetworkStatusContract - Network Status details.

func (NetworkStatusContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NetworkStatusContract.

type NetworkStatusContractByLocation

type NetworkStatusContractByLocation struct {
	// Location of service
	Location *string `json:"location,omitempty"`

	// Network status in Location
	NetworkStatus *NetworkStatusContract `json:"networkStatus,omitempty"`
}

NetworkStatusContractByLocation - Network Status in the Location

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

NewNotificationClient creates a new instance of NotificationClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. notificationName - Notification Name Identifier. options - NotificationClientCreateOrUpdateOptions contains the optional parameters for the NotificationClient.CreateOrUpdate method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateNotification.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewNotificationClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.NotificationName("RequestPublisherNotificationMessage"),
		&armapimanagement.NotificationClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.NotificationClientCreateOrUpdateResult)
}
Output:

func (*NotificationClient) Get

func (client *NotificationClient) Get(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, options *NotificationClientGetOptions) (NotificationClientGetResponse, error)

Get - Gets the details of the Notification specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. notificationName - Notification Name Identifier. options - NotificationClientGetOptions contains the optional parameters for the NotificationClient.Get method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetNotification.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewNotificationClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.NotificationName("RequestPublisherNotificationMessage"),
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.NotificationClientGetResult)
}
Output:

func (*NotificationClient) ListByService

func (client *NotificationClient) ListByService(resourceGroupName string, serviceName string, options *NotificationClientListByServiceOptions) *NotificationClientListByServicePager

ListByService - Lists a collection of properties defined within a service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - NotificationClientListByServiceOptions contains the optional parameters for the NotificationClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListNotifications.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewNotificationClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		&armapimanagement.NotificationClientListByServiceOptions{Top: nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type NotificationClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type NotificationClientCreateOrUpdateResponse struct {
	NotificationClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

NotificationClientCreateOrUpdateResponse contains the response from method NotificationClient.CreateOrUpdate.

type NotificationClientCreateOrUpdateResult added in v0.3.0

type NotificationClientCreateOrUpdateResult struct {
	NotificationContract
}

NotificationClientCreateOrUpdateResult contains the result from method NotificationClient.CreateOrUpdate.

type NotificationClientGetOptions added in v0.3.0

type NotificationClientGetOptions struct {
}

NotificationClientGetOptions contains the optional parameters for the NotificationClient.Get method.

type NotificationClientGetResponse added in v0.3.0

type NotificationClientGetResponse struct {
	NotificationClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

NotificationClientGetResponse contains the response from method NotificationClient.Get.

type NotificationClientGetResult added in v0.3.0

type NotificationClientGetResult struct {
	NotificationContract
}

NotificationClientGetResult contains the result from method NotificationClient.Get.

type NotificationClientListByServiceOptions added in v0.3.0

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.ListByService method.

type NotificationClientListByServicePager added in v0.3.0

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

NotificationClientListByServicePager provides operations for iterating over paged responses.

func (*NotificationClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*NotificationClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*NotificationClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current NotificationClientListByServiceResponse page.

type NotificationClientListByServiceResponse added in v0.3.0

type NotificationClientListByServiceResponse struct {
	NotificationClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

NotificationClientListByServiceResponse contains the response from method NotificationClient.ListByService.

type NotificationClientListByServiceResult added in v0.3.0

type NotificationClientListByServiceResult struct {
	NotificationCollection
}

NotificationClientListByServiceResult contains the result from method NotificationClient.ListByService.

type NotificationCollection

type NotificationCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// Next page link if any.
	NextLink *string `json:"nextLink,omitempty"`

	// Page values.
	Value []*NotificationContract `json:"value,omitempty"`
}

NotificationCollection - Paged Notification list representation.

func (NotificationCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NotificationCollection.

type NotificationContract

type NotificationContract struct {
	// Notification entity contract properties.
	Properties *NotificationContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

NotificationContract - Notification details.

type NotificationContractProperties

type NotificationContractProperties struct {
	// REQUIRED; Title of the Notification.
	Title *string `json:"title,omitempty"`

	// Description of the Notification.
	Description *string `json:"description,omitempty"`

	// Recipient Parameter values.
	Recipients *RecipientsContractProperties `json:"recipients,omitempty"`
}

NotificationContractProperties - Notification Contract properties.

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.

func (NotificationName) ToPtr

ToPtr returns a *NotificationName pointing to the current value.

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

NewNotificationRecipientEmailClient creates a new instance of NotificationRecipientEmailClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*NotificationRecipientEmailClient) CheckEntityExists

CheckEntityExists - Determine if Notification Recipient Email subscribed to the notification. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadNotificationRecipientEmail.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewNotificationRecipientEmailClient("<subscription-id>", cred, nil)
	_, err = client.CheckEntityExists(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.NotificationName("RequestPublisherNotificationMessage"),
		"<email>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*NotificationRecipientEmailClient) CreateOrUpdate

CreateOrUpdate - Adds the Email address to the list of Recipients for the Notification. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateNotificationRecipientEmail.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewNotificationRecipientEmailClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.NotificationName("RequestPublisherNotificationMessage"),
		"<email>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.NotificationRecipientEmailClientCreateOrUpdateResult)
}
Output:

func (*NotificationRecipientEmailClient) Delete

Delete - Removes the email from the list of Notification. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteNotificationRecipientEmail.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewNotificationRecipientEmailClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.NotificationName("RequestPublisherNotificationMessage"),
		"<email>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*NotificationRecipientEmailClient) ListByNotification

ListByNotification - Gets the list of the Notification Recipient Emails subscribed to a notification. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. notificationName - Notification Name Identifier. options - NotificationRecipientEmailClientListByNotificationOptions contains the optional parameters for the NotificationRecipientEmailClient.ListByNotification method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListNotificationRecipientEmails.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewNotificationRecipientEmailClient("<subscription-id>", cred, nil)
	res, err := client.ListByNotification(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.NotificationName("RequestPublisherNotificationMessage"),
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.NotificationRecipientEmailClientListByNotificationResult)
}
Output:

type NotificationRecipientEmailClientCheckEntityExistsOptions added in v0.3.0

type NotificationRecipientEmailClientCheckEntityExistsOptions struct {
}

NotificationRecipientEmailClientCheckEntityExistsOptions contains the optional parameters for the NotificationRecipientEmailClient.CheckEntityExists method.

type NotificationRecipientEmailClientCheckEntityExistsResponse added in v0.3.0

type NotificationRecipientEmailClientCheckEntityExistsResponse struct {
	NotificationRecipientEmailClientCheckEntityExistsResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

NotificationRecipientEmailClientCheckEntityExistsResponse contains the response from method NotificationRecipientEmailClient.CheckEntityExists.

type NotificationRecipientEmailClientCheckEntityExistsResult added in v0.3.0

type NotificationRecipientEmailClientCheckEntityExistsResult struct {
	// Success indicates if the operation succeeded or failed.
	Success bool
}

NotificationRecipientEmailClientCheckEntityExistsResult contains the result from method NotificationRecipientEmailClient.CheckEntityExists.

type NotificationRecipientEmailClientCreateOrUpdateOptions added in v0.3.0

type NotificationRecipientEmailClientCreateOrUpdateOptions struct {
}

NotificationRecipientEmailClientCreateOrUpdateOptions contains the optional parameters for the NotificationRecipientEmailClient.CreateOrUpdate method.

type NotificationRecipientEmailClientCreateOrUpdateResponse added in v0.3.0

type NotificationRecipientEmailClientCreateOrUpdateResponse struct {
	NotificationRecipientEmailClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

NotificationRecipientEmailClientCreateOrUpdateResponse contains the response from method NotificationRecipientEmailClient.CreateOrUpdate.

type NotificationRecipientEmailClientCreateOrUpdateResult added in v0.3.0

type NotificationRecipientEmailClientCreateOrUpdateResult struct {
	RecipientEmailContract
}

NotificationRecipientEmailClientCreateOrUpdateResult contains the result from method NotificationRecipientEmailClient.CreateOrUpdate.

type NotificationRecipientEmailClientDeleteOptions added in v0.3.0

type NotificationRecipientEmailClientDeleteOptions struct {
}

NotificationRecipientEmailClientDeleteOptions contains the optional parameters for the NotificationRecipientEmailClient.Delete method.

type NotificationRecipientEmailClientDeleteResponse added in v0.3.0

type NotificationRecipientEmailClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

NotificationRecipientEmailClientDeleteResponse contains the response from method NotificationRecipientEmailClient.Delete.

type NotificationRecipientEmailClientListByNotificationOptions added in v0.3.0

type NotificationRecipientEmailClientListByNotificationOptions struct {
}

NotificationRecipientEmailClientListByNotificationOptions contains the optional parameters for the NotificationRecipientEmailClient.ListByNotification method.

type NotificationRecipientEmailClientListByNotificationResponse added in v0.3.0

type NotificationRecipientEmailClientListByNotificationResponse struct {
	NotificationRecipientEmailClientListByNotificationResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

NotificationRecipientEmailClientListByNotificationResponse contains the response from method NotificationRecipientEmailClient.ListByNotification.

type NotificationRecipientEmailClientListByNotificationResult added in v0.3.0

type NotificationRecipientEmailClientListByNotificationResult struct {
	RecipientEmailCollection
}

NotificationRecipientEmailClientListByNotificationResult contains the result 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

NewNotificationRecipientUserClient creates a new instance of NotificationRecipientUserClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*NotificationRecipientUserClient) CheckEntityExists

CheckEntityExists - Determine if the Notification Recipient User is subscribed to the notification. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadNotificationRecipientUser.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewNotificationRecipientUserClient("<subscription-id>", cred, nil)
	_, err = client.CheckEntityExists(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.NotificationName("RequestPublisherNotificationMessage"),
		"<user-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*NotificationRecipientUserClient) CreateOrUpdate

CreateOrUpdate - Adds the API Management User to the list of Recipients for the Notification. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateNotificationRecipientUser.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewNotificationRecipientUserClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.NotificationName("RequestPublisherNotificationMessage"),
		"<user-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.NotificationRecipientUserClientCreateOrUpdateResult)
}
Output:

func (*NotificationRecipientUserClient) Delete

Delete - Removes the API Management user from the list of Notification. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteNotificationRecipientUser.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewNotificationRecipientUserClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.NotificationName("RequestPublisherNotificationMessage"),
		"<user-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*NotificationRecipientUserClient) ListByNotification

ListByNotification - Gets the list of the Notification Recipient User subscribed to the notification. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. notificationName - Notification Name Identifier. options - NotificationRecipientUserClientListByNotificationOptions contains the optional parameters for the NotificationRecipientUserClient.ListByNotification method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListNotificationRecipientUsers.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewNotificationRecipientUserClient("<subscription-id>", cred, nil)
	res, err := client.ListByNotification(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.NotificationName("RequestPublisherNotificationMessage"),
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.NotificationRecipientUserClientListByNotificationResult)
}
Output:

type NotificationRecipientUserClientCheckEntityExistsOptions added in v0.3.0

type NotificationRecipientUserClientCheckEntityExistsOptions struct {
}

NotificationRecipientUserClientCheckEntityExistsOptions contains the optional parameters for the NotificationRecipientUserClient.CheckEntityExists method.

type NotificationRecipientUserClientCheckEntityExistsResponse added in v0.3.0

type NotificationRecipientUserClientCheckEntityExistsResponse struct {
	NotificationRecipientUserClientCheckEntityExistsResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

NotificationRecipientUserClientCheckEntityExistsResponse contains the response from method NotificationRecipientUserClient.CheckEntityExists.

type NotificationRecipientUserClientCheckEntityExistsResult added in v0.3.0

type NotificationRecipientUserClientCheckEntityExistsResult struct {
	// Success indicates if the operation succeeded or failed.
	Success bool
}

NotificationRecipientUserClientCheckEntityExistsResult contains the result from method NotificationRecipientUserClient.CheckEntityExists.

type NotificationRecipientUserClientCreateOrUpdateOptions added in v0.3.0

type NotificationRecipientUserClientCreateOrUpdateOptions struct {
}

NotificationRecipientUserClientCreateOrUpdateOptions contains the optional parameters for the NotificationRecipientUserClient.CreateOrUpdate method.

type NotificationRecipientUserClientCreateOrUpdateResponse added in v0.3.0

type NotificationRecipientUserClientCreateOrUpdateResponse struct {
	NotificationRecipientUserClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

NotificationRecipientUserClientCreateOrUpdateResponse contains the response from method NotificationRecipientUserClient.CreateOrUpdate.

type NotificationRecipientUserClientCreateOrUpdateResult added in v0.3.0

type NotificationRecipientUserClientCreateOrUpdateResult struct {
	RecipientUserContract
}

NotificationRecipientUserClientCreateOrUpdateResult contains the result from method NotificationRecipientUserClient.CreateOrUpdate.

type NotificationRecipientUserClientDeleteOptions added in v0.3.0

type NotificationRecipientUserClientDeleteOptions struct {
}

NotificationRecipientUserClientDeleteOptions contains the optional parameters for the NotificationRecipientUserClient.Delete method.

type NotificationRecipientUserClientDeleteResponse added in v0.3.0

type NotificationRecipientUserClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

NotificationRecipientUserClientDeleteResponse contains the response from method NotificationRecipientUserClient.Delete.

type NotificationRecipientUserClientListByNotificationOptions added in v0.3.0

type NotificationRecipientUserClientListByNotificationOptions struct {
}

NotificationRecipientUserClientListByNotificationOptions contains the optional parameters for the NotificationRecipientUserClient.ListByNotification method.

type NotificationRecipientUserClientListByNotificationResponse added in v0.3.0

type NotificationRecipientUserClientListByNotificationResponse struct {
	NotificationRecipientUserClientListByNotificationResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

NotificationRecipientUserClientListByNotificationResponse contains the response from method NotificationRecipientUserClient.ListByNotification.

type NotificationRecipientUserClientListByNotificationResult added in v0.3.0

type NotificationRecipientUserClientListByNotificationResult struct {
	RecipientUserCollection
}

NotificationRecipientUserClientListByNotificationResult contains the result from method NotificationRecipientUserClient.ListByNotification.

type OAuth2AuthenticationSettingsContract

type OAuth2AuthenticationSettingsContract struct {
	// OAuth authorization server identifier.
	AuthorizationServerID *string `json:"authorizationServerId,omitempty"`

	// operations scope.
	Scope *string `json:"scope,omitempty"`
}

OAuth2AuthenticationSettingsContract - API OAuth2 Authentication settings details.

type OpenIDAuthenticationSettingsContract

type OpenIDAuthenticationSettingsContract struct {
	// How to send token to the server.
	BearerTokenSendingMethods []*BearerTokenSendingMethods `json:"bearerTokenSendingMethods,omitempty"`

	// OAuth authorization server identifier.
	OpenidProviderID *string `json:"openidProviderId,omitempty"`
}

OpenIDAuthenticationSettingsContract - API OAuth2 Authentication settings details.

func (OpenIDAuthenticationSettingsContract) MarshalJSON

func (o OpenIDAuthenticationSettingsContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller 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

NewOpenIDConnectProviderClient creates a new instance of OpenIDConnectProviderClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*OpenIDConnectProviderClient) CreateOrUpdate

CreateOrUpdate - Creates or updates the OpenID Connect Provider. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateOpenIdConnectProvider.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewOpenIDConnectProviderClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<opid>",
		armapimanagement.OpenidConnectProviderContract{
			Properties: &armapimanagement.OpenidConnectProviderContractProperties{
				ClientID:         to.StringPtr("<client-id>"),
				ClientSecret:     to.StringPtr("<client-secret>"),
				DisplayName:      to.StringPtr("<display-name>"),
				MetadataEndpoint: to.StringPtr("<metadata-endpoint>"),
			},
		},
		&armapimanagement.OpenIDConnectProviderClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.OpenIDConnectProviderClientCreateOrUpdateResult)
}
Output:

func (*OpenIDConnectProviderClient) Delete

Delete - Deletes specific OpenID Connect Provider of the API Management service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteOpenIdConnectProvider.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewOpenIDConnectProviderClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<opid>",
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*OpenIDConnectProviderClient) Get

Get - Gets specific OpenID Connect Provider without secrets. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetOpenIdConnectProvider.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewOpenIDConnectProviderClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<opid>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.OpenIDConnectProviderClientGetResult)
}
Output:

func (*OpenIDConnectProviderClient) GetEntityTag

GetEntityTag - Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadOpenIdConnectProvider.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewOpenIDConnectProviderClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<opid>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*OpenIDConnectProviderClient) ListByService

ListByService - Lists of all the OpenId Connect Providers. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - OpenIDConnectProviderClientListByServiceOptions contains the optional parameters for the OpenIDConnectProviderClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListOpenIdConnectProviders.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewOpenIDConnectProviderClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		&armapimanagement.OpenIDConnectProviderClientListByServiceOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*OpenIDConnectProviderClient) ListSecrets

ListSecrets - Gets the client secret details of the OpenID Connect Provider. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementOpenidConnectProviderListSecrets.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewOpenIDConnectProviderClient("<subscription-id>", cred, nil)
	res, err := client.ListSecrets(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<opid>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.OpenIDConnectProviderClientListSecretsResult)
}
Output:

func (*OpenIDConnectProviderClient) Update

Update - Updates the specific OpenID Connect Provider. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateOpenIdConnectProvider.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewOpenIDConnectProviderClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<opid>",
		"<if-match>",
		armapimanagement.OpenidConnectProviderUpdateContract{
			Properties: &armapimanagement.OpenidConnectProviderUpdateContractProperties{
				ClientSecret: to.StringPtr("<client-secret>"),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.OpenIDConnectProviderClientUpdateResult)
}
Output:

type OpenIDConnectProviderClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type OpenIDConnectProviderClientCreateOrUpdateResponse struct {
	OpenIDConnectProviderClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

OpenIDConnectProviderClientCreateOrUpdateResponse contains the response from method OpenIDConnectProviderClient.CreateOrUpdate.

type OpenIDConnectProviderClientCreateOrUpdateResult added in v0.3.0

type OpenIDConnectProviderClientCreateOrUpdateResult struct {
	OpenidConnectProviderContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

OpenIDConnectProviderClientCreateOrUpdateResult contains the result from method OpenIDConnectProviderClient.CreateOrUpdate.

type OpenIDConnectProviderClientDeleteOptions added in v0.3.0

type OpenIDConnectProviderClientDeleteOptions struct {
}

OpenIDConnectProviderClientDeleteOptions contains the optional parameters for the OpenIDConnectProviderClient.Delete method.

type OpenIDConnectProviderClientDeleteResponse added in v0.3.0

type OpenIDConnectProviderClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

OpenIDConnectProviderClientDeleteResponse contains the response from method OpenIDConnectProviderClient.Delete.

type OpenIDConnectProviderClientGetEntityTagOptions added in v0.3.0

type OpenIDConnectProviderClientGetEntityTagOptions struct {
}

OpenIDConnectProviderClientGetEntityTagOptions contains the optional parameters for the OpenIDConnectProviderClient.GetEntityTag method.

type OpenIDConnectProviderClientGetEntityTagResponse added in v0.3.0

type OpenIDConnectProviderClientGetEntityTagResponse struct {
	OpenIDConnectProviderClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

OpenIDConnectProviderClientGetEntityTagResponse contains the response from method OpenIDConnectProviderClient.GetEntityTag.

type OpenIDConnectProviderClientGetEntityTagResult added in v0.3.0

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

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

OpenIDConnectProviderClientGetEntityTagResult contains the result from method OpenIDConnectProviderClient.GetEntityTag.

type OpenIDConnectProviderClientGetOptions added in v0.3.0

type OpenIDConnectProviderClientGetOptions struct {
}

OpenIDConnectProviderClientGetOptions contains the optional parameters for the OpenIDConnectProviderClient.Get method.

type OpenIDConnectProviderClientGetResponse added in v0.3.0

type OpenIDConnectProviderClientGetResponse struct {
	OpenIDConnectProviderClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

OpenIDConnectProviderClientGetResponse contains the response from method OpenIDConnectProviderClient.Get.

type OpenIDConnectProviderClientGetResult added in v0.3.0

type OpenIDConnectProviderClientGetResult struct {
	OpenidConnectProviderContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

OpenIDConnectProviderClientGetResult contains the result from method OpenIDConnectProviderClient.Get.

type OpenIDConnectProviderClientListByServiceOptions added in v0.3.0

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.ListByService method.

type OpenIDConnectProviderClientListByServicePager added in v0.3.0

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

OpenIDConnectProviderClientListByServicePager provides operations for iterating over paged responses.

func (*OpenIDConnectProviderClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*OpenIDConnectProviderClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*OpenIDConnectProviderClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current OpenIDConnectProviderClientListByServiceResponse page.

type OpenIDConnectProviderClientListByServiceResponse added in v0.3.0

type OpenIDConnectProviderClientListByServiceResponse struct {
	OpenIDConnectProviderClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

OpenIDConnectProviderClientListByServiceResponse contains the response from method OpenIDConnectProviderClient.ListByService.

type OpenIDConnectProviderClientListByServiceResult added in v0.3.0

type OpenIDConnectProviderClientListByServiceResult struct {
	OpenIDConnectProviderCollection
}

OpenIDConnectProviderClientListByServiceResult contains the result from method OpenIDConnectProviderClient.ListByService.

type OpenIDConnectProviderClientListSecretsOptions added in v0.3.0

type OpenIDConnectProviderClientListSecretsOptions struct {
}

OpenIDConnectProviderClientListSecretsOptions contains the optional parameters for the OpenIDConnectProviderClient.ListSecrets method.

type OpenIDConnectProviderClientListSecretsResponse added in v0.3.0

type OpenIDConnectProviderClientListSecretsResponse struct {
	OpenIDConnectProviderClientListSecretsResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

OpenIDConnectProviderClientListSecretsResponse contains the response from method OpenIDConnectProviderClient.ListSecrets.

type OpenIDConnectProviderClientListSecretsResult added in v0.3.0

type OpenIDConnectProviderClientListSecretsResult struct {
	ClientSecretContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

OpenIDConnectProviderClientListSecretsResult contains the result from method OpenIDConnectProviderClient.ListSecrets.

type OpenIDConnectProviderClientUpdateOptions added in v0.3.0

type OpenIDConnectProviderClientUpdateOptions struct {
}

OpenIDConnectProviderClientUpdateOptions contains the optional parameters for the OpenIDConnectProviderClient.Update method.

type OpenIDConnectProviderClientUpdateResponse added in v0.3.0

type OpenIDConnectProviderClientUpdateResponse struct {
	OpenIDConnectProviderClientUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

OpenIDConnectProviderClientUpdateResponse contains the response from method OpenIDConnectProviderClient.Update.

type OpenIDConnectProviderClientUpdateResult added in v0.3.0

type OpenIDConnectProviderClientUpdateResult struct {
	OpenidConnectProviderContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

OpenIDConnectProviderClientUpdateResult contains the result from method OpenIDConnectProviderClient.Update.

type OpenIDConnectProviderCollection

type OpenIDConnectProviderCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// Next page link if any.
	NextLink *string `json:"nextLink,omitempty"`

	// Page values.
	Value []*OpenidConnectProviderContract `json:"value,omitempty"`
}

OpenIDConnectProviderCollection - Paged OpenIdProviders list representation.

func (OpenIDConnectProviderCollection) MarshalJSON

func (o OpenIDConnectProviderCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OpenIDConnectProviderCollection.

type OpenidConnectProviderContract

type OpenidConnectProviderContract struct {
	// OpenId Connect Provider contract properties.
	Properties *OpenidConnectProviderContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

OpenidConnectProviderContract - OpenId Connect Provider details.

type OpenidConnectProviderContractProperties

type OpenidConnectProviderContractProperties struct {
	// REQUIRED; Client ID of developer console which is the client application.
	ClientID *string `json:"clientId,omitempty"`

	// REQUIRED; User-friendly OpenID Connect Provider name.
	DisplayName *string `json:"displayName,omitempty"`

	// REQUIRED; Metadata endpoint URI.
	MetadataEndpoint *string `json:"metadataEndpoint,omitempty"`

	// Client Secret of developer console which is the client application.
	ClientSecret *string `json:"clientSecret,omitempty"`

	// User-friendly description of OpenID Connect Provider.
	Description *string `json:"description,omitempty"`
}

OpenidConnectProviderContractProperties - OpenID Connect Providers Contract.

type OpenidConnectProviderUpdateContract

type OpenidConnectProviderUpdateContract struct {
	// OpenId Connect Provider Update contract properties.
	Properties *OpenidConnectProviderUpdateContractProperties `json:"properties,omitempty"`
}

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.

type OpenidConnectProviderUpdateContractProperties

type OpenidConnectProviderUpdateContractProperties struct {
	// Client ID of developer console which is the client application.
	ClientID *string `json:"clientId,omitempty"`

	// Client Secret of developer console which is the client application.
	ClientSecret *string `json:"clientSecret,omitempty"`

	// User-friendly description of OpenID Connect Provider.
	Description *string `json:"description,omitempty"`

	// User-friendly OpenID Connect Provider name.
	DisplayName *string `json:"displayName,omitempty"`

	// Metadata endpoint URI.
	MetadataEndpoint *string `json:"metadataEndpoint,omitempty"`
}

OpenidConnectProviderUpdateContractProperties - Parameters supplied to the Update OpenID Connect Provider operation.

type Operation

type Operation struct {
	// The object that describes the operation.
	Display *OperationDisplay `json:"display,omitempty"`

	// Operation name: {provider}/{resource}/{operation}
	Name *string `json:"name,omitempty"`

	// The operation origin.
	Origin *string `json:"origin,omitempty"`

	// The operation properties.
	Properties map[string]interface{} `json:"properties,omitempty"`
}

Operation - REST API 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

NewOperationClient creates a new instance of OperationClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*OperationClient) ListByTags

func (client *OperationClient) ListByTags(resourceGroupName string, serviceName string, apiID string, options *OperationClientListByTagsOptions) *OperationClientListByTagsPager

ListByTags - Lists a collection of operations associated with tags. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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.ListByTags method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiOperationsByTags.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewOperationClient("<subscription-id>", cred, nil)
	pager := client.ListByTags("<resource-group-name>",
		"<service-name>",
		"<api-id>",
		&armapimanagement.OperationClientListByTagsOptions{Filter: nil,
			Top:                        nil,
			Skip:                       nil,
			IncludeNotTaggedOperations: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type OperationClientListByTagsOptions added in v0.3.0

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.ListByTags method.

type OperationClientListByTagsPager added in v0.3.0

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

OperationClientListByTagsPager provides operations for iterating over paged responses.

func (*OperationClientListByTagsPager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*OperationClientListByTagsPager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*OperationClientListByTagsPager) PageResponse added in v0.3.0

PageResponse returns the current OperationClientListByTagsResponse page.

type OperationClientListByTagsResponse added in v0.3.0

type OperationClientListByTagsResponse struct {
	OperationClientListByTagsResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

OperationClientListByTagsResponse contains the response from method OperationClient.ListByTags.

type OperationClientListByTagsResult added in v0.3.0

type OperationClientListByTagsResult struct {
	TagResourceCollection
}

OperationClientListByTagsResult contains the result from method OperationClient.ListByTags.

type OperationCollection

type OperationCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// READ-ONLY; Next page link if any.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; Page values.
	Value []*OperationContract `json:"value,omitempty" azure:"ro"`
}

OperationCollection - Paged Operation list representation.

func (OperationCollection) MarshalJSON

func (o OperationCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationCollection.

type OperationContract

type OperationContract struct {
	// Properties of the Operation Contract.
	Properties *OperationContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

OperationContract - API Operation details.

type OperationContractProperties

type OperationContractProperties struct {
	// REQUIRED; Operation Name.
	DisplayName *string `json:"displayName,omitempty"`

	// REQUIRED; A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them.
	Method *string `json:"method,omitempty"`

	// REQUIRED; Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}
	URLTemplate *string `json:"urlTemplate,omitempty"`

	// Description of the operation. May include HTML formatting tags.
	Description *string `json:"description,omitempty"`

	// Operation Policies
	Policies *string `json:"policies,omitempty"`

	// An entity containing request details.
	Request *RequestContract `json:"request,omitempty"`

	// Array of Operation responses.
	Responses []*ResponseContract `json:"responses,omitempty"`

	// Collection of URL template parameters.
	TemplateParameters []*ParameterContract `json:"templateParameters,omitempty"`
}

OperationContractProperties - Operation Contract Properties

func (OperationContractProperties) MarshalJSON

func (o OperationContractProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationContractProperties.

type OperationDisplay

type OperationDisplay struct {
	// Friendly name of the operation
	Description *string `json:"description,omitempty"`

	// Operation type: read, write, delete, listKeys/action, etc.
	Operation *string `json:"operation,omitempty"`

	// Friendly name of the resource provider
	Provider *string `json:"provider,omitempty"`

	// Resource type on which the operation is performed.
	Resource *string `json:"resource,omitempty"`
}

OperationDisplay - The object that describes the operation.

type OperationEntityBaseContract

type OperationEntityBaseContract struct {
	// Description of the operation. May include HTML formatting tags.
	Description *string `json:"description,omitempty"`

	// Operation Policies
	Policies *string `json:"policies,omitempty"`

	// An entity containing request details.
	Request *RequestContract `json:"request,omitempty"`

	// Array of Operation responses.
	Responses []*ResponseContract `json:"responses,omitempty"`

	// Collection of URL template parameters.
	TemplateParameters []*ParameterContract `json:"templateParameters,omitempty"`
}

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.

type OperationListResult

type OperationListResult struct {
	// URL to get the next set of operation list results if there are any.
	NextLink *string `json:"nextLink,omitempty"`

	// List of operations supported by the resource provider.
	Value []*Operation `json:"value,omitempty"`
}

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.

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.

func (OperationNameFormat) ToPtr

ToPtr returns a *OperationNameFormat pointing to the current value.

type OperationResultContract

type OperationResultContract struct {
	// Properties of the Operation Contract.
	Properties *OperationResultContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

OperationResultContract - Long Running Git Operation Results.

type OperationResultContractProperties

type OperationResultContractProperties struct {
	// Error Body Contract
	Error *ErrorResponseBody `json:"error,omitempty"`

	// Operation result identifier.
	ID *string `json:"id,omitempty"`

	// Optional result info.
	ResultInfo *string `json:"resultInfo,omitempty"`

	// 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 `json:"started,omitempty"`

	// Status of an async operation.
	Status *AsyncOperationStatus `json:"status,omitempty"`

	// 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 `json:"updated,omitempty"`

	// 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 `json:"actionLog,omitempty" azure:"ro"`
}

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 `json:"action,omitempty"`

	// Identifier of the entity being created/updated/deleted.
	ObjectKey *string `json:"objectKey,omitempty"`

	// The type of entity contract.
	ObjectType *string `json:"objectType,omitempty"`
}

OperationResultLogItemContract - Log of the entity being created, updated or deleted.

type OperationTagResourceContractProperties

type OperationTagResourceContractProperties struct {
	// Identifier of the operation in form /operations/{operationId}.
	ID *string `json:"id,omitempty"`

	// READ-ONLY; API Name.
	APIName *string `json:"apiName,omitempty" azure:"ro"`

	// READ-ONLY; API Revision.
	APIRevision *string `json:"apiRevision,omitempty" azure:"ro"`

	// READ-ONLY; API Version.
	APIVersion *string `json:"apiVersion,omitempty" azure:"ro"`

	// READ-ONLY; Operation Description.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them.
	Method *string `json:"method,omitempty" azure:"ro"`

	// READ-ONLY; Operation name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}
	URLTemplate *string `json:"urlTemplate,omitempty" azure:"ro"`
}

OperationTagResourceContractProperties - Operation Entity contract Properties.

type OperationUpdateContract

type OperationUpdateContract struct {
	// Properties of the API Operation entity that can be updated.
	Properties *OperationUpdateContractProperties `json:"properties,omitempty"`
}

OperationUpdateContract - API Operation Update Contract details.

func (OperationUpdateContract) MarshalJSON

func (o OperationUpdateContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationUpdateContract.

type OperationUpdateContractProperties

type OperationUpdateContractProperties struct {
	// Description of the operation. May include HTML formatting tags.
	Description *string `json:"description,omitempty"`

	// Operation Name.
	DisplayName *string `json:"displayName,omitempty"`

	// A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them.
	Method *string `json:"method,omitempty"`

	// Operation Policies
	Policies *string `json:"policies,omitempty"`

	// An entity containing request details.
	Request *RequestContract `json:"request,omitempty"`

	// Array of Operation responses.
	Responses []*ResponseContract `json:"responses,omitempty"`

	// Collection of URL template parameters.
	TemplateParameters []*ParameterContract `json:"templateParameters,omitempty"`

	// Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}
	URLTemplate *string `json:"urlTemplate,omitempty"`
}

OperationUpdateContractProperties - Operation Update Contract Properties.

func (OperationUpdateContractProperties) MarshalJSON

func (o OperationUpdateContractProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationUpdateContractProperties.

type OperationsClient added in v0.3.0

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 added in v0.3.0

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) *OperationsClient

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) List added in v0.3.0

List - Lists all of the available REST API operations of the Microsoft.ApiManagement provider. If the operation fails it returns an *azcore.ResponseError type. options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListOperations.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewOperationsClient(cred, nil)
	pager := client.List(nil)
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type OperationsClientListOptions added in v0.3.0

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

type OperationsClientListPager added in v0.3.0

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

OperationsClientListPager provides operations for iterating over paged responses.

func (*OperationsClientListPager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*OperationsClientListPager) NextPage added in v0.3.0

func (p *OperationsClientListPager) NextPage(ctx context.Context) bool

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*OperationsClientListPager) PageResponse added in v0.3.0

PageResponse returns the current OperationsClientListResponse page.

type OperationsClientListResponse added in v0.3.0

type OperationsClientListResponse struct {
	OperationsClientListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

OperationsClientListResponse contains the response from method OperationsClient.List.

type OperationsClientListResult added in v0.3.0

type OperationsClientListResult struct {
	OperationListResult
}

OperationsClientListResult contains the result from method OperationsClient.List.

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.

func (Origin) ToPtr

func (c Origin) ToPtr() *Origin

ToPtr returns a *Origin pointing to the current value.

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 `json:"category,omitempty"`

	// The endpoints that the Api Management Service reaches the service at.
	Endpoints []*EndpointDependency `json:"endpoints,omitempty"`
}

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.

type OutboundEnvironmentEndpointList

type OutboundEnvironmentEndpointList struct {
	// REQUIRED; Collection of resources.
	Value []*OutboundEnvironmentEndpoint `json:"value,omitempty"`

	// READ-ONLY; Link to next page of resources.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

OutboundEnvironmentEndpointList - Collection of Outbound Environment Endpoints

func (OutboundEnvironmentEndpointList) MarshalJSON

func (o OutboundEnvironmentEndpointList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller 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

NewOutboundNetworkDependenciesEndpointsClient creates a new instance of OutboundNetworkDependenciesEndpointsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - OutboundNetworkDependenciesEndpointsClientListByServiceOptions contains the optional parameters for the OutboundNetworkDependenciesEndpointsClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetOutboundNetworkDependenciesEndpoints.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewOutboundNetworkDependenciesEndpointsClient("<subscription-id>", cred, nil)
	res, err := client.ListByService(ctx,
		"<resource-group-name>",
		"<service-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.OutboundNetworkDependenciesEndpointsClientListByServiceResult)
}
Output:

type OutboundNetworkDependenciesEndpointsClientListByServiceOptions added in v0.3.0

type OutboundNetworkDependenciesEndpointsClientListByServiceOptions struct {
}

OutboundNetworkDependenciesEndpointsClientListByServiceOptions contains the optional parameters for the OutboundNetworkDependenciesEndpointsClient.ListByService method.

type OutboundNetworkDependenciesEndpointsClientListByServiceResponse added in v0.3.0

type OutboundNetworkDependenciesEndpointsClientListByServiceResponse struct {
	OutboundNetworkDependenciesEndpointsClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

OutboundNetworkDependenciesEndpointsClientListByServiceResponse contains the response from method OutboundNetworkDependenciesEndpointsClient.ListByService.

type OutboundNetworkDependenciesEndpointsClientListByServiceResult added in v0.3.0

type OutboundNetworkDependenciesEndpointsClientListByServiceResult struct {
	OutboundEnvironmentEndpointList
}

OutboundNetworkDependenciesEndpointsClientListByServiceResult contains the result from method OutboundNetworkDependenciesEndpointsClient.ListByService.

type ParameterContract

type ParameterContract struct {
	// REQUIRED; Parameter name.
	Name *string `json:"name,omitempty"`

	// REQUIRED; Parameter type.
	Type *string `json:"type,omitempty"`

	// Default parameter value.
	DefaultValue *string `json:"defaultValue,omitempty"`

	// Parameter description.
	Description *string `json:"description,omitempty"`

	// Exampled defined for the parameter.
	Examples map[string]*ParameterExampleContract `json:"examples,omitempty"`

	// Specifies whether parameter is required or not.
	Required *bool `json:"required,omitempty"`

	// Schema identifier.
	SchemaID *string `json:"schemaId,omitempty"`

	// Type name defined by the schema.
	TypeName *string `json:"typeName,omitempty"`

	// Parameter values.
	Values []*string `json:"values,omitempty"`
}

ParameterContract - Operation parameters details.

func (ParameterContract) MarshalJSON

func (p ParameterContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ParameterContract.

type ParameterExampleContract

type ParameterExampleContract struct {
	// Long description for the example
	Description *string `json:"description,omitempty"`

	// A URL that points to the literal example
	ExternalValue *string `json:"externalValue,omitempty"`

	// Short description for the example
	Summary *string `json:"summary,omitempty"`

	// Example value. May be a primitive value, or an object.
	Value interface{} `json:"value,omitempty"`
}

ParameterExampleContract - Parameter example.

type PipelineDiagnosticSettings

type PipelineDiagnosticSettings struct {
	// Diagnostic settings for request.
	Request *HTTPMessageDiagnostic `json:"request,omitempty"`

	// Diagnostic settings for response.
	Response *HTTPMessageDiagnostic `json:"response,omitempty"`
}

PipelineDiagnosticSettings - Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.

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.

func (PlatformVersion) ToPtr

func (c PlatformVersion) ToPtr() *PlatformVersion

ToPtr returns a *PlatformVersion pointing to the current value.

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

NewPolicyClient creates a new instance of PolicyClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreatePolicy.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewPolicyClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.PolicyIDName("policy"),
		armapimanagement.PolicyContract{
			Properties: &armapimanagement.PolicyContractProperties{
				Format: armapimanagement.PolicyContentFormat("xml").ToPtr(),
				Value:  to.StringPtr("<value>"),
			},
		},
		&armapimanagement.PolicyClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.PolicyClientCreateOrUpdateResult)
}
Output:

func (*PolicyClient) Delete

func (client *PolicyClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, policyID PolicyIDName, ifMatch string, options *PolicyClientDeleteOptions) (PolicyClientDeleteResponse, error)

Delete - Deletes the global policy configuration of the Api Management Service. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeletePolicy.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewPolicyClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.PolicyIDName("policy"),
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*PolicyClient) Get

func (client *PolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, policyID PolicyIDName, options *PolicyClientGetOptions) (PolicyClientGetResponse, error)

Get - Get the Global policy definition of the Api Management service. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPolicy.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewPolicyClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.PolicyIDName("policy"),
		&armapimanagement.PolicyClientGetOptions{Format: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.PolicyClientGetResult)
}
Output:

func (*PolicyClient) GetEntityTag

func (client *PolicyClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, policyID PolicyIDName, options *PolicyClientGetEntityTagOptions) (PolicyClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the Global policy definition in the Api Management service. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadPolicy.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewPolicyClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.PolicyIDName("policy"),
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*PolicyClient) ListByService

func (client *PolicyClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, options *PolicyClientListByServiceOptions) (PolicyClientListByServiceResponse, error)

ListByService - Lists all the Global Policy definitions of the Api Management service. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - PolicyClientListByServiceOptions contains the optional parameters for the PolicyClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListPolicies.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewPolicyClient("<subscription-id>", cred, nil)
	res, err := client.ListByService(ctx,
		"<resource-group-name>",
		"<service-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.PolicyClientListByServiceResult)
}
Output:

type PolicyClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type PolicyClientCreateOrUpdateResponse struct {
	PolicyClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PolicyClientCreateOrUpdateResponse contains the response from method PolicyClient.CreateOrUpdate.

type PolicyClientCreateOrUpdateResult added in v0.3.0

type PolicyClientCreateOrUpdateResult struct {
	PolicyContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

PolicyClientCreateOrUpdateResult contains the result from method PolicyClient.CreateOrUpdate.

type PolicyClientDeleteOptions added in v0.3.0

type PolicyClientDeleteOptions struct {
}

PolicyClientDeleteOptions contains the optional parameters for the PolicyClient.Delete method.

type PolicyClientDeleteResponse added in v0.3.0

type PolicyClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PolicyClientDeleteResponse contains the response from method PolicyClient.Delete.

type PolicyClientGetEntityTagOptions added in v0.3.0

type PolicyClientGetEntityTagOptions struct {
}

PolicyClientGetEntityTagOptions contains the optional parameters for the PolicyClient.GetEntityTag method.

type PolicyClientGetEntityTagResponse added in v0.3.0

type PolicyClientGetEntityTagResponse struct {
	PolicyClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PolicyClientGetEntityTagResponse contains the response from method PolicyClient.GetEntityTag.

type PolicyClientGetEntityTagResult added in v0.3.0

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

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

PolicyClientGetEntityTagResult contains the result from method PolicyClient.GetEntityTag.

type PolicyClientGetOptions added in v0.3.0

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

PolicyClientGetOptions contains the optional parameters for the PolicyClient.Get method.

type PolicyClientGetResponse added in v0.3.0

type PolicyClientGetResponse struct {
	PolicyClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PolicyClientGetResponse contains the response from method PolicyClient.Get.

type PolicyClientGetResult added in v0.3.0

type PolicyClientGetResult struct {
	PolicyContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

PolicyClientGetResult contains the result from method PolicyClient.Get.

type PolicyClientListByServiceOptions added in v0.3.0

type PolicyClientListByServiceOptions struct {
}

PolicyClientListByServiceOptions contains the optional parameters for the PolicyClient.ListByService method.

type PolicyClientListByServiceResponse added in v0.3.0

type PolicyClientListByServiceResponse struct {
	PolicyClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PolicyClientListByServiceResponse contains the response from method PolicyClient.ListByService.

type PolicyClientListByServiceResult added in v0.3.0

type PolicyClientListByServiceResult struct {
	PolicyCollection
}

PolicyClientListByServiceResult contains the result from method PolicyClient.ListByService.

type PolicyCollection

type PolicyCollection struct {
	// Total record count number.
	Count *int64 `json:"count,omitempty"`

	// Next page link if any.
	NextLink *string `json:"nextLink,omitempty"`

	// Policy Contract value.
	Value []*PolicyContract `json:"value,omitempty"`
}

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.

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.

func (PolicyContentFormat) ToPtr

ToPtr returns a *PolicyContentFormat pointing to the current value.

type PolicyContract

type PolicyContract struct {
	// Properties of the Policy.
	Properties *PolicyContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

PolicyContract - Policy Contract details.

type PolicyContractProperties

type PolicyContractProperties struct {
	// REQUIRED; Contents of the Policy as defined by the format.
	Value *string `json:"value,omitempty"`

	// Format of the policyContent.
	Format *PolicyContentFormat `json:"format,omitempty"`
}

PolicyContractProperties - Policy contract Properties.

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

NewPolicyDescriptionClient creates a new instance of PolicyDescriptionClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*PolicyDescriptionClient) ListByService

ListByService - Lists all policy descriptions. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - PolicyDescriptionClientListByServiceOptions contains the optional parameters for the PolicyDescriptionClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListPolicyDescriptions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewPolicyDescriptionClient("<subscription-id>", cred, nil)
	res, err := client.ListByService(ctx,
		"<resource-group-name>",
		"<service-name>",
		&armapimanagement.PolicyDescriptionClientListByServiceOptions{Scope: armapimanagement.PolicyScopeContractAPI.ToPtr()})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.PolicyDescriptionClientListByServiceResult)
}
Output:

type PolicyDescriptionClientListByServiceOptions added in v0.3.0

type PolicyDescriptionClientListByServiceOptions struct {
	// Policy scope.
	Scope *PolicyScopeContract
}

PolicyDescriptionClientListByServiceOptions contains the optional parameters for the PolicyDescriptionClient.ListByService method.

type PolicyDescriptionClientListByServiceResponse added in v0.3.0

type PolicyDescriptionClientListByServiceResponse struct {
	PolicyDescriptionClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PolicyDescriptionClientListByServiceResponse contains the response from method PolicyDescriptionClient.ListByService.

type PolicyDescriptionClientListByServiceResult added in v0.3.0

type PolicyDescriptionClientListByServiceResult struct {
	PolicyDescriptionCollection
}

PolicyDescriptionClientListByServiceResult contains the result from method PolicyDescriptionClient.ListByService.

type PolicyDescriptionCollection

type PolicyDescriptionCollection struct {
	// Total record count number.
	Count *int64 `json:"count,omitempty"`

	// Descriptions of APIM policies.
	Value []*PolicyDescriptionContract `json:"value,omitempty"`
}

PolicyDescriptionCollection - Descriptions of APIM policies.

func (PolicyDescriptionCollection) MarshalJSON

func (p PolicyDescriptionCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PolicyDescriptionCollection.

type PolicyDescriptionContract

type PolicyDescriptionContract struct {
	// Policy description contract properties.
	Properties *PolicyDescriptionContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

PolicyDescriptionContract - Policy description details.

type PolicyDescriptionContractProperties

type PolicyDescriptionContractProperties struct {
	// READ-ONLY; Policy description.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; Binary OR value of the Snippet scope.
	Scope *int64 `json:"scope,omitempty" azure:"ro"`
}

PolicyDescriptionContractProperties - Policy description properties.

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.

func (PolicyExportFormat) ToPtr

ToPtr returns a *PolicyExportFormat pointing to the current value.

type PolicyIDName

type PolicyIDName string
const (
	PolicyIDNamePolicy PolicyIDName = "policy"
)

func PossiblePolicyIDNameValues

func PossiblePolicyIDNameValues() []PolicyIDName

PossiblePolicyIDNameValues returns the possible values for the PolicyIDName const type.

func (PolicyIDName) ToPtr

func (c PolicyIDName) ToPtr() *PolicyIDName

ToPtr returns a *PolicyIDName pointing to the current value.

type PolicyScopeContract

type PolicyScopeContract string
const (
	PolicyScopeContractTenant    PolicyScopeContract = "Tenant"
	PolicyScopeContractProduct   PolicyScopeContract = "Product"
	PolicyScopeContractAPI       PolicyScopeContract = "Api"
	PolicyScopeContractOperation PolicyScopeContract = "Operation"
	PolicyScopeContractAll       PolicyScopeContract = "All"
)

func PossiblePolicyScopeContractValues

func PossiblePolicyScopeContractValues() []PolicyScopeContract

PossiblePolicyScopeContractValues returns the possible values for the PolicyScopeContract const type.

func (PolicyScopeContract) ToPtr

ToPtr returns a *PolicyScopeContract pointing to the current value.

type PortalDelegationSettings

type PortalDelegationSettings struct {
	// Delegation settings contract properties.
	Properties *PortalDelegationSettingsProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

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.

type PortalDelegationSettingsProperties

type PortalDelegationSettingsProperties struct {
	// Subscriptions delegation settings.
	Subscriptions *SubscriptionsDelegationSettingsProperties `json:"subscriptions,omitempty"`

	// A delegation Url.
	URL *string `json:"url,omitempty"`

	// User registration delegation settings.
	UserRegistration *RegistrationDelegationSettingsProperties `json:"userRegistration,omitempty"`

	// A base64-encoded validation key to validate, that a request is coming from Azure API Management.
	ValidationKey *string `json:"validationKey,omitempty"`
}

PortalDelegationSettingsProperties - Delegation settings contract properties.

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

NewPortalRevisionClient creates a new instance of PortalRevisionClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*PortalRevisionClient) BeginCreateOrUpdate

func (client *PortalRevisionClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, portalRevisionID string, parameters PortalRevisionContract, options *PortalRevisionClientBeginCreateOrUpdateOptions) (PortalRevisionClientCreateOrUpdatePollerResponse, 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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreatePortalRevision.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewPortalRevisionClient("<subscription-id>", cred, nil)
	poller, err := client.BeginCreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<portal-revision-id>",
		armapimanagement.PortalRevisionContract{
			Properties: &armapimanagement.PortalRevisionContractProperties{
				Description: to.StringPtr("<description>"),
				IsCurrent:   to.BoolPtr(true),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	_, err = poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*PortalRevisionClient) BeginUpdate

func (client *PortalRevisionClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, portalRevisionID string, ifMatch string, parameters PortalRevisionContract, options *PortalRevisionClientBeginUpdateOptions) (PortalRevisionClientUpdatePollerResponse, error)

BeginUpdate - Updates the description of specified portal revision or makes it current. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdatePortalRevision.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewPortalRevisionClient("<subscription-id>", cred, nil)
	poller, err := client.BeginUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<portal-revision-id>",
		"<if-match>",
		armapimanagement.PortalRevisionContract{
			Properties: &armapimanagement.PortalRevisionContractProperties{
				Description: to.StringPtr("<description>"),
				IsCurrent:   to.BoolPtr(true),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.PortalRevisionClientUpdateResult)
}
Output:

func (*PortalRevisionClient) Get

func (client *PortalRevisionClient) Get(ctx context.Context, resourceGroupName string, serviceName string, portalRevisionID string, options *PortalRevisionClientGetOptions) (PortalRevisionClientGetResponse, error)

Get - Gets the developer portal's revision specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPortalRevision.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewPortalRevisionClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<portal-revision-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.PortalRevisionClientGetResult)
}
Output:

func (*PortalRevisionClient) GetEntityTag

func (client *PortalRevisionClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, portalRevisionID string, options *PortalRevisionClientGetEntityTagOptions) (PortalRevisionClientGetEntityTagResponse, error)

GetEntityTag - Gets the developer portal revision specified by its identifier. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadPortalRevision.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewPortalRevisionClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<portal-revision-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*PortalRevisionClient) ListByService

func (client *PortalRevisionClient) ListByService(resourceGroupName string, serviceName string, options *PortalRevisionClientListByServiceOptions) *PortalRevisionClientListByServicePager

ListByService - Lists developer portal's revisions. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - PortalRevisionClientListByServiceOptions contains the optional parameters for the PortalRevisionClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListPortalRevisions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewPortalRevisionClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		&armapimanagement.PortalRevisionClientListByServiceOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type PortalRevisionClientBeginCreateOrUpdateOptions added in v0.3.0

type PortalRevisionClientBeginCreateOrUpdateOptions struct {
}

PortalRevisionClientBeginCreateOrUpdateOptions contains the optional parameters for the PortalRevisionClient.BeginCreateOrUpdate method.

type PortalRevisionClientBeginUpdateOptions added in v0.3.0

type PortalRevisionClientBeginUpdateOptions struct {
}

PortalRevisionClientBeginUpdateOptions contains the optional parameters for the PortalRevisionClient.BeginUpdate method.

type PortalRevisionClientCreateOrUpdatePoller added in v0.3.0

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

PortalRevisionClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state.

func (*PortalRevisionClientCreateOrUpdatePoller) Done added in v0.3.0

Done returns true if the LRO has reached a terminal state.

func (*PortalRevisionClientCreateOrUpdatePoller) FinalResponse added in v0.3.0

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final PortalRevisionClientCreateOrUpdateResponse will be returned.

func (*PortalRevisionClientCreateOrUpdatePoller) Poll added in v0.3.0

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*PortalRevisionClientCreateOrUpdatePoller) ResumeToken added in v0.3.0

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type PortalRevisionClientCreateOrUpdatePollerResponse added in v0.3.0

type PortalRevisionClientCreateOrUpdatePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *PortalRevisionClientCreateOrUpdatePoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PortalRevisionClientCreateOrUpdatePollerResponse contains the response from method PortalRevisionClient.CreateOrUpdate.

func (PortalRevisionClientCreateOrUpdatePollerResponse) PollUntilDone added in v0.3.0

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*PortalRevisionClientCreateOrUpdatePollerResponse) Resume added in v0.3.0

Resume rehydrates a PortalRevisionClientCreateOrUpdatePollerResponse from the provided client and resume token.

type PortalRevisionClientCreateOrUpdateResponse added in v0.3.0

type PortalRevisionClientCreateOrUpdateResponse struct {
	PortalRevisionClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PortalRevisionClientCreateOrUpdateResponse contains the response from method PortalRevisionClient.CreateOrUpdate.

type PortalRevisionClientCreateOrUpdateResult added in v0.3.0

type PortalRevisionClientCreateOrUpdateResult struct {
	PortalRevisionContract
}

PortalRevisionClientCreateOrUpdateResult contains the result from method PortalRevisionClient.CreateOrUpdate.

type PortalRevisionClientGetEntityTagOptions added in v0.3.0

type PortalRevisionClientGetEntityTagOptions struct {
}

PortalRevisionClientGetEntityTagOptions contains the optional parameters for the PortalRevisionClient.GetEntityTag method.

type PortalRevisionClientGetEntityTagResponse added in v0.3.0

type PortalRevisionClientGetEntityTagResponse struct {
	PortalRevisionClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PortalRevisionClientGetEntityTagResponse contains the response from method PortalRevisionClient.GetEntityTag.

type PortalRevisionClientGetEntityTagResult added in v0.3.0

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

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

PortalRevisionClientGetEntityTagResult contains the result from method PortalRevisionClient.GetEntityTag.

type PortalRevisionClientGetOptions added in v0.3.0

type PortalRevisionClientGetOptions struct {
}

PortalRevisionClientGetOptions contains the optional parameters for the PortalRevisionClient.Get method.

type PortalRevisionClientGetResponse added in v0.3.0

type PortalRevisionClientGetResponse struct {
	PortalRevisionClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PortalRevisionClientGetResponse contains the response from method PortalRevisionClient.Get.

type PortalRevisionClientGetResult added in v0.3.0

type PortalRevisionClientGetResult struct {
	PortalRevisionContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

PortalRevisionClientGetResult contains the result from method PortalRevisionClient.Get.

type PortalRevisionClientListByServiceOptions added in v0.3.0

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.ListByService method.

type PortalRevisionClientListByServicePager added in v0.3.0

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

PortalRevisionClientListByServicePager provides operations for iterating over paged responses.

func (*PortalRevisionClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*PortalRevisionClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*PortalRevisionClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current PortalRevisionClientListByServiceResponse page.

type PortalRevisionClientListByServiceResponse added in v0.3.0

type PortalRevisionClientListByServiceResponse struct {
	PortalRevisionClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PortalRevisionClientListByServiceResponse contains the response from method PortalRevisionClient.ListByService.

type PortalRevisionClientListByServiceResult added in v0.3.0

type PortalRevisionClientListByServiceResult struct {
	PortalRevisionCollection
}

PortalRevisionClientListByServiceResult contains the result from method PortalRevisionClient.ListByService.

type PortalRevisionClientUpdatePoller added in v0.3.0

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

PortalRevisionClientUpdatePoller provides polling facilities until the operation reaches a terminal state.

func (*PortalRevisionClientUpdatePoller) Done added in v0.3.0

Done returns true if the LRO has reached a terminal state.

func (*PortalRevisionClientUpdatePoller) FinalResponse added in v0.3.0

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final PortalRevisionClientUpdateResponse will be returned.

func (*PortalRevisionClientUpdatePoller) Poll added in v0.3.0

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*PortalRevisionClientUpdatePoller) ResumeToken added in v0.3.0

func (p *PortalRevisionClientUpdatePoller) ResumeToken() (string, error)

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type PortalRevisionClientUpdatePollerResponse added in v0.3.0

type PortalRevisionClientUpdatePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *PortalRevisionClientUpdatePoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PortalRevisionClientUpdatePollerResponse contains the response from method PortalRevisionClient.Update.

func (PortalRevisionClientUpdatePollerResponse) PollUntilDone added in v0.3.0

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*PortalRevisionClientUpdatePollerResponse) Resume added in v0.3.0

Resume rehydrates a PortalRevisionClientUpdatePollerResponse from the provided client and resume token.

type PortalRevisionClientUpdateResponse added in v0.3.0

type PortalRevisionClientUpdateResponse struct {
	PortalRevisionClientUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PortalRevisionClientUpdateResponse contains the response from method PortalRevisionClient.Update.

type PortalRevisionClientUpdateResult added in v0.3.0

type PortalRevisionClientUpdateResult struct {
	PortalRevisionContract
}

PortalRevisionClientUpdateResult contains the result from method PortalRevisionClient.Update.

type PortalRevisionCollection

type PortalRevisionCollection struct {
	// READ-ONLY; Next page link, if any.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; Collection of portal revisions.
	Value []*PortalRevisionContract `json:"value,omitempty" azure:"ro"`
}

PortalRevisionCollection - Paged list of portal revisions.

func (PortalRevisionCollection) MarshalJSON

func (p PortalRevisionCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PortalRevisionCollection.

type PortalRevisionContract

type PortalRevisionContract struct {
	// Properties of the portal revisions.
	Properties *PortalRevisionContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

PortalRevisionContract - Portal Revision's contract details.

func (PortalRevisionContract) MarshalJSON

func (p PortalRevisionContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PortalRevisionContract.

type PortalRevisionContractProperties

type PortalRevisionContractProperties struct {
	// Portal revision description.
	Description *string `json:"description,omitempty"`

	// Indicates if the portal's revision is public.
	IsCurrent *bool `json:"isCurrent,omitempty"`

	// READ-ONLY; Portal's revision creation date and time.
	CreatedDateTime *time.Time `json:"createdDateTime,omitempty" azure:"ro"`

	// READ-ONLY; Status of the portal's revision.
	Status *PortalRevisionStatus `json:"status,omitempty" azure:"ro"`

	// READ-ONLY; Portal revision publishing status details.
	StatusDetails *string `json:"statusDetails,omitempty" azure:"ro"`

	// READ-ONLY; Last updated date and time.
	UpdatedDateTime *time.Time `json:"updatedDateTime,omitempty" azure:"ro"`
}

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.

func (PortalRevisionStatus) ToPtr

ToPtr returns a *PortalRevisionStatus pointing to the current value.

type PortalSettingValidationKeyContract

type PortalSettingValidationKeyContract struct {
	// This is secret value of the validation key in portal settings.
	ValidationKey *string `json:"validationKey,omitempty"`
}

PortalSettingValidationKeyContract - Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.

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

NewPortalSettingsClient creates a new instance of PortalSettingsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - PortalSettingsClientListByServiceOptions contains the optional parameters for the PortalSettingsClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListPortalSettings.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewPortalSettingsClient("<subscription-id>", cred, nil)
	res, err := client.ListByService(ctx,
		"<resource-group-name>",
		"<service-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.PortalSettingsClientListByServiceResult)
}
Output:

type PortalSettingsClientListByServiceOptions added in v0.3.0

type PortalSettingsClientListByServiceOptions struct {
}

PortalSettingsClientListByServiceOptions contains the optional parameters for the PortalSettingsClient.ListByService method.

type PortalSettingsClientListByServiceResponse added in v0.3.0

type PortalSettingsClientListByServiceResponse struct {
	PortalSettingsClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PortalSettingsClientListByServiceResponse contains the response from method PortalSettingsClient.ListByService.

type PortalSettingsClientListByServiceResult added in v0.3.0

type PortalSettingsClientListByServiceResult struct {
	PortalSettingsCollection
}

PortalSettingsClientListByServiceResult contains the result from method PortalSettingsClient.ListByService.

type PortalSettingsCollection

type PortalSettingsCollection struct {
	// Total record count number.
	Count *int64 `json:"count,omitempty"`

	// Descriptions of APIM policies.
	Value []*PortalSettingsContract `json:"value,omitempty"`
}

PortalSettingsCollection - Descriptions of APIM policies.

func (PortalSettingsCollection) MarshalJSON

func (p PortalSettingsCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PortalSettingsCollection.

type PortalSettingsContract

type PortalSettingsContract struct {
	// Portal Settings contract properties.
	Properties *PortalSettingsContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

PortalSettingsContract - Portal Settings for the Developer Portal.

type PortalSettingsContractProperties

type PortalSettingsContractProperties struct {
	// Redirect Anonymous users to the Sign-In page.
	Enabled *bool `json:"enabled,omitempty"`

	// Subscriptions delegation settings.
	Subscriptions *SubscriptionsDelegationSettingsProperties `json:"subscriptions,omitempty"`

	// Terms of service contract properties.
	TermsOfService *TermsOfServiceProperties `json:"termsOfService,omitempty"`

	// A delegation Url.
	URL *string `json:"url,omitempty"`

	// User registration delegation settings.
	UserRegistration *RegistrationDelegationSettingsProperties `json:"userRegistration,omitempty"`

	// A base64-encoded validation key to validate, that a request is coming from Azure API Management.
	ValidationKey *string `json:"validationKey,omitempty"`
}

PortalSettingsContractProperties - Sign-in settings contract properties.

type PortalSigninSettingProperties

type PortalSigninSettingProperties struct {
	// Redirect Anonymous users to the Sign-In page.
	Enabled *bool `json:"enabled,omitempty"`
}

PortalSigninSettingProperties - Sign-in settings contract properties.

type PortalSigninSettings

type PortalSigninSettings struct {
	// Sign-in settings contract properties.
	Properties *PortalSigninSettingProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

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.

type PortalSignupSettings

type PortalSignupSettings struct {
	// Sign-up settings contract properties.
	Properties *PortalSignupSettingsProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

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.

type PortalSignupSettingsProperties

type PortalSignupSettingsProperties struct {
	// Allow users to sign up on a developer portal.
	Enabled *bool `json:"enabled,omitempty"`

	// Terms of service contract properties.
	TermsOfService *TermsOfServiceProperties `json:"termsOfService,omitempty"`
}

PortalSignupSettingsProperties - Sign-up settings contract properties.

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.

func (PreferredIPVersion) ToPtr

ToPtr returns a *PreferredIPVersion pointing to the current value.

type PrivateEndpoint

type PrivateEndpoint struct {
	// READ-ONLY; The ARM identifier for Private Endpoint
	ID *string `json:"id,omitempty" azure:"ro"`
}

PrivateEndpoint - The Private Endpoint resource.

type PrivateEndpointConnection

type PrivateEndpointConnection struct {
	// Resource properties.
	Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

PrivateEndpointConnection - The Private Endpoint Connection resource.

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

NewPrivateEndpointConnectionClient creates a new instance of PrivateEndpointConnectionClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*PrivateEndpointConnectionClient) BeginCreateOrUpdate

func (client *PrivateEndpointConnectionClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, privateEndpointConnectionName string, privateEndpointConnectionRequest PrivateEndpointConnectionRequest, options *PrivateEndpointConnectionClientBeginCreateOrUpdateOptions) (PrivateEndpointConnectionClientCreateOrUpdatePollerResponse, error)

BeginCreateOrUpdate - Creates a new Private Endpoint Connection or updates an existing one. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementApproveOrRejectPrivateEndpointConnection.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewPrivateEndpointConnectionClient("<subscription-id>", cred, nil)
	poller, err := client.BeginCreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<private-endpoint-connection-name>",
		armapimanagement.PrivateEndpointConnectionRequest{
			ID: to.StringPtr("<id>"),
			Properties: &armapimanagement.PrivateEndpointConnectionRequestProperties{
				PrivateLinkServiceConnectionState: &armapimanagement.PrivateLinkServiceConnectionState{
					Description: to.StringPtr("<description>"),
					Status:      armapimanagement.PrivateEndpointServiceConnectionStatus("Approved").ToPtr(),
				},
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.PrivateEndpointConnectionClientCreateOrUpdateResult)
}
Output:

func (*PrivateEndpointConnectionClient) BeginDelete

func (client *PrivateEndpointConnectionClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionClientBeginDeleteOptions) (PrivateEndpointConnectionClientDeletePollerResponse, error)

BeginDelete - Deletes the specified Private Endpoint Connection. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeletePrivateEndpointConnection.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewPrivateEndpointConnectionClient("<subscription-id>", cred, nil)
	poller, err := client.BeginDelete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<private-endpoint-connection-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	_, err = poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*PrivateEndpointConnectionClient) GetByName

func (client *PrivateEndpointConnectionClient) GetByName(ctx context.Context, resourceGroupName string, serviceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionClientGetByNameOptions) (PrivateEndpointConnectionClientGetByNameResponse, error)

GetByName - Gets the details of the Private Endpoint Connection specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPrivateEndpointConnection.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewPrivateEndpointConnectionClient("<subscription-id>", cred, nil)
	res, err := client.GetByName(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<private-endpoint-connection-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.PrivateEndpointConnectionClientGetByNameResult)
}
Output:

func (*PrivateEndpointConnectionClient) GetPrivateLinkResource

func (client *PrivateEndpointConnectionClient) GetPrivateLinkResource(ctx context.Context, resourceGroupName string, serviceName string, privateLinkSubResourceName string, options *PrivateEndpointConnectionClientGetPrivateLinkResourceOptions) (PrivateEndpointConnectionClientGetPrivateLinkResourceResponse, error)

GetPrivateLinkResource - Description for Gets the private link resources If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPrivateLinkGroupResource.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewPrivateEndpointConnectionClient("<subscription-id>", cred, nil)
	res, err := client.GetPrivateLinkResource(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<private-link-sub-resource-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.PrivateEndpointConnectionClientGetPrivateLinkResourceResult)
}
Output:

func (*PrivateEndpointConnectionClient) ListByService

ListByService - Lists all private endpoint connections of the API Management service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - PrivateEndpointConnectionClientListByServiceOptions contains the optional parameters for the PrivateEndpointConnectionClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListPrivateEndpointConnections.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewPrivateEndpointConnectionClient("<subscription-id>", cred, nil)
	res, err := client.ListByService(ctx,
		"<resource-group-name>",
		"<service-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.PrivateEndpointConnectionClientListByServiceResult)
}
Output:

func (*PrivateEndpointConnectionClient) ListPrivateLinkResources

ListPrivateLinkResources - Description for Gets the private link resources If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - PrivateEndpointConnectionClientListPrivateLinkResourcesOptions contains the optional parameters for the PrivateEndpointConnectionClient.ListPrivateLinkResources method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListPrivateLinkGroupResources.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewPrivateEndpointConnectionClient("<subscription-id>", cred, nil)
	res, err := client.ListPrivateLinkResources(ctx,
		"<resource-group-name>",
		"<service-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.PrivateEndpointConnectionClientListPrivateLinkResourcesResult)
}
Output:

type PrivateEndpointConnectionClientBeginCreateOrUpdateOptions added in v0.3.0

type PrivateEndpointConnectionClientBeginCreateOrUpdateOptions struct {
}

PrivateEndpointConnectionClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginCreateOrUpdate method.

type PrivateEndpointConnectionClientBeginDeleteOptions added in v0.3.0

type PrivateEndpointConnectionClientBeginDeleteOptions struct {
}

PrivateEndpointConnectionClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginDelete method.

type PrivateEndpointConnectionClientCreateOrUpdatePoller added in v0.3.0

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

PrivateEndpointConnectionClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state.

func (*PrivateEndpointConnectionClientCreateOrUpdatePoller) Done added in v0.3.0

Done returns true if the LRO has reached a terminal state.

func (*PrivateEndpointConnectionClientCreateOrUpdatePoller) FinalResponse added in v0.3.0

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final PrivateEndpointConnectionClientCreateOrUpdateResponse will be returned.

func (*PrivateEndpointConnectionClientCreateOrUpdatePoller) Poll added in v0.3.0

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*PrivateEndpointConnectionClientCreateOrUpdatePoller) ResumeToken added in v0.3.0

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type PrivateEndpointConnectionClientCreateOrUpdatePollerResponse added in v0.3.0

type PrivateEndpointConnectionClientCreateOrUpdatePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *PrivateEndpointConnectionClientCreateOrUpdatePoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateEndpointConnectionClientCreateOrUpdatePollerResponse contains the response from method PrivateEndpointConnectionClient.CreateOrUpdate.

func (PrivateEndpointConnectionClientCreateOrUpdatePollerResponse) PollUntilDone added in v0.3.0

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*PrivateEndpointConnectionClientCreateOrUpdatePollerResponse) Resume added in v0.3.0

Resume rehydrates a PrivateEndpointConnectionClientCreateOrUpdatePollerResponse from the provided client and resume token.

type PrivateEndpointConnectionClientCreateOrUpdateResponse added in v0.3.0

type PrivateEndpointConnectionClientCreateOrUpdateResponse struct {
	PrivateEndpointConnectionClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateEndpointConnectionClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionClient.CreateOrUpdate.

type PrivateEndpointConnectionClientCreateOrUpdateResult added in v0.3.0

type PrivateEndpointConnectionClientCreateOrUpdateResult struct {
	PrivateEndpointConnection
}

PrivateEndpointConnectionClientCreateOrUpdateResult contains the result from method PrivateEndpointConnectionClient.CreateOrUpdate.

type PrivateEndpointConnectionClientDeletePoller added in v0.3.0

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

PrivateEndpointConnectionClientDeletePoller provides polling facilities until the operation reaches a terminal state.

func (*PrivateEndpointConnectionClientDeletePoller) Done added in v0.3.0

Done returns true if the LRO has reached a terminal state.

func (*PrivateEndpointConnectionClientDeletePoller) FinalResponse added in v0.3.0

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final PrivateEndpointConnectionClientDeleteResponse will be returned.

func (*PrivateEndpointConnectionClientDeletePoller) Poll added in v0.3.0

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*PrivateEndpointConnectionClientDeletePoller) ResumeToken added in v0.3.0

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type PrivateEndpointConnectionClientDeletePollerResponse added in v0.3.0

type PrivateEndpointConnectionClientDeletePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *PrivateEndpointConnectionClientDeletePoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateEndpointConnectionClientDeletePollerResponse contains the response from method PrivateEndpointConnectionClient.Delete.

func (PrivateEndpointConnectionClientDeletePollerResponse) PollUntilDone added in v0.3.0

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*PrivateEndpointConnectionClientDeletePollerResponse) Resume added in v0.3.0

Resume rehydrates a PrivateEndpointConnectionClientDeletePollerResponse from the provided client and resume token.

type PrivateEndpointConnectionClientDeleteResponse added in v0.3.0

type PrivateEndpointConnectionClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateEndpointConnectionClientDeleteResponse contains the response from method PrivateEndpointConnectionClient.Delete.

type PrivateEndpointConnectionClientGetByNameOptions added in v0.3.0

type PrivateEndpointConnectionClientGetByNameOptions struct {
}

PrivateEndpointConnectionClientGetByNameOptions contains the optional parameters for the PrivateEndpointConnectionClient.GetByName method.

type PrivateEndpointConnectionClientGetByNameResponse added in v0.3.0

type PrivateEndpointConnectionClientGetByNameResponse struct {
	PrivateEndpointConnectionClientGetByNameResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateEndpointConnectionClientGetByNameResponse contains the response from method PrivateEndpointConnectionClient.GetByName.

type PrivateEndpointConnectionClientGetByNameResult added in v0.3.0

type PrivateEndpointConnectionClientGetByNameResult struct {
	PrivateEndpointConnection
}

PrivateEndpointConnectionClientGetByNameResult contains the result from method PrivateEndpointConnectionClient.GetByName.

type PrivateEndpointConnectionClientGetPrivateLinkResourceOptions added in v0.3.0

type PrivateEndpointConnectionClientGetPrivateLinkResourceOptions struct {
}

PrivateEndpointConnectionClientGetPrivateLinkResourceOptions contains the optional parameters for the PrivateEndpointConnectionClient.GetPrivateLinkResource method.

type PrivateEndpointConnectionClientGetPrivateLinkResourceResponse added in v0.3.0

type PrivateEndpointConnectionClientGetPrivateLinkResourceResponse struct {
	PrivateEndpointConnectionClientGetPrivateLinkResourceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateEndpointConnectionClientGetPrivateLinkResourceResponse contains the response from method PrivateEndpointConnectionClient.GetPrivateLinkResource.

type PrivateEndpointConnectionClientGetPrivateLinkResourceResult added in v0.3.0

type PrivateEndpointConnectionClientGetPrivateLinkResourceResult struct {
	PrivateLinkResource
}

PrivateEndpointConnectionClientGetPrivateLinkResourceResult contains the result from method PrivateEndpointConnectionClient.GetPrivateLinkResource.

type PrivateEndpointConnectionClientListByServiceOptions added in v0.3.0

type PrivateEndpointConnectionClientListByServiceOptions struct {
}

PrivateEndpointConnectionClientListByServiceOptions contains the optional parameters for the PrivateEndpointConnectionClient.ListByService method.

type PrivateEndpointConnectionClientListByServiceResponse added in v0.3.0

type PrivateEndpointConnectionClientListByServiceResponse struct {
	PrivateEndpointConnectionClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateEndpointConnectionClientListByServiceResponse contains the response from method PrivateEndpointConnectionClient.ListByService.

type PrivateEndpointConnectionClientListByServiceResult added in v0.3.0

type PrivateEndpointConnectionClientListByServiceResult struct {
	PrivateEndpointConnectionListResult
}

PrivateEndpointConnectionClientListByServiceResult contains the result from method PrivateEndpointConnectionClient.ListByService.

type PrivateEndpointConnectionClientListPrivateLinkResourcesOptions added in v0.3.0

type PrivateEndpointConnectionClientListPrivateLinkResourcesOptions struct {
}

PrivateEndpointConnectionClientListPrivateLinkResourcesOptions contains the optional parameters for the PrivateEndpointConnectionClient.ListPrivateLinkResources method.

type PrivateEndpointConnectionClientListPrivateLinkResourcesResponse added in v0.3.0

type PrivateEndpointConnectionClientListPrivateLinkResourcesResponse struct {
	PrivateEndpointConnectionClientListPrivateLinkResourcesResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

PrivateEndpointConnectionClientListPrivateLinkResourcesResponse contains the response from method PrivateEndpointConnectionClient.ListPrivateLinkResources.

type PrivateEndpointConnectionClientListPrivateLinkResourcesResult added in v0.3.0

type PrivateEndpointConnectionClientListPrivateLinkResourcesResult struct {
	PrivateLinkResourceListResult
}

PrivateEndpointConnectionClientListPrivateLinkResourcesResult contains the result from method PrivateEndpointConnectionClient.ListPrivateLinkResources.

type PrivateEndpointConnectionListResult

type PrivateEndpointConnectionListResult struct {
	// Array of private endpoint connections
	Value []*PrivateEndpointConnection `json:"value,omitempty"`
}

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.

type PrivateEndpointConnectionProperties

type PrivateEndpointConnectionProperties struct {
	// REQUIRED; A collection of information about the state of the connection between service consumer and provider.
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`

	// The resource of private end point.
	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`

	// READ-ONLY; The provisioning state of the private endpoint connection resource.
	ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty" azure:"ro"`
}

PrivateEndpointConnectionProperties - Properties of the PrivateEndpointConnectProperties.

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.

func (PrivateEndpointConnectionProvisioningState) ToPtr

ToPtr returns a *PrivateEndpointConnectionProvisioningState pointing to the current value.

type PrivateEndpointConnectionRequest

type PrivateEndpointConnectionRequest struct {
	// Private Endpoint Connection Resource Id.
	ID *string `json:"id,omitempty"`

	// The connection state of the private endpoint connection.
	Properties *PrivateEndpointConnectionRequestProperties `json:"properties,omitempty"`
}

PrivateEndpointConnectionRequest - A request to approve or reject a private endpoint connection

type PrivateEndpointConnectionRequestProperties

type PrivateEndpointConnectionRequestProperties struct {
	// A collection of information about the state of the connection between service consumer and provider.
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
}

PrivateEndpointConnectionRequestProperties - The connection state of the private endpoint connection.

type PrivateEndpointConnectionWrapperProperties

type PrivateEndpointConnectionWrapperProperties struct {
	// REQUIRED; A collection of information about the state of the connection between service consumer and provider.
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`

	// The resource of private end point.
	PrivateEndpoint *ArmIDWrapper `json:"privateEndpoint,omitempty"`

	// READ-ONLY; All the Group ids.
	GroupIDs []*string `json:"groupIds,omitempty" azure:"ro"`

	// READ-ONLY; The provisioning state of the private endpoint connection resource.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`
}

PrivateEndpointConnectionWrapperProperties - Properties of the PrivateEndpointConnectProperties.

func (PrivateEndpointConnectionWrapperProperties) MarshalJSON

MarshalJSON implements the json.Marshaller 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.

func (PrivateEndpointServiceConnectionStatus) ToPtr

ToPtr returns a *PrivateEndpointServiceConnectionStatus pointing to the current value.

type PrivateLinkResource

type PrivateLinkResource struct {
	// Resource properties.
	Properties *PrivateLinkResourceProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

PrivateLinkResource - A private link resource

type PrivateLinkResourceListResult

type PrivateLinkResourceListResult struct {
	// Array of private link resources
	Value []*PrivateLinkResource `json:"value,omitempty"`
}

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.

type PrivateLinkResourceProperties

type PrivateLinkResourceProperties struct {
	// The private link resource Private link DNS zone name.
	RequiredZoneNames []*string `json:"requiredZoneNames,omitempty"`

	// READ-ONLY; The private link resource group id.
	GroupID *string `json:"groupId,omitempty" azure:"ro"`

	// READ-ONLY; The private link resource required member names.
	RequiredMembers []*string `json:"requiredMembers,omitempty" azure:"ro"`
}

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.

type PrivateLinkServiceConnectionState

type PrivateLinkServiceConnectionState struct {
	// A message indicating if changes on the service provider require any updates on the consumer.
	ActionsRequired *string `json:"actionsRequired,omitempty"`

	// The reason for approval/rejection of the connection.
	Description *string `json:"description,omitempty"`

	// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
	Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"`
}

PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.

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

NewProductAPIClient creates a new instance of ProductAPIClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadProductApi.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewProductAPIClient("<subscription-id>", cred, nil)
	_, err = client.CheckEntityExists(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<product-id>",
		"<api-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*ProductAPIClient) CreateOrUpdate

func (client *ProductAPIClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiID string, options *ProductAPIClientCreateOrUpdateOptions) (ProductAPIClientCreateOrUpdateResponse, error)

CreateOrUpdate - Adds an API to the specified product. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateProductApi.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewProductAPIClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<product-id>",
		"<api-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ProductAPIClientCreateOrUpdateResult)
}
Output:

func (*ProductAPIClient) Delete

func (client *ProductAPIClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiID string, options *ProductAPIClientDeleteOptions) (ProductAPIClientDeleteResponse, error)

Delete - Deletes the specified API from the specified product. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteProductApi.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewProductAPIClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<product-id>",
		"<api-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*ProductAPIClient) ListByProduct

func (client *ProductAPIClient) ListByProduct(resourceGroupName string, serviceName string, productID string, options *ProductAPIClientListByProductOptions) *ProductAPIClientListByProductPager

ListByProduct - Lists a collection of the APIs associated with a product. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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.ListByProduct method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListProductApis.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewProductAPIClient("<subscription-id>", cred, nil)
	pager := client.ListByProduct("<resource-group-name>",
		"<service-name>",
		"<product-id>",
		&armapimanagement.ProductAPIClientListByProductOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type ProductAPIClientCheckEntityExistsOptions added in v0.3.0

type ProductAPIClientCheckEntityExistsOptions struct {
}

ProductAPIClientCheckEntityExistsOptions contains the optional parameters for the ProductAPIClient.CheckEntityExists method.

type ProductAPIClientCheckEntityExistsResponse added in v0.3.0

type ProductAPIClientCheckEntityExistsResponse struct {
	ProductAPIClientCheckEntityExistsResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ProductAPIClientCheckEntityExistsResponse contains the response from method ProductAPIClient.CheckEntityExists.

type ProductAPIClientCheckEntityExistsResult added in v0.3.0

type ProductAPIClientCheckEntityExistsResult struct {
	// Success indicates if the operation succeeded or failed.
	Success bool
}

ProductAPIClientCheckEntityExistsResult contains the result from method ProductAPIClient.CheckEntityExists.

type ProductAPIClientCreateOrUpdateOptions added in v0.3.0

type ProductAPIClientCreateOrUpdateOptions struct {
}

ProductAPIClientCreateOrUpdateOptions contains the optional parameters for the ProductAPIClient.CreateOrUpdate method.

type ProductAPIClientCreateOrUpdateResponse added in v0.3.0

type ProductAPIClientCreateOrUpdateResponse struct {
	ProductAPIClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ProductAPIClientCreateOrUpdateResponse contains the response from method ProductAPIClient.CreateOrUpdate.

type ProductAPIClientCreateOrUpdateResult added in v0.3.0

type ProductAPIClientCreateOrUpdateResult struct {
	APIContract
}

ProductAPIClientCreateOrUpdateResult contains the result from method ProductAPIClient.CreateOrUpdate.

type ProductAPIClientDeleteOptions added in v0.3.0

type ProductAPIClientDeleteOptions struct {
}

ProductAPIClientDeleteOptions contains the optional parameters for the ProductAPIClient.Delete method.

type ProductAPIClientDeleteResponse added in v0.3.0

type ProductAPIClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ProductAPIClientDeleteResponse contains the response from method ProductAPIClient.Delete.

type ProductAPIClientListByProductOptions added in v0.3.0

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.ListByProduct method.

type ProductAPIClientListByProductPager added in v0.3.0

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

ProductAPIClientListByProductPager provides operations for iterating over paged responses.

func (*ProductAPIClientListByProductPager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*ProductAPIClientListByProductPager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*ProductAPIClientListByProductPager) PageResponse added in v0.3.0

PageResponse returns the current ProductAPIClientListByProductResponse page.

type ProductAPIClientListByProductResponse added in v0.3.0

type ProductAPIClientListByProductResponse struct {
	ProductAPIClientListByProductResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ProductAPIClientListByProductResponse contains the response from method ProductAPIClient.ListByProduct.

type ProductAPIClientListByProductResult added in v0.3.0

type ProductAPIClientListByProductResult struct {
	APICollection
}

ProductAPIClientListByProductResult contains the result from method ProductAPIClient.ListByProduct.

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

NewProductClient creates a new instance of ProductClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*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. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateProduct.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewProductClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<product-id>",
		armapimanagement.ProductContract{
			Properties: &armapimanagement.ProductContractProperties{
				DisplayName: to.StringPtr("<display-name>"),
			},
		},
		&armapimanagement.ProductClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ProductClientCreateOrUpdateResult)
}
Output:

func (*ProductClient) Delete

func (client *ProductClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, ifMatch string, options *ProductClientDeleteOptions) (ProductClientDeleteResponse, error)

Delete - Delete product. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteProduct.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewProductClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<product-id>",
		"<if-match>",
		&armapimanagement.ProductClientDeleteOptions{DeleteSubscriptions: to.BoolPtr(true)})
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*ProductClient) Get

func (client *ProductClient) Get(ctx context.Context, resourceGroupName string, serviceName string, productID string, options *ProductClientGetOptions) (ProductClientGetResponse, error)

Get - Gets the details of the product specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetProduct.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewProductClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<product-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ProductClientGetResult)
}
Output:

func (*ProductClient) GetEntityTag

func (client *ProductClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, productID string, options *ProductClientGetEntityTagOptions) (ProductClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the product specified by its identifier. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadProduct.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewProductClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<product-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*ProductClient) ListByService

func (client *ProductClient) ListByService(resourceGroupName string, serviceName string, options *ProductClientListByServiceOptions) *ProductClientListByServicePager

ListByService - Lists a collection of products in the specified service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - ProductClientListByServiceOptions contains the optional parameters for the ProductClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListProducts.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewProductClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		&armapimanagement.ProductClientListByServiceOptions{Filter: nil,
			Top:          nil,
			Skip:         nil,
			ExpandGroups: nil,
			Tags:         nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*ProductClient) ListByTags

func (client *ProductClient) ListByTags(resourceGroupName string, serviceName string, options *ProductClientListByTagsOptions) *ProductClientListByTagsPager

ListByTags - Lists a collection of products associated with tags. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - ProductClientListByTagsOptions contains the optional parameters for the ProductClient.ListByTags method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListProductsByTags.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewProductClient("<subscription-id>", cred, nil)
	pager := client.ListByTags("<resource-group-name>",
		"<service-name>",
		&armapimanagement.ProductClientListByTagsOptions{Filter: nil,
			Top:                      nil,
			Skip:                     nil,
			IncludeNotTaggedProducts: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*ProductClient) Update

func (client *ProductClient) Update(ctx context.Context, resourceGroupName string, serviceName string, productID string, ifMatch string, parameters ProductUpdateParameters, options *ProductClientUpdateOptions) (ProductClientUpdateResponse, error)

Update - Update existing product details. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. 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

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateProduct.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewProductClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<product-id>",
		"<if-match>",
		armapimanagement.ProductUpdateParameters{
			Properties: &armapimanagement.ProductUpdateProperties{
				DisplayName: to.StringPtr("<display-name>"),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ProductClientUpdateResult)
}
Output:

type ProductClientCreateOrUpdateOptions added in v0.3.0

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 added in v0.3.0

type ProductClientCreateOrUpdateResponse struct {
	ProductClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ProductClientCreateOrUpdateResponse contains the response from method ProductClient.CreateOrUpdate.

type ProductClientCreateOrUpdateResult added in v0.3.0

type ProductClientCreateOrUpdateResult struct {
	ProductContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

ProductClientCreateOrUpdateResult contains the result from method ProductClient.CreateOrUpdate.

type ProductClientDeleteOptions added in v0.3.0

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 added in v0.3.0

type ProductClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ProductClientDeleteResponse contains the response from method ProductClient.Delete.

type ProductClientGetEntityTagOptions added in v0.3.0

type ProductClientGetEntityTagOptions struct {
}

ProductClientGetEntityTagOptions contains the optional parameters for the ProductClient.GetEntityTag method.

type ProductClientGetEntityTagResponse added in v0.3.0

type ProductClientGetEntityTagResponse struct {
	ProductClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ProductClientGetEntityTagResponse contains the response from method ProductClient.GetEntityTag.

type ProductClientGetEntityTagResult added in v0.3.0

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

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

ProductClientGetEntityTagResult contains the result from method ProductClient.GetEntityTag.

type ProductClientGetOptions added in v0.3.0

type ProductClientGetOptions struct {
}

ProductClientGetOptions contains the optional parameters for the ProductClient.Get method.

type ProductClientGetResponse added in v0.3.0

type ProductClientGetResponse struct {
	ProductClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ProductClientGetResponse contains the response from method ProductClient.Get.

type ProductClientGetResult added in v0.3.0

type ProductClientGetResult struct {
	ProductContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

ProductClientGetResult contains the result from method ProductClient.Get.

type ProductClientListByServiceOptions added in v0.3.0

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.ListByService method.

type ProductClientListByServicePager added in v0.3.0

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

ProductClientListByServicePager provides operations for iterating over paged responses.

func (*ProductClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*ProductClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*ProductClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current ProductClientListByServiceResponse page.

type ProductClientListByServiceResponse added in v0.3.0

type ProductClientListByServiceResponse struct {
	ProductClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ProductClientListByServiceResponse contains the response from method ProductClient.ListByService.

type ProductClientListByServiceResult added in v0.3.0

type ProductClientListByServiceResult struct {
	ProductCollection
}

ProductClientListByServiceResult contains the result from method ProductClient.ListByService.

type ProductClientListByTagsOptions added in v0.3.0

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.ListByTags method.

type ProductClientListByTagsPager added in v0.3.0

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

ProductClientListByTagsPager provides operations for iterating over paged responses.

func (*ProductClientListByTagsPager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*ProductClientListByTagsPager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*ProductClientListByTagsPager) PageResponse added in v0.3.0

PageResponse returns the current ProductClientListByTagsResponse page.

type ProductClientListByTagsResponse added in v0.3.0

type ProductClientListByTagsResponse struct {
	ProductClientListByTagsResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ProductClientListByTagsResponse contains the response from method ProductClient.ListByTags.

type ProductClientListByTagsResult added in v0.3.0

type ProductClientListByTagsResult struct {
	TagResourceCollection
}

ProductClientListByTagsResult contains the result from method ProductClient.ListByTags.

type ProductClientUpdateOptions added in v0.3.0

type ProductClientUpdateOptions struct {
}

ProductClientUpdateOptions contains the optional parameters for the ProductClient.Update method.

type ProductClientUpdateResponse added in v0.3.0

type ProductClientUpdateResponse struct {
	ProductClientUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ProductClientUpdateResponse contains the response from method ProductClient.Update.

type ProductClientUpdateResult added in v0.3.0

type ProductClientUpdateResult struct {
	ProductContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

ProductClientUpdateResult contains the result from method ProductClient.Update.

type ProductCollection

type ProductCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// Next page link if any.
	NextLink *string `json:"nextLink,omitempty"`

	// Page values.
	Value []*ProductContract `json:"value,omitempty"`
}

ProductCollection - Paged Products list representation.

func (ProductCollection) MarshalJSON

func (p ProductCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProductCollection.

type ProductContract

type ProductContract struct {
	// Product entity contract properties.
	Properties *ProductContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

ProductContract - Product details.

type ProductContractProperties

type ProductContractProperties struct {
	// REQUIRED; Product name.
	DisplayName *string `json:"displayName,omitempty"`

	// 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 `json:"approvalRequired,omitempty"`

	// Product description. May include HTML formatting tags.
	Description *string `json:"description,omitempty"`

	// 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 `json:"state,omitempty"`

	// 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 `json:"subscriptionRequired,omitempty"`

	// 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 `json:"subscriptionsLimit,omitempty"`

	// 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 `json:"terms,omitempty"`
}

ProductContractProperties - Product profile.

type ProductEntityBaseParameters

type ProductEntityBaseParameters struct {
	// whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers
	// to call the product’s APIs immediately after subscribing. If true,
	// administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present
	// only if subscriptionRequired property is present and has a value of false.
	ApprovalRequired *bool `json:"approvalRequired,omitempty"`

	// Product description. May include HTML formatting tags.
	Description *string `json:"description,omitempty"`

	// 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 `json:"state,omitempty"`

	// 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 `json:"subscriptionRequired,omitempty"`

	// 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 `json:"subscriptionsLimit,omitempty"`

	// 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 `json:"terms,omitempty"`
}

ProductEntityBaseParameters - Product Entity Base Parameters

type ProductGroupClient

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

ProductGroupClient contains the methods for the ProductGroup group. Don't use this type directly, use NewProductGroupClient() instead.

func NewProductGroupClient

func NewProductGroupClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ProductGroupClient

NewProductGroupClient creates a new instance of ProductGroupClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ProductGroupClient) CheckEntityExists

func (client *ProductGroupClient) CheckEntityExists(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string, options *ProductGroupClientCheckEntityExistsOptions) (ProductGroupClientCheckEntityExistsResponse, error)

CheckEntityExists - Checks that Group entity specified by identifier is associated with the Product entity. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. productID - Product identifier. Must be unique in the current API Management service instance. groupID - Group identifier. Must be unique in the current API Management service instance. options - ProductGroupClientCheckEntityExistsOptions contains the optional parameters for the ProductGroupClient.CheckEntityExists method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadProductGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewProductGroupClient("<subscription-id>", cred, nil)
	_, err = client.CheckEntityExists(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<product-id>",
		"<group-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*ProductGroupClient) CreateOrUpdate

func (client *ProductGroupClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string, options *ProductGroupClientCreateOrUpdateOptions) (ProductGroupClientCreateOrUpdateResponse, error)

CreateOrUpdate - Adds the association between the specified developer group with the specified product. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. productID - Product identifier. Must be unique in the current API Management service instance. groupID - Group identifier. Must be unique in the current API Management service instance. options - ProductGroupClientCreateOrUpdateOptions contains the optional parameters for the ProductGroupClient.CreateOrUpdate method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateProductGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewProductGroupClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<product-id>",
		"<group-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ProductGroupClientCreateOrUpdateResult)
}
Output:

func (*ProductGroupClient) Delete

func (client *ProductGroupClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string, options *ProductGroupClientDeleteOptions) (ProductGroupClientDeleteResponse, error)

Delete - Deletes the association between the specified group and product. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. productID - Product identifier. Must be unique in the current API Management service instance. groupID - Group identifier. Must be unique in the current API Management service instance. options - ProductGroupClientDeleteOptions contains the optional parameters for the ProductGroupClient.Delete method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteProductGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewProductGroupClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<product-id>",
		"<group-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*ProductGroupClient) ListByProduct

func (client *ProductGroupClient) ListByProduct(resourceGroupName string, serviceName string, productID string, options *ProductGroupClientListByProductOptions) *ProductGroupClientListByProductPager

ListByProduct - Lists the collection of developer groups associated with the specified product. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. productID - Product identifier. Must be unique in the current API Management service instance. options - ProductGroupClientListByProductOptions contains the optional parameters for the ProductGroupClient.ListByProduct method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListProductGroups.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewProductGroupClient("<subscription-id>", cred, nil)
	pager := client.ListByProduct("<resource-group-name>",
		"<service-name>",
		"<product-id>",
		&armapimanagement.ProductGroupClientListByProductOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type ProductGroupClientCheckEntityExistsOptions added in v0.3.0

type ProductGroupClientCheckEntityExistsOptions struct {
}

ProductGroupClientCheckEntityExistsOptions contains the optional parameters for the ProductGroupClient.CheckEntityExists method.

type ProductGroupClientCheckEntityExistsResponse added in v0.3.0

type ProductGroupClientCheckEntityExistsResponse struct {
	ProductGroupClientCheckEntityExistsResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ProductGroupClientCheckEntityExistsResponse contains the response from method ProductGroupClient.CheckEntityExists.

type ProductGroupClientCheckEntityExistsResult added in v0.3.0

type ProductGroupClientCheckEntityExistsResult struct {
	// Success indicates if the operation succeeded or failed.
	Success bool
}

ProductGroupClientCheckEntityExistsResult contains the result from method ProductGroupClient.CheckEntityExists.

type ProductGroupClientCreateOrUpdateOptions added in v0.3.0

type ProductGroupClientCreateOrUpdateOptions struct {
}

ProductGroupClientCreateOrUpdateOptions contains the optional parameters for the ProductGroupClient.CreateOrUpdate method.

type ProductGroupClientCreateOrUpdateResponse added in v0.3.0

type ProductGroupClientCreateOrUpdateResponse struct {
	ProductGroupClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ProductGroupClientCreateOrUpdateResponse contains the response from method ProductGroupClient.CreateOrUpdate.

type ProductGroupClientCreateOrUpdateResult added in v0.3.0

type ProductGroupClientCreateOrUpdateResult struct {
	GroupContract
}

ProductGroupClientCreateOrUpdateResult contains the result from method ProductGroupClient.CreateOrUpdate.

type ProductGroupClientDeleteOptions added in v0.3.0

type ProductGroupClientDeleteOptions struct {
}

ProductGroupClientDeleteOptions contains the optional parameters for the ProductGroupClient.Delete method.

type ProductGroupClientDeleteResponse added in v0.3.0

type ProductGroupClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ProductGroupClientDeleteResponse contains the response from method ProductGroupClient.Delete.

type ProductGroupClientListByProductOptions added in v0.3.0

type ProductGroupClientListByProductOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | |
	// | displayName | filter | eq, ne | |
	// | description | filter | eq, ne | |
	Filter *string
	// Number of records to skip.
	Skip *int32
	// Number of records to return.
	Top *int32
}

ProductGroupClientListByProductOptions contains the optional parameters for the ProductGroupClient.ListByProduct method.

type ProductGroupClientListByProductPager added in v0.3.0

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

ProductGroupClientListByProductPager provides operations for iterating over paged responses.

func (*ProductGroupClientListByProductPager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*ProductGroupClientListByProductPager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*ProductGroupClientListByProductPager) PageResponse added in v0.3.0

PageResponse returns the current ProductGroupClientListByProductResponse page.

type ProductGroupClientListByProductResponse added in v0.3.0

type ProductGroupClientListByProductResponse struct {
	ProductGroupClientListByProductResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ProductGroupClientListByProductResponse contains the response from method ProductGroupClient.ListByProduct.

type ProductGroupClientListByProductResult added in v0.3.0

type ProductGroupClientListByProductResult struct {
	GroupCollection
}

ProductGroupClientListByProductResult contains the result from method ProductGroupClient.ListByProduct.

type ProductPolicyClient

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

ProductPolicyClient contains the methods for the ProductPolicy group. Don't use this type directly, use NewProductPolicyClient() instead.

func NewProductPolicyClient

func NewProductPolicyClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ProductPolicyClient

NewProductPolicyClient creates a new instance of ProductPolicyClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ProductPolicyClient) CreateOrUpdate

func (client *ProductPolicyClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, policyID PolicyIDName, parameters PolicyContract, options *ProductPolicyClientCreateOrUpdateOptions) (ProductPolicyClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates policy configuration for the Product. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. productID - Product identifier. Must be unique in the current API Management service instance. policyID - The identifier of the Policy. parameters - The policy contents to apply. options - ProductPolicyClientCreateOrUpdateOptions contains the optional parameters for the ProductPolicyClient.CreateOrUpdate method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateProductPolicy.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewProductPolicyClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<product-id>",
		armapimanagement.PolicyIDName("policy"),
		armapimanagement.PolicyContract{
			Properties: &armapimanagement.PolicyContractProperties{
				Format: armapimanagement.PolicyContentFormat("xml").ToPtr(),
				Value:  to.StringPtr("<value>"),
			},
		},
		&armapimanagement.ProductPolicyClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ProductPolicyClientCreateOrUpdateResult)
}
Output:

func (*ProductPolicyClient) Delete

func (client *ProductPolicyClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, policyID PolicyIDName, ifMatch string, options *ProductPolicyClientDeleteOptions) (ProductPolicyClientDeleteResponse, error)

Delete - Deletes the policy configuration at the Product. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. productID - Product identifier. Must be unique in the current API Management service instance. policyID - The identifier of the Policy. ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. options - ProductPolicyClientDeleteOptions contains the optional parameters for the ProductPolicyClient.Delete method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteProductPolicy.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewProductPolicyClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<product-id>",
		armapimanagement.PolicyIDName("policy"),
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*ProductPolicyClient) Get

func (client *ProductPolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, productID string, policyID PolicyIDName, options *ProductPolicyClientGetOptions) (ProductPolicyClientGetResponse, error)

Get - Get the policy configuration at the Product level. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. productID - Product identifier. Must be unique in the current API Management service instance. policyID - The identifier of the Policy. options - ProductPolicyClientGetOptions contains the optional parameters for the ProductPolicyClient.Get method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetProductPolicy.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewProductPolicyClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<product-id>",
		armapimanagement.PolicyIDName("policy"),
		&armapimanagement.ProductPolicyClientGetOptions{Format: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ProductPolicyClientGetResult)
}
Output:

func (*ProductPolicyClient) GetEntityTag

func (client *ProductPolicyClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, productID string, policyID PolicyIDName, options *ProductPolicyClientGetEntityTagOptions) (ProductPolicyClientGetEntityTagResponse, error)

GetEntityTag - Get the ETag of the policy configuration at the Product level. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. productID - Product identifier. Must be unique in the current API Management service instance. policyID - The identifier of the Policy. options - ProductPolicyClientGetEntityTagOptions contains the optional parameters for the ProductPolicyClient.GetEntityTag method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadProductPolicy.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewProductPolicyClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<product-id>",
		armapimanagement.PolicyIDName("policy"),
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*ProductPolicyClient) ListByProduct

func (client *ProductPolicyClient) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, options *ProductPolicyClientListByProductOptions) (ProductPolicyClientListByProductResponse, error)

ListByProduct - Get the policy configuration at the Product level. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. productID - Product identifier. Must be unique in the current API Management service instance. options - ProductPolicyClientListByProductOptions contains the optional parameters for the ProductPolicyClient.ListByProduct method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListProductPolicies.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewProductPolicyClient("<subscription-id>", cred, nil)
	res, err := client.ListByProduct(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<product-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ProductPolicyClientListByProductResult)
}
Output:

type ProductPolicyClientCreateOrUpdateOptions added in v0.3.0

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

ProductPolicyClientCreateOrUpdateOptions contains the optional parameters for the ProductPolicyClient.CreateOrUpdate method.

type ProductPolicyClientCreateOrUpdateResponse added in v0.3.0

type ProductPolicyClientCreateOrUpdateResponse struct {
	ProductPolicyClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ProductPolicyClientCreateOrUpdateResponse contains the response from method ProductPolicyClient.CreateOrUpdate.

type ProductPolicyClientCreateOrUpdateResult added in v0.3.0

type ProductPolicyClientCreateOrUpdateResult struct {
	PolicyContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

ProductPolicyClientCreateOrUpdateResult contains the result from method ProductPolicyClient.CreateOrUpdate.

type ProductPolicyClientDeleteOptions added in v0.3.0

type ProductPolicyClientDeleteOptions struct {
}

ProductPolicyClientDeleteOptions contains the optional parameters for the ProductPolicyClient.Delete method.

type ProductPolicyClientDeleteResponse added in v0.3.0

type ProductPolicyClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ProductPolicyClientDeleteResponse contains the response from method ProductPolicyClient.Delete.

type ProductPolicyClientGetEntityTagOptions added in v0.3.0

type ProductPolicyClientGetEntityTagOptions struct {
}

ProductPolicyClientGetEntityTagOptions contains the optional parameters for the ProductPolicyClient.GetEntityTag method.

type ProductPolicyClientGetEntityTagResponse added in v0.3.0

type ProductPolicyClientGetEntityTagResponse struct {
	ProductPolicyClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ProductPolicyClientGetEntityTagResponse contains the response from method ProductPolicyClient.GetEntityTag.

type ProductPolicyClientGetEntityTagResult added in v0.3.0

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

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

ProductPolicyClientGetEntityTagResult contains the result from method ProductPolicyClient.GetEntityTag.

type ProductPolicyClientGetOptions added in v0.3.0

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

ProductPolicyClientGetOptions contains the optional parameters for the ProductPolicyClient.Get method.

type ProductPolicyClientGetResponse added in v0.3.0

type ProductPolicyClientGetResponse struct {
	ProductPolicyClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ProductPolicyClientGetResponse contains the response from method ProductPolicyClient.Get.

type ProductPolicyClientGetResult added in v0.3.0

type ProductPolicyClientGetResult struct {
	PolicyContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

ProductPolicyClientGetResult contains the result from method ProductPolicyClient.Get.

type ProductPolicyClientListByProductOptions added in v0.3.0

type ProductPolicyClientListByProductOptions struct {
}

ProductPolicyClientListByProductOptions contains the optional parameters for the ProductPolicyClient.ListByProduct method.

type ProductPolicyClientListByProductResponse added in v0.3.0

type ProductPolicyClientListByProductResponse struct {
	ProductPolicyClientListByProductResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ProductPolicyClientListByProductResponse contains the response from method ProductPolicyClient.ListByProduct.

type ProductPolicyClientListByProductResult added in v0.3.0

type ProductPolicyClientListByProductResult struct {
	PolicyCollection
}

ProductPolicyClientListByProductResult contains the result from method ProductPolicyClient.ListByProduct.

type ProductState

type ProductState string

ProductState - whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished.

const (
	ProductStateNotPublished ProductState = "notPublished"
	ProductStatePublished    ProductState = "published"
)

func PossibleProductStateValues

func PossibleProductStateValues() []ProductState

PossibleProductStateValues returns the possible values for the ProductState const type.

func (ProductState) ToPtr

func (c ProductState) ToPtr() *ProductState

ToPtr returns a *ProductState pointing to the current value.

type ProductSubscriptionsClient

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

ProductSubscriptionsClient contains the methods for the ProductSubscriptions group. Don't use this type directly, use NewProductSubscriptionsClient() instead.

func NewProductSubscriptionsClient

func NewProductSubscriptionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ProductSubscriptionsClient

NewProductSubscriptionsClient creates a new instance of ProductSubscriptionsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ProductSubscriptionsClient) List

func (client *ProductSubscriptionsClient) List(resourceGroupName string, serviceName string, productID string, options *ProductSubscriptionsClientListOptions) *ProductSubscriptionsClientListPager

List - Lists the collection of subscriptions to the specified product. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. productID - Product identifier. Must be unique in the current API Management service instance. options - ProductSubscriptionsClientListOptions contains the optional parameters for the ProductSubscriptionsClient.List method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListProductSubscriptions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewProductSubscriptionsClient("<subscription-id>", cred, nil)
	pager := client.List("<resource-group-name>",
		"<service-name>",
		"<product-id>",
		&armapimanagement.ProductSubscriptionsClientListOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type ProductSubscriptionsClientListOptions added in v0.3.0

type ProductSubscriptionsClientListOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | state | filter | eq | |
	// | user | expand | | |
	Filter *string
	// Number of records to skip.
	Skip *int32
	// Number of records to return.
	Top *int32
}

ProductSubscriptionsClientListOptions contains the optional parameters for the ProductSubscriptionsClient.List method.

type ProductSubscriptionsClientListPager added in v0.3.0

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

ProductSubscriptionsClientListPager provides operations for iterating over paged responses.

func (*ProductSubscriptionsClientListPager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*ProductSubscriptionsClientListPager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*ProductSubscriptionsClientListPager) PageResponse added in v0.3.0

PageResponse returns the current ProductSubscriptionsClientListResponse page.

type ProductSubscriptionsClientListResponse added in v0.3.0

type ProductSubscriptionsClientListResponse struct {
	ProductSubscriptionsClientListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ProductSubscriptionsClientListResponse contains the response from method ProductSubscriptionsClient.List.

type ProductSubscriptionsClientListResult added in v0.3.0

type ProductSubscriptionsClientListResult struct {
	SubscriptionCollection
}

ProductSubscriptionsClientListResult contains the result from method ProductSubscriptionsClient.List.

type ProductTagResourceContractProperties

type ProductTagResourceContractProperties struct {
	// REQUIRED; Product name.
	Name *string `json:"name,omitempty"`

	// 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 `json:"approvalRequired,omitempty"`

	// Product description. May include HTML formatting tags.
	Description *string `json:"description,omitempty"`

	// Identifier of the product in the form of /products/{productId}
	ID *string `json:"id,omitempty"`

	// 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 `json:"state,omitempty"`

	// 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 `json:"subscriptionRequired,omitempty"`

	// 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 `json:"subscriptionsLimit,omitempty"`

	// 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 `json:"terms,omitempty"`
}

ProductTagResourceContractProperties - Product profile.

type ProductUpdateParameters

type ProductUpdateParameters struct {
	// Product entity Update contract properties.
	Properties *ProductUpdateProperties `json:"properties,omitempty"`
}

ProductUpdateParameters - Product Update parameters.

func (ProductUpdateParameters) MarshalJSON

func (p ProductUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProductUpdateParameters.

type ProductUpdateProperties

type ProductUpdateProperties struct {
	// whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers
	// to call the product’s APIs immediately after subscribing. If true,
	// administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present
	// only if subscriptionRequired property is present and has a value of false.
	ApprovalRequired *bool `json:"approvalRequired,omitempty"`

	// Product description. May include HTML formatting tags.
	Description *string `json:"description,omitempty"`

	// Product name.
	DisplayName *string `json:"displayName,omitempty"`

	// 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 `json:"state,omitempty"`

	// 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 `json:"subscriptionRequired,omitempty"`

	// 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 `json:"subscriptionsLimit,omitempty"`

	// 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 `json:"terms,omitempty"`
}

ProductUpdateProperties - Parameters supplied to the Update Product operation.

type Protocol

type Protocol string
const (
	ProtocolHTTP  Protocol = "http"
	ProtocolHTTPS Protocol = "https"
	ProtocolWs    Protocol = "ws"
	ProtocolWss   Protocol = "wss"
)

func PossibleProtocolValues

func PossibleProtocolValues() []Protocol

PossibleProtocolValues returns the possible values for the Protocol const type.

func (Protocol) ToPtr

func (c Protocol) ToPtr() *Protocol

ToPtr returns a *Protocol pointing to the current value.

type PublicNetworkAccess

type PublicNetworkAccess string

PublicNetworkAccess - Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'

const (
	PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled"
	PublicNetworkAccessEnabled  PublicNetworkAccess = "Enabled"
)

func PossiblePublicNetworkAccessValues

func PossiblePublicNetworkAccessValues() []PublicNetworkAccess

PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type.

func (PublicNetworkAccess) ToPtr

ToPtr returns a *PublicNetworkAccess pointing to the current value.

type QuotaByCounterKeysClient

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

QuotaByCounterKeysClient contains the methods for the QuotaByCounterKeys group. Don't use this type directly, use NewQuotaByCounterKeysClient() instead.

func NewQuotaByCounterKeysClient

func NewQuotaByCounterKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *QuotaByCounterKeysClient

NewQuotaByCounterKeysClient creates a new instance of QuotaByCounterKeysClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*QuotaByCounterKeysClient) ListByService

func (client *QuotaByCounterKeysClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, quotaCounterKey string, options *QuotaByCounterKeysClientListByServiceOptions) (QuotaByCounterKeysClientListByServiceResponse, error)

ListByService - Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. quotaCounterKey - Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key options - QuotaByCounterKeysClientListByServiceOptions contains the optional parameters for the QuotaByCounterKeysClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetQuotaCounterKeys.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewQuotaByCounterKeysClient("<subscription-id>", cred, nil)
	res, err := client.ListByService(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<quota-counter-key>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.QuotaByCounterKeysClientListByServiceResult)
}
Output:

func (*QuotaByCounterKeysClient) Update

func (client *QuotaByCounterKeysClient) Update(ctx context.Context, resourceGroupName string, serviceName string, quotaCounterKey string, parameters QuotaCounterValueUpdateContract, options *QuotaByCounterKeysClientUpdateOptions) (QuotaByCounterKeysClientUpdateResponse, error)

Update - Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. quotaCounterKey - Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key parameters - The value of the quota counter to be applied to all quota counter periods. options - QuotaByCounterKeysClientUpdateOptions contains the optional parameters for the QuotaByCounterKeysClient.Update method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateQuotaCounterKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewQuotaByCounterKeysClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<quota-counter-key>",
		armapimanagement.QuotaCounterValueUpdateContract{
			Properties: &armapimanagement.QuotaCounterValueContractProperties{
				CallsCount:    to.Int32Ptr(0),
				KbTransferred: to.Float64Ptr(2.5630078125),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.QuotaByCounterKeysClientUpdateResult)
}
Output:

type QuotaByCounterKeysClientListByServiceOptions added in v0.3.0

type QuotaByCounterKeysClientListByServiceOptions struct {
}

QuotaByCounterKeysClientListByServiceOptions contains the optional parameters for the QuotaByCounterKeysClient.ListByService method.

type QuotaByCounterKeysClientListByServiceResponse added in v0.3.0

type QuotaByCounterKeysClientListByServiceResponse struct {
	QuotaByCounterKeysClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

QuotaByCounterKeysClientListByServiceResponse contains the response from method QuotaByCounterKeysClient.ListByService.

type QuotaByCounterKeysClientListByServiceResult added in v0.3.0

type QuotaByCounterKeysClientListByServiceResult struct {
	QuotaCounterCollection
}

QuotaByCounterKeysClientListByServiceResult contains the result from method QuotaByCounterKeysClient.ListByService.

type QuotaByCounterKeysClientUpdateOptions added in v0.3.0

type QuotaByCounterKeysClientUpdateOptions struct {
}

QuotaByCounterKeysClientUpdateOptions contains the optional parameters for the QuotaByCounterKeysClient.Update method.

type QuotaByCounterKeysClientUpdateResponse added in v0.3.0

type QuotaByCounterKeysClientUpdateResponse struct {
	QuotaByCounterKeysClientUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

QuotaByCounterKeysClientUpdateResponse contains the response from method QuotaByCounterKeysClient.Update.

type QuotaByCounterKeysClientUpdateResult added in v0.3.0

type QuotaByCounterKeysClientUpdateResult struct {
	QuotaCounterCollection
}

QuotaByCounterKeysClientUpdateResult contains the result from method QuotaByCounterKeysClient.Update.

type QuotaByPeriodKeysClient

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

QuotaByPeriodKeysClient contains the methods for the QuotaByPeriodKeys group. Don't use this type directly, use NewQuotaByPeriodKeysClient() instead.

func NewQuotaByPeriodKeysClient

func NewQuotaByPeriodKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *QuotaByPeriodKeysClient

NewQuotaByPeriodKeysClient creates a new instance of QuotaByPeriodKeysClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*QuotaByPeriodKeysClient) Get

func (client *QuotaByPeriodKeysClient) Get(ctx context.Context, resourceGroupName string, serviceName string, quotaCounterKey string, quotaPeriodKey string, options *QuotaByPeriodKeysClientGetOptions) (QuotaByPeriodKeysClientGetResponse, error)

Get - Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. quotaCounterKey - Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key quotaPeriodKey - Quota period key identifier. options - QuotaByPeriodKeysClientGetOptions contains the optional parameters for the QuotaByPeriodKeysClient.Get method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetQuotaCounterKeysByQuotaPeriod.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewQuotaByPeriodKeysClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<quota-counter-key>",
		"<quota-period-key>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.QuotaByPeriodKeysClientGetResult)
}
Output:

func (*QuotaByPeriodKeysClient) Update

func (client *QuotaByPeriodKeysClient) Update(ctx context.Context, resourceGroupName string, serviceName string, quotaCounterKey string, quotaPeriodKey string, parameters QuotaCounterValueUpdateContract, options *QuotaByPeriodKeysClientUpdateOptions) (QuotaByPeriodKeysClientUpdateResponse, error)

Update - Updates an existing quota counter value in the specified service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. quotaCounterKey - Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key quotaPeriodKey - Quota period key identifier. parameters - The value of the Quota counter to be applied on the specified period. options - QuotaByPeriodKeysClientUpdateOptions contains the optional parameters for the QuotaByPeriodKeysClient.Update method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateQuotaCounterKeyByQuotaPeriod.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewQuotaByPeriodKeysClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<quota-counter-key>",
		"<quota-period-key>",
		armapimanagement.QuotaCounterValueUpdateContract{
			Properties: &armapimanagement.QuotaCounterValueContractProperties{
				CallsCount:    to.Int32Ptr(0),
				KbTransferred: to.Float64Ptr(0),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.QuotaByPeriodKeysClientUpdateResult)
}
Output:

type QuotaByPeriodKeysClientGetOptions added in v0.3.0

type QuotaByPeriodKeysClientGetOptions struct {
}

QuotaByPeriodKeysClientGetOptions contains the optional parameters for the QuotaByPeriodKeysClient.Get method.

type QuotaByPeriodKeysClientGetResponse added in v0.3.0

type QuotaByPeriodKeysClientGetResponse struct {
	QuotaByPeriodKeysClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

QuotaByPeriodKeysClientGetResponse contains the response from method QuotaByPeriodKeysClient.Get.

type QuotaByPeriodKeysClientGetResult added in v0.3.0

type QuotaByPeriodKeysClientGetResult struct {
	QuotaCounterContract
}

QuotaByPeriodKeysClientGetResult contains the result from method QuotaByPeriodKeysClient.Get.

type QuotaByPeriodKeysClientUpdateOptions added in v0.3.0

type QuotaByPeriodKeysClientUpdateOptions struct {
}

QuotaByPeriodKeysClientUpdateOptions contains the optional parameters for the QuotaByPeriodKeysClient.Update method.

type QuotaByPeriodKeysClientUpdateResponse added in v0.3.0

type QuotaByPeriodKeysClientUpdateResponse struct {
	QuotaByPeriodKeysClientUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

QuotaByPeriodKeysClientUpdateResponse contains the response from method QuotaByPeriodKeysClient.Update.

type QuotaByPeriodKeysClientUpdateResult added in v0.3.0

type QuotaByPeriodKeysClientUpdateResult struct {
	QuotaCounterContract
}

QuotaByPeriodKeysClientUpdateResult contains the result from method QuotaByPeriodKeysClient.Update.

type QuotaCounterCollection

type QuotaCounterCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// Next page link if any.
	NextLink *string `json:"nextLink,omitempty"`

	// Quota counter values.
	Value []*QuotaCounterContract `json:"value,omitempty"`
}

QuotaCounterCollection - Paged Quota Counter list representation.

func (QuotaCounterCollection) MarshalJSON

func (q QuotaCounterCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type QuotaCounterCollection.

type QuotaCounterContract

type QuotaCounterContract struct {
	// REQUIRED; The Key value of the Counter. Must not be empty.
	CounterKey *string `json:"counterKey,omitempty"`

	// REQUIRED; The date of the end of Counter Period. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified
	// by the ISO 8601 standard.
	PeriodEndTime *time.Time `json:"periodEndTime,omitempty"`

	// REQUIRED; Identifier of the Period for which the counter was collected. Must not be empty.
	PeriodKey *string `json:"periodKey,omitempty"`

	// REQUIRED; The date of the start of Counter Period. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified
	// by the ISO 8601 standard.
	PeriodStartTime *time.Time `json:"periodStartTime,omitempty"`

	// Quota Value Properties
	Value *QuotaCounterValueContractProperties `json:"value,omitempty"`
}

QuotaCounterContract - Quota counter details.

func (QuotaCounterContract) MarshalJSON

func (q QuotaCounterContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type QuotaCounterContract.

func (*QuotaCounterContract) UnmarshalJSON

func (q *QuotaCounterContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type QuotaCounterContract.

type QuotaCounterValueContract

type QuotaCounterValueContract struct {
	// Quota counter Value Properties.
	Value *QuotaCounterValueContractProperties `json:"value,omitempty"`
}

QuotaCounterValueContract - Quota counter value details.

type QuotaCounterValueContractProperties

type QuotaCounterValueContractProperties struct {
	// Number of times Counter was called.
	CallsCount *int32 `json:"callsCount,omitempty"`

	// Data Transferred in KiloBytes.
	KbTransferred *float64 `json:"kbTransferred,omitempty"`
}

QuotaCounterValueContractProperties - Quota counter value details.

type QuotaCounterValueUpdateContract

type QuotaCounterValueUpdateContract struct {
	// Quota counter value details.
	Properties *QuotaCounterValueContractProperties `json:"properties,omitempty"`
}

QuotaCounterValueUpdateContract - Quota counter value details.

func (QuotaCounterValueUpdateContract) MarshalJSON

func (q QuotaCounterValueUpdateContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type QuotaCounterValueUpdateContract.

type RecipientEmailCollection

type RecipientEmailCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// Next page link if any.
	NextLink *string `json:"nextLink,omitempty"`

	// Page values.
	Value []*RecipientEmailContract `json:"value,omitempty"`
}

RecipientEmailCollection - Paged Recipient User list representation.

func (RecipientEmailCollection) MarshalJSON

func (r RecipientEmailCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RecipientEmailCollection.

type RecipientEmailContract

type RecipientEmailContract struct {
	// Recipient Email contract properties.
	Properties *RecipientEmailContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

RecipientEmailContract - Recipient Email details.

type RecipientEmailContractProperties

type RecipientEmailContractProperties struct {
	// User Email subscribed to notification.
	Email *string `json:"email,omitempty"`
}

RecipientEmailContractProperties - Recipient Email Contract Properties.

type RecipientUserCollection

type RecipientUserCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// Next page link if any.
	NextLink *string `json:"nextLink,omitempty"`

	// Page values.
	Value []*RecipientUserContract `json:"value,omitempty"`
}

RecipientUserCollection - Paged Recipient User list representation.

func (RecipientUserCollection) MarshalJSON

func (r RecipientUserCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RecipientUserCollection.

type RecipientUserContract

type RecipientUserContract struct {
	// Recipient User entity contract properties.
	Properties *RecipientUsersContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

RecipientUserContract - Recipient User details.

type RecipientUsersContractProperties

type RecipientUsersContractProperties struct {
	// API Management UserId subscribed to notification.
	UserID *string `json:"userId,omitempty"`
}

RecipientUsersContractProperties - Recipient User Contract Properties.

type RecipientsContractProperties

type RecipientsContractProperties struct {
	// List of Emails subscribed for the notification.
	Emails []*string `json:"emails,omitempty"`

	// List of Users subscribed for the notification.
	Users []*string `json:"users,omitempty"`
}

RecipientsContractProperties - Notification Parameter contract.

func (RecipientsContractProperties) MarshalJSON

func (r RecipientsContractProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RecipientsContractProperties.

type RegionClient

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

RegionClient contains the methods for the Region group. Don't use this type directly, use NewRegionClient() instead.

func NewRegionClient

func NewRegionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *RegionClient

NewRegionClient creates a new instance of RegionClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*RegionClient) ListByService

func (client *RegionClient) ListByService(resourceGroupName string, serviceName string, options *RegionClientListByServiceOptions) *RegionClientListByServicePager

ListByService - Lists all azure regions in which the service exists. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - RegionClientListByServiceOptions contains the optional parameters for the RegionClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListRegions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewRegionClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		nil)
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type RegionClientListByServiceOptions added in v0.3.0

type RegionClientListByServiceOptions struct {
}

RegionClientListByServiceOptions contains the optional parameters for the RegionClient.ListByService method.

type RegionClientListByServicePager added in v0.3.0

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

RegionClientListByServicePager provides operations for iterating over paged responses.

func (*RegionClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*RegionClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*RegionClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current RegionClientListByServiceResponse page.

type RegionClientListByServiceResponse added in v0.3.0

type RegionClientListByServiceResponse struct {
	RegionClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

RegionClientListByServiceResponse contains the response from method RegionClient.ListByService.

type RegionClientListByServiceResult added in v0.3.0

type RegionClientListByServiceResult struct {
	RegionListResult
}

RegionClientListByServiceResult contains the result from method RegionClient.ListByService.

type RegionContract

type RegionContract struct {
	// whether Region is deleted.
	IsDeleted *bool `json:"isDeleted,omitempty"`

	// whether Region is the master region.
	IsMasterRegion *bool `json:"isMasterRegion,omitempty"`

	// READ-ONLY; Region name.
	Name *string `json:"name,omitempty" azure:"ro"`
}

RegionContract - Region profile.

type RegionListResult

type RegionListResult struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// Next page link if any.
	NextLink *string `json:"nextLink,omitempty"`

	// Lists of Regions.
	Value []*RegionContract `json:"value,omitempty"`
}

RegionListResult - Lists Regions operation response details.

func (RegionListResult) MarshalJSON

func (r RegionListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RegionListResult.

type RegistrationDelegationSettingsProperties

type RegistrationDelegationSettingsProperties struct {
	// Enable or disable delegation for user registration.
	Enabled *bool `json:"enabled,omitempty"`
}

RegistrationDelegationSettingsProperties - User registration delegation settings properties.

type RemotePrivateEndpointConnectionWrapper

type RemotePrivateEndpointConnectionWrapper struct {
	// Private Endpoint connection resource id
	ID *string `json:"id,omitempty"`

	// Private Endpoint Connection Name
	Name *string `json:"name,omitempty"`

	// Resource properties.
	Properties *PrivateEndpointConnectionWrapperProperties `json:"properties,omitempty"`

	// Private Endpoint Connection Resource Type
	Type *string `json:"type,omitempty"`
}

RemotePrivateEndpointConnectionWrapper - Remote Private Endpoint Connection resource.

type ReportCollection

type ReportCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// Next page link if any.
	NextLink *string `json:"nextLink,omitempty"`

	// Page values.
	Value []*ReportRecordContract `json:"value,omitempty"`
}

ReportCollection - Paged Report records list representation.

func (ReportCollection) MarshalJSON

func (r ReportCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ReportCollection.

type ReportRecordContract

type ReportRecordContract struct {
	// API identifier path. /apis/{apiId}
	APIID *string `json:"apiId,omitempty"`

	// API region identifier.
	APIRegion *string `json:"apiRegion,omitempty"`

	// Average time it took to process request.
	APITimeAvg *float64 `json:"apiTimeAvg,omitempty"`

	// Maximum time it took to process request.
	APITimeMax *float64 `json:"apiTimeMax,omitempty"`

	// Minimum time it took to process request.
	APITimeMin *float64 `json:"apiTimeMin,omitempty"`

	// Bandwidth consumed.
	Bandwidth *int64 `json:"bandwidth,omitempty"`

	// Number of times when content was served from cache policy.
	CacheHitCount *int32 `json:"cacheHitCount,omitempty"`

	// Number of times content was fetched from backend.
	CacheMissCount *int32 `json:"cacheMissCount,omitempty"`

	// Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden
	// and HttpStatusCode.TooManyRequests
	CallCountBlocked *int32 `json:"callCountBlocked,omitempty"`

	// Number of calls failed due to proxy or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and
	// any Code between HttpStatusCode.InternalServerError (500) and 600
	CallCountFailed *int32 `json:"callCountFailed,omitempty"`

	// Number of other calls.
	CallCountOther *int32 `json:"callCountOther,omitempty"`

	// Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect
	CallCountSuccess *int32 `json:"callCountSuccess,omitempty"`

	// Total number of calls.
	CallCountTotal *int32 `json:"callCountTotal,omitempty"`

	// Country to which this record data is related.
	Country *string `json:"country,omitempty"`

	// Length of aggregation period. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601
	// format (http://en.wikipedia.org/wiki/ISO_8601#Durations).
	Interval *string `json:"interval,omitempty"`

	// Name depending on report endpoint specifies product, API, operation or developer name.
	Name *string `json:"name,omitempty"`

	// Operation identifier path. /apis/{apiId}/operations/{operationId}
	OperationID *string `json:"operationId,omitempty"`

	// Country region to which this record data is related.
	Region *string `json:"region,omitempty"`

	// Average time it took to process request on backend.
	ServiceTimeAvg *float64 `json:"serviceTimeAvg,omitempty"`

	// Maximum time it took to process request on backend.
	ServiceTimeMax *float64 `json:"serviceTimeMax,omitempty"`

	// Minimum time it took to process request on backend.
	ServiceTimeMin *float64 `json:"serviceTimeMin,omitempty"`

	// Subscription identifier path. /subscriptions/{subscriptionId}
	SubscriptionID *string `json:"subscriptionId,omitempty"`

	// Start of aggregation period. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601
	// standard.
	Timestamp *time.Time `json:"timestamp,omitempty"`

	// Zip code to which this record data is related.
	Zip *string `json:"zip,omitempty"`

	// READ-ONLY; Product identifier path. /products/{productId}
	ProductID *string `json:"productId,omitempty" azure:"ro"`

	// READ-ONLY; User identifier path. /users/{userId}
	UserID *string `json:"userId,omitempty" azure:"ro"`
}

ReportRecordContract - Report data.

func (ReportRecordContract) MarshalJSON

func (r ReportRecordContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ReportRecordContract.

func (*ReportRecordContract) UnmarshalJSON

func (r *ReportRecordContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ReportRecordContract.

type ReportsClient

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

ReportsClient contains the methods for the Reports group. Don't use this type directly, use NewReportsClient() instead.

func NewReportsClient

func NewReportsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ReportsClient

NewReportsClient creates a new instance of ReportsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ReportsClient) ListByAPI

func (client *ReportsClient) ListByAPI(resourceGroupName string, serviceName string, filter string, options *ReportsClientListByAPIOptions) *ReportsClientListByAPIPager

ListByAPI - Lists report records by API. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. filter - The filter to apply on the operation. options - ReportsClientListByAPIOptions contains the optional parameters for the ReportsClient.ListByAPI method.

func (*ReportsClient) ListByGeo

func (client *ReportsClient) ListByGeo(resourceGroupName string, serviceName string, filter string, options *ReportsClientListByGeoOptions) *ReportsClientListByGeoPager

ListByGeo - Lists report records by geography. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. filter - | Field | Usage | Supported operators | Supported functions | |-------------|-------------|-------------|-------------| | timestamp | filter | ge, le | | | country | select | | | | region | select | | | | zip | select | | | | apiRegion | filter | eq | | | userId | filter | eq | | | productId | filter | eq | | | subscriptionId | filter | eq | | | apiId | filter | eq | | | operationId | filter | eq | | | callCountSuccess | select | | | | callCountBlocked | select | | | | callCountFailed | select | | | | callCountOther | select | | | | bandwidth | select, orderBy | | | | cacheHitsCount | select | | | | cacheMissCount | select | | | | apiTimeAvg | select | | | | apiTimeMin | select | | | | apiTimeMax | select | | | | serviceTimeAvg | select | | | | serviceTimeMin | select | | | | serviceTimeMax | select | | | options - ReportsClientListByGeoOptions contains the optional parameters for the ReportsClient.ListByGeo method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetReportsByGeo.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewReportsClient("<subscription-id>", cred, nil)
	pager := client.ListByGeo("<resource-group-name>",
		"<service-name>",
		"<filter>",
		&armapimanagement.ReportsClientListByGeoOptions{Top: nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*ReportsClient) ListByOperation

func (client *ReportsClient) ListByOperation(resourceGroupName string, serviceName string, filter string, options *ReportsClientListByOperationOptions) *ReportsClientListByOperationPager

ListByOperation - Lists report records by API Operations. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. filter - | Field | Usage | Supported operators | Supported functions | |-------------|-------------|-------------|-------------| | timestamp | filter | ge, le | | | displayName | select, orderBy | | | | apiRegion | filter | eq | | | userId | filter | eq | | | productId | filter | eq | | | subscriptionId | filter | eq | | | apiId | filter | eq | | | operationId | select, filter | eq | | | callCountSuccess | select, orderBy | | | | callCountBlocked | select, orderBy | | | | callCountFailed | select, orderBy | | | | callCountOther | select, orderBy | | | | callCountTotal | select, orderBy | | | | bandwidth | select, orderBy | | | | cacheHitsCount | select | | | | cacheMissCount | select | | | | apiTimeAvg | select, orderBy | | | | apiTimeMin | select | | | | apiTimeMax | select | | | | serviceTimeAvg | select | | | | serviceTimeMin | select | | | | serviceTimeMax | select | | | options - ReportsClientListByOperationOptions contains the optional parameters for the ReportsClient.ListByOperation method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetReportsByOperation.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewReportsClient("<subscription-id>", cred, nil)
	pager := client.ListByOperation("<resource-group-name>",
		"<service-name>",
		"<filter>",
		&armapimanagement.ReportsClientListByOperationOptions{Top: nil,
			Skip:    nil,
			Orderby: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*ReportsClient) ListByProduct

func (client *ReportsClient) ListByProduct(resourceGroupName string, serviceName string, filter string, options *ReportsClientListByProductOptions) *ReportsClientListByProductPager

ListByProduct - Lists report records by Product. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. filter - | Field | Usage | Supported operators | Supported functions | |-------------|-------------|-------------|-------------| | timestamp | filter | ge, le | | | displayName | select, orderBy | | | | apiRegion | filter | eq | | | userId | filter | eq | | | productId | select, filter | eq | | | subscriptionId | filter | eq | | | callCountSuccess | select, orderBy | | | | callCountBlocked | select, orderBy | | | | callCountFailed | select, orderBy | | | | callCountOther | select, orderBy | | | | callCountTotal | select, orderBy | | | | bandwidth | select, orderBy | | | | cacheHitsCount | select | | | | cacheMissCount | select | | | | apiTimeAvg | select, orderBy | | | | apiTimeMin | select | | | | apiTimeMax | select | | | | serviceTimeAvg | select | | | | serviceTimeMin | select | | | | serviceTimeMax | select | | | options - ReportsClientListByProductOptions contains the optional parameters for the ReportsClient.ListByProduct method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetReportsByProduct.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewReportsClient("<subscription-id>", cred, nil)
	pager := client.ListByProduct("<resource-group-name>",
		"<service-name>",
		"<filter>",
		&armapimanagement.ReportsClientListByProductOptions{Top: nil,
			Skip:    nil,
			Orderby: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*ReportsClient) ListByRequest

func (client *ReportsClient) ListByRequest(ctx context.Context, resourceGroupName string, serviceName string, filter string, options *ReportsClientListByRequestOptions) (ReportsClientListByRequestResponse, error)

ListByRequest - Lists report records by Request. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. filter - | Field | Usage | Supported operators | Supported functions | |-------------|-------------|-------------|-------------| | timestamp | filter | ge, le | | | apiId | filter | eq | | | operationId | filter | eq | | | productId | filter | eq | | | userId | filter | eq | | | apiRegion | filter | eq | | | subscriptionId | filter | eq | | options - ReportsClientListByRequestOptions contains the optional parameters for the ReportsClient.ListByRequest method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetReportsByRequest.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewReportsClient("<subscription-id>", cred, nil)
	res, err := client.ListByRequest(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<filter>",
		&armapimanagement.ReportsClientListByRequestOptions{Top: nil,
			Skip: nil,
		})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ReportsClientListByRequestResult)
}
Output:

func (*ReportsClient) ListBySubscription

func (client *ReportsClient) ListBySubscription(resourceGroupName string, serviceName string, filter string, options *ReportsClientListBySubscriptionOptions) *ReportsClientListBySubscriptionPager

ListBySubscription - Lists report records by subscription. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. filter - | Field | Usage | Supported operators | Supported functions | |-------------|-------------|-------------|-------------| | timestamp | filter | ge, le | | | displayName | select, orderBy | | | | apiRegion | filter | eq | | | userId | select, filter | eq | | | productId | select, filter | eq | | | subscriptionId | select, filter | eq | | | callCountSuccess | select, orderBy | | | | callCountBlocked | select, orderBy | | | | callCountFailed | select, orderBy | | | | callCountOther | select, orderBy | | | | callCountTotal | select, orderBy | | | | bandwidth | select, orderBy | | | | cacheHitsCount | select | | | | cacheMissCount | select | | | | apiTimeAvg | select, orderBy | | | | apiTimeMin | select | | | | apiTimeMax | select | | | | serviceTimeAvg | select | | | | serviceTimeMin | select | | | | serviceTimeMax | select | | | options - ReportsClientListBySubscriptionOptions contains the optional parameters for the ReportsClient.ListBySubscription method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetReportsBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewReportsClient("<subscription-id>", cred, nil)
	pager := client.ListBySubscription("<resource-group-name>",
		"<service-name>",
		"<filter>",
		&armapimanagement.ReportsClientListBySubscriptionOptions{Top: nil,
			Skip:    nil,
			Orderby: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*ReportsClient) ListByTime

func (client *ReportsClient) ListByTime(resourceGroupName string, serviceName string, filter string, interval string, options *ReportsClientListByTimeOptions) *ReportsClientListByTimePager

ListByTime - Lists report records by Time. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. filter - | Field | Usage | Supported operators | Supported functions | |-------------|-------------|-------------|-------------| | timestamp | filter, select | ge, le | | | interval | select | | | | apiRegion | filter | eq | | | userId | filter | eq | | | productId | filter | eq | | | subscriptionId | filter | eq | | | apiId | filter | eq | | | operationId | filter | eq | | | callCountSuccess | select | | | | callCountBlocked | select | | | | callCountFailed | select | | | | callCountOther | select | | | | bandwidth | select, orderBy | | | | cacheHitsCount | select | | | | cacheMissCount | select | | | | apiTimeAvg | select | | | | apiTimeMin | select | | | | apiTimeMax | select | | | | serviceTimeAvg | select | | | | serviceTimeMin | select | | | | serviceTimeMax | select | | | interval - By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)). options - ReportsClientListByTimeOptions contains the optional parameters for the ReportsClient.ListByTime method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetReportsByTime.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewReportsClient("<subscription-id>", cred, nil)
	pager := client.ListByTime("<resource-group-name>",
		"<service-name>",
		"<filter>",
		"<interval>",
		&armapimanagement.ReportsClientListByTimeOptions{Top: nil,
			Skip:    nil,
			Orderby: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*ReportsClient) ListByUser

func (client *ReportsClient) ListByUser(resourceGroupName string, serviceName string, filter string, options *ReportsClientListByUserOptions) *ReportsClientListByUserPager

ListByUser - Lists report records by User. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. filter - | Field | Usage | Supported operators | Supported functions | |-------------|-------------|-------------|-------------| | timestamp | filter | ge, le | | | displayName | select, orderBy | | | | userId | select, filter | eq | | | apiRegion | filter | eq | | | productId | filter | eq | | | subscriptionId | filter | eq | | | apiId | filter | eq | | | operationId | filter | eq | | | callCountSuccess | select, orderBy | | | | callCountBlocked | select, orderBy | | | | callCountFailed | select, orderBy | | | | callCountOther | select, orderBy | | | | callCountTotal | select, orderBy | | | | bandwidth | select, orderBy | | | | cacheHitsCount | select | | | | cacheMissCount | select | | | | apiTimeAvg | select, orderBy | | | | apiTimeMin | select | | | | apiTimeMax | select | | | | serviceTimeAvg | select | | | | serviceTimeMin | select | | | | serviceTimeMax | select | | | options - ReportsClientListByUserOptions contains the optional parameters for the ReportsClient.ListByUser method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetReportsByUser.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewReportsClient("<subscription-id>", cred, nil)
	pager := client.ListByUser("<resource-group-name>",
		"<service-name>",
		"<filter>",
		&armapimanagement.ReportsClientListByUserOptions{Top: nil,
			Skip:    nil,
			Orderby: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type ReportsClientListByAPIOptions added in v0.3.0

type ReportsClientListByAPIOptions struct {
	// OData order by query option.
	Orderby *string
	// Number of records to skip.
	Skip *int32
	// Number of records to return.
	Top *int32
}

ReportsClientListByAPIOptions contains the optional parameters for the ReportsClient.ListByAPI method.

type ReportsClientListByAPIPager added in v0.3.0

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

ReportsClientListByAPIPager provides operations for iterating over paged responses.

func (*ReportsClientListByAPIPager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*ReportsClientListByAPIPager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*ReportsClientListByAPIPager) PageResponse added in v0.3.0

PageResponse returns the current ReportsClientListByAPIResponse page.

type ReportsClientListByAPIResponse added in v0.3.0

type ReportsClientListByAPIResponse struct {
	ReportsClientListByAPIResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ReportsClientListByAPIResponse contains the response from method ReportsClient.ListByAPI.

type ReportsClientListByAPIResult added in v0.3.0

type ReportsClientListByAPIResult struct {
	ReportCollection
}

ReportsClientListByAPIResult contains the result from method ReportsClient.ListByAPI.

type ReportsClientListByGeoOptions added in v0.3.0

type ReportsClientListByGeoOptions struct {
	// Number of records to skip.
	Skip *int32
	// Number of records to return.
	Top *int32
}

ReportsClientListByGeoOptions contains the optional parameters for the ReportsClient.ListByGeo method.

type ReportsClientListByGeoPager added in v0.3.0

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

ReportsClientListByGeoPager provides operations for iterating over paged responses.

func (*ReportsClientListByGeoPager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*ReportsClientListByGeoPager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*ReportsClientListByGeoPager) PageResponse added in v0.3.0

PageResponse returns the current ReportsClientListByGeoResponse page.

type ReportsClientListByGeoResponse added in v0.3.0

type ReportsClientListByGeoResponse struct {
	ReportsClientListByGeoResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ReportsClientListByGeoResponse contains the response from method ReportsClient.ListByGeo.

type ReportsClientListByGeoResult added in v0.3.0

type ReportsClientListByGeoResult struct {
	ReportCollection
}

ReportsClientListByGeoResult contains the result from method ReportsClient.ListByGeo.

type ReportsClientListByOperationOptions added in v0.3.0

type ReportsClientListByOperationOptions struct {
	// OData order by query option.
	Orderby *string
	// Number of records to skip.
	Skip *int32
	// Number of records to return.
	Top *int32
}

ReportsClientListByOperationOptions contains the optional parameters for the ReportsClient.ListByOperation method.

type ReportsClientListByOperationPager added in v0.3.0

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

ReportsClientListByOperationPager provides operations for iterating over paged responses.

func (*ReportsClientListByOperationPager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*ReportsClientListByOperationPager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*ReportsClientListByOperationPager) PageResponse added in v0.3.0

PageResponse returns the current ReportsClientListByOperationResponse page.

type ReportsClientListByOperationResponse added in v0.3.0

type ReportsClientListByOperationResponse struct {
	ReportsClientListByOperationResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ReportsClientListByOperationResponse contains the response from method ReportsClient.ListByOperation.

type ReportsClientListByOperationResult added in v0.3.0

type ReportsClientListByOperationResult struct {
	ReportCollection
}

ReportsClientListByOperationResult contains the result from method ReportsClient.ListByOperation.

type ReportsClientListByProductOptions added in v0.3.0

type ReportsClientListByProductOptions struct {
	// OData order by query option.
	Orderby *string
	// Number of records to skip.
	Skip *int32
	// Number of records to return.
	Top *int32
}

ReportsClientListByProductOptions contains the optional parameters for the ReportsClient.ListByProduct method.

type ReportsClientListByProductPager added in v0.3.0

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

ReportsClientListByProductPager provides operations for iterating over paged responses.

func (*ReportsClientListByProductPager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*ReportsClientListByProductPager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*ReportsClientListByProductPager) PageResponse added in v0.3.0

PageResponse returns the current ReportsClientListByProductResponse page.

type ReportsClientListByProductResponse added in v0.3.0

type ReportsClientListByProductResponse struct {
	ReportsClientListByProductResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ReportsClientListByProductResponse contains the response from method ReportsClient.ListByProduct.

type ReportsClientListByProductResult added in v0.3.0

type ReportsClientListByProductResult struct {
	ReportCollection
}

ReportsClientListByProductResult contains the result from method ReportsClient.ListByProduct.

type ReportsClientListByRequestOptions added in v0.3.0

type ReportsClientListByRequestOptions struct {
	// Number of records to skip.
	Skip *int32
	// Number of records to return.
	Top *int32
}

ReportsClientListByRequestOptions contains the optional parameters for the ReportsClient.ListByRequest method.

type ReportsClientListByRequestResponse added in v0.3.0

type ReportsClientListByRequestResponse struct {
	ReportsClientListByRequestResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ReportsClientListByRequestResponse contains the response from method ReportsClient.ListByRequest.

type ReportsClientListByRequestResult added in v0.3.0

type ReportsClientListByRequestResult struct {
	RequestReportCollection
}

ReportsClientListByRequestResult contains the result from method ReportsClient.ListByRequest.

type ReportsClientListBySubscriptionOptions added in v0.3.0

type ReportsClientListBySubscriptionOptions struct {
	// OData order by query option.
	Orderby *string
	// Number of records to skip.
	Skip *int32
	// Number of records to return.
	Top *int32
}

ReportsClientListBySubscriptionOptions contains the optional parameters for the ReportsClient.ListBySubscription method.

type ReportsClientListBySubscriptionPager added in v0.3.0

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

ReportsClientListBySubscriptionPager provides operations for iterating over paged responses.

func (*ReportsClientListBySubscriptionPager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*ReportsClientListBySubscriptionPager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*ReportsClientListBySubscriptionPager) PageResponse added in v0.3.0

PageResponse returns the current ReportsClientListBySubscriptionResponse page.

type ReportsClientListBySubscriptionResponse added in v0.3.0

type ReportsClientListBySubscriptionResponse struct {
	ReportsClientListBySubscriptionResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ReportsClientListBySubscriptionResponse contains the response from method ReportsClient.ListBySubscription.

type ReportsClientListBySubscriptionResult added in v0.3.0

type ReportsClientListBySubscriptionResult struct {
	ReportCollection
}

ReportsClientListBySubscriptionResult contains the result from method ReportsClient.ListBySubscription.

type ReportsClientListByTimeOptions added in v0.3.0

type ReportsClientListByTimeOptions struct {
	// OData order by query option.
	Orderby *string
	// Number of records to skip.
	Skip *int32
	// Number of records to return.
	Top *int32
}

ReportsClientListByTimeOptions contains the optional parameters for the ReportsClient.ListByTime method.

type ReportsClientListByTimePager added in v0.3.0

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

ReportsClientListByTimePager provides operations for iterating over paged responses.

func (*ReportsClientListByTimePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*ReportsClientListByTimePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*ReportsClientListByTimePager) PageResponse added in v0.3.0

PageResponse returns the current ReportsClientListByTimeResponse page.

type ReportsClientListByTimeResponse added in v0.3.0

type ReportsClientListByTimeResponse struct {
	ReportsClientListByTimeResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ReportsClientListByTimeResponse contains the response from method ReportsClient.ListByTime.

type ReportsClientListByTimeResult added in v0.3.0

type ReportsClientListByTimeResult struct {
	ReportCollection
}

ReportsClientListByTimeResult contains the result from method ReportsClient.ListByTime.

type ReportsClientListByUserOptions added in v0.3.0

type ReportsClientListByUserOptions struct {
	// OData order by query option.
	Orderby *string
	// Number of records to skip.
	Skip *int32
	// Number of records to return.
	Top *int32
}

ReportsClientListByUserOptions contains the optional parameters for the ReportsClient.ListByUser method.

type ReportsClientListByUserPager added in v0.3.0

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

ReportsClientListByUserPager provides operations for iterating over paged responses.

func (*ReportsClientListByUserPager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*ReportsClientListByUserPager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*ReportsClientListByUserPager) PageResponse added in v0.3.0

PageResponse returns the current ReportsClientListByUserResponse page.

type ReportsClientListByUserResponse added in v0.3.0

type ReportsClientListByUserResponse struct {
	ReportsClientListByUserResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ReportsClientListByUserResponse contains the response from method ReportsClient.ListByUser.

type ReportsClientListByUserResult added in v0.3.0

type ReportsClientListByUserResult struct {
	ReportCollection
}

ReportsClientListByUserResult contains the result from method ReportsClient.ListByUser.

type RepresentationContract

type RepresentationContract struct {
	// REQUIRED; Specifies a registered or custom content type for this representation, e.g. application/xml.
	ContentType *string `json:"contentType,omitempty"`

	// Exampled defined for the representation.
	Examples map[string]*ParameterExampleContract `json:"examples,omitempty"`

	// Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'..
	FormParameters []*ParameterContract `json:"formParameters,omitempty"`

	// Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.
	SchemaID *string `json:"schemaId,omitempty"`

	// Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded'
	// nor 'multipart/form-data'.
	TypeName *string `json:"typeName,omitempty"`
}

RepresentationContract - Operation request/response representation details.

func (RepresentationContract) MarshalJSON

func (r RepresentationContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RepresentationContract.

type RequestContract

type RequestContract struct {
	// Operation request description.
	Description *string `json:"description,omitempty"`

	// Collection of operation request headers.
	Headers []*ParameterContract `json:"headers,omitempty"`

	// Collection of operation request query parameters.
	QueryParameters []*ParameterContract `json:"queryParameters,omitempty"`

	// Collection of operation request representations.
	Representations []*RepresentationContract `json:"representations,omitempty"`
}

RequestContract - Operation request details.

func (RequestContract) MarshalJSON

func (r RequestContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RequestContract.

type RequestReportCollection

type RequestReportCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// Page values.
	Value []*RequestReportRecordContract `json:"value,omitempty"`
}

RequestReportCollection - Paged Report records list representation.

func (RequestReportCollection) MarshalJSON

func (r RequestReportCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RequestReportCollection.

type RequestReportRecordContract

type RequestReportRecordContract struct {
	// API identifier path. /apis/{apiId}
	APIID *string `json:"apiId,omitempty"`

	// Azure region where the gateway that processed this request is located.
	APIRegion *string `json:"apiRegion,omitempty"`

	// The total time it took to process this request.
	APITime *float64 `json:"apiTime,omitempty"`

	// The HTTP status code received by the gateway as a result of forwarding this request to the backend.
	BackendResponseCode *string `json:"backendResponseCode,omitempty"`

	// Specifies if response cache was involved in generating the response. If the value is none, the cache was not used. If the
	// value is hit, cached response was returned. If the value is miss, the cache
	// was used but lookup resulted in a miss and request was fulfilled by the backend.
	Cache *string `json:"cache,omitempty"`

	// The client IP address associated with this request.
	IPAddress *string `json:"ipAddress,omitempty"`

	// The HTTP method associated with this request..
	Method *string `json:"method,omitempty"`

	// Operation identifier path. /apis/{apiId}/operations/{operationId}
	OperationID *string `json:"operationId,omitempty"`

	// Request Identifier.
	RequestID *string `json:"requestId,omitempty"`

	// The size of this request..
	RequestSize *int32 `json:"requestSize,omitempty"`

	// The HTTP status code returned by the gateway.
	ResponseCode *int32 `json:"responseCode,omitempty"`

	// The size of the response returned by the gateway.
	ResponseSize *int32 `json:"responseSize,omitempty"`

	// he time it took to forward this request to the backend and get the response back.
	ServiceTime *float64 `json:"serviceTime,omitempty"`

	// Subscription identifier path. /subscriptions/{subscriptionId}
	SubscriptionID *string `json:"subscriptionId,omitempty"`

	// The date and time when this request was received by the gateway in ISO 8601 format.
	Timestamp *time.Time `json:"timestamp,omitempty"`

	// The full URL associated with this request.
	URL *string `json:"url,omitempty"`

	// READ-ONLY; Product identifier path. /products/{productId}
	ProductID *string `json:"productId,omitempty" azure:"ro"`

	// READ-ONLY; User identifier path. /users/{userId}
	UserID *string `json:"userId,omitempty" azure:"ro"`
}

RequestReportRecordContract - Request Report data.

func (RequestReportRecordContract) MarshalJSON

func (r RequestReportRecordContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RequestReportRecordContract.

func (*RequestReportRecordContract) UnmarshalJSON

func (r *RequestReportRecordContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RequestReportRecordContract.

type Resource

type Resource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

Resource - Common fields that are returned in the response for all Azure Resource Manager resources

type ResourceLocationDataContract

type ResourceLocationDataContract struct {
	// REQUIRED; A canonical name for the geographic or physical location.
	Name *string `json:"name,omitempty"`

	// The city or locality where the resource is located.
	City *string `json:"city,omitempty"`

	// The country or region where the resource is located.
	CountryOrRegion *string `json:"countryOrRegion,omitempty"`

	// The district, state, or province where the resource is located.
	District *string `json:"district,omitempty"`
}

ResourceLocationDataContract - Resource location data properties.

type ResourceSKU

type ResourceSKU struct {
	// Name of the Sku.
	Name *SKUType `json:"name,omitempty"`
}

ResourceSKU - Describes an available API Management SKU.

type ResourceSKUCapacity

type ResourceSKUCapacity struct {
	// READ-ONLY; The default capacity.
	Default *int32 `json:"default,omitempty" azure:"ro"`

	// READ-ONLY; The maximum capacity that can be set.
	Maximum *int32 `json:"maximum,omitempty" azure:"ro"`

	// READ-ONLY; The minimum capacity.
	Minimum *int32 `json:"minimum,omitempty" azure:"ro"`

	// READ-ONLY; The scale type applicable to the sku.
	ScaleType *ResourceSKUCapacityScaleType `json:"scaleType,omitempty" azure:"ro"`
}

ResourceSKUCapacity - Describes scaling information of a SKU.

type ResourceSKUCapacityScaleType

type ResourceSKUCapacityScaleType string

ResourceSKUCapacityScaleType - The scale type applicable to the sku.

const (
	// ResourceSKUCapacityScaleTypeAutomatic - Supported scale type automatic.
	ResourceSKUCapacityScaleTypeAutomatic ResourceSKUCapacityScaleType = "automatic"
	// ResourceSKUCapacityScaleTypeManual - Supported scale type manual.
	ResourceSKUCapacityScaleTypeManual ResourceSKUCapacityScaleType = "manual"
	// ResourceSKUCapacityScaleTypeNone - Scaling not supported.
	ResourceSKUCapacityScaleTypeNone ResourceSKUCapacityScaleType = "none"
)

func PossibleResourceSKUCapacityScaleTypeValues

func PossibleResourceSKUCapacityScaleTypeValues() []ResourceSKUCapacityScaleType

PossibleResourceSKUCapacityScaleTypeValues returns the possible values for the ResourceSKUCapacityScaleType const type.

func (ResourceSKUCapacityScaleType) ToPtr

ToPtr returns a *ResourceSKUCapacityScaleType pointing to the current value.

type ResourceSKUResult

type ResourceSKUResult struct {
	// READ-ONLY; Specifies the number of API Management units.
	Capacity *ResourceSKUCapacity `json:"capacity,omitempty" azure:"ro"`

	// READ-ONLY; The type of resource the SKU applies to.
	ResourceType *string `json:"resourceType,omitempty" azure:"ro"`

	// READ-ONLY; Specifies API Management SKU.
	SKU *ResourceSKU `json:"sku,omitempty" azure:"ro"`
}

ResourceSKUResult - Describes an available API Management service SKU.

type ResourceSKUResults

type ResourceSKUResults struct {
	// REQUIRED; The list of skus available for the service.
	Value []*ResourceSKUResult `json:"value,omitempty"`

	// The uri to fetch the next page of API Management service Skus.
	NextLink *string `json:"nextLink,omitempty"`
}

ResourceSKUResults - The API Management service SKUs operation response.

func (ResourceSKUResults) MarshalJSON

func (r ResourceSKUResults) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceSKUResults.

type ResponseContract

type ResponseContract struct {
	// REQUIRED; Operation response HTTP status code.
	StatusCode *int32 `json:"statusCode,omitempty"`

	// Operation response description.
	Description *string `json:"description,omitempty"`

	// Collection of operation response headers.
	Headers []*ParameterContract `json:"headers,omitempty"`

	// Collection of operation response representations.
	Representations []*RepresentationContract `json:"representations,omitempty"`
}

ResponseContract - Operation response details.

func (ResponseContract) MarshalJSON

func (r ResponseContract) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResponseContract.

type SKU added in v0.3.0

type SKU struct {
	// READ-ONLY; The api versions that support this SKU.
	APIVersions []*string `json:"apiVersions,omitempty" azure:"ro"`

	// READ-ONLY; A name value pair to describe the capability.
	Capabilities []*SKUCapabilities `json:"capabilities,omitempty" azure:"ro"`

	// READ-ONLY; Specifies the number of virtual machines in the scale set.
	Capacity *SKUCapacity `json:"capacity,omitempty" azure:"ro"`

	// READ-ONLY; Metadata for retrieving price info.
	Costs []*SKUCosts `json:"costs,omitempty" azure:"ro"`

	// READ-ONLY; The Family of this particular SKU.
	Family *string `json:"family,omitempty" azure:"ro"`

	// READ-ONLY; The Kind of resources that are supported in this SKU.
	Kind *string `json:"kind,omitempty" azure:"ro"`

	// READ-ONLY; A list of locations and availability zones in those locations where the SKU is available.
	LocationInfo []*SKULocationInfo `json:"locationInfo,omitempty" azure:"ro"`

	// READ-ONLY; The set of locations that the SKU is available.
	Locations []*string `json:"locations,omitempty" azure:"ro"`

	// READ-ONLY; The name of SKU.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of resource the SKU applies to.
	ResourceType *string `json:"resourceType,omitempty" azure:"ro"`

	// READ-ONLY; The restrictions because of which SKU cannot be used. This is empty if there are no restrictions.
	Restrictions []*SKURestrictions `json:"restrictions,omitempty" azure:"ro"`

	// READ-ONLY; The Size of the SKU.
	Size *string `json:"size,omitempty" azure:"ro"`

	// READ-ONLY; Specifies the tier of virtual machines in a scale set.
	// Possible Values:
	// Standard
	// Basic
	Tier *string `json:"tier,omitempty" azure:"ro"`
}

SKU - Describes an available ApiManagement SKU.

func (SKU) MarshalJSON added in v0.3.0

func (s SKU) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKU.

type SKUCapabilities added in v0.3.0

type SKUCapabilities struct {
	// READ-ONLY; An invariant to describe the feature.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; An invariant if the feature is measured by quantity.
	Value *string `json:"value,omitempty" azure:"ro"`
}

SKUCapabilities - Describes The SKU capabilities object.

type SKUCapacity added in v0.3.0

type SKUCapacity struct {
	// READ-ONLY; The default capacity.
	Default *int32 `json:"default,omitempty" azure:"ro"`

	// READ-ONLY; The maximum capacity that can be set.
	Maximum *int32 `json:"maximum,omitempty" azure:"ro"`

	// READ-ONLY; The minimum capacity.
	Minimum *int32 `json:"minimum,omitempty" azure:"ro"`

	// READ-ONLY; The scale type applicable to the sku.
	ScaleType *APIManagementSKUCapacityScaleType `json:"scaleType,omitempty" azure:"ro"`
}

SKUCapacity - Describes scaling information of a SKU.

type SKUCosts added in v0.3.0

type SKUCosts struct {
	// READ-ONLY; An invariant to show the extended unit.
	ExtendedUnit *string `json:"extendedUnit,omitempty" azure:"ro"`

	// READ-ONLY; Used for querying price from commerce.
	MeterID *string `json:"meterID,omitempty" azure:"ro"`

	// READ-ONLY; The multiplier is needed to extend the base metered cost.
	Quantity *int64 `json:"quantity,omitempty" azure:"ro"`
}

SKUCosts - Describes metadata for retrieving price info.

type SKULocationInfo added in v0.3.0

type SKULocationInfo struct {
	// READ-ONLY; Location of the SKU
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Details of capabilities available to a SKU in specific zones.
	ZoneDetails []*SKUZoneDetails `json:"zoneDetails,omitempty" azure:"ro"`

	// READ-ONLY; List of availability zones where the SKU is supported.
	Zones []*string `json:"zones,omitempty" azure:"ro"`
}

func (SKULocationInfo) MarshalJSON added in v0.3.0

func (s SKULocationInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKULocationInfo.

type SKURestrictionInfo added in v0.3.0

type SKURestrictionInfo struct {
	// READ-ONLY; Locations where the SKU is restricted
	Locations []*string `json:"locations,omitempty" azure:"ro"`

	// READ-ONLY; List of availability zones where the SKU is restricted.
	Zones []*string `json:"zones,omitempty" azure:"ro"`
}

func (SKURestrictionInfo) MarshalJSON added in v0.3.0

func (s SKURestrictionInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKURestrictionInfo.

type SKURestrictions added in v0.3.0

type SKURestrictions struct {
	// READ-ONLY; The reason for restriction.
	ReasonCode *APIManagementSKURestrictionsReasonCode `json:"reasonCode,omitempty" azure:"ro"`

	// READ-ONLY; The information about the restriction where the SKU cannot be used.
	RestrictionInfo *SKURestrictionInfo `json:"restrictionInfo,omitempty" azure:"ro"`

	// READ-ONLY; The type of restrictions.
	Type *APIManagementSKURestrictionsType `json:"type,omitempty" azure:"ro"`

	// READ-ONLY; The value of restrictions. If the restriction type is set to location. This would be different locations where
	// the SKU is restricted.
	Values []*string `json:"values,omitempty" azure:"ro"`
}

SKURestrictions - Describes scaling information of a SKU.

func (SKURestrictions) MarshalJSON added in v0.3.0

func (s SKURestrictions) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKURestrictions.

type SKUType

type SKUType string

SKUType - Name of the Sku.

const (
	// SKUTypeBasic - Basic SKU of Api Management.
	SKUTypeBasic SKUType = "Basic"
	// SKUTypeConsumption - Consumption SKU of Api Management.
	SKUTypeConsumption SKUType = "Consumption"
	// SKUTypeDeveloper - Developer SKU of Api Management.
	SKUTypeDeveloper SKUType = "Developer"
	// SKUTypeIsolated - Isolated SKU of Api Management.
	SKUTypeIsolated SKUType = "Isolated"
	// SKUTypePremium - Premium SKU of Api Management.
	SKUTypePremium SKUType = "Premium"
	// SKUTypeStandard - Standard SKU of Api Management.
	SKUTypeStandard SKUType = "Standard"
)

func PossibleSKUTypeValues

func PossibleSKUTypeValues() []SKUType

PossibleSKUTypeValues returns the possible values for the SKUType const type.

func (SKUType) ToPtr

func (c SKUType) ToPtr() *SKUType

ToPtr returns a *SKUType pointing to the current value.

type SKUZoneDetails added in v0.3.0

type SKUZoneDetails struct {
	// READ-ONLY; A list of capabilities that are available for the SKU in the specified list of zones.
	Capabilities []*SKUCapabilities `json:"capabilities,omitempty" azure:"ro"`

	// READ-ONLY; The set of zones that the SKU is available in with the specified capabilities.
	Name []*string `json:"name,omitempty" azure:"ro"`
}

SKUZoneDetails - Describes The zonal capabilities of a SKU.

func (SKUZoneDetails) MarshalJSON added in v0.3.0

func (s SKUZoneDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKUZoneDetails.

type SKUsClient added in v0.3.0

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

SKUsClient contains the methods for the APIManagementSKUs group. Don't use this type directly, use NewSKUsClient() instead.

func NewSKUsClient added in v0.3.0

func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *SKUsClient

NewSKUsClient creates a new instance of SKUsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*SKUsClient) List added in v0.3.0

func (client *SKUsClient) List(options *SKUsClientListOptions) *SKUsClientListPager

List - Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. If the operation fails it returns an *azcore.ResponseError type. options - SKUsClientListOptions contains the optional parameters for the SKUsClient.List method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListSku.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewSKUsClient("<subscription-id>", cred, nil)
	pager := client.List(nil)
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type SKUsClientListOptions added in v0.3.0

type SKUsClientListOptions struct {
}

SKUsClientListOptions contains the optional parameters for the SKUsClient.List method.

type SKUsClientListPager added in v0.3.0

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

SKUsClientListPager provides operations for iterating over paged responses.

func (*SKUsClientListPager) Err added in v0.3.0

func (p *SKUsClientListPager) Err() error

Err returns the last error encountered while paging.

func (*SKUsClientListPager) NextPage added in v0.3.0

func (p *SKUsClientListPager) NextPage(ctx context.Context) bool

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*SKUsClientListPager) PageResponse added in v0.3.0

func (p *SKUsClientListPager) PageResponse() SKUsClientListResponse

PageResponse returns the current SKUsClientListResponse page.

type SKUsClientListResponse added in v0.3.0

type SKUsClientListResponse struct {
	SKUsClientListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

SKUsClientListResponse contains the response from method SKUsClient.List.

type SKUsClientListResult added in v0.3.0

type SKUsClientListResult struct {
	SKUsResult
}

SKUsClientListResult contains the result from method SKUsClient.List.

type SKUsResult added in v0.3.0

type SKUsResult struct {
	// REQUIRED; The list of skus available for the subscription.
	Value []*SKU `json:"value,omitempty"`

	// READ-ONLY; The URI to fetch the next page of Resource Skus. Call ListNext() with this URI to fetch the next page of Resource
	// Skus
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

SKUsResult - The List Resource Skus operation response.

func (SKUsResult) MarshalJSON added in v0.3.0

func (s SKUsResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKUsResult.

type SamplingSettings

type SamplingSettings struct {
	// Rate of sampling for fixed-rate sampling.
	Percentage *float64 `json:"percentage,omitempty"`

	// Sampling type.
	SamplingType *SamplingType `json:"samplingType,omitempty"`
}

SamplingSettings - Sampling settings for Diagnostic.

type SamplingType

type SamplingType string

SamplingType - Sampling type.

const (
	// SamplingTypeFixed - Fixed-rate sampling.
	SamplingTypeFixed SamplingType = "fixed"
)

func PossibleSamplingTypeValues

func PossibleSamplingTypeValues() []SamplingType

PossibleSamplingTypeValues returns the possible values for the SamplingType const type.

func (SamplingType) ToPtr

func (c SamplingType) ToPtr() *SamplingType

ToPtr returns a *SamplingType pointing to the current value.

type SaveConfigurationParameter

type SaveConfigurationParameter struct {
	// Properties of the Save Configuration Parameters.
	Properties *SaveConfigurationParameterProperties `json:"properties,omitempty"`
}

SaveConfigurationParameter - Save Tenant Configuration Contract details.

type SaveConfigurationParameterProperties

type SaveConfigurationParameterProperties struct {
	// REQUIRED; The name of the Git branch in which to commit the current configuration snapshot.
	Branch *string `json:"branch,omitempty"`

	// The value if true, the current configuration database is committed to the Git repository, even if the Git repository has
	// newer changes that would be overwritten.
	Force *bool `json:"force,omitempty"`
}

SaveConfigurationParameterProperties - Parameters supplied to the Save Tenant Configuration operation.

type SchemaCollection

type SchemaCollection struct {
	// Total record count number.
	Count *int64 `json:"count,omitempty"`

	// READ-ONLY; Next page link if any.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; API Schema Contract value.
	Value []*SchemaContract `json:"value,omitempty" azure:"ro"`
}

SchemaCollection - The response of the list schema operation.

func (SchemaCollection) MarshalJSON

func (s SchemaCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SchemaCollection.

type SchemaContract

type SchemaContract struct {
	// Properties of the API Schema.
	Properties *SchemaContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

SchemaContract - API Schema Contract details.

type SchemaContractProperties

type SchemaContractProperties struct {
	// REQUIRED; Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema
	// document (e.g. application/json, application/xml).
	// - Swagger Schema use application/vnd.ms-azure-apim.swagger.definitions+json
	// - WSDL Schema use application/vnd.ms-azure-apim.xsd+xml
	// - OpenApi Schema use application/vnd.oai.openapi.components+json
	// - WADL Schema use application/vnd.ms-azure-apim.wadl.grammars+xml.
	ContentType *string `json:"contentType,omitempty"`

	// Create or update Properties of the API Schema Document.
	Document *SchemaDocumentProperties `json:"document,omitempty"`
}

SchemaContractProperties - API Schema create or update contract Properties.

type SchemaDocumentProperties

type SchemaDocumentProperties struct {
	// Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise.
	Components map[string]interface{} `json:"components,omitempty"`

	// Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise.
	Definitions map[string]interface{} `json:"definitions,omitempty"`

	// Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI.
	Value *string `json:"value,omitempty"`
}

SchemaDocumentProperties - Api Schema Document Properties.

type SchemaType added in v0.3.0

type SchemaType string

SchemaType - Schema Type. Immutable.

const (
	// SchemaTypeJSON - Json schema type.
	SchemaTypeJSON SchemaType = "json"
	// SchemaTypeXML - Xml schema type.
	SchemaTypeXML SchemaType = "xml"
)

func PossibleSchemaTypeValues added in v0.3.0

func PossibleSchemaTypeValues() []SchemaType

PossibleSchemaTypeValues returns the possible values for the SchemaType const type.

func (SchemaType) ToPtr added in v0.3.0

func (c SchemaType) ToPtr() *SchemaType

ToPtr returns a *SchemaType pointing to the current value.

type ServiceApplyNetworkConfigurationParameters added in v0.3.0

type ServiceApplyNetworkConfigurationParameters struct {
	// Location of the Api Management service to update for a multi-region service. For a service deployed in a single region,
	// this parameter is not required.
	Location *string `json:"location,omitempty"`
}

ServiceApplyNetworkConfigurationParameters - Parameter supplied to the Apply Network configuration operation.

type ServiceBackupRestoreParameters added in v0.3.0

type ServiceBackupRestoreParameters struct {
	// REQUIRED; The name of the backup file to create/retrieve.
	BackupName *string `json:"backupName,omitempty"`

	// REQUIRED; The name of the blob container (used to place/retrieve the backup).
	ContainerName *string `json:"containerName,omitempty"`

	// REQUIRED; The name of the Azure storage account (used to place/retrieve the backup).
	StorageAccount *string `json:"storageAccount,omitempty"`

	// Storage account access key. Required only if accessType is set to AccessKey.
	AccessKey *string `json:"accessKey,omitempty"`

	// The type of access to be used for the storage account.
	AccessType *AccessType `json:"accessType,omitempty"`

	// The Client ID of user assigned managed identity. Required only if accessType is set to UserAssignedManagedIdentity.
	ClientID *string `json:"clientId,omitempty"`
}

ServiceBackupRestoreParameters - Parameters supplied to the Backup/Restore of an API Management service operation.

type ServiceBaseProperties added in v0.3.0

type ServiceBaseProperties struct {
	// Control Plane Apis version constraint for the API Management service.
	APIVersionConstraint *APIVersionConstraint `json:"apiVersionConstraint,omitempty"`

	// Additional datacenter locations of the API Management service.
	AdditionalLocations []*AdditionalLocation `json:"additionalLocations,omitempty"`

	// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed
	// is 10.
	Certificates []*CertificateConfiguration `json:"certificates,omitempty"`

	// Custom properties of the API Management service.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168 will disable the cipher TLSRSAWITH3DESEDECBCSHA
	// for all TLS(1.0, 1.1 and 1.2).
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11 can be used to disable just TLS 1.1.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10 can be used to disable TLS 1.0 on an API
	// Management service.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11 can be used to disable just TLS 1.1
	// for communications with backends.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10 can be used to disable TLS 1.0 for
	// communications with backends.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2 can be used to enable HTTP2 protocol on an
	// API Management service.
	// Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For
	// all the settings except Http2 the default value is True if the service was
	// created on or before April 1st 2018 and False otherwise. Http2 setting's default value is False.
	// You can disable any of next ciphers by using settings Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]:
	// TLSECDHEECDSAWITHAES256CBCSHA, TLSECDHEECDSAWITHAES128CBCSHA, TLS
	// ECDHERSAWITHAES256CBCSHA, TLSECDHERSAWITHAES128CBCSHA, TLSRSAWITHAES128GCMSHA256, TLSRSAWITHAES256CBCSHA256, TLSRSAWITHAES128CBCSHA256,
	// TLSRSAWITHAES256CBCSHA, TLSRSAWITHAES128CBCSHA. For example,
	// Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256:false. The default value
	// is true for them. Note: next ciphers can't be disabled since they are required by
	// Azure CloudService internal components: TLSECDHEECDSAWITHAES256GCMSHA384,TLSECDHEECDSAWITHAES128GCMSHA256,TLSECDHERSAWITHAES256GCMSHA384,TLSECDHERSAWITHAES128GCMSHA256,TLSECDHEECDSAWITHAES256CBC
	// SHA384,TLSECDHEECDSAWITHAES128CBCSHA256,TLSECDHERSAWITHAES256CBCSHA384,TLSECDHERSAWITHAES128CBCSHA256,TLSRSAWITHAES256GCMSHA384
	CustomProperties map[string]*string `json:"customProperties,omitempty"`

	// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway
	// in master region.
	DisableGateway *bool `json:"disableGateway,omitempty"`

	// Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each
	// request to the gateway. This also enables the ability to authenticate the
	// certificate in the policy on the gateway.
	EnableClientCertificate *bool `json:"enableClientCertificate,omitempty"`

	// Custom hostname configuration of the API Management service.
	HostnameConfigurations []*HostnameConfiguration `json:"hostnameConfigurations,omitempty"`

	// Email address from which the notification will be sent.
	NotificationSenderEmail *string `json:"notificationSenderEmail,omitempty"`

	// List of Private Endpoint Connections of this service.
	PrivateEndpointConnections []*RemotePrivateEndpointConnectionWrapper `json:"privateEndpointConnections,omitempty"`

	// Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported
	// only for Developer and Premium SKU being deployed in Virtual Network.
	PublicIPAddressID *string `json:"publicIpAddressId,omitempty"`

	// Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must
	// be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the
	// exclusive access method. Default value is 'Enabled'
	PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`

	// Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other
	// properties will be ignored.
	Restore *bool `json:"restore,omitempty"`

	// Virtual network configuration of the API Management service.
	VirtualNetworkConfiguration *VirtualNetworkConfiguration `json:"virtualNetworkConfiguration,omitempty"`

	// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management
	// service is not part of any Virtual Network, External means the API Management
	// deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management
	// deployment is setup inside a Virtual Network having an Intranet Facing Endpoint
	// only.
	VirtualNetworkType *VirtualNetworkType `json:"virtualNetworkType,omitempty"`

	// READ-ONLY; Creation UTC date of the API Management service.The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ
	// as specified by the ISO 8601 standard.
	CreatedAtUTC *time.Time `json:"createdAtUtc,omitempty" azure:"ro"`

	// READ-ONLY; DEveloper Portal endpoint URL of the API Management service.
	DeveloperPortalURL *string `json:"developerPortalUrl,omitempty" azure:"ro"`

	// READ-ONLY; Gateway URL of the API Management service in the Default Region.
	GatewayRegionalURL *string `json:"gatewayRegionalUrl,omitempty" azure:"ro"`

	// READ-ONLY; Gateway URL of the API Management service.
	GatewayURL *string `json:"gatewayUrl,omitempty" azure:"ro"`

	// READ-ONLY; Management API endpoint URL of the API Management service.
	ManagementAPIURL *string `json:"managementApiUrl,omitempty" azure:"ro"`

	// READ-ONLY; Compute Platform Version running the service in this location.
	PlatformVersion *PlatformVersion `json:"platformVersion,omitempty" azure:"ro"`

	// READ-ONLY; Publisher portal endpoint Url of the API Management service.
	PortalURL *string `json:"portalUrl,omitempty" azure:"ro"`

	// READ-ONLY; Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed
	// in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated
	// SKU.
	PrivateIPAddresses []*string `json:"privateIPAddresses,omitempty" azure:"ro"`

	// READ-ONLY; The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for
	// Basic, Standard, Premium and Isolated SKU.
	PublicIPAddresses []*string `json:"publicIPAddresses,omitempty" azure:"ro"`

	// READ-ONLY; SCM endpoint URL of the API Management service.
	ScmURL *string `json:"scmUrl,omitempty" azure:"ro"`

	// READ-ONLY; The provisioning state of the API Management service, which is targeted by the long running operation started
	// on the service.
	TargetProvisioningState *string `json:"targetProvisioningState,omitempty" azure:"ro"`
}

ServiceBaseProperties - Base Properties of an API Management service resource description.

func (ServiceBaseProperties) MarshalJSON added in v0.3.0

func (s ServiceBaseProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceBaseProperties.

func (*ServiceBaseProperties) UnmarshalJSON added in v0.3.0

func (s *ServiceBaseProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceBaseProperties.

type ServiceCheckNameAvailabilityParameters added in v0.3.0

type ServiceCheckNameAvailabilityParameters struct {
	// REQUIRED; The name to check for availability.
	Name *string `json:"name,omitempty"`
}

ServiceCheckNameAvailabilityParameters - Parameters supplied to the CheckNameAvailability operation.

type ServiceClient added in v0.3.0

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

ServiceClient contains the methods for the APIManagementService group. Don't use this type directly, use NewServiceClient() instead.

func NewServiceClient added in v0.3.0

func NewServiceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ServiceClient

NewServiceClient creates a new instance of ServiceClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ServiceClient) BeginApplyNetworkConfigurationUpdates added in v0.3.0

func (client *ServiceClient) BeginApplyNetworkConfigurationUpdates(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientBeginApplyNetworkConfigurationUpdatesOptions) (ServiceClientApplyNetworkConfigurationUpdatesPollerResponse, error)

BeginApplyNetworkConfigurationUpdates - Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - ServiceClientBeginApplyNetworkConfigurationUpdatesOptions contains the optional parameters for the ServiceClient.BeginApplyNetworkConfigurationUpdates method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementApplyNetworkConfigurationUpdates.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewServiceClient("<subscription-id>", cred, nil)
	poller, err := client.BeginApplyNetworkConfigurationUpdates(ctx,
		"<resource-group-name>",
		"<service-name>",
		&armapimanagement.ServiceClientBeginApplyNetworkConfigurationUpdatesOptions{Parameters: &armapimanagement.ServiceApplyNetworkConfigurationParameters{
			Location: to.StringPtr("<location>"),
		},
		})
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ServiceClientApplyNetworkConfigurationUpdatesResult)
}
Output:

func (*ServiceClient) BeginBackup added in v0.3.0

func (client *ServiceClient) BeginBackup(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceBackupRestoreParameters, options *ServiceClientBeginBackupOptions) (ServiceClientBackupPollerResponse, error)

BeginBackup - Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. parameters - Parameters supplied to the ApiManagementService_Backup operation. options - ServiceClientBeginBackupOptions contains the optional parameters for the ServiceClient.BeginBackup method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementBackupWithAccessKey.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewServiceClient("<subscription-id>", cred, nil)
	poller, err := client.BeginBackup(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.ServiceBackupRestoreParameters{
			AccessKey:      to.StringPtr("<access-key>"),
			AccessType:     armapimanagement.AccessType("AccessKey").ToPtr(),
			BackupName:     to.StringPtr("<backup-name>"),
			ContainerName:  to.StringPtr("<container-name>"),
			StorageAccount: to.StringPtr("<storage-account>"),
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ServiceClientBackupResult)
}
Output:

func (*ServiceClient) BeginCreateOrUpdate added in v0.3.0

func (client *ServiceClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceResource, options *ServiceClientBeginCreateOrUpdateOptions) (ServiceClientCreateOrUpdatePollerResponse, error)

BeginCreateOrUpdate - Creates or updates an API Management service. This is long running operation and could take several minutes to complete. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. parameters - Parameters supplied to the CreateOrUpdate API Management service operation. options - ServiceClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceClient.BeginCreateOrUpdate method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateMultiRegionServiceWithCustomHostname.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewServiceClient("<subscription-id>", cred, nil)
	poller, err := client.BeginCreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.ServiceResource{
			Tags: map[string]*string{
				"tag1": to.StringPtr("value1"),
				"tag2": to.StringPtr("value2"),
				"tag3": to.StringPtr("value3"),
			},
			Location: to.StringPtr("<location>"),
			Properties: &armapimanagement.ServiceProperties{
				AdditionalLocations: []*armapimanagement.AdditionalLocation{
					{
						DisableGateway: to.BoolPtr(true),
						Location:       to.StringPtr("<location>"),
						SKU: &armapimanagement.ServiceSKUProperties{
							Name:     armapimanagement.SKUType("Premium").ToPtr(),
							Capacity: to.Int32Ptr(1),
						},
					}},
				APIVersionConstraint: &armapimanagement.APIVersionConstraint{
					MinAPIVersion: to.StringPtr("<min-apiversion>"),
				},
				HostnameConfigurations: []*armapimanagement.HostnameConfiguration{
					{
						Type:                armapimanagement.HostnameType("Proxy").ToPtr(),
						CertificatePassword: to.StringPtr("<certificate-password>"),
						DefaultSSLBinding:   to.BoolPtr(true),
						EncodedCertificate:  to.StringPtr("<encoded-certificate>"),
						HostName:            to.StringPtr("<host-name>"),
					},
					{
						Type:                armapimanagement.HostnameType("Management").ToPtr(),
						CertificatePassword: to.StringPtr("<certificate-password>"),
						EncodedCertificate:  to.StringPtr("<encoded-certificate>"),
						HostName:            to.StringPtr("<host-name>"),
					},
					{
						Type:                armapimanagement.HostnameType("Portal").ToPtr(),
						CertificatePassword: to.StringPtr("<certificate-password>"),
						EncodedCertificate:  to.StringPtr("<encoded-certificate>"),
						HostName:            to.StringPtr("<host-name>"),
					}},
				VirtualNetworkType: armapimanagement.VirtualNetworkType("None").ToPtr(),
				PublisherEmail:     to.StringPtr("<publisher-email>"),
				PublisherName:      to.StringPtr("<publisher-name>"),
			},
			SKU: &armapimanagement.ServiceSKUProperties{
				Name:     armapimanagement.SKUType("Premium").ToPtr(),
				Capacity: to.Int32Ptr(1),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ServiceClientCreateOrUpdateResult)
}
Output:

func (*ServiceClient) BeginDelete added in v0.3.0

func (client *ServiceClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientBeginDeleteOptions) (ServiceClientDeletePollerResponse, error)

BeginDelete - Deletes an existing API Management service. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - ServiceClientBeginDeleteOptions contains the optional parameters for the ServiceClient.BeginDelete method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceDeleteService.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewServiceClient("<subscription-id>", cred, nil)
	poller, err := client.BeginDelete(ctx,
		"<resource-group-name>",
		"<service-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	_, err = poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*ServiceClient) BeginRestore added in v0.3.0

func (client *ServiceClient) BeginRestore(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceBackupRestoreParameters, options *ServiceClientBeginRestoreOptions) (ServiceClientRestorePollerResponse, error)

BeginRestore - Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. parameters - Parameters supplied to the Restore API Management service from backup operation. options - ServiceClientBeginRestoreOptions contains the optional parameters for the ServiceClient.BeginRestore method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementRestoreWithAccessKey.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewServiceClient("<subscription-id>", cred, nil)
	poller, err := client.BeginRestore(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.ServiceBackupRestoreParameters{
			AccessKey:      to.StringPtr("<access-key>"),
			AccessType:     armapimanagement.AccessType("AccessKey").ToPtr(),
			BackupName:     to.StringPtr("<backup-name>"),
			ContainerName:  to.StringPtr("<container-name>"),
			StorageAccount: to.StringPtr("<storage-account>"),
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ServiceClientRestoreResult)
}
Output:

func (*ServiceClient) BeginUpdate added in v0.3.0

func (client *ServiceClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceUpdateParameters, options *ServiceClientBeginUpdateOptions) (ServiceClientUpdatePollerResponse, error)

BeginUpdate - Updates an existing API Management service. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. parameters - Parameters supplied to the CreateOrUpdate API Management service operation. options - ServiceClientBeginUpdateOptions contains the optional parameters for the ServiceClient.BeginUpdate method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateServiceDisableTls10.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewServiceClient("<subscription-id>", cred, nil)
	poller, err := client.BeginUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.ServiceUpdateParameters{
			Properties: &armapimanagement.ServiceUpdateProperties{
				CustomProperties: map[string]*string{
					"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": to.StringPtr("false"),
				},
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ServiceClientUpdateResult)
}
Output:

func (*ServiceClient) CheckNameAvailability added in v0.3.0

CheckNameAvailability - Checks availability and correctness of a name for an API Management service. If the operation fails it returns an *azcore.ResponseError type. parameters - Parameters supplied to the CheckNameAvailability operation. options - ServiceClientCheckNameAvailabilityOptions contains the optional parameters for the ServiceClient.CheckNameAvailability method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceCheckNameAvailability.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewServiceClient("<subscription-id>", cred, nil)
	res, err := client.CheckNameAvailability(ctx,
		armapimanagement.ServiceCheckNameAvailabilityParameters{
			Name: to.StringPtr("<name>"),
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ServiceClientCheckNameAvailabilityResult)
}
Output:

func (*ServiceClient) Get added in v0.3.0

func (client *ServiceClient) Get(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientGetOptions) (ServiceClientGetResponse, error)

Get - Gets an API Management service resource description. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - ServiceClientGetOptions contains the optional parameters for the ServiceClient.Get method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewServiceClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ServiceClientGetResult)
}
Output:

func (*ServiceClient) GetDomainOwnershipIdentifier added in v0.3.0

GetDomainOwnershipIdentifier - Get the custom domain ownership identifier for an API Management service. If the operation fails it returns an *azcore.ResponseError type. options - ServiceClientGetDomainOwnershipIdentifierOptions contains the optional parameters for the ServiceClient.GetDomainOwnershipIdentifier method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetDomainOwnershipIdentifier.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewServiceClient("<subscription-id>", cred, nil)
	res, err := client.GetDomainOwnershipIdentifier(ctx,
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ServiceClientGetDomainOwnershipIdentifierResult)
}
Output:

func (*ServiceClient) GetSsoToken added in v0.3.0

func (client *ServiceClient) GetSsoToken(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientGetSsoTokenOptions) (ServiceClientGetSsoTokenResponse, error)

GetSsoToken - Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - ServiceClientGetSsoTokenOptions contains the optional parameters for the ServiceClient.GetSsoToken method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetSsoToken.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewServiceClient("<subscription-id>", cred, nil)
	res, err := client.GetSsoToken(ctx,
		"<resource-group-name>",
		"<service-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.ServiceClientGetSsoTokenResult)
}
Output:

func (*ServiceClient) List added in v0.3.0

List - Lists all API Management services within an Azure subscription. If the operation fails it returns an *azcore.ResponseError type. options - ServiceClientListOptions contains the optional parameters for the ServiceClient.List method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListServiceBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewServiceClient("<subscription-id>", cred, nil)
	pager := client.List(nil)
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*ServiceClient) ListByResourceGroup added in v0.3.0

func (client *ServiceClient) ListByResourceGroup(resourceGroupName string, options *ServiceClientListByResourceGroupOptions) *ServiceClientListByResourceGroupPager

ListByResourceGroup - List all API Management services within a resource group. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. options - ServiceClientListByResourceGroupOptions contains the optional parameters for the ServiceClient.ListByResourceGroup method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListServiceBySubscriptionAndResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewServiceClient("<subscription-id>", cred, nil)
	pager := client.ListByResourceGroup("<resource-group-name>",
		nil)
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type ServiceClientApplyNetworkConfigurationUpdatesPoller added in v0.3.0

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

ServiceClientApplyNetworkConfigurationUpdatesPoller provides polling facilities until the operation reaches a terminal state.

func (*ServiceClientApplyNetworkConfigurationUpdatesPoller) Done added in v0.3.0

Done returns true if the LRO has reached a terminal state.

func (*ServiceClientApplyNetworkConfigurationUpdatesPoller) FinalResponse added in v0.3.0

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final ServiceClientApplyNetworkConfigurationUpdatesResponse will be returned.

func (*ServiceClientApplyNetworkConfigurationUpdatesPoller) Poll added in v0.3.0

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*ServiceClientApplyNetworkConfigurationUpdatesPoller) ResumeToken added in v0.3.0

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type ServiceClientApplyNetworkConfigurationUpdatesPollerResponse added in v0.3.0

type ServiceClientApplyNetworkConfigurationUpdatesPollerResponse struct {
	// Poller contains an initialized poller.
	Poller *ServiceClientApplyNetworkConfigurationUpdatesPoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ServiceClientApplyNetworkConfigurationUpdatesPollerResponse contains the response from method ServiceClient.ApplyNetworkConfigurationUpdates.

func (ServiceClientApplyNetworkConfigurationUpdatesPollerResponse) PollUntilDone added in v0.3.0

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*ServiceClientApplyNetworkConfigurationUpdatesPollerResponse) Resume added in v0.3.0

Resume rehydrates a ServiceClientApplyNetworkConfigurationUpdatesPollerResponse from the provided client and resume token.

type ServiceClientApplyNetworkConfigurationUpdatesResponse added in v0.3.0

type ServiceClientApplyNetworkConfigurationUpdatesResponse struct {
	ServiceClientApplyNetworkConfigurationUpdatesResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ServiceClientApplyNetworkConfigurationUpdatesResponse contains the response from method ServiceClient.ApplyNetworkConfigurationUpdates.

type ServiceClientApplyNetworkConfigurationUpdatesResult added in v0.3.0

type ServiceClientApplyNetworkConfigurationUpdatesResult struct {
	ServiceResource
}

ServiceClientApplyNetworkConfigurationUpdatesResult contains the result from method ServiceClient.ApplyNetworkConfigurationUpdates.

type ServiceClientBackupPoller added in v0.3.0

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

ServiceClientBackupPoller provides polling facilities until the operation reaches a terminal state.

func (*ServiceClientBackupPoller) Done added in v0.3.0

func (p *ServiceClientBackupPoller) Done() bool

Done returns true if the LRO has reached a terminal state.

func (*ServiceClientBackupPoller) FinalResponse added in v0.3.0

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final ServiceClientBackupResponse will be returned.

func (*ServiceClientBackupPoller) Poll added in v0.3.0

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*ServiceClientBackupPoller) ResumeToken added in v0.3.0

func (p *ServiceClientBackupPoller) ResumeToken() (string, error)

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type ServiceClientBackupPollerResponse added in v0.3.0

type ServiceClientBackupPollerResponse struct {
	// Poller contains an initialized poller.
	Poller *ServiceClientBackupPoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ServiceClientBackupPollerResponse contains the response from method ServiceClient.Backup.

func (ServiceClientBackupPollerResponse) PollUntilDone added in v0.3.0

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*ServiceClientBackupPollerResponse) Resume added in v0.3.0

Resume rehydrates a ServiceClientBackupPollerResponse from the provided client and resume token.

type ServiceClientBackupResponse added in v0.3.0

type ServiceClientBackupResponse struct {
	ServiceClientBackupResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ServiceClientBackupResponse contains the response from method ServiceClient.Backup.

type ServiceClientBackupResult added in v0.3.0

type ServiceClientBackupResult struct {
	ServiceResource
}

ServiceClientBackupResult contains the result from method ServiceClient.Backup.

type ServiceClientBeginApplyNetworkConfigurationUpdatesOptions added in v0.3.0

type ServiceClientBeginApplyNetworkConfigurationUpdatesOptions struct {
	// Parameters supplied to the Apply Network Configuration operation. If the parameters are empty, all the regions in which
	// the Api Management service is deployed will be updated sequentially without
	// incurring downtime in the region.
	Parameters *ServiceApplyNetworkConfigurationParameters
}

ServiceClientBeginApplyNetworkConfigurationUpdatesOptions contains the optional parameters for the ServiceClient.BeginApplyNetworkConfigurationUpdates method.

type ServiceClientBeginBackupOptions added in v0.3.0

type ServiceClientBeginBackupOptions struct {
}

ServiceClientBeginBackupOptions contains the optional parameters for the ServiceClient.BeginBackup method.

type ServiceClientBeginCreateOrUpdateOptions added in v0.3.0

type ServiceClientBeginCreateOrUpdateOptions struct {
}

ServiceClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceClient.BeginCreateOrUpdate method.

type ServiceClientBeginDeleteOptions added in v0.3.0

type ServiceClientBeginDeleteOptions struct {
}

ServiceClientBeginDeleteOptions contains the optional parameters for the ServiceClient.BeginDelete method.

type ServiceClientBeginRestoreOptions added in v0.3.0

type ServiceClientBeginRestoreOptions struct {
}

ServiceClientBeginRestoreOptions contains the optional parameters for the ServiceClient.BeginRestore method.

type ServiceClientBeginUpdateOptions added in v0.3.0

type ServiceClientBeginUpdateOptions struct {
}

ServiceClientBeginUpdateOptions contains the optional parameters for the ServiceClient.BeginUpdate method.

type ServiceClientCheckNameAvailabilityOptions added in v0.3.0

type ServiceClientCheckNameAvailabilityOptions struct {
}

ServiceClientCheckNameAvailabilityOptions contains the optional parameters for the ServiceClient.CheckNameAvailability method.

type ServiceClientCheckNameAvailabilityResponse added in v0.3.0

type ServiceClientCheckNameAvailabilityResponse struct {
	ServiceClientCheckNameAvailabilityResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ServiceClientCheckNameAvailabilityResponse contains the response from method ServiceClient.CheckNameAvailability.

type ServiceClientCheckNameAvailabilityResult added in v0.3.0

type ServiceClientCheckNameAvailabilityResult struct {
	ServiceNameAvailabilityResult
}

ServiceClientCheckNameAvailabilityResult contains the result from method ServiceClient.CheckNameAvailability.

type ServiceClientCreateOrUpdatePoller added in v0.3.0

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

ServiceClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state.

func (*ServiceClientCreateOrUpdatePoller) Done added in v0.3.0

Done returns true if the LRO has reached a terminal state.

func (*ServiceClientCreateOrUpdatePoller) FinalResponse added in v0.3.0

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final ServiceClientCreateOrUpdateResponse will be returned.

func (*ServiceClientCreateOrUpdatePoller) Poll added in v0.3.0

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*ServiceClientCreateOrUpdatePoller) ResumeToken added in v0.3.0

func (p *ServiceClientCreateOrUpdatePoller) ResumeToken() (string, error)

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type ServiceClientCreateOrUpdatePollerResponse added in v0.3.0

type ServiceClientCreateOrUpdatePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *ServiceClientCreateOrUpdatePoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ServiceClientCreateOrUpdatePollerResponse contains the response from method ServiceClient.CreateOrUpdate.

func (ServiceClientCreateOrUpdatePollerResponse) PollUntilDone added in v0.3.0

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*ServiceClientCreateOrUpdatePollerResponse) Resume added in v0.3.0

Resume rehydrates a ServiceClientCreateOrUpdatePollerResponse from the provided client and resume token.

type ServiceClientCreateOrUpdateResponse added in v0.3.0

type ServiceClientCreateOrUpdateResponse struct {
	ServiceClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ServiceClientCreateOrUpdateResponse contains the response from method ServiceClient.CreateOrUpdate.

type ServiceClientCreateOrUpdateResult added in v0.3.0

type ServiceClientCreateOrUpdateResult struct {
	ServiceResource
}

ServiceClientCreateOrUpdateResult contains the result from method ServiceClient.CreateOrUpdate.

type ServiceClientDeletePoller added in v0.3.0

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

ServiceClientDeletePoller provides polling facilities until the operation reaches a terminal state.

func (*ServiceClientDeletePoller) Done added in v0.3.0

func (p *ServiceClientDeletePoller) Done() bool

Done returns true if the LRO has reached a terminal state.

func (*ServiceClientDeletePoller) FinalResponse added in v0.3.0

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final ServiceClientDeleteResponse will be returned.

func (*ServiceClientDeletePoller) Poll added in v0.3.0

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*ServiceClientDeletePoller) ResumeToken added in v0.3.0

func (p *ServiceClientDeletePoller) ResumeToken() (string, error)

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type ServiceClientDeletePollerResponse added in v0.3.0

type ServiceClientDeletePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *ServiceClientDeletePoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ServiceClientDeletePollerResponse contains the response from method ServiceClient.Delete.

func (ServiceClientDeletePollerResponse) PollUntilDone added in v0.3.0

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*ServiceClientDeletePollerResponse) Resume added in v0.3.0

Resume rehydrates a ServiceClientDeletePollerResponse from the provided client and resume token.

type ServiceClientDeleteResponse added in v0.3.0

type ServiceClientDeleteResponse struct {
	ServiceClientDeleteResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ServiceClientDeleteResponse contains the response from method ServiceClient.Delete.

type ServiceClientDeleteResult added in v0.3.0

type ServiceClientDeleteResult struct {
	ServiceResource
}

ServiceClientDeleteResult contains the result from method ServiceClient.Delete.

type ServiceClientGetDomainOwnershipIdentifierOptions added in v0.3.0

type ServiceClientGetDomainOwnershipIdentifierOptions struct {
}

ServiceClientGetDomainOwnershipIdentifierOptions contains the optional parameters for the ServiceClient.GetDomainOwnershipIdentifier method.

type ServiceClientGetDomainOwnershipIdentifierResponse added in v0.3.0

type ServiceClientGetDomainOwnershipIdentifierResponse struct {
	ServiceClientGetDomainOwnershipIdentifierResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ServiceClientGetDomainOwnershipIdentifierResponse contains the response from method ServiceClient.GetDomainOwnershipIdentifier.

type ServiceClientGetDomainOwnershipIdentifierResult added in v0.3.0

type ServiceClientGetDomainOwnershipIdentifierResult struct {
	ServiceGetDomainOwnershipIdentifierResult
}

ServiceClientGetDomainOwnershipIdentifierResult contains the result from method ServiceClient.GetDomainOwnershipIdentifier.

type ServiceClientGetOptions added in v0.3.0

type ServiceClientGetOptions struct {
}

ServiceClientGetOptions contains the optional parameters for the ServiceClient.Get method.

type ServiceClientGetResponse added in v0.3.0

type ServiceClientGetResponse struct {
	ServiceClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ServiceClientGetResponse contains the response from method ServiceClient.Get.

type ServiceClientGetResult added in v0.3.0

type ServiceClientGetResult struct {
	ServiceResource
}

ServiceClientGetResult contains the result from method ServiceClient.Get.

type ServiceClientGetSsoTokenOptions added in v0.3.0

type ServiceClientGetSsoTokenOptions struct {
}

ServiceClientGetSsoTokenOptions contains the optional parameters for the ServiceClient.GetSsoToken method.

type ServiceClientGetSsoTokenResponse added in v0.3.0

type ServiceClientGetSsoTokenResponse struct {
	ServiceClientGetSsoTokenResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ServiceClientGetSsoTokenResponse contains the response from method ServiceClient.GetSsoToken.

type ServiceClientGetSsoTokenResult added in v0.3.0

type ServiceClientGetSsoTokenResult struct {
	ServiceGetSsoTokenResult
}

ServiceClientGetSsoTokenResult contains the result from method ServiceClient.GetSsoToken.

type ServiceClientListByResourceGroupOptions added in v0.3.0

type ServiceClientListByResourceGroupOptions struct {
}

ServiceClientListByResourceGroupOptions contains the optional parameters for the ServiceClient.ListByResourceGroup method.

type ServiceClientListByResourceGroupPager added in v0.3.0

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

ServiceClientListByResourceGroupPager provides operations for iterating over paged responses.

func (*ServiceClientListByResourceGroupPager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*ServiceClientListByResourceGroupPager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*ServiceClientListByResourceGroupPager) PageResponse added in v0.3.0

PageResponse returns the current ServiceClientListByResourceGroupResponse page.

type ServiceClientListByResourceGroupResponse added in v0.3.0

type ServiceClientListByResourceGroupResponse struct {
	ServiceClientListByResourceGroupResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ServiceClientListByResourceGroupResponse contains the response from method ServiceClient.ListByResourceGroup.

type ServiceClientListByResourceGroupResult added in v0.3.0

type ServiceClientListByResourceGroupResult struct {
	ServiceListResult
}

ServiceClientListByResourceGroupResult contains the result from method ServiceClient.ListByResourceGroup.

type ServiceClientListOptions added in v0.3.0

type ServiceClientListOptions struct {
}

ServiceClientListOptions contains the optional parameters for the ServiceClient.List method.

type ServiceClientListPager added in v0.3.0

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

ServiceClientListPager provides operations for iterating over paged responses.

func (*ServiceClientListPager) Err added in v0.3.0

func (p *ServiceClientListPager) Err() error

Err returns the last error encountered while paging.

func (*ServiceClientListPager) NextPage added in v0.3.0

func (p *ServiceClientListPager) NextPage(ctx context.Context) bool

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*ServiceClientListPager) PageResponse added in v0.3.0

PageResponse returns the current ServiceClientListResponse page.

type ServiceClientListResponse added in v0.3.0

type ServiceClientListResponse struct {
	ServiceClientListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ServiceClientListResponse contains the response from method ServiceClient.List.

type ServiceClientListResult added in v0.3.0

type ServiceClientListResult struct {
	ServiceListResult
}

ServiceClientListResult contains the result from method ServiceClient.List.

type ServiceClientRestorePoller added in v0.3.0

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

ServiceClientRestorePoller provides polling facilities until the operation reaches a terminal state.

func (*ServiceClientRestorePoller) Done added in v0.3.0

func (p *ServiceClientRestorePoller) Done() bool

Done returns true if the LRO has reached a terminal state.

func (*ServiceClientRestorePoller) FinalResponse added in v0.3.0

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final ServiceClientRestoreResponse will be returned.

func (*ServiceClientRestorePoller) Poll added in v0.3.0

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*ServiceClientRestorePoller) ResumeToken added in v0.3.0

func (p *ServiceClientRestorePoller) ResumeToken() (string, error)

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type ServiceClientRestorePollerResponse added in v0.3.0

type ServiceClientRestorePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *ServiceClientRestorePoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ServiceClientRestorePollerResponse contains the response from method ServiceClient.Restore.

func (ServiceClientRestorePollerResponse) PollUntilDone added in v0.3.0

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*ServiceClientRestorePollerResponse) Resume added in v0.3.0

Resume rehydrates a ServiceClientRestorePollerResponse from the provided client and resume token.

type ServiceClientRestoreResponse added in v0.3.0

type ServiceClientRestoreResponse struct {
	ServiceClientRestoreResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ServiceClientRestoreResponse contains the response from method ServiceClient.Restore.

type ServiceClientRestoreResult added in v0.3.0

type ServiceClientRestoreResult struct {
	ServiceResource
}

ServiceClientRestoreResult contains the result from method ServiceClient.Restore.

type ServiceClientUpdatePoller added in v0.3.0

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

ServiceClientUpdatePoller provides polling facilities until the operation reaches a terminal state.

func (*ServiceClientUpdatePoller) Done added in v0.3.0

func (p *ServiceClientUpdatePoller) Done() bool

Done returns true if the LRO has reached a terminal state.

func (*ServiceClientUpdatePoller) FinalResponse added in v0.3.0

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final ServiceClientUpdateResponse will be returned.

func (*ServiceClientUpdatePoller) Poll added in v0.3.0

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*ServiceClientUpdatePoller) ResumeToken added in v0.3.0

func (p *ServiceClientUpdatePoller) ResumeToken() (string, error)

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type ServiceClientUpdatePollerResponse added in v0.3.0

type ServiceClientUpdatePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *ServiceClientUpdatePoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ServiceClientUpdatePollerResponse contains the response from method ServiceClient.Update.

func (ServiceClientUpdatePollerResponse) PollUntilDone added in v0.3.0

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*ServiceClientUpdatePollerResponse) Resume added in v0.3.0

Resume rehydrates a ServiceClientUpdatePollerResponse from the provided client and resume token.

type ServiceClientUpdateResponse added in v0.3.0

type ServiceClientUpdateResponse struct {
	ServiceClientUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ServiceClientUpdateResponse contains the response from method ServiceClient.Update.

type ServiceClientUpdateResult added in v0.3.0

type ServiceClientUpdateResult struct {
	ServiceResource
}

ServiceClientUpdateResult contains the result from method ServiceClient.Update.

type ServiceGetDomainOwnershipIdentifierResult added in v0.3.0

type ServiceGetDomainOwnershipIdentifierResult struct {
	// READ-ONLY; The domain ownership identifier value.
	DomainOwnershipIdentifier *string `json:"domainOwnershipIdentifier,omitempty" azure:"ro"`
}

ServiceGetDomainOwnershipIdentifierResult - Response of the GetDomainOwnershipIdentifier operation.

type ServiceGetSsoTokenResult added in v0.3.0

type ServiceGetSsoTokenResult struct {
	// Redirect URL to the Publisher Portal containing the SSO token.
	RedirectURI *string `json:"redirectUri,omitempty"`
}

ServiceGetSsoTokenResult - The response of the GetSsoToken operation.

type ServiceIdentity added in v0.3.0

type ServiceIdentity struct {
	// REQUIRED; The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly
	// created identity and a set of user assigned identities. The type 'None' will remove any
	// identities from the service.
	Type *ApimIdentityType `json:"type,omitempty"`

	// The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource
	// ids in the form:
	// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
	UserAssignedIdentities map[string]*UserIdentityProperties `json:"userAssignedIdentities,omitempty"`

	// READ-ONLY; The principal id of the identity.
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`

	// READ-ONLY; The client tenant id of the identity.
	TenantID *string `json:"tenantId,omitempty" azure:"ro"`
}

ServiceIdentity - Identity properties of the Api Management service resource.

func (ServiceIdentity) MarshalJSON added in v0.3.0

func (s ServiceIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceIdentity.

type ServiceListResult added in v0.3.0

type ServiceListResult struct {
	// REQUIRED; Result of the List API Management services operation.
	Value []*ServiceResource `json:"value,omitempty"`

	// Link to the next set of results. Not empty if Value contains incomplete list of API Management services.
	NextLink *string `json:"nextLink,omitempty"`
}

ServiceListResult - The response of the List API Management services operation.

func (ServiceListResult) MarshalJSON added in v0.3.0

func (s ServiceListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceListResult.

type ServiceNameAvailabilityResult added in v0.3.0

type ServiceNameAvailabilityResult struct {
	// Invalid indicates the name provided does not match the resource provider’s naming requirements (incorrect length, unsupported
	// characters, etc.) AlreadyExists indicates that the name is already in use
	// and is therefore unavailable.
	Reason *NameAvailabilityReason `json:"reason,omitempty"`

	// READ-ONLY; If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource
	// naming requirements so that the user can select a valid name. If reason == AlreadyExists,
	// explain that is already in use, and direct them to select a different name.
	Message *string `json:"message,omitempty" azure:"ro"`

	// READ-ONLY; True if the name is available and can be used to create a new API Management service; otherwise false.
	NameAvailable *bool `json:"nameAvailable,omitempty" azure:"ro"`
}

ServiceNameAvailabilityResult - Response of the CheckNameAvailability operation.

type ServiceProperties added in v0.3.0

type ServiceProperties struct {
	// REQUIRED; Publisher email.
	PublisherEmail *string `json:"publisherEmail,omitempty"`

	// REQUIRED; Publisher name.
	PublisherName *string `json:"publisherName,omitempty"`

	// Control Plane Apis version constraint for the API Management service.
	APIVersionConstraint *APIVersionConstraint `json:"apiVersionConstraint,omitempty"`

	// Additional datacenter locations of the API Management service.
	AdditionalLocations []*AdditionalLocation `json:"additionalLocations,omitempty"`

	// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed
	// is 10.
	Certificates []*CertificateConfiguration `json:"certificates,omitempty"`

	// Custom properties of the API Management service.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168 will disable the cipher TLSRSAWITH3DESEDECBCSHA
	// for all TLS(1.0, 1.1 and 1.2).
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11 can be used to disable just TLS 1.1.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10 can be used to disable TLS 1.0 on an API
	// Management service.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11 can be used to disable just TLS 1.1
	// for communications with backends.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10 can be used to disable TLS 1.0 for
	// communications with backends.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2 can be used to enable HTTP2 protocol on an
	// API Management service.
	// Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For
	// all the settings except Http2 the default value is True if the service was
	// created on or before April 1st 2018 and False otherwise. Http2 setting's default value is False.
	// You can disable any of next ciphers by using settings Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]:
	// TLSECDHEECDSAWITHAES256CBCSHA, TLSECDHEECDSAWITHAES128CBCSHA, TLS
	// ECDHERSAWITHAES256CBCSHA, TLSECDHERSAWITHAES128CBCSHA, TLSRSAWITHAES128GCMSHA256, TLSRSAWITHAES256CBCSHA256, TLSRSAWITHAES128CBCSHA256,
	// TLSRSAWITHAES256CBCSHA, TLSRSAWITHAES128CBCSHA. For example,
	// Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256:false. The default value
	// is true for them. Note: next ciphers can't be disabled since they are required by
	// Azure CloudService internal components: TLSECDHEECDSAWITHAES256GCMSHA384,TLSECDHEECDSAWITHAES128GCMSHA256,TLSECDHERSAWITHAES256GCMSHA384,TLSECDHERSAWITHAES128GCMSHA256,TLSECDHEECDSAWITHAES256CBC
	// SHA384,TLSECDHEECDSAWITHAES128CBCSHA256,TLSECDHERSAWITHAES256CBCSHA384,TLSECDHERSAWITHAES128CBCSHA256,TLSRSAWITHAES256GCMSHA384
	CustomProperties map[string]*string `json:"customProperties,omitempty"`

	// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway
	// in master region.
	DisableGateway *bool `json:"disableGateway,omitempty"`

	// Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each
	// request to the gateway. This also enables the ability to authenticate the
	// certificate in the policy on the gateway.
	EnableClientCertificate *bool `json:"enableClientCertificate,omitempty"`

	// Custom hostname configuration of the API Management service.
	HostnameConfigurations []*HostnameConfiguration `json:"hostnameConfigurations,omitempty"`

	// Email address from which the notification will be sent.
	NotificationSenderEmail *string `json:"notificationSenderEmail,omitempty"`

	// List of Private Endpoint Connections of this service.
	PrivateEndpointConnections []*RemotePrivateEndpointConnectionWrapper `json:"privateEndpointConnections,omitempty"`

	// Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported
	// only for Developer and Premium SKU being deployed in Virtual Network.
	PublicIPAddressID *string `json:"publicIpAddressId,omitempty"`

	// Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must
	// be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the
	// exclusive access method. Default value is 'Enabled'
	PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`

	// Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other
	// properties will be ignored.
	Restore *bool `json:"restore,omitempty"`

	// Virtual network configuration of the API Management service.
	VirtualNetworkConfiguration *VirtualNetworkConfiguration `json:"virtualNetworkConfiguration,omitempty"`

	// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management
	// service is not part of any Virtual Network, External means the API Management
	// deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management
	// deployment is setup inside a Virtual Network having an Intranet Facing Endpoint
	// only.
	VirtualNetworkType *VirtualNetworkType `json:"virtualNetworkType,omitempty"`

	// READ-ONLY; Creation UTC date of the API Management service.The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ
	// as specified by the ISO 8601 standard.
	CreatedAtUTC *time.Time `json:"createdAtUtc,omitempty" azure:"ro"`

	// READ-ONLY; DEveloper Portal endpoint URL of the API Management service.
	DeveloperPortalURL *string `json:"developerPortalUrl,omitempty" azure:"ro"`

	// READ-ONLY; Gateway URL of the API Management service in the Default Region.
	GatewayRegionalURL *string `json:"gatewayRegionalUrl,omitempty" azure:"ro"`

	// READ-ONLY; Gateway URL of the API Management service.
	GatewayURL *string `json:"gatewayUrl,omitempty" azure:"ro"`

	// READ-ONLY; Management API endpoint URL of the API Management service.
	ManagementAPIURL *string `json:"managementApiUrl,omitempty" azure:"ro"`

	// READ-ONLY; Compute Platform Version running the service in this location.
	PlatformVersion *PlatformVersion `json:"platformVersion,omitempty" azure:"ro"`

	// READ-ONLY; Publisher portal endpoint Url of the API Management service.
	PortalURL *string `json:"portalUrl,omitempty" azure:"ro"`

	// READ-ONLY; Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed
	// in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated
	// SKU.
	PrivateIPAddresses []*string `json:"privateIPAddresses,omitempty" azure:"ro"`

	// READ-ONLY; The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for
	// Basic, Standard, Premium and Isolated SKU.
	PublicIPAddresses []*string `json:"publicIPAddresses,omitempty" azure:"ro"`

	// READ-ONLY; SCM endpoint URL of the API Management service.
	ScmURL *string `json:"scmUrl,omitempty" azure:"ro"`

	// READ-ONLY; The provisioning state of the API Management service, which is targeted by the long running operation started
	// on the service.
	TargetProvisioningState *string `json:"targetProvisioningState,omitempty" azure:"ro"`
}

ServiceProperties - Properties of an API Management service resource description.

func (ServiceProperties) MarshalJSON added in v0.3.0

func (s ServiceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceProperties.

func (*ServiceProperties) UnmarshalJSON added in v0.3.0

func (s *ServiceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceProperties.

type ServiceResource added in v0.3.0

type ServiceResource struct {
	// REQUIRED; Resource location.
	Location *string `json:"location,omitempty"`

	// REQUIRED; Properties of the API Management service.
	Properties *ServiceProperties `json:"properties,omitempty"`

	// REQUIRED; SKU properties of the API Management service.
	SKU *ServiceSKUProperties `json:"sku,omitempty"`

	// Managed service identity of the Api Management service.
	Identity *ServiceIdentity `json:"identity,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// A list of availability zones denoting where the resource needs to come from.
	Zones []*string `json:"zones,omitempty"`

	// READ-ONLY; ETag of the resource.
	Etag *string `json:"etag,omitempty" azure:"ro"`

	// READ-ONLY; Resource ID.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Resource type for API Management resource is set to Microsoft.ApiManagement.
	Type *string `json:"type,omitempty" azure:"ro"`
}

ServiceResource - A single API Management service resource in List or Get response.

func (ServiceResource) MarshalJSON added in v0.3.0

func (s ServiceResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceResource.

type ServiceSKUProperties added in v0.3.0

type ServiceSKUProperties struct {
	// REQUIRED; Capacity of the SKU (number of deployed units of the SKU). For Consumption SKU capacity must be specified as
	// 0.
	Capacity *int32 `json:"capacity,omitempty"`

	// REQUIRED; Name of the Sku.
	Name *SKUType `json:"name,omitempty"`
}

ServiceSKUProperties - API Management service resource SKU properties.

type ServiceSKUsClient added in v0.3.0

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

ServiceSKUsClient contains the methods for the APIManagementServiceSKUs group. Don't use this type directly, use NewServiceSKUsClient() instead.

func NewServiceSKUsClient added in v0.3.0

func NewServiceSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ServiceSKUsClient

NewServiceSKUsClient creates a new instance of ServiceSKUsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ServiceSKUsClient) ListAvailableServiceSKUs added in v0.3.0

func (client *ServiceSKUsClient) ListAvailableServiceSKUs(resourceGroupName string, serviceName string, options *ServiceSKUsClientListAvailableServiceSKUsOptions) *ServiceSKUsClientListAvailableServiceSKUsPager

ListAvailableServiceSKUs - Gets all available SKU for a given API Management service If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - ServiceSKUsClientListAvailableServiceSKUsOptions contains the optional parameters for the ServiceSKUsClient.ListAvailableServiceSKUs method.

type ServiceSKUsClientListAvailableServiceSKUsOptions added in v0.3.0

type ServiceSKUsClientListAvailableServiceSKUsOptions struct {
}

ServiceSKUsClientListAvailableServiceSKUsOptions contains the optional parameters for the ServiceSKUsClient.ListAvailableServiceSKUs method.

type ServiceSKUsClientListAvailableServiceSKUsPager added in v0.3.0

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

ServiceSKUsClientListAvailableServiceSKUsPager provides operations for iterating over paged responses.

func (*ServiceSKUsClientListAvailableServiceSKUsPager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*ServiceSKUsClientListAvailableServiceSKUsPager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*ServiceSKUsClientListAvailableServiceSKUsPager) PageResponse added in v0.3.0

PageResponse returns the current ServiceSKUsClientListAvailableServiceSKUsResponse page.

type ServiceSKUsClientListAvailableServiceSKUsResponse added in v0.3.0

type ServiceSKUsClientListAvailableServiceSKUsResponse struct {
	ServiceSKUsClientListAvailableServiceSKUsResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

ServiceSKUsClientListAvailableServiceSKUsResponse contains the response from method ServiceSKUsClient.ListAvailableServiceSKUs.

type ServiceSKUsClientListAvailableServiceSKUsResult added in v0.3.0

type ServiceSKUsClientListAvailableServiceSKUsResult struct {
	ResourceSKUResults
}

ServiceSKUsClientListAvailableServiceSKUsResult contains the result from method ServiceSKUsClient.ListAvailableServiceSKUs.

type ServiceUpdateParameters added in v0.3.0

type ServiceUpdateParameters struct {
	// Managed service identity of the Api Management service.
	Identity *ServiceIdentity `json:"identity,omitempty"`

	// Properties of the API Management service.
	Properties *ServiceUpdateProperties `json:"properties,omitempty"`

	// SKU properties of the API Management service.
	SKU *ServiceSKUProperties `json:"sku,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// A list of availability zones denoting where the resource needs to come from.
	Zones []*string `json:"zones,omitempty"`

	// READ-ONLY; ETag of the resource.
	Etag *string `json:"etag,omitempty" azure:"ro"`

	// READ-ONLY; Resource ID.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Resource type for API Management resource is set to Microsoft.ApiManagement.
	Type *string `json:"type,omitempty" azure:"ro"`
}

ServiceUpdateParameters - Parameter supplied to Update Api Management Service.

func (ServiceUpdateParameters) MarshalJSON added in v0.3.0

func (s ServiceUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceUpdateParameters.

type ServiceUpdateProperties added in v0.3.0

type ServiceUpdateProperties struct {
	// Control Plane Apis version constraint for the API Management service.
	APIVersionConstraint *APIVersionConstraint `json:"apiVersionConstraint,omitempty"`

	// Additional datacenter locations of the API Management service.
	AdditionalLocations []*AdditionalLocation `json:"additionalLocations,omitempty"`

	// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed
	// is 10.
	Certificates []*CertificateConfiguration `json:"certificates,omitempty"`

	// Custom properties of the API Management service.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168 will disable the cipher TLSRSAWITH3DESEDECBCSHA
	// for all TLS(1.0, 1.1 and 1.2).
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11 can be used to disable just TLS 1.1.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10 can be used to disable TLS 1.0 on an API
	// Management service.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11 can be used to disable just TLS 1.1
	// for communications with backends.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10 can be used to disable TLS 1.0 for
	// communications with backends.
	// Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2 can be used to enable HTTP2 protocol on an
	// API Management service.
	// Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For
	// all the settings except Http2 the default value is True if the service was
	// created on or before April 1st 2018 and False otherwise. Http2 setting's default value is False.
	// You can disable any of next ciphers by using settings Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]:
	// TLSECDHEECDSAWITHAES256CBCSHA, TLSECDHEECDSAWITHAES128CBCSHA, TLS
	// ECDHERSAWITHAES256CBCSHA, TLSECDHERSAWITHAES128CBCSHA, TLSRSAWITHAES128GCMSHA256, TLSRSAWITHAES256CBCSHA256, TLSRSAWITHAES128CBCSHA256,
	// TLSRSAWITHAES256CBCSHA, TLSRSAWITHAES128CBCSHA. For example,
	// Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256:false. The default value
	// is true for them. Note: next ciphers can't be disabled since they are required by
	// Azure CloudService internal components: TLSECDHEECDSAWITHAES256GCMSHA384,TLSECDHEECDSAWITHAES128GCMSHA256,TLSECDHERSAWITHAES256GCMSHA384,TLSECDHERSAWITHAES128GCMSHA256,TLSECDHEECDSAWITHAES256CBC
	// SHA384,TLSECDHEECDSAWITHAES128CBCSHA256,TLSECDHERSAWITHAES256CBCSHA384,TLSECDHERSAWITHAES128CBCSHA256,TLSRSAWITHAES256GCMSHA384
	CustomProperties map[string]*string `json:"customProperties,omitempty"`

	// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway
	// in master region.
	DisableGateway *bool `json:"disableGateway,omitempty"`

	// Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each
	// request to the gateway. This also enables the ability to authenticate the
	// certificate in the policy on the gateway.
	EnableClientCertificate *bool `json:"enableClientCertificate,omitempty"`

	// Custom hostname configuration of the API Management service.
	HostnameConfigurations []*HostnameConfiguration `json:"hostnameConfigurations,omitempty"`

	// Email address from which the notification will be sent.
	NotificationSenderEmail *string `json:"notificationSenderEmail,omitempty"`

	// List of Private Endpoint Connections of this service.
	PrivateEndpointConnections []*RemotePrivateEndpointConnectionWrapper `json:"privateEndpointConnections,omitempty"`

	// Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported
	// only for Developer and Premium SKU being deployed in Virtual Network.
	PublicIPAddressID *string `json:"publicIpAddressId,omitempty"`

	// Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must
	// be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the
	// exclusive access method. Default value is 'Enabled'
	PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`

	// Publisher email.
	PublisherEmail *string `json:"publisherEmail,omitempty"`

	// Publisher name.
	PublisherName *string `json:"publisherName,omitempty"`

	// Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other
	// properties will be ignored.
	Restore *bool `json:"restore,omitempty"`

	// Virtual network configuration of the API Management service.
	VirtualNetworkConfiguration *VirtualNetworkConfiguration `json:"virtualNetworkConfiguration,omitempty"`

	// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management
	// service is not part of any Virtual Network, External means the API Management
	// deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management
	// deployment is setup inside a Virtual Network having an Intranet Facing Endpoint
	// only.
	VirtualNetworkType *VirtualNetworkType `json:"virtualNetworkType,omitempty"`

	// READ-ONLY; Creation UTC date of the API Management service.The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ
	// as specified by the ISO 8601 standard.
	CreatedAtUTC *time.Time `json:"createdAtUtc,omitempty" azure:"ro"`

	// READ-ONLY; DEveloper Portal endpoint URL of the API Management service.
	DeveloperPortalURL *string `json:"developerPortalUrl,omitempty" azure:"ro"`

	// READ-ONLY; Gateway URL of the API Management service in the Default Region.
	GatewayRegionalURL *string `json:"gatewayRegionalUrl,omitempty" azure:"ro"`

	// READ-ONLY; Gateway URL of the API Management service.
	GatewayURL *string `json:"gatewayUrl,omitempty" azure:"ro"`

	// READ-ONLY; Management API endpoint URL of the API Management service.
	ManagementAPIURL *string `json:"managementApiUrl,omitempty" azure:"ro"`

	// READ-ONLY; Compute Platform Version running the service in this location.
	PlatformVersion *PlatformVersion `json:"platformVersion,omitempty" azure:"ro"`

	// READ-ONLY; Publisher portal endpoint Url of the API Management service.
	PortalURL *string `json:"portalUrl,omitempty" azure:"ro"`

	// READ-ONLY; Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed
	// in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated
	// SKU.
	PrivateIPAddresses []*string `json:"privateIPAddresses,omitempty" azure:"ro"`

	// READ-ONLY; The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for
	// Basic, Standard, Premium and Isolated SKU.
	PublicIPAddresses []*string `json:"publicIPAddresses,omitempty" azure:"ro"`

	// READ-ONLY; SCM endpoint URL of the API Management service.
	ScmURL *string `json:"scmUrl,omitempty" azure:"ro"`

	// READ-ONLY; The provisioning state of the API Management service, which is targeted by the long running operation started
	// on the service.
	TargetProvisioningState *string `json:"targetProvisioningState,omitempty" azure:"ro"`
}

ServiceUpdateProperties - Properties of an API Management service resource description.

func (ServiceUpdateProperties) MarshalJSON added in v0.3.0

func (s ServiceUpdateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceUpdateProperties.

func (*ServiceUpdateProperties) UnmarshalJSON added in v0.3.0

func (s *ServiceUpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceUpdateProperties.

type SettingsTypeName

type SettingsTypeName string
const (
	SettingsTypeNamePublic SettingsTypeName = "public"
)

func PossibleSettingsTypeNameValues

func PossibleSettingsTypeNameValues() []SettingsTypeName

PossibleSettingsTypeNameValues returns the possible values for the SettingsTypeName const type.

func (SettingsTypeName) ToPtr

ToPtr returns a *SettingsTypeName pointing to the current value.

type Severity

type Severity string

Severity - The severity of the issue.

const (
	SeverityError   Severity = "Error"
	SeverityWarning Severity = "Warning"
)

func PossibleSeverityValues

func PossibleSeverityValues() []Severity

PossibleSeverityValues returns the possible values for the Severity const type.

func (Severity) ToPtr

func (c Severity) ToPtr() *Severity

ToPtr returns a *Severity pointing to the current value.

type SignInSettingsClient

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

SignInSettingsClient contains the methods for the SignInSettings group. Don't use this type directly, use NewSignInSettingsClient() instead.

func NewSignInSettingsClient

func NewSignInSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *SignInSettingsClient

NewSignInSettingsClient creates a new instance of SignInSettingsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*SignInSettingsClient) CreateOrUpdate

CreateOrUpdate - Create or Update Sign-In settings. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. parameters - Create or update parameters. options - SignInSettingsClientCreateOrUpdateOptions contains the optional parameters for the SignInSettingsClient.CreateOrUpdate method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPortalSettingsPutSignIn.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewSignInSettingsClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.PortalSigninSettings{
			Properties: &armapimanagement.PortalSigninSettingProperties{
				Enabled: to.BoolPtr(true),
			},
		},
		&armapimanagement.SignInSettingsClientCreateOrUpdateOptions{IfMatch: to.StringPtr("<if-match>")})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.SignInSettingsClientCreateOrUpdateResult)
}
Output:

func (*SignInSettingsClient) Get

func (client *SignInSettingsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, options *SignInSettingsClientGetOptions) (SignInSettingsClientGetResponse, error)

Get - Get Sign In Settings for the Portal If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - SignInSettingsClientGetOptions contains the optional parameters for the SignInSettingsClient.Get method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPortalSettingsGetSignIn.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewSignInSettingsClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.SignInSettingsClientGetResult)
}
Output:

func (*SignInSettingsClient) GetEntityTag

func (client *SignInSettingsClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, options *SignInSettingsClientGetEntityTagOptions) (SignInSettingsClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the SignInSettings. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - SignInSettingsClientGetEntityTagOptions contains the optional parameters for the SignInSettingsClient.GetEntityTag method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadSignInSettings.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewSignInSettingsClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*SignInSettingsClient) Update

func (client *SignInSettingsClient) Update(ctx context.Context, resourceGroupName string, serviceName string, ifMatch string, parameters PortalSigninSettings, options *SignInSettingsClientUpdateOptions) (SignInSettingsClientUpdateResponse, error)

Update - Update Sign-In settings. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. parameters - Update Sign-In settings. options - SignInSettingsClientUpdateOptions contains the optional parameters for the SignInSettingsClient.Update method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPortalSettingsUpdateSignIn.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewSignInSettingsClient("<subscription-id>", cred, nil)
	_, err = client.Update(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<if-match>",
		armapimanagement.PortalSigninSettings{
			Properties: &armapimanagement.PortalSigninSettingProperties{
				Enabled: to.BoolPtr(true),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

type SignInSettingsClientCreateOrUpdateOptions added in v0.3.0

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

SignInSettingsClientCreateOrUpdateOptions contains the optional parameters for the SignInSettingsClient.CreateOrUpdate method.

type SignInSettingsClientCreateOrUpdateResponse added in v0.3.0

type SignInSettingsClientCreateOrUpdateResponse struct {
	SignInSettingsClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

SignInSettingsClientCreateOrUpdateResponse contains the response from method SignInSettingsClient.CreateOrUpdate.

type SignInSettingsClientCreateOrUpdateResult added in v0.3.0

type SignInSettingsClientCreateOrUpdateResult struct {
	PortalSigninSettings
}

SignInSettingsClientCreateOrUpdateResult contains the result from method SignInSettingsClient.CreateOrUpdate.

type SignInSettingsClientGetEntityTagOptions added in v0.3.0

type SignInSettingsClientGetEntityTagOptions struct {
}

SignInSettingsClientGetEntityTagOptions contains the optional parameters for the SignInSettingsClient.GetEntityTag method.

type SignInSettingsClientGetEntityTagResponse added in v0.3.0

type SignInSettingsClientGetEntityTagResponse struct {
	SignInSettingsClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

SignInSettingsClientGetEntityTagResponse contains the response from method SignInSettingsClient.GetEntityTag.

type SignInSettingsClientGetEntityTagResult added in v0.3.0

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

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

SignInSettingsClientGetEntityTagResult contains the result from method SignInSettingsClient.GetEntityTag.

type SignInSettingsClientGetOptions added in v0.3.0

type SignInSettingsClientGetOptions struct {
}

SignInSettingsClientGetOptions contains the optional parameters for the SignInSettingsClient.Get method.

type SignInSettingsClientGetResponse added in v0.3.0

type SignInSettingsClientGetResponse struct {
	SignInSettingsClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

SignInSettingsClientGetResponse contains the response from method SignInSettingsClient.Get.

type SignInSettingsClientGetResult added in v0.3.0

type SignInSettingsClientGetResult struct {
	PortalSigninSettings
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

SignInSettingsClientGetResult contains the result from method SignInSettingsClient.Get.

type SignInSettingsClientUpdateOptions added in v0.3.0

type SignInSettingsClientUpdateOptions struct {
}

SignInSettingsClientUpdateOptions contains the optional parameters for the SignInSettingsClient.Update method.

type SignInSettingsClientUpdateResponse added in v0.3.0

type SignInSettingsClientUpdateResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

SignInSettingsClientUpdateResponse contains the response from method SignInSettingsClient.Update.

type SignUpSettingsClient

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

SignUpSettingsClient contains the methods for the SignUpSettings group. Don't use this type directly, use NewSignUpSettingsClient() instead.

func NewSignUpSettingsClient

func NewSignUpSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *SignUpSettingsClient

NewSignUpSettingsClient creates a new instance of SignUpSettingsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*SignUpSettingsClient) CreateOrUpdate

CreateOrUpdate - Create or Update Sign-Up settings. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. parameters - Create or update parameters. options - SignUpSettingsClientCreateOrUpdateOptions contains the optional parameters for the SignUpSettingsClient.CreateOrUpdate method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPortalSettingsPutSignUp.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewSignUpSettingsClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.PortalSignupSettings{
			Properties: &armapimanagement.PortalSignupSettingsProperties{
				Enabled: to.BoolPtr(true),
				TermsOfService: &armapimanagement.TermsOfServiceProperties{
					ConsentRequired: to.BoolPtr(true),
					Enabled:         to.BoolPtr(true),
					Text:            to.StringPtr("<text>"),
				},
			},
		},
		&armapimanagement.SignUpSettingsClientCreateOrUpdateOptions{IfMatch: to.StringPtr("<if-match>")})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.SignUpSettingsClientCreateOrUpdateResult)
}
Output:

func (*SignUpSettingsClient) Get

func (client *SignUpSettingsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, options *SignUpSettingsClientGetOptions) (SignUpSettingsClientGetResponse, error)

Get - Get Sign Up Settings for the Portal If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - SignUpSettingsClientGetOptions contains the optional parameters for the SignUpSettingsClient.Get method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPortalSettingsGetSignUp.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewSignUpSettingsClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.SignUpSettingsClientGetResult)
}
Output:

func (*SignUpSettingsClient) GetEntityTag

func (client *SignUpSettingsClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, options *SignUpSettingsClientGetEntityTagOptions) (SignUpSettingsClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the SignUpSettings. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - SignUpSettingsClientGetEntityTagOptions contains the optional parameters for the SignUpSettingsClient.GetEntityTag method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadSignUpSettings.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewSignUpSettingsClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*SignUpSettingsClient) Update

func (client *SignUpSettingsClient) Update(ctx context.Context, resourceGroupName string, serviceName string, ifMatch string, parameters PortalSignupSettings, options *SignUpSettingsClientUpdateOptions) (SignUpSettingsClientUpdateResponse, error)

Update - Update Sign-Up settings. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. parameters - Update Sign-Up settings. options - SignUpSettingsClientUpdateOptions contains the optional parameters for the SignUpSettingsClient.Update method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPortalSettingsUpdateSignUp.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewSignUpSettingsClient("<subscription-id>", cred, nil)
	_, err = client.Update(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<if-match>",
		armapimanagement.PortalSignupSettings{
			Properties: &armapimanagement.PortalSignupSettingsProperties{
				Enabled: to.BoolPtr(true),
				TermsOfService: &armapimanagement.TermsOfServiceProperties{
					ConsentRequired: to.BoolPtr(true),
					Enabled:         to.BoolPtr(true),
					Text:            to.StringPtr("<text>"),
				},
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

type SignUpSettingsClientCreateOrUpdateOptions added in v0.3.0

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

SignUpSettingsClientCreateOrUpdateOptions contains the optional parameters for the SignUpSettingsClient.CreateOrUpdate method.

type SignUpSettingsClientCreateOrUpdateResponse added in v0.3.0

type SignUpSettingsClientCreateOrUpdateResponse struct {
	SignUpSettingsClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

SignUpSettingsClientCreateOrUpdateResponse contains the response from method SignUpSettingsClient.CreateOrUpdate.

type SignUpSettingsClientCreateOrUpdateResult added in v0.3.0

type SignUpSettingsClientCreateOrUpdateResult struct {
	PortalSignupSettings
}

SignUpSettingsClientCreateOrUpdateResult contains the result from method SignUpSettingsClient.CreateOrUpdate.

type SignUpSettingsClientGetEntityTagOptions added in v0.3.0

type SignUpSettingsClientGetEntityTagOptions struct {
}

SignUpSettingsClientGetEntityTagOptions contains the optional parameters for the SignUpSettingsClient.GetEntityTag method.

type SignUpSettingsClientGetEntityTagResponse added in v0.3.0

type SignUpSettingsClientGetEntityTagResponse struct {
	SignUpSettingsClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

SignUpSettingsClientGetEntityTagResponse contains the response from method SignUpSettingsClient.GetEntityTag.

type SignUpSettingsClientGetEntityTagResult added in v0.3.0

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

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

SignUpSettingsClientGetEntityTagResult contains the result from method SignUpSettingsClient.GetEntityTag.

type SignUpSettingsClientGetOptions added in v0.3.0

type SignUpSettingsClientGetOptions struct {
}

SignUpSettingsClientGetOptions contains the optional parameters for the SignUpSettingsClient.Get method.

type SignUpSettingsClientGetResponse added in v0.3.0

type SignUpSettingsClientGetResponse struct {
	SignUpSettingsClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

SignUpSettingsClientGetResponse contains the response from method SignUpSettingsClient.Get.

type SignUpSettingsClientGetResult added in v0.3.0

type SignUpSettingsClientGetResult struct {
	PortalSignupSettings
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

SignUpSettingsClientGetResult contains the result from method SignUpSettingsClient.Get.

type SignUpSettingsClientUpdateOptions added in v0.3.0

type SignUpSettingsClientUpdateOptions struct {
}

SignUpSettingsClientUpdateOptions contains the optional parameters for the SignUpSettingsClient.Update method.

type SignUpSettingsClientUpdateResponse added in v0.3.0

type SignUpSettingsClientUpdateResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

SignUpSettingsClientUpdateResponse contains the response from method SignUpSettingsClient.Update.

type SoapAPIType

type SoapAPIType string

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

const (
	// SoapAPITypeGraphQL - Imports the API having a GraphQL front end.
	SoapAPITypeGraphQL SoapAPIType = "graphql"
	// SoapAPITypeSoapPassThrough - Imports the SOAP API having a SOAP front end.
	SoapAPITypeSoapPassThrough SoapAPIType = "soap"
	// SoapAPITypeSoapToRest - Imports a SOAP API having a RESTful front end.
	SoapAPITypeSoapToRest SoapAPIType = "http"
	// SoapAPITypeWebSocket - Imports the API having a Websocket front end.
	SoapAPITypeWebSocket SoapAPIType = "websocket"
)

func PossibleSoapAPITypeValues

func PossibleSoapAPITypeValues() []SoapAPIType

PossibleSoapAPITypeValues returns the possible values for the SoapAPIType const type.

func (SoapAPIType) ToPtr

func (c SoapAPIType) ToPtr() *SoapAPIType

ToPtr returns a *SoapAPIType pointing to the current value.

type State

type State string

State - Status of the issue.

const (
	// StateClosed - The issue was closed.
	StateClosed State = "closed"
	// StateOpen - The issue is opened.
	StateOpen State = "open"
	// StateProposed - The issue is proposed.
	StateProposed State = "proposed"
	// StateRemoved - The issue was removed.
	StateRemoved State = "removed"
	// StateResolved - The issue is now resolved.
	StateResolved State = "resolved"
)

func PossibleStateValues

func PossibleStateValues() []State

PossibleStateValues returns the possible values for the State const type.

func (State) ToPtr

func (c State) ToPtr() *State

ToPtr returns a *State pointing to the current value.

type SubscriptionClient

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

SubscriptionClient contains the methods for the Subscription group. Don't use this type directly, use NewSubscriptionClient() instead.

func NewSubscriptionClient

func NewSubscriptionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *SubscriptionClient

NewSubscriptionClient creates a new instance of SubscriptionClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*SubscriptionClient) CreateOrUpdate

func (client *SubscriptionClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, sid string, parameters SubscriptionCreateParameters, options *SubscriptionClientCreateOrUpdateOptions) (SubscriptionClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates the subscription of specified user to the specified product. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management. parameters - Create parameters. options - SubscriptionClientCreateOrUpdateOptions contains the optional parameters for the SubscriptionClient.CreateOrUpdate method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateSubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewSubscriptionClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<sid>",
		armapimanagement.SubscriptionCreateParameters{
			Properties: &armapimanagement.SubscriptionCreateParameterProperties{
				DisplayName: to.StringPtr("<display-name>"),
				OwnerID:     to.StringPtr("<owner-id>"),
				Scope:       to.StringPtr("<scope>"),
			},
		},
		&armapimanagement.SubscriptionClientCreateOrUpdateOptions{Notify: nil,
			IfMatch: nil,
			AppType: nil,
		})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.SubscriptionClientCreateOrUpdateResult)
}
Output:

func (*SubscriptionClient) Delete

func (client *SubscriptionClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, sid string, ifMatch string, options *SubscriptionClientDeleteOptions) (SubscriptionClientDeleteResponse, error)

Delete - Deletes the specified subscription. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management. ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. options - SubscriptionClientDeleteOptions contains the optional parameters for the SubscriptionClient.Delete method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteSubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewSubscriptionClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<sid>",
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*SubscriptionClient) Get

func (client *SubscriptionClient) Get(ctx context.Context, resourceGroupName string, serviceName string, sid string, options *SubscriptionClientGetOptions) (SubscriptionClientGetResponse, error)

Get - Gets the specified Subscription entity. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management. options - SubscriptionClientGetOptions contains the optional parameters for the SubscriptionClient.Get method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetSubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewSubscriptionClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<sid>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.SubscriptionClientGetResult)
}
Output:

func (*SubscriptionClient) GetEntityTag

func (client *SubscriptionClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, sid string, options *SubscriptionClientGetEntityTagOptions) (SubscriptionClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management. options - SubscriptionClientGetEntityTagOptions contains the optional parameters for the SubscriptionClient.GetEntityTag method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadSubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewSubscriptionClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<sid>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*SubscriptionClient) List

func (client *SubscriptionClient) List(resourceGroupName string, serviceName string, options *SubscriptionClientListOptions) *SubscriptionClientListPager

List - Lists all subscriptions of the API Management service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - SubscriptionClientListOptions contains the optional parameters for the SubscriptionClient.List method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListSubscriptions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewSubscriptionClient("<subscription-id>", cred, nil)
	pager := client.List("<resource-group-name>",
		"<service-name>",
		&armapimanagement.SubscriptionClientListOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*SubscriptionClient) ListSecrets

func (client *SubscriptionClient) ListSecrets(ctx context.Context, resourceGroupName string, serviceName string, sid string, options *SubscriptionClientListSecretsOptions) (SubscriptionClientListSecretsResponse, error)

ListSecrets - Gets the specified Subscription keys. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management. options - SubscriptionClientListSecretsOptions contains the optional parameters for the SubscriptionClient.ListSecrets method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementSubscriptionListSecrets.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewSubscriptionClient("<subscription-id>", cred, nil)
	res, err := client.ListSecrets(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<sid>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.SubscriptionClientListSecretsResult)
}
Output:

func (*SubscriptionClient) RegeneratePrimaryKey

func (client *SubscriptionClient) RegeneratePrimaryKey(ctx context.Context, resourceGroupName string, serviceName string, sid string, options *SubscriptionClientRegeneratePrimaryKeyOptions) (SubscriptionClientRegeneratePrimaryKeyResponse, error)

RegeneratePrimaryKey - Regenerates primary key of existing subscription of the API Management service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management. options - SubscriptionClientRegeneratePrimaryKeyOptions contains the optional parameters for the SubscriptionClient.RegeneratePrimaryKey method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementSubscriptionRegeneratePrimaryKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewSubscriptionClient("<subscription-id>", cred, nil)
	_, err = client.RegeneratePrimaryKey(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<sid>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*SubscriptionClient) RegenerateSecondaryKey

func (client *SubscriptionClient) RegenerateSecondaryKey(ctx context.Context, resourceGroupName string, serviceName string, sid string, options *SubscriptionClientRegenerateSecondaryKeyOptions) (SubscriptionClientRegenerateSecondaryKeyResponse, error)

RegenerateSecondaryKey - Regenerates secondary key of existing subscription of the API Management service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management. options - SubscriptionClientRegenerateSecondaryKeyOptions contains the optional parameters for the SubscriptionClient.RegenerateSecondaryKey method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementSubscriptionRegenerateSecondaryKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewSubscriptionClient("<subscription-id>", cred, nil)
	_, err = client.RegenerateSecondaryKey(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<sid>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*SubscriptionClient) Update

func (client *SubscriptionClient) Update(ctx context.Context, resourceGroupName string, serviceName string, sid string, ifMatch string, parameters SubscriptionUpdateParameters, options *SubscriptionClientUpdateOptions) (SubscriptionClientUpdateResponse, error)

Update - Updates the details of a subscription specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management. ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. parameters - Update parameters. options - SubscriptionClientUpdateOptions contains the optional parameters for the SubscriptionClient.Update method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateSubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewSubscriptionClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<sid>",
		"<if-match>",
		armapimanagement.SubscriptionUpdateParameters{
			Properties: &armapimanagement.SubscriptionUpdateParameterProperties{
				DisplayName: to.StringPtr("<display-name>"),
			},
		},
		&armapimanagement.SubscriptionClientUpdateOptions{Notify: nil,
			AppType: nil,
		})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.SubscriptionClientUpdateResult)
}
Output:

type SubscriptionClientCreateOrUpdateOptions added in v0.3.0

type SubscriptionClientCreateOrUpdateOptions struct {
	// Determines the type of application which send the create user request. Default is legacy publisher portal.
	AppType *AppType
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
	// Notify change in Subscription State.
	// * If false, do not send any email notification for change of state of subscription
	// * If true, send email notification of change of state of subscription
	Notify *bool
}

SubscriptionClientCreateOrUpdateOptions contains the optional parameters for the SubscriptionClient.CreateOrUpdate method.

type SubscriptionClientCreateOrUpdateResponse added in v0.3.0

type SubscriptionClientCreateOrUpdateResponse struct {
	SubscriptionClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

SubscriptionClientCreateOrUpdateResponse contains the response from method SubscriptionClient.CreateOrUpdate.

type SubscriptionClientCreateOrUpdateResult added in v0.3.0

type SubscriptionClientCreateOrUpdateResult struct {
	SubscriptionContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

SubscriptionClientCreateOrUpdateResult contains the result from method SubscriptionClient.CreateOrUpdate.

type SubscriptionClientDeleteOptions added in v0.3.0

type SubscriptionClientDeleteOptions struct {
}

SubscriptionClientDeleteOptions contains the optional parameters for the SubscriptionClient.Delete method.

type SubscriptionClientDeleteResponse added in v0.3.0

type SubscriptionClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

SubscriptionClientDeleteResponse contains the response from method SubscriptionClient.Delete.

type SubscriptionClientGetEntityTagOptions added in v0.3.0

type SubscriptionClientGetEntityTagOptions struct {
}

SubscriptionClientGetEntityTagOptions contains the optional parameters for the SubscriptionClient.GetEntityTag method.

type SubscriptionClientGetEntityTagResponse added in v0.3.0

type SubscriptionClientGetEntityTagResponse struct {
	SubscriptionClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

SubscriptionClientGetEntityTagResponse contains the response from method SubscriptionClient.GetEntityTag.

type SubscriptionClientGetEntityTagResult added in v0.3.0

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

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

SubscriptionClientGetEntityTagResult contains the result from method SubscriptionClient.GetEntityTag.

type SubscriptionClientGetOptions added in v0.3.0

type SubscriptionClientGetOptions struct {
}

SubscriptionClientGetOptions contains the optional parameters for the SubscriptionClient.Get method.

type SubscriptionClientGetResponse added in v0.3.0

type SubscriptionClientGetResponse struct {
	SubscriptionClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

SubscriptionClientGetResponse contains the response from method SubscriptionClient.Get.

type SubscriptionClientGetResult added in v0.3.0

type SubscriptionClientGetResult struct {
	SubscriptionContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

SubscriptionClientGetResult contains the result from method SubscriptionClient.Get.

type SubscriptionClientListOptions added in v0.3.0

type SubscriptionClientListOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | state | filter | eq | |
	// | user | expand | | |
	Filter *string
	// Number of records to skip.
	Skip *int32
	// Number of records to return.
	Top *int32
}

SubscriptionClientListOptions contains the optional parameters for the SubscriptionClient.List method.

type SubscriptionClientListPager added in v0.3.0

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

SubscriptionClientListPager provides operations for iterating over paged responses.

func (*SubscriptionClientListPager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*SubscriptionClientListPager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*SubscriptionClientListPager) PageResponse added in v0.3.0

PageResponse returns the current SubscriptionClientListResponse page.

type SubscriptionClientListResponse added in v0.3.0

type SubscriptionClientListResponse struct {
	SubscriptionClientListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

SubscriptionClientListResponse contains the response from method SubscriptionClient.List.

type SubscriptionClientListResult added in v0.3.0

type SubscriptionClientListResult struct {
	SubscriptionCollection
}

SubscriptionClientListResult contains the result from method SubscriptionClient.List.

type SubscriptionClientListSecretsOptions added in v0.3.0

type SubscriptionClientListSecretsOptions struct {
}

SubscriptionClientListSecretsOptions contains the optional parameters for the SubscriptionClient.ListSecrets method.

type SubscriptionClientListSecretsResponse added in v0.3.0

type SubscriptionClientListSecretsResponse struct {
	SubscriptionClientListSecretsResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

SubscriptionClientListSecretsResponse contains the response from method SubscriptionClient.ListSecrets.

type SubscriptionClientListSecretsResult added in v0.3.0

type SubscriptionClientListSecretsResult struct {
	SubscriptionKeysContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

SubscriptionClientListSecretsResult contains the result from method SubscriptionClient.ListSecrets.

type SubscriptionClientRegeneratePrimaryKeyOptions added in v0.3.0

type SubscriptionClientRegeneratePrimaryKeyOptions struct {
}

SubscriptionClientRegeneratePrimaryKeyOptions contains the optional parameters for the SubscriptionClient.RegeneratePrimaryKey method.

type SubscriptionClientRegeneratePrimaryKeyResponse added in v0.3.0

type SubscriptionClientRegeneratePrimaryKeyResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

SubscriptionClientRegeneratePrimaryKeyResponse contains the response from method SubscriptionClient.RegeneratePrimaryKey.

type SubscriptionClientRegenerateSecondaryKeyOptions added in v0.3.0

type SubscriptionClientRegenerateSecondaryKeyOptions struct {
}

SubscriptionClientRegenerateSecondaryKeyOptions contains the optional parameters for the SubscriptionClient.RegenerateSecondaryKey method.

type SubscriptionClientRegenerateSecondaryKeyResponse added in v0.3.0

type SubscriptionClientRegenerateSecondaryKeyResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

SubscriptionClientRegenerateSecondaryKeyResponse contains the response from method SubscriptionClient.RegenerateSecondaryKey.

type SubscriptionClientUpdateOptions added in v0.3.0

type SubscriptionClientUpdateOptions struct {
	// Determines the type of application which send the create user request. Default is legacy publisher portal.
	AppType *AppType
	// Notify change in Subscription State.
	// * If false, do not send any email notification for change of state of subscription
	// * If true, send email notification of change of state of subscription
	Notify *bool
}

SubscriptionClientUpdateOptions contains the optional parameters for the SubscriptionClient.Update method.

type SubscriptionClientUpdateResponse added in v0.3.0

type SubscriptionClientUpdateResponse struct {
	SubscriptionClientUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

SubscriptionClientUpdateResponse contains the response from method SubscriptionClient.Update.

type SubscriptionClientUpdateResult added in v0.3.0

type SubscriptionClientUpdateResult struct {
	SubscriptionContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

SubscriptionClientUpdateResult contains the result from method SubscriptionClient.Update.

type SubscriptionCollection

type SubscriptionCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// Next page link if any.
	NextLink *string `json:"nextLink,omitempty"`

	// Page values.
	Value []*SubscriptionContract `json:"value,omitempty"`
}

SubscriptionCollection - Paged Subscriptions list representation.

func (SubscriptionCollection) MarshalJSON

func (s SubscriptionCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubscriptionCollection.

type SubscriptionContract

type SubscriptionContract struct {
	// Subscription contract properties.
	Properties *SubscriptionContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

SubscriptionContract - Subscription details.

type SubscriptionContractProperties

type SubscriptionContractProperties struct {
	// REQUIRED; Scope like /products/{productId} or /apis or /apis/{apiId}.
	Scope *string `json:"scope,omitempty"`

	// REQUIRED; Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription
	// is blocked, and the subscriber cannot call any APIs of the product, * submitted – the
	// subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription
	// request has been denied by an administrator, * cancelled – the
	// subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration
	// date and was deactivated.
	State *SubscriptionState `json:"state,omitempty"`

	// Determines whether tracing is enabled
	AllowTracing *bool `json:"allowTracing,omitempty"`

	// The name of the subscription, or null if the subscription has no name.
	DisplayName *string `json:"displayName,omitempty"`

	// Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically
	// cancelled. The subscription lifecycle can be managed by using the
	// state property. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
	EndDate *time.Time `json:"endDate,omitempty"`

	// Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired.
	// The subscription lifecycle can be managed by using the state property. The date
	// conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
	ExpirationDate *time.Time `json:"expirationDate,omitempty"`

	// Upcoming subscription expiration notification date. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as
	// specified by the ISO 8601 standard.
	NotificationDate *time.Time `json:"notificationDate,omitempty"`

	// The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{userId}
	// where {userId} is a user identifier.
	OwnerID *string `json:"ownerId,omitempty"`

	// Subscription primary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get
	// the value.
	PrimaryKey *string `json:"primaryKey,omitempty"`

	// Subscription secondary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get
	// the value.
	SecondaryKey *string `json:"secondaryKey,omitempty"`

	// Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated.
	// The subscription lifecycle can be managed by using the state property. The
	// date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
	StartDate *time.Time `json:"startDate,omitempty"`

	// Optional subscription comment added by an administrator when the state is changed to the 'rejected'.
	StateComment *string `json:"stateComment,omitempty"`

	// READ-ONLY; Subscription creation date. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by
	// the ISO 8601 standard.
	CreatedDate *time.Time `json:"createdDate,omitempty" azure:"ro"`
}

SubscriptionContractProperties - Subscription details.

func (SubscriptionContractProperties) MarshalJSON

func (s SubscriptionContractProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubscriptionContractProperties.

func (*SubscriptionContractProperties) UnmarshalJSON

func (s *SubscriptionContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionContractProperties.

type SubscriptionCreateParameterProperties

type SubscriptionCreateParameterProperties struct {
	// REQUIRED; Subscription name.
	DisplayName *string `json:"displayName,omitempty"`

	// REQUIRED; Scope like /products/{productId} or /apis or /apis/{apiId}.
	Scope *string `json:"scope,omitempty"`

	// Determines whether tracing can be enabled
	AllowTracing *bool `json:"allowTracing,omitempty"`

	// User (user id path) for whom subscription is being created in form /users/{userId}
	OwnerID *string `json:"ownerId,omitempty"`

	// Primary subscription key. If not specified during request key will be generated automatically.
	PrimaryKey *string `json:"primaryKey,omitempty"`

	// Secondary subscription key. If not specified during request key will be generated automatically.
	SecondaryKey *string `json:"secondaryKey,omitempty"`

	// Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are
	// * active – the subscription is active, * suspended – the subscription is
	// blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by
	// the developer, but has not yet been approved or rejected, * rejected – the
	// subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer
	// or administrator, * expired – the subscription reached its expiration date
	// and was deactivated.
	State *SubscriptionState `json:"state,omitempty"`
}

SubscriptionCreateParameterProperties - Parameters supplied to the Create subscription operation.

type SubscriptionCreateParameters

type SubscriptionCreateParameters struct {
	// Subscription contract properties.
	Properties *SubscriptionCreateParameterProperties `json:"properties,omitempty"`
}

SubscriptionCreateParameters - Subscription create details.

type SubscriptionKeyParameterNamesContract

type SubscriptionKeyParameterNamesContract struct {
	// Subscription key header name.
	Header *string `json:"header,omitempty"`

	// Subscription key query string parameter name.
	Query *string `json:"query,omitempty"`
}

SubscriptionKeyParameterNamesContract - Subscription key parameter names details.

type SubscriptionKeysContract

type SubscriptionKeysContract struct {
	// Subscription primary key.
	PrimaryKey *string `json:"primaryKey,omitempty"`

	// Subscription secondary key.
	SecondaryKey *string `json:"secondaryKey,omitempty"`
}

SubscriptionKeysContract - Subscription keys.

type SubscriptionState

type SubscriptionState string

SubscriptionState - Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated.

const (
	SubscriptionStateSuspended SubscriptionState = "suspended"
	SubscriptionStateActive    SubscriptionState = "active"
	SubscriptionStateExpired   SubscriptionState = "expired"
	SubscriptionStateSubmitted SubscriptionState = "submitted"
	SubscriptionStateRejected  SubscriptionState = "rejected"
	SubscriptionStateCancelled SubscriptionState = "cancelled"
)

func PossibleSubscriptionStateValues

func PossibleSubscriptionStateValues() []SubscriptionState

PossibleSubscriptionStateValues returns the possible values for the SubscriptionState const type.

func (SubscriptionState) ToPtr

ToPtr returns a *SubscriptionState pointing to the current value.

type SubscriptionUpdateParameterProperties

type SubscriptionUpdateParameterProperties struct {
	// Determines whether tracing can be enabled
	AllowTracing *bool `json:"allowTracing,omitempty"`

	// Subscription name.
	DisplayName *string `json:"displayName,omitempty"`

	// Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired.
	// The subscription lifecycle can be managed by using the state property. The date
	// conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
	ExpirationDate *time.Time `json:"expirationDate,omitempty"`

	// User identifier path: /users/{userId}
	OwnerID *string `json:"ownerId,omitempty"`

	// Primary subscription key.
	PrimaryKey *string `json:"primaryKey,omitempty"`

	// Scope like /products/{productId} or /apis or /apis/{apiId}
	Scope *string `json:"scope,omitempty"`

	// Secondary subscription key.
	SecondaryKey *string `json:"secondaryKey,omitempty"`

	// Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked,
	// and the subscriber cannot call any APIs of the product, * submitted – the
	// subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription
	// request has been denied by an administrator, * cancelled – the
	// subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration
	// date and was deactivated.
	State *SubscriptionState `json:"state,omitempty"`

	// Comments describing subscription state change by the administrator when the state is changed to the 'rejected'.
	StateComment *string `json:"stateComment,omitempty"`
}

SubscriptionUpdateParameterProperties - Parameters supplied to the Update subscription operation.

func (SubscriptionUpdateParameterProperties) MarshalJSON

func (s SubscriptionUpdateParameterProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubscriptionUpdateParameterProperties.

func (*SubscriptionUpdateParameterProperties) UnmarshalJSON

func (s *SubscriptionUpdateParameterProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionUpdateParameterProperties.

type SubscriptionUpdateParameters

type SubscriptionUpdateParameters struct {
	// Subscription Update contract properties.
	Properties *SubscriptionUpdateParameterProperties `json:"properties,omitempty"`
}

SubscriptionUpdateParameters - Subscription update details.

func (SubscriptionUpdateParameters) MarshalJSON

func (s SubscriptionUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubscriptionUpdateParameters.

type SubscriptionsDelegationSettingsProperties

type SubscriptionsDelegationSettingsProperties struct {
	// Enable or disable delegation for subscriptions.
	Enabled *bool `json:"enabled,omitempty"`
}

SubscriptionsDelegationSettingsProperties - Subscriptions delegation settings properties.

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time `json:"createdAt,omitempty"`

	// The identity that created the resource.
	CreatedBy *string `json:"createdBy,omitempty"`

	// The type of identity that created the resource.
	CreatedByType *CreatedByType `json:"createdByType,omitempty"`

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"`

	// The identity that last modified the resource.
	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"`
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON

func (s SystemData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type TagClient

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

TagClient contains the methods for the Tag group. Don't use this type directly, use NewTagClient() instead.

func NewTagClient

func NewTagClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *TagClient

NewTagClient creates a new instance of TagClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*TagClient) AssignToAPI

func (client *TagClient) AssignToAPI(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagID string, options *TagClientAssignToAPIOptions) (TagClientAssignToAPIResponse, error)

AssignToAPI - Assign tag to the Api. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. tagID - Tag identifier. Must be unique in the current API Management service instance. options - TagClientAssignToAPIOptions contains the optional parameters for the TagClient.AssignToAPI method.

func (*TagClient) AssignToOperation

func (client *TagClient) AssignToOperation(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, tagID string, options *TagClientAssignToOperationOptions) (TagClientAssignToOperationResponse, error)

AssignToOperation - Assign tag to the Operation. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. operationID - Operation identifier within an API. Must be unique in the current API Management service instance. tagID - Tag identifier. Must be unique in the current API Management service instance. options - TagClientAssignToOperationOptions contains the optional parameters for the TagClient.AssignToOperation method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiOperationTag.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTagClient("<subscription-id>", cred, nil)
	res, err := client.AssignToOperation(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<operation-id>",
		"<tag-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.TagClientAssignToOperationResult)
}
Output:

func (*TagClient) AssignToProduct

func (client *TagClient) AssignToProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string, options *TagClientAssignToProductOptions) (TagClientAssignToProductResponse, error)

AssignToProduct - Assign tag to the Product. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. productID - Product identifier. Must be unique in the current API Management service instance. tagID - Tag identifier. Must be unique in the current API Management service instance. options - TagClientAssignToProductOptions contains the optional parameters for the TagClient.AssignToProduct method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateProductTag.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTagClient("<subscription-id>", cred, nil)
	res, err := client.AssignToProduct(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<product-id>",
		"<tag-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.TagClientAssignToProductResult)
}
Output:

func (*TagClient) CreateOrUpdate

func (client *TagClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, tagID string, parameters TagCreateUpdateParameters, options *TagClientCreateOrUpdateOptions) (TagClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates a tag. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. tagID - Tag identifier. Must be unique in the current API Management service instance. parameters - Create parameters. options - TagClientCreateOrUpdateOptions contains the optional parameters for the TagClient.CreateOrUpdate method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateTag.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTagClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<tag-id>",
		armapimanagement.TagCreateUpdateParameters{
			Properties: &armapimanagement.TagContractProperties{
				DisplayName: to.StringPtr("<display-name>"),
			},
		},
		&armapimanagement.TagClientCreateOrUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.TagClientCreateOrUpdateResult)
}
Output:

func (*TagClient) Delete

func (client *TagClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, tagID string, ifMatch string, options *TagClientDeleteOptions) (TagClientDeleteResponse, error)

Delete - Deletes specific tag of the API Management service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. tagID - Tag identifier. Must be unique in the current API Management service instance. ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. options - TagClientDeleteOptions contains the optional parameters for the TagClient.Delete method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteTag.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTagClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<tag-id>",
		"<if-match>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*TagClient) DetachFromAPI

func (client *TagClient) DetachFromAPI(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagID string, options *TagClientDetachFromAPIOptions) (TagClientDetachFromAPIResponse, error)

DetachFromAPI - Detach the tag from the Api. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. tagID - Tag identifier. Must be unique in the current API Management service instance. options - TagClientDetachFromAPIOptions contains the optional parameters for the TagClient.DetachFromAPI method.

func (*TagClient) DetachFromOperation

func (client *TagClient) DetachFromOperation(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, tagID string, options *TagClientDetachFromOperationOptions) (TagClientDetachFromOperationResponse, error)

DetachFromOperation - Detach the tag from the Operation. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. operationID - Operation identifier within an API. Must be unique in the current API Management service instance. tagID - Tag identifier. Must be unique in the current API Management service instance. options - TagClientDetachFromOperationOptions contains the optional parameters for the TagClient.DetachFromOperation method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiOperationTag.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTagClient("<subscription-id>", cred, nil)
	_, err = client.DetachFromOperation(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<operation-id>",
		"<tag-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*TagClient) DetachFromProduct

func (client *TagClient) DetachFromProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string, options *TagClientDetachFromProductOptions) (TagClientDetachFromProductResponse, error)

DetachFromProduct - Detach the tag from the Product. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. productID - Product identifier. Must be unique in the current API Management service instance. tagID - Tag identifier. Must be unique in the current API Management service instance. options - TagClientDetachFromProductOptions contains the optional parameters for the TagClient.DetachFromProduct method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteProductTag.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTagClient("<subscription-id>", cred, nil)
	_, err = client.DetachFromProduct(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<product-id>",
		"<tag-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*TagClient) Get

func (client *TagClient) Get(ctx context.Context, resourceGroupName string, serviceName string, tagID string, options *TagClientGetOptions) (TagClientGetResponse, error)

Get - Gets the details of the tag specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. tagID - Tag identifier. Must be unique in the current API Management service instance. options - TagClientGetOptions contains the optional parameters for the TagClient.Get method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTag.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTagClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<tag-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.TagClientGetResult)
}
Output:

func (*TagClient) GetByAPI

func (client *TagClient) GetByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagID string, options *TagClientGetByAPIOptions) (TagClientGetByAPIResponse, error)

GetByAPI - Get tag associated with the API. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. tagID - Tag identifier. Must be unique in the current API Management service instance. options - TagClientGetByAPIOptions contains the optional parameters for the TagClient.GetByAPI method.

func (*TagClient) GetByOperation

func (client *TagClient) GetByOperation(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, tagID string, options *TagClientGetByOperationOptions) (TagClientGetByOperationResponse, error)

GetByOperation - Get tag associated with the Operation. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. operationID - Operation identifier within an API. Must be unique in the current API Management service instance. tagID - Tag identifier. Must be unique in the current API Management service instance. options - TagClientGetByOperationOptions contains the optional parameters for the TagClient.GetByOperation method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperationTag.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTagClient("<subscription-id>", cred, nil)
	res, err := client.GetByOperation(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<operation-id>",
		"<tag-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.TagClientGetByOperationResult)
}
Output:

func (*TagClient) GetByProduct

func (client *TagClient) GetByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string, options *TagClientGetByProductOptions) (TagClientGetByProductResponse, error)

GetByProduct - Get tag associated with the Product. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. productID - Product identifier. Must be unique in the current API Management service instance. tagID - Tag identifier. Must be unique in the current API Management service instance. options - TagClientGetByProductOptions contains the optional parameters for the TagClient.GetByProduct method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetProductTag.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTagClient("<subscription-id>", cred, nil)
	res, err := client.GetByProduct(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<product-id>",
		"<tag-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.TagClientGetByProductResult)
}
Output:

func (*TagClient) GetEntityState

func (client *TagClient) GetEntityState(ctx context.Context, resourceGroupName string, serviceName string, tagID string, options *TagClientGetEntityStateOptions) (TagClientGetEntityStateResponse, error)

GetEntityState - Gets the entity state version of the tag specified by its identifier. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. tagID - Tag identifier. Must be unique in the current API Management service instance. options - TagClientGetEntityStateOptions contains the optional parameters for the TagClient.GetEntityState method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadTag.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTagClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityState(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<tag-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*TagClient) GetEntityStateByAPI

func (client *TagClient) GetEntityStateByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagID string, options *TagClientGetEntityStateByAPIOptions) (TagClientGetEntityStateByAPIResponse, error)

GetEntityStateByAPI - Gets the entity state version of the tag specified by its identifier. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. tagID - Tag identifier. Must be unique in the current API Management service instance. options - TagClientGetEntityStateByAPIOptions contains the optional parameters for the TagClient.GetEntityStateByAPI method.

func (*TagClient) GetEntityStateByOperation

func (client *TagClient) GetEntityStateByOperation(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, tagID string, options *TagClientGetEntityStateByOperationOptions) (TagClientGetEntityStateByOperationResponse, error)

GetEntityStateByOperation - Gets the entity state version of the tag specified by its identifier. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. operationID - Operation identifier within an API. Must be unique in the current API Management service instance. tagID - Tag identifier. Must be unique in the current API Management service instance. options - TagClientGetEntityStateByOperationOptions contains the optional parameters for the TagClient.GetEntityStateByOperation method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiOperationTag.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTagClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityStateByOperation(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<operation-id>",
		"<tag-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*TagClient) GetEntityStateByProduct

func (client *TagClient) GetEntityStateByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string, options *TagClientGetEntityStateByProductOptions) (TagClientGetEntityStateByProductResponse, error)

GetEntityStateByProduct - Gets the entity state version of the tag specified by its identifier. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. productID - Product identifier. Must be unique in the current API Management service instance. tagID - Tag identifier. Must be unique in the current API Management service instance. options - TagClientGetEntityStateByProductOptions contains the optional parameters for the TagClient.GetEntityStateByProduct method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadProductTag.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTagClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityStateByProduct(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<product-id>",
		"<tag-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*TagClient) ListByAPI

func (client *TagClient) ListByAPI(resourceGroupName string, serviceName string, apiID string, options *TagClientListByAPIOptions) *TagClientListByAPIPager

ListByAPI - Lists all Tags associated with the API. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. options - TagClientListByAPIOptions contains the optional parameters for the TagClient.ListByAPI method.

func (*TagClient) ListByOperation

func (client *TagClient) ListByOperation(resourceGroupName string, serviceName string, apiID string, operationID string, options *TagClientListByOperationOptions) *TagClientListByOperationPager

ListByOperation - Lists all Tags associated with the Operation. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. operationID - Operation identifier within an API. Must be unique in the current API Management service instance. options - TagClientListByOperationOptions contains the optional parameters for the TagClient.ListByOperation method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiOperationTags.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTagClient("<subscription-id>", cred, nil)
	pager := client.ListByOperation("<resource-group-name>",
		"<service-name>",
		"<api-id>",
		"<operation-id>",
		&armapimanagement.TagClientListByOperationOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*TagClient) ListByProduct

func (client *TagClient) ListByProduct(resourceGroupName string, serviceName string, productID string, options *TagClientListByProductOptions) *TagClientListByProductPager

ListByProduct - Lists all Tags associated with the Product. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. productID - Product identifier. Must be unique in the current API Management service instance. options - TagClientListByProductOptions contains the optional parameters for the TagClient.ListByProduct method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListProductTags.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTagClient("<subscription-id>", cred, nil)
	pager := client.ListByProduct("<resource-group-name>",
		"<service-name>",
		"<product-id>",
		&armapimanagement.TagClientListByProductOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*TagClient) ListByService

func (client *TagClient) ListByService(resourceGroupName string, serviceName string, options *TagClientListByServiceOptions) *TagClientListByServicePager

ListByService - Lists a collection of tags defined within a service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - TagClientListByServiceOptions contains the optional parameters for the TagClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListTags.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTagClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		&armapimanagement.TagClientListByServiceOptions{Filter: nil,
			Top:   nil,
			Skip:  nil,
			Scope: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*TagClient) Update

func (client *TagClient) Update(ctx context.Context, resourceGroupName string, serviceName string, tagID string, ifMatch string, parameters TagCreateUpdateParameters, options *TagClientUpdateOptions) (TagClientUpdateResponse, error)

Update - Updates the details of the tag specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. tagID - Tag identifier. Must be unique in the current API Management service instance. ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. parameters - Update parameters. options - TagClientUpdateOptions contains the optional parameters for the TagClient.Update method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateTag.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTagClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<tag-id>",
		"<if-match>",
		armapimanagement.TagCreateUpdateParameters{
			Properties: &armapimanagement.TagContractProperties{
				DisplayName: to.StringPtr("<display-name>"),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.TagClientUpdateResult)
}
Output:

type TagClientAssignToAPIOptions added in v0.3.0

type TagClientAssignToAPIOptions struct {
}

TagClientAssignToAPIOptions contains the optional parameters for the TagClient.AssignToAPI method.

type TagClientAssignToAPIResponse added in v0.3.0

type TagClientAssignToAPIResponse struct {
	TagClientAssignToAPIResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TagClientAssignToAPIResponse contains the response from method TagClient.AssignToAPI.

type TagClientAssignToAPIResult added in v0.3.0

type TagClientAssignToAPIResult struct {
	TagContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

TagClientAssignToAPIResult contains the result from method TagClient.AssignToAPI.

type TagClientAssignToOperationOptions added in v0.3.0

type TagClientAssignToOperationOptions struct {
}

TagClientAssignToOperationOptions contains the optional parameters for the TagClient.AssignToOperation method.

type TagClientAssignToOperationResponse added in v0.3.0

type TagClientAssignToOperationResponse struct {
	TagClientAssignToOperationResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TagClientAssignToOperationResponse contains the response from method TagClient.AssignToOperation.

type TagClientAssignToOperationResult added in v0.3.0

type TagClientAssignToOperationResult struct {
	TagContract
}

TagClientAssignToOperationResult contains the result from method TagClient.AssignToOperation.

type TagClientAssignToProductOptions added in v0.3.0

type TagClientAssignToProductOptions struct {
}

TagClientAssignToProductOptions contains the optional parameters for the TagClient.AssignToProduct method.

type TagClientAssignToProductResponse added in v0.3.0

type TagClientAssignToProductResponse struct {
	TagClientAssignToProductResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TagClientAssignToProductResponse contains the response from method TagClient.AssignToProduct.

type TagClientAssignToProductResult added in v0.3.0

type TagClientAssignToProductResult struct {
	TagContract
}

TagClientAssignToProductResult contains the result from method TagClient.AssignToProduct.

type TagClientCreateOrUpdateOptions added in v0.3.0

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

TagClientCreateOrUpdateOptions contains the optional parameters for the TagClient.CreateOrUpdate method.

type TagClientCreateOrUpdateResponse added in v0.3.0

type TagClientCreateOrUpdateResponse struct {
	TagClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TagClientCreateOrUpdateResponse contains the response from method TagClient.CreateOrUpdate.

type TagClientCreateOrUpdateResult added in v0.3.0

type TagClientCreateOrUpdateResult struct {
	TagContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

TagClientCreateOrUpdateResult contains the result from method TagClient.CreateOrUpdate.

type TagClientDeleteOptions added in v0.3.0

type TagClientDeleteOptions struct {
}

TagClientDeleteOptions contains the optional parameters for the TagClient.Delete method.

type TagClientDeleteResponse added in v0.3.0

type TagClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TagClientDeleteResponse contains the response from method TagClient.Delete.

type TagClientDetachFromAPIOptions added in v0.3.0

type TagClientDetachFromAPIOptions struct {
}

TagClientDetachFromAPIOptions contains the optional parameters for the TagClient.DetachFromAPI method.

type TagClientDetachFromAPIResponse added in v0.3.0

type TagClientDetachFromAPIResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TagClientDetachFromAPIResponse contains the response from method TagClient.DetachFromAPI.

type TagClientDetachFromOperationOptions added in v0.3.0

type TagClientDetachFromOperationOptions struct {
}

TagClientDetachFromOperationOptions contains the optional parameters for the TagClient.DetachFromOperation method.

type TagClientDetachFromOperationResponse added in v0.3.0

type TagClientDetachFromOperationResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TagClientDetachFromOperationResponse contains the response from method TagClient.DetachFromOperation.

type TagClientDetachFromProductOptions added in v0.3.0

type TagClientDetachFromProductOptions struct {
}

TagClientDetachFromProductOptions contains the optional parameters for the TagClient.DetachFromProduct method.

type TagClientDetachFromProductResponse added in v0.3.0

type TagClientDetachFromProductResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TagClientDetachFromProductResponse contains the response from method TagClient.DetachFromProduct.

type TagClientGetByAPIOptions added in v0.3.0

type TagClientGetByAPIOptions struct {
}

TagClientGetByAPIOptions contains the optional parameters for the TagClient.GetByAPI method.

type TagClientGetByAPIResponse added in v0.3.0

type TagClientGetByAPIResponse struct {
	TagClientGetByAPIResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TagClientGetByAPIResponse contains the response from method TagClient.GetByAPI.

type TagClientGetByAPIResult added in v0.3.0

type TagClientGetByAPIResult struct {
	TagContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

TagClientGetByAPIResult contains the result from method TagClient.GetByAPI.

type TagClientGetByOperationOptions added in v0.3.0

type TagClientGetByOperationOptions struct {
}

TagClientGetByOperationOptions contains the optional parameters for the TagClient.GetByOperation method.

type TagClientGetByOperationResponse added in v0.3.0

type TagClientGetByOperationResponse struct {
	TagClientGetByOperationResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TagClientGetByOperationResponse contains the response from method TagClient.GetByOperation.

type TagClientGetByOperationResult added in v0.3.0

type TagClientGetByOperationResult struct {
	TagContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

TagClientGetByOperationResult contains the result from method TagClient.GetByOperation.

type TagClientGetByProductOptions added in v0.3.0

type TagClientGetByProductOptions struct {
}

TagClientGetByProductOptions contains the optional parameters for the TagClient.GetByProduct method.

type TagClientGetByProductResponse added in v0.3.0

type TagClientGetByProductResponse struct {
	TagClientGetByProductResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TagClientGetByProductResponse contains the response from method TagClient.GetByProduct.

type TagClientGetByProductResult added in v0.3.0

type TagClientGetByProductResult struct {
	TagContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

TagClientGetByProductResult contains the result from method TagClient.GetByProduct.

type TagClientGetEntityStateByAPIOptions added in v0.3.0

type TagClientGetEntityStateByAPIOptions struct {
}

TagClientGetEntityStateByAPIOptions contains the optional parameters for the TagClient.GetEntityStateByAPI method.

type TagClientGetEntityStateByAPIResponse added in v0.3.0

type TagClientGetEntityStateByAPIResponse struct {
	TagClientGetEntityStateByAPIResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TagClientGetEntityStateByAPIResponse contains the response from method TagClient.GetEntityStateByAPI.

type TagClientGetEntityStateByAPIResult added in v0.3.0

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

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

TagClientGetEntityStateByAPIResult contains the result from method TagClient.GetEntityStateByAPI.

type TagClientGetEntityStateByOperationOptions added in v0.3.0

type TagClientGetEntityStateByOperationOptions struct {
}

TagClientGetEntityStateByOperationOptions contains the optional parameters for the TagClient.GetEntityStateByOperation method.

type TagClientGetEntityStateByOperationResponse added in v0.3.0

type TagClientGetEntityStateByOperationResponse struct {
	TagClientGetEntityStateByOperationResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TagClientGetEntityStateByOperationResponse contains the response from method TagClient.GetEntityStateByOperation.

type TagClientGetEntityStateByOperationResult added in v0.3.0

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

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

TagClientGetEntityStateByOperationResult contains the result from method TagClient.GetEntityStateByOperation.

type TagClientGetEntityStateByProductOptions added in v0.3.0

type TagClientGetEntityStateByProductOptions struct {
}

TagClientGetEntityStateByProductOptions contains the optional parameters for the TagClient.GetEntityStateByProduct method.

type TagClientGetEntityStateByProductResponse added in v0.3.0

type TagClientGetEntityStateByProductResponse struct {
	TagClientGetEntityStateByProductResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TagClientGetEntityStateByProductResponse contains the response from method TagClient.GetEntityStateByProduct.

type TagClientGetEntityStateByProductResult added in v0.3.0

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

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

TagClientGetEntityStateByProductResult contains the result from method TagClient.GetEntityStateByProduct.

type TagClientGetEntityStateOptions added in v0.3.0

type TagClientGetEntityStateOptions struct {
}

TagClientGetEntityStateOptions contains the optional parameters for the TagClient.GetEntityState method.

type TagClientGetEntityStateResponse added in v0.3.0

type TagClientGetEntityStateResponse struct {
	TagClientGetEntityStateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TagClientGetEntityStateResponse contains the response from method TagClient.GetEntityState.

type TagClientGetEntityStateResult added in v0.3.0

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

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

TagClientGetEntityStateResult contains the result from method TagClient.GetEntityState.

type TagClientGetOptions added in v0.3.0

type TagClientGetOptions struct {
}

TagClientGetOptions contains the optional parameters for the TagClient.Get method.

type TagClientGetResponse added in v0.3.0

type TagClientGetResponse struct {
	TagClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TagClientGetResponse contains the response from method TagClient.Get.

type TagClientGetResult added in v0.3.0

type TagClientGetResult struct {
	TagContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

TagClientGetResult contains the result from method TagClient.Get.

type TagClientListByAPIOptions added in v0.3.0

type TagClientListByAPIOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string
	// Number of records to skip.
	Skip *int32
	// Number of records to return.
	Top *int32
}

TagClientListByAPIOptions contains the optional parameters for the TagClient.ListByAPI method.

type TagClientListByAPIPager added in v0.3.0

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

TagClientListByAPIPager provides operations for iterating over paged responses.

func (*TagClientListByAPIPager) Err added in v0.3.0

func (p *TagClientListByAPIPager) Err() error

Err returns the last error encountered while paging.

func (*TagClientListByAPIPager) NextPage added in v0.3.0

func (p *TagClientListByAPIPager) NextPage(ctx context.Context) bool

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*TagClientListByAPIPager) PageResponse added in v0.3.0

PageResponse returns the current TagClientListByAPIResponse page.

type TagClientListByAPIResponse added in v0.3.0

type TagClientListByAPIResponse struct {
	TagClientListByAPIResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TagClientListByAPIResponse contains the response from method TagClient.ListByAPI.

type TagClientListByAPIResult added in v0.3.0

type TagClientListByAPIResult struct {
	TagCollection
}

TagClientListByAPIResult contains the result from method TagClient.ListByAPI.

type TagClientListByOperationOptions added in v0.3.0

type TagClientListByOperationOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string
	// Number of records to skip.
	Skip *int32
	// Number of records to return.
	Top *int32
}

TagClientListByOperationOptions contains the optional parameters for the TagClient.ListByOperation method.

type TagClientListByOperationPager added in v0.3.0

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

TagClientListByOperationPager provides operations for iterating over paged responses.

func (*TagClientListByOperationPager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*TagClientListByOperationPager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*TagClientListByOperationPager) PageResponse added in v0.3.0

PageResponse returns the current TagClientListByOperationResponse page.

type TagClientListByOperationResponse added in v0.3.0

type TagClientListByOperationResponse struct {
	TagClientListByOperationResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TagClientListByOperationResponse contains the response from method TagClient.ListByOperation.

type TagClientListByOperationResult added in v0.3.0

type TagClientListByOperationResult struct {
	TagCollection
}

TagClientListByOperationResult contains the result from method TagClient.ListByOperation.

type TagClientListByProductOptions added in v0.3.0

type TagClientListByProductOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string
	// Number of records to skip.
	Skip *int32
	// Number of records to return.
	Top *int32
}

TagClientListByProductOptions contains the optional parameters for the TagClient.ListByProduct method.

type TagClientListByProductPager added in v0.3.0

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

TagClientListByProductPager provides operations for iterating over paged responses.

func (*TagClientListByProductPager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*TagClientListByProductPager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*TagClientListByProductPager) PageResponse added in v0.3.0

PageResponse returns the current TagClientListByProductResponse page.

type TagClientListByProductResponse added in v0.3.0

type TagClientListByProductResponse struct {
	TagClientListByProductResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TagClientListByProductResponse contains the response from method TagClient.ListByProduct.

type TagClientListByProductResult added in v0.3.0

type TagClientListByProductResult struct {
	TagCollection
}

TagClientListByProductResult contains the result from method TagClient.ListByProduct.

type TagClientListByServiceOptions added in v0.3.0

type TagClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string
	// Scope like 'apis', 'products' or 'apis/{apiId}
	Scope *string
	// Number of records to skip.
	Skip *int32
	// Number of records to return.
	Top *int32
}

TagClientListByServiceOptions contains the optional parameters for the TagClient.ListByService method.

type TagClientListByServicePager added in v0.3.0

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

TagClientListByServicePager provides operations for iterating over paged responses.

func (*TagClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*TagClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*TagClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current TagClientListByServiceResponse page.

type TagClientListByServiceResponse added in v0.3.0

type TagClientListByServiceResponse struct {
	TagClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TagClientListByServiceResponse contains the response from method TagClient.ListByService.

type TagClientListByServiceResult added in v0.3.0

type TagClientListByServiceResult struct {
	TagCollection
}

TagClientListByServiceResult contains the result from method TagClient.ListByService.

type TagClientUpdateOptions added in v0.3.0

type TagClientUpdateOptions struct {
}

TagClientUpdateOptions contains the optional parameters for the TagClient.Update method.

type TagClientUpdateResponse added in v0.3.0

type TagClientUpdateResponse struct {
	TagClientUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TagClientUpdateResponse contains the response from method TagClient.Update.

type TagClientUpdateResult added in v0.3.0

type TagClientUpdateResult struct {
	TagContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

TagClientUpdateResult contains the result from method TagClient.Update.

type TagCollection

type TagCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// Next page link if any.
	NextLink *string `json:"nextLink,omitempty"`

	// Page values.
	Value []*TagContract `json:"value,omitempty"`
}

TagCollection - Paged Tag list representation.

func (TagCollection) MarshalJSON

func (t TagCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TagCollection.

type TagContract

type TagContract struct {
	// Tag entity contract properties.
	Properties *TagContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

TagContract - Tag Contract details.

type TagContractProperties

type TagContractProperties struct {
	// REQUIRED; Tag name.
	DisplayName *string `json:"displayName,omitempty"`
}

TagContractProperties - Tag contract Properties.

type TagCreateUpdateParameters

type TagCreateUpdateParameters struct {
	// Properties supplied to Create Tag operation.
	Properties *TagContractProperties `json:"properties,omitempty"`
}

TagCreateUpdateParameters - Parameters supplied to Create/Update Tag operations.

func (TagCreateUpdateParameters) MarshalJSON

func (t TagCreateUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TagCreateUpdateParameters.

type TagDescriptionBaseProperties

type TagDescriptionBaseProperties struct {
	// Description of the Tag.
	Description *string `json:"description,omitempty"`

	// Description of the external resources describing the tag.
	ExternalDocsDescription *string `json:"externalDocsDescription,omitempty"`

	// Absolute URL of external resources describing the tag.
	ExternalDocsURL *string `json:"externalDocsUrl,omitempty"`
}

TagDescriptionBaseProperties - Parameters supplied to the Create TagDescription operation.

type TagDescriptionCollection

type TagDescriptionCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// Next page link if any.
	NextLink *string `json:"nextLink,omitempty"`

	// Page values.
	Value []*TagDescriptionContract `json:"value,omitempty"`
}

TagDescriptionCollection - Paged TagDescription list representation.

func (TagDescriptionCollection) MarshalJSON

func (t TagDescriptionCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TagDescriptionCollection.

type TagDescriptionContract

type TagDescriptionContract struct {
	// TagDescription entity contract properties.
	Properties *TagDescriptionContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

TagDescriptionContract - Contract details.

type TagDescriptionContractProperties

type TagDescriptionContractProperties struct {
	// Description of the Tag.
	Description *string `json:"description,omitempty"`

	// Tag name.
	DisplayName *string `json:"displayName,omitempty"`

	// Description of the external resources describing the tag.
	ExternalDocsDescription *string `json:"externalDocsDescription,omitempty"`

	// Absolute URL of external resources describing the tag.
	ExternalDocsURL *string `json:"externalDocsUrl,omitempty"`

	// Identifier of the tag in the form of /tags/{tagId}
	TagID *string `json:"tagId,omitempty"`
}

TagDescriptionContractProperties - TagDescription contract Properties.

type TagDescriptionCreateParameters

type TagDescriptionCreateParameters struct {
	// Properties supplied to Create TagDescription operation.
	Properties *TagDescriptionBaseProperties `json:"properties,omitempty"`
}

TagDescriptionCreateParameters - Parameters supplied to the Create TagDescription operation.

type TagResourceClient

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

TagResourceClient contains the methods for the TagResource group. Don't use this type directly, use NewTagResourceClient() instead.

func NewTagResourceClient

func NewTagResourceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *TagResourceClient

NewTagResourceClient creates a new instance of TagResourceClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*TagResourceClient) ListByService

func (client *TagResourceClient) ListByService(resourceGroupName string, serviceName string, options *TagResourceClientListByServiceOptions) *TagResourceClientListByServicePager

ListByService - Lists a collection of resources associated with tags. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - TagResourceClientListByServiceOptions contains the optional parameters for the TagResourceClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListTagResources.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTagResourceClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		&armapimanagement.TagResourceClientListByServiceOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type TagResourceClientListByServiceOptions added in v0.3.0

type TagResourceClientListByServiceOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | state | filter | eq | |
	// | isCurrent | filter | eq | |
	Filter *string
	// Number of records to skip.
	Skip *int32
	// Number of records to return.
	Top *int32
}

TagResourceClientListByServiceOptions contains the optional parameters for the TagResourceClient.ListByService method.

type TagResourceClientListByServicePager added in v0.3.0

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

TagResourceClientListByServicePager provides operations for iterating over paged responses.

func (*TagResourceClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*TagResourceClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*TagResourceClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current TagResourceClientListByServiceResponse page.

type TagResourceClientListByServiceResponse added in v0.3.0

type TagResourceClientListByServiceResponse struct {
	TagResourceClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TagResourceClientListByServiceResponse contains the response from method TagResourceClient.ListByService.

type TagResourceClientListByServiceResult added in v0.3.0

type TagResourceClientListByServiceResult struct {
	TagResourceCollection
}

TagResourceClientListByServiceResult contains the result from method TagResourceClient.ListByService.

type TagResourceCollection

type TagResourceCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// Next page link if any.
	NextLink *string `json:"nextLink,omitempty"`

	// Page values.
	Value []*TagResourceContract `json:"value,omitempty"`
}

TagResourceCollection - Paged Tag list representation.

func (TagResourceCollection) MarshalJSON

func (t TagResourceCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TagResourceCollection.

type TagResourceContract

type TagResourceContract struct {
	// REQUIRED; Tag associated with the resource.
	Tag *TagResourceContractProperties `json:"tag,omitempty"`

	// API associated with the tag.
	API *APITagResourceContractProperties `json:"api,omitempty"`

	// Operation associated with the tag.
	Operation *OperationTagResourceContractProperties `json:"operation,omitempty"`

	// Product associated with the tag.
	Product *ProductTagResourceContractProperties `json:"product,omitempty"`
}

TagResourceContract - TagResource contract properties.

type TagResourceContractProperties

type TagResourceContractProperties struct {
	// Tag identifier
	ID *string `json:"id,omitempty"`

	// Tag Name
	Name *string `json:"name,omitempty"`
}

TagResourceContractProperties - Contract defining the Tag property in the Tag Resource Contract

type TemplateName

type TemplateName string
const (
	TemplateNameAccountClosedDeveloper                            TemplateName = "accountClosedDeveloper"
	TemplateNameApplicationApprovedNotificationMessage            TemplateName = "applicationApprovedNotificationMessage"
	TemplateNameConfirmSignUpIdentityDefault                      TemplateName = "confirmSignUpIdentityDefault"
	TemplateNameEmailChangeIdentityDefault                        TemplateName = "emailChangeIdentityDefault"
	TemplateNameInviteUserNotificationMessage                     TemplateName = "inviteUserNotificationMessage"
	TemplateNameNewCommentNotificationMessage                     TemplateName = "newCommentNotificationMessage"
	TemplateNameNewDeveloperNotificationMessage                   TemplateName = "newDeveloperNotificationMessage"
	TemplateNameNewIssueNotificationMessage                       TemplateName = "newIssueNotificationMessage"
	TemplateNamePasswordResetByAdminNotificationMessage           TemplateName = "passwordResetByAdminNotificationMessage"
	TemplateNamePasswordResetIdentityDefault                      TemplateName = "passwordResetIdentityDefault"
	TemplateNamePurchaseDeveloperNotificationMessage              TemplateName = "purchaseDeveloperNotificationMessage"
	TemplateNameQuotaLimitApproachingDeveloperNotificationMessage TemplateName = "quotaLimitApproachingDeveloperNotificationMessage"
	TemplateNameRejectDeveloperNotificationMessage                TemplateName = "rejectDeveloperNotificationMessage"
	TemplateNameRequestDeveloperNotificationMessage               TemplateName = "requestDeveloperNotificationMessage"
)

func PossibleTemplateNameValues

func PossibleTemplateNameValues() []TemplateName

PossibleTemplateNameValues returns the possible values for the TemplateName const type.

func (TemplateName) ToPtr

func (c TemplateName) ToPtr() *TemplateName

ToPtr returns a *TemplateName pointing to the current value.

type TenantAccessClient

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

TenantAccessClient contains the methods for the TenantAccess group. Don't use this type directly, use NewTenantAccessClient() instead.

func NewTenantAccessClient

func NewTenantAccessClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *TenantAccessClient

NewTenantAccessClient creates a new instance of TenantAccessClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*TenantAccessClient) Create

func (client *TenantAccessClient) Create(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, ifMatch string, parameters AccessInformationCreateParameters, options *TenantAccessClientCreateOptions) (TenantAccessClientCreateResponse, error)

Create - Update tenant access information details. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. accessName - The identifier of the Access configuration. ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. parameters - Parameters supplied to retrieve the Tenant Access Information. options - TenantAccessClientCreateOptions contains the optional parameters for the TenantAccessClient.Create method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateTenantAccess.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTenantAccessClient("<subscription-id>", cred, nil)
	res, err := client.Create(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.AccessIDName("access"),
		"<if-match>",
		armapimanagement.AccessInformationCreateParameters{
			Properties: &armapimanagement.AccessInformationCreateParameterProperties{
				Enabled: to.BoolPtr(true),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.TenantAccessClientCreateResult)
}
Output:

func (*TenantAccessClient) Get

func (client *TenantAccessClient) Get(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, options *TenantAccessClientGetOptions) (TenantAccessClientGetResponse, error)

Get - Get tenant access information details without secrets. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. accessName - The identifier of the Access configuration. options - TenantAccessClientGetOptions contains the optional parameters for the TenantAccessClient.Get method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTenantAccess.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTenantAccessClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.AccessIDName("access"),
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.TenantAccessClientGetResult)
}
Output:

func (*TenantAccessClient) GetEntityTag

func (client *TenantAccessClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, options *TenantAccessClientGetEntityTagOptions) (TenantAccessClientGetEntityTagResponse, error)

GetEntityTag - Tenant access metadata resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. accessName - The identifier of the Access configuration. options - TenantAccessClientGetEntityTagOptions contains the optional parameters for the TenantAccessClient.GetEntityTag method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadTenantAccess.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTenantAccessClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.AccessIDName("access"),
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*TenantAccessClient) ListByService

func (client *TenantAccessClient) ListByService(resourceGroupName string, serviceName string, options *TenantAccessClientListByServiceOptions) *TenantAccessClientListByServicePager

ListByService - Returns list of access infos - for Git and Management endpoints. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - TenantAccessClientListByServiceOptions contains the optional parameters for the TenantAccessClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListTenantAccess.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTenantAccessClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		&armapimanagement.TenantAccessClientListByServiceOptions{Filter: nil})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*TenantAccessClient) ListSecrets

func (client *TenantAccessClient) ListSecrets(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, options *TenantAccessClientListSecretsOptions) (TenantAccessClientListSecretsResponse, error)

ListSecrets - Get tenant access information details. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. accessName - The identifier of the Access configuration. options - TenantAccessClientListSecretsOptions contains the optional parameters for the TenantAccessClient.ListSecrets method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListSecretsTenantAccess.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTenantAccessClient("<subscription-id>", cred, nil)
	res, err := client.ListSecrets(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.AccessIDName("access"),
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.TenantAccessClientListSecretsResult)
}
Output:

func (*TenantAccessClient) RegeneratePrimaryKey

func (client *TenantAccessClient) RegeneratePrimaryKey(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, options *TenantAccessClientRegeneratePrimaryKeyOptions) (TenantAccessClientRegeneratePrimaryKeyResponse, error)

RegeneratePrimaryKey - Regenerate primary access key If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. accessName - The identifier of the Access configuration. options - TenantAccessClientRegeneratePrimaryKeyOptions contains the optional parameters for the TenantAccessClient.RegeneratePrimaryKey method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementTenantAccessRegenerateKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTenantAccessClient("<subscription-id>", cred, nil)
	_, err = client.RegeneratePrimaryKey(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.AccessIDName("access"),
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*TenantAccessClient) RegenerateSecondaryKey

func (client *TenantAccessClient) RegenerateSecondaryKey(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, options *TenantAccessClientRegenerateSecondaryKeyOptions) (TenantAccessClientRegenerateSecondaryKeyResponse, error)

RegenerateSecondaryKey - Regenerate secondary access key If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. accessName - The identifier of the Access configuration. options - TenantAccessClientRegenerateSecondaryKeyOptions contains the optional parameters for the TenantAccessClient.RegenerateSecondaryKey method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementTenantAccessRegenerateKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTenantAccessClient("<subscription-id>", cred, nil)
	_, err = client.RegenerateSecondaryKey(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.AccessIDName("access"),
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*TenantAccessClient) Update

func (client *TenantAccessClient) Update(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, ifMatch string, parameters AccessInformationUpdateParameters, options *TenantAccessClientUpdateOptions) (TenantAccessClientUpdateResponse, error)

Update - Update tenant access information details. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. accessName - The identifier of the Access configuration. ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. parameters - Parameters supplied to retrieve the Tenant Access Information. options - TenantAccessClientUpdateOptions contains the optional parameters for the TenantAccessClient.Update method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateTenantAccess.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTenantAccessClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.AccessIDName("access"),
		"<if-match>",
		armapimanagement.AccessInformationUpdateParameters{
			Properties: &armapimanagement.AccessInformationUpdateParameterProperties{
				Enabled: to.BoolPtr(true),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.TenantAccessClientUpdateResult)
}
Output:

type TenantAccessClientCreateOptions added in v0.3.0

type TenantAccessClientCreateOptions struct {
}

TenantAccessClientCreateOptions contains the optional parameters for the TenantAccessClient.Create method.

type TenantAccessClientCreateResponse added in v0.3.0

type TenantAccessClientCreateResponse struct {
	TenantAccessClientCreateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TenantAccessClientCreateResponse contains the response from method TenantAccessClient.Create.

type TenantAccessClientCreateResult added in v0.3.0

type TenantAccessClientCreateResult struct {
	AccessInformationContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

TenantAccessClientCreateResult contains the result from method TenantAccessClient.Create.

type TenantAccessClientGetEntityTagOptions added in v0.3.0

type TenantAccessClientGetEntityTagOptions struct {
}

TenantAccessClientGetEntityTagOptions contains the optional parameters for the TenantAccessClient.GetEntityTag method.

type TenantAccessClientGetEntityTagResponse added in v0.3.0

type TenantAccessClientGetEntityTagResponse struct {
	TenantAccessClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TenantAccessClientGetEntityTagResponse contains the response from method TenantAccessClient.GetEntityTag.

type TenantAccessClientGetEntityTagResult added in v0.3.0

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

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

TenantAccessClientGetEntityTagResult contains the result from method TenantAccessClient.GetEntityTag.

type TenantAccessClientGetOptions added in v0.3.0

type TenantAccessClientGetOptions struct {
}

TenantAccessClientGetOptions contains the optional parameters for the TenantAccessClient.Get method.

type TenantAccessClientGetResponse added in v0.3.0

type TenantAccessClientGetResponse struct {
	TenantAccessClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TenantAccessClientGetResponse contains the response from method TenantAccessClient.Get.

type TenantAccessClientGetResult added in v0.3.0

type TenantAccessClientGetResult struct {
	AccessInformationContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

TenantAccessClientGetResult contains the result from method TenantAccessClient.Get.

type TenantAccessClientListByServiceOptions added in v0.3.0

type TenantAccessClientListByServiceOptions struct {
	// Not used
	Filter *string
}

TenantAccessClientListByServiceOptions contains the optional parameters for the TenantAccessClient.ListByService method.

type TenantAccessClientListByServicePager added in v0.3.0

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

TenantAccessClientListByServicePager provides operations for iterating over paged responses.

func (*TenantAccessClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*TenantAccessClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*TenantAccessClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current TenantAccessClientListByServiceResponse page.

type TenantAccessClientListByServiceResponse added in v0.3.0

type TenantAccessClientListByServiceResponse struct {
	TenantAccessClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TenantAccessClientListByServiceResponse contains the response from method TenantAccessClient.ListByService.

type TenantAccessClientListByServiceResult added in v0.3.0

type TenantAccessClientListByServiceResult struct {
	AccessInformationCollection
}

TenantAccessClientListByServiceResult contains the result from method TenantAccessClient.ListByService.

type TenantAccessClientListSecretsOptions added in v0.3.0

type TenantAccessClientListSecretsOptions struct {
}

TenantAccessClientListSecretsOptions contains the optional parameters for the TenantAccessClient.ListSecrets method.

type TenantAccessClientListSecretsResponse added in v0.3.0

type TenantAccessClientListSecretsResponse struct {
	TenantAccessClientListSecretsResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TenantAccessClientListSecretsResponse contains the response from method TenantAccessClient.ListSecrets.

type TenantAccessClientListSecretsResult added in v0.3.0

type TenantAccessClientListSecretsResult struct {
	AccessInformationSecretsContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

TenantAccessClientListSecretsResult contains the result from method TenantAccessClient.ListSecrets.

type TenantAccessClientRegeneratePrimaryKeyOptions added in v0.3.0

type TenantAccessClientRegeneratePrimaryKeyOptions struct {
}

TenantAccessClientRegeneratePrimaryKeyOptions contains the optional parameters for the TenantAccessClient.RegeneratePrimaryKey method.

type TenantAccessClientRegeneratePrimaryKeyResponse added in v0.3.0

type TenantAccessClientRegeneratePrimaryKeyResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TenantAccessClientRegeneratePrimaryKeyResponse contains the response from method TenantAccessClient.RegeneratePrimaryKey.

type TenantAccessClientRegenerateSecondaryKeyOptions added in v0.3.0

type TenantAccessClientRegenerateSecondaryKeyOptions struct {
}

TenantAccessClientRegenerateSecondaryKeyOptions contains the optional parameters for the TenantAccessClient.RegenerateSecondaryKey method.

type TenantAccessClientRegenerateSecondaryKeyResponse added in v0.3.0

type TenantAccessClientRegenerateSecondaryKeyResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TenantAccessClientRegenerateSecondaryKeyResponse contains the response from method TenantAccessClient.RegenerateSecondaryKey.

type TenantAccessClientUpdateOptions added in v0.3.0

type TenantAccessClientUpdateOptions struct {
}

TenantAccessClientUpdateOptions contains the optional parameters for the TenantAccessClient.Update method.

type TenantAccessClientUpdateResponse added in v0.3.0

type TenantAccessClientUpdateResponse struct {
	TenantAccessClientUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TenantAccessClientUpdateResponse contains the response from method TenantAccessClient.Update.

type TenantAccessClientUpdateResult added in v0.3.0

type TenantAccessClientUpdateResult struct {
	AccessInformationContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

TenantAccessClientUpdateResult contains the result from method TenantAccessClient.Update.

type TenantAccessGitClient

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

TenantAccessGitClient contains the methods for the TenantAccessGit group. Don't use this type directly, use NewTenantAccessGitClient() instead.

func NewTenantAccessGitClient

func NewTenantAccessGitClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *TenantAccessGitClient

NewTenantAccessGitClient creates a new instance of TenantAccessGitClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*TenantAccessGitClient) RegeneratePrimaryKey

func (client *TenantAccessGitClient) RegeneratePrimaryKey(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, options *TenantAccessGitClientRegeneratePrimaryKeyOptions) (TenantAccessGitClientRegeneratePrimaryKeyResponse, error)

RegeneratePrimaryKey - Regenerate primary access key for GIT. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. accessName - The identifier of the Access configuration. options - TenantAccessGitClientRegeneratePrimaryKeyOptions contains the optional parameters for the TenantAccessGitClient.RegeneratePrimaryKey method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementTenantAccessRegenerateKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTenantAccessGitClient("<subscription-id>", cred, nil)
	_, err = client.RegeneratePrimaryKey(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.AccessIDName("access"),
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*TenantAccessGitClient) RegenerateSecondaryKey

func (client *TenantAccessGitClient) RegenerateSecondaryKey(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, options *TenantAccessGitClientRegenerateSecondaryKeyOptions) (TenantAccessGitClientRegenerateSecondaryKeyResponse, error)

RegenerateSecondaryKey - Regenerate secondary access key for GIT. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. accessName - The identifier of the Access configuration. options - TenantAccessGitClientRegenerateSecondaryKeyOptions contains the optional parameters for the TenantAccessGitClient.RegenerateSecondaryKey method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementTenantAccessRegenerateKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTenantAccessGitClient("<subscription-id>", cred, nil)
	_, err = client.RegenerateSecondaryKey(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.AccessIDName("access"),
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

type TenantAccessGitClientRegeneratePrimaryKeyOptions added in v0.3.0

type TenantAccessGitClientRegeneratePrimaryKeyOptions struct {
}

TenantAccessGitClientRegeneratePrimaryKeyOptions contains the optional parameters for the TenantAccessGitClient.RegeneratePrimaryKey method.

type TenantAccessGitClientRegeneratePrimaryKeyResponse added in v0.3.0

type TenantAccessGitClientRegeneratePrimaryKeyResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TenantAccessGitClientRegeneratePrimaryKeyResponse contains the response from method TenantAccessGitClient.RegeneratePrimaryKey.

type TenantAccessGitClientRegenerateSecondaryKeyOptions added in v0.3.0

type TenantAccessGitClientRegenerateSecondaryKeyOptions struct {
}

TenantAccessGitClientRegenerateSecondaryKeyOptions contains the optional parameters for the TenantAccessGitClient.RegenerateSecondaryKey method.

type TenantAccessGitClientRegenerateSecondaryKeyResponse added in v0.3.0

type TenantAccessGitClientRegenerateSecondaryKeyResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TenantAccessGitClientRegenerateSecondaryKeyResponse contains the response from method TenantAccessGitClient.RegenerateSecondaryKey.

type TenantConfigurationClient

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

TenantConfigurationClient contains the methods for the TenantConfiguration group. Don't use this type directly, use NewTenantConfigurationClient() instead.

func NewTenantConfigurationClient

func NewTenantConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *TenantConfigurationClient

NewTenantConfigurationClient creates a new instance of TenantConfigurationClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*TenantConfigurationClient) BeginDeploy

BeginDeploy - This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. configurationName - The identifier of the Git Configuration Operation. parameters - Deploy Configuration parameters. options - TenantConfigurationClientBeginDeployOptions contains the optional parameters for the TenantConfigurationClient.BeginDeploy method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementTenantConfigurationDeploy.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTenantConfigurationClient("<subscription-id>", cred, nil)
	poller, err := client.BeginDeploy(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.ConfigurationIDName("configuration"),
		armapimanagement.DeployConfigurationParameters{
			Properties: &armapimanagement.DeployConfigurationParameterProperties{
				Branch: to.StringPtr("<branch>"),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.TenantConfigurationClientDeployResult)
}
Output:

func (*TenantConfigurationClient) BeginSave

BeginSave - This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. configurationName - The identifier of the Git Configuration Operation. parameters - Save Configuration parameters. options - TenantConfigurationClientBeginSaveOptions contains the optional parameters for the TenantConfigurationClient.BeginSave method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementTenantConfigurationSave.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTenantConfigurationClient("<subscription-id>", cred, nil)
	poller, err := client.BeginSave(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.ConfigurationIDName("configuration"),
		armapimanagement.SaveConfigurationParameter{
			Properties: &armapimanagement.SaveConfigurationParameterProperties{
				Branch: to.StringPtr("<branch>"),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.TenantConfigurationClientSaveResult)
}
Output:

func (*TenantConfigurationClient) BeginValidate

BeginValidate - This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. configurationName - The identifier of the Git Configuration Operation. parameters - Validate Configuration parameters. options - TenantConfigurationClientBeginValidateOptions contains the optional parameters for the TenantConfigurationClient.BeginValidate method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementTenantConfigurationValidate.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTenantConfigurationClient("<subscription-id>", cred, nil)
	poller, err := client.BeginValidate(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.ConfigurationIDName("configuration"),
		armapimanagement.DeployConfigurationParameters{
			Properties: &armapimanagement.DeployConfigurationParameterProperties{
				Branch: to.StringPtr("<branch>"),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	res, err := poller.PollUntilDone(ctx, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.TenantConfigurationClientValidateResult)
}
Output:

func (*TenantConfigurationClient) GetSyncState

GetSyncState - Gets the status of the most recent synchronization between the configuration database and the Git repository. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. configurationName - The identifier of the Git Configuration Operation. options - TenantConfigurationClientGetSyncStateOptions contains the optional parameters for the TenantConfigurationClient.GetSyncState method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementTenantAccessSyncState.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTenantConfigurationClient("<subscription-id>", cred, nil)
	res, err := client.GetSyncState(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.ConfigurationIDName("configuration"),
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.TenantConfigurationClientGetSyncStateResult)
}
Output:

type TenantConfigurationClientBeginDeployOptions added in v0.3.0

type TenantConfigurationClientBeginDeployOptions struct {
}

TenantConfigurationClientBeginDeployOptions contains the optional parameters for the TenantConfigurationClient.BeginDeploy method.

type TenantConfigurationClientBeginSaveOptions added in v0.3.0

type TenantConfigurationClientBeginSaveOptions struct {
}

TenantConfigurationClientBeginSaveOptions contains the optional parameters for the TenantConfigurationClient.BeginSave method.

type TenantConfigurationClientBeginValidateOptions added in v0.3.0

type TenantConfigurationClientBeginValidateOptions struct {
}

TenantConfigurationClientBeginValidateOptions contains the optional parameters for the TenantConfigurationClient.BeginValidate method.

type TenantConfigurationClientDeployPoller added in v0.3.0

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

TenantConfigurationClientDeployPoller provides polling facilities until the operation reaches a terminal state.

func (*TenantConfigurationClientDeployPoller) Done added in v0.3.0

Done returns true if the LRO has reached a terminal state.

func (*TenantConfigurationClientDeployPoller) FinalResponse added in v0.3.0

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final TenantConfigurationClientDeployResponse will be returned.

func (*TenantConfigurationClientDeployPoller) Poll added in v0.3.0

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*TenantConfigurationClientDeployPoller) ResumeToken added in v0.3.0

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type TenantConfigurationClientDeployPollerResponse added in v0.3.0

type TenantConfigurationClientDeployPollerResponse struct {
	// Poller contains an initialized poller.
	Poller *TenantConfigurationClientDeployPoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TenantConfigurationClientDeployPollerResponse contains the response from method TenantConfigurationClient.Deploy.

func (TenantConfigurationClientDeployPollerResponse) PollUntilDone added in v0.3.0

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*TenantConfigurationClientDeployPollerResponse) Resume added in v0.3.0

Resume rehydrates a TenantConfigurationClientDeployPollerResponse from the provided client and resume token.

type TenantConfigurationClientDeployResponse added in v0.3.0

type TenantConfigurationClientDeployResponse struct {
	TenantConfigurationClientDeployResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TenantConfigurationClientDeployResponse contains the response from method TenantConfigurationClient.Deploy.

type TenantConfigurationClientDeployResult added in v0.3.0

type TenantConfigurationClientDeployResult struct {
	OperationResultContract
}

TenantConfigurationClientDeployResult contains the result from method TenantConfigurationClient.Deploy.

type TenantConfigurationClientGetSyncStateOptions added in v0.3.0

type TenantConfigurationClientGetSyncStateOptions struct {
}

TenantConfigurationClientGetSyncStateOptions contains the optional parameters for the TenantConfigurationClient.GetSyncState method.

type TenantConfigurationClientGetSyncStateResponse added in v0.3.0

type TenantConfigurationClientGetSyncStateResponse struct {
	TenantConfigurationClientGetSyncStateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TenantConfigurationClientGetSyncStateResponse contains the response from method TenantConfigurationClient.GetSyncState.

type TenantConfigurationClientGetSyncStateResult added in v0.3.0

type TenantConfigurationClientGetSyncStateResult struct {
	TenantConfigurationSyncStateContract
}

TenantConfigurationClientGetSyncStateResult contains the result from method TenantConfigurationClient.GetSyncState.

type TenantConfigurationClientSavePoller added in v0.3.0

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

TenantConfigurationClientSavePoller provides polling facilities until the operation reaches a terminal state.

func (*TenantConfigurationClientSavePoller) Done added in v0.3.0

Done returns true if the LRO has reached a terminal state.

func (*TenantConfigurationClientSavePoller) FinalResponse added in v0.3.0

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final TenantConfigurationClientSaveResponse will be returned.

func (*TenantConfigurationClientSavePoller) Poll added in v0.3.0

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*TenantConfigurationClientSavePoller) ResumeToken added in v0.3.0

func (p *TenantConfigurationClientSavePoller) ResumeToken() (string, error)

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type TenantConfigurationClientSavePollerResponse added in v0.3.0

type TenantConfigurationClientSavePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *TenantConfigurationClientSavePoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TenantConfigurationClientSavePollerResponse contains the response from method TenantConfigurationClient.Save.

func (TenantConfigurationClientSavePollerResponse) PollUntilDone added in v0.3.0

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*TenantConfigurationClientSavePollerResponse) Resume added in v0.3.0

Resume rehydrates a TenantConfigurationClientSavePollerResponse from the provided client and resume token.

type TenantConfigurationClientSaveResponse added in v0.3.0

type TenantConfigurationClientSaveResponse struct {
	TenantConfigurationClientSaveResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TenantConfigurationClientSaveResponse contains the response from method TenantConfigurationClient.Save.

type TenantConfigurationClientSaveResult added in v0.3.0

type TenantConfigurationClientSaveResult struct {
	OperationResultContract
}

TenantConfigurationClientSaveResult contains the result from method TenantConfigurationClient.Save.

type TenantConfigurationClientValidatePoller added in v0.3.0

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

TenantConfigurationClientValidatePoller provides polling facilities until the operation reaches a terminal state.

func (*TenantConfigurationClientValidatePoller) Done added in v0.3.0

Done returns true if the LRO has reached a terminal state.

func (*TenantConfigurationClientValidatePoller) FinalResponse added in v0.3.0

FinalResponse performs a final GET to the service and returns the final response for the polling operation. If there is an error performing the final GET then an error is returned. If the final GET succeeded then the final TenantConfigurationClientValidateResponse will be returned.

func (*TenantConfigurationClientValidatePoller) Poll added in v0.3.0

Poll fetches the latest state of the LRO. It returns an HTTP response or error. If the LRO has completed successfully, the poller's state is updated and the HTTP response is returned. If the LRO has completed with failure or was cancelled, the poller's state is updated and the error is returned. If the LRO has not reached a terminal state, the poller's state is updated and the latest HTTP response is returned. If Poll fails, the poller's state is unmodified and the error is returned. Calling Poll on an LRO that has reached a terminal state will return the final HTTP response or error.

func (*TenantConfigurationClientValidatePoller) ResumeToken added in v0.3.0

ResumeToken returns a value representing the poller that can be used to resume the LRO at a later time. ResumeTokens are unique per service operation.

type TenantConfigurationClientValidatePollerResponse added in v0.3.0

type TenantConfigurationClientValidatePollerResponse struct {
	// Poller contains an initialized poller.
	Poller *TenantConfigurationClientValidatePoller

	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TenantConfigurationClientValidatePollerResponse contains the response from method TenantConfigurationClient.Validate.

func (TenantConfigurationClientValidatePollerResponse) PollUntilDone added in v0.3.0

PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. A good starting value is 30 seconds. Note that some resources might benefit from a different value.

func (*TenantConfigurationClientValidatePollerResponse) Resume added in v0.3.0

Resume rehydrates a TenantConfigurationClientValidatePollerResponse from the provided client and resume token.

type TenantConfigurationClientValidateResponse added in v0.3.0

type TenantConfigurationClientValidateResponse struct {
	TenantConfigurationClientValidateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TenantConfigurationClientValidateResponse contains the response from method TenantConfigurationClient.Validate.

type TenantConfigurationClientValidateResult added in v0.3.0

type TenantConfigurationClientValidateResult struct {
	OperationResultContract
}

TenantConfigurationClientValidateResult contains the result from method TenantConfigurationClient.Validate.

type TenantConfigurationSyncStateContract

type TenantConfigurationSyncStateContract struct {
	// Properties returned Tenant Configuration Sync State check.
	Properties *TenantConfigurationSyncStateContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

TenantConfigurationSyncStateContract - Result of Tenant Configuration Sync State.

type TenantConfigurationSyncStateContractProperties

type TenantConfigurationSyncStateContractProperties struct {
	// The name of Git branch.
	Branch *string `json:"branch,omitempty"`

	// The latest commit Id.
	CommitID *string `json:"commitId,omitempty"`

	// The date of the latest configuration change. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified
	// by the ISO 8601 standard.
	ConfigurationChangeDate *time.Time `json:"configurationChangeDate,omitempty"`

	// value indicating if last sync was save (true) or deploy (false) operation.
	IsExport *bool `json:"isExport,omitempty"`

	// value indicating whether Git configuration access is enabled.
	IsGitEnabled *bool `json:"isGitEnabled,omitempty"`

	// value indicating if last synchronization was later than the configuration change.
	IsSynced *bool `json:"isSynced,omitempty"`

	// Most recent tenant configuration operation identifier
	LastOperationID *string `json:"lastOperationId,omitempty"`

	// The date of the latest synchronization. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by
	// the ISO 8601 standard.
	SyncDate *time.Time `json:"syncDate,omitempty"`
}

TenantConfigurationSyncStateContractProperties - Tenant Configuration Synchronization State.

func (TenantConfigurationSyncStateContractProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type TenantConfigurationSyncStateContractProperties.

func (*TenantConfigurationSyncStateContractProperties) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type TenantConfigurationSyncStateContractProperties.

type TenantSettingsClient

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

TenantSettingsClient contains the methods for the TenantSettings group. Don't use this type directly, use NewTenantSettingsClient() instead.

func NewTenantSettingsClient

func NewTenantSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *TenantSettingsClient

NewTenantSettingsClient creates a new instance of TenantSettingsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*TenantSettingsClient) Get

func (client *TenantSettingsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, settingsType SettingsTypeName, options *TenantSettingsClientGetOptions) (TenantSettingsClientGetResponse, error)

Get - Get tenant settings. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. settingsType - The identifier of the settings. options - TenantSettingsClientGetOptions contains the optional parameters for the TenantSettingsClient.Get method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTenantSettings.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTenantSettingsClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		armapimanagement.SettingsTypeName("public"),
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.TenantSettingsClientGetResult)
}
Output:

func (*TenantSettingsClient) ListByService

func (client *TenantSettingsClient) ListByService(resourceGroupName string, serviceName string, options *TenantSettingsClientListByServiceOptions) *TenantSettingsClientListByServicePager

ListByService - Public settings. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - TenantSettingsClientListByServiceOptions contains the optional parameters for the TenantSettingsClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListTenantSettings.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewTenantSettingsClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		&armapimanagement.TenantSettingsClientListByServiceOptions{Filter: nil})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type TenantSettingsClientGetOptions added in v0.3.0

type TenantSettingsClientGetOptions struct {
}

TenantSettingsClientGetOptions contains the optional parameters for the TenantSettingsClient.Get method.

type TenantSettingsClientGetResponse added in v0.3.0

type TenantSettingsClientGetResponse struct {
	TenantSettingsClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TenantSettingsClientGetResponse contains the response from method TenantSettingsClient.Get.

type TenantSettingsClientGetResult added in v0.3.0

type TenantSettingsClientGetResult struct {
	TenantSettingsContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

TenantSettingsClientGetResult contains the result from method TenantSettingsClient.Get.

type TenantSettingsClientListByServiceOptions added in v0.3.0

type TenantSettingsClientListByServiceOptions struct {
	// Not used
	Filter *string
}

TenantSettingsClientListByServiceOptions contains the optional parameters for the TenantSettingsClient.ListByService method.

type TenantSettingsClientListByServicePager added in v0.3.0

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

TenantSettingsClientListByServicePager provides operations for iterating over paged responses.

func (*TenantSettingsClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*TenantSettingsClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*TenantSettingsClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current TenantSettingsClientListByServiceResponse page.

type TenantSettingsClientListByServiceResponse added in v0.3.0

type TenantSettingsClientListByServiceResponse struct {
	TenantSettingsClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

TenantSettingsClientListByServiceResponse contains the response from method TenantSettingsClient.ListByService.

type TenantSettingsClientListByServiceResult added in v0.3.0

type TenantSettingsClientListByServiceResult struct {
	TenantSettingsCollection
}

TenantSettingsClientListByServiceResult contains the result from method TenantSettingsClient.ListByService.

type TenantSettingsCollection

type TenantSettingsCollection struct {
	// READ-ONLY; Next page link if any.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; Page values.
	Value []*TenantSettingsContract `json:"value,omitempty" azure:"ro"`
}

TenantSettingsCollection - Paged AccessInformation list representation.

func (TenantSettingsCollection) MarshalJSON

func (t TenantSettingsCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TenantSettingsCollection.

type TenantSettingsContract

type TenantSettingsContract struct {
	// TenantSettings entity contract properties.
	Properties *TenantSettingsContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

TenantSettingsContract - Tenant Settings.

type TenantSettingsContractProperties

type TenantSettingsContractProperties struct {
	// Tenant settings
	Settings map[string]*string `json:"settings,omitempty"`
}

TenantSettingsContractProperties - Tenant access information contract of the API Management service.

func (TenantSettingsContractProperties) MarshalJSON

func (t TenantSettingsContractProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TenantSettingsContractProperties.

type TermsOfServiceProperties

type TermsOfServiceProperties struct {
	// Ask user for consent to the terms of service.
	ConsentRequired *bool `json:"consentRequired,omitempty"`

	// Display terms of service during a sign-up process.
	Enabled *bool `json:"enabled,omitempty"`

	// A terms of service text.
	Text *string `json:"text,omitempty"`
}

TermsOfServiceProperties - Terms of service contract properties.

type TokenBodyParameterContract

type TokenBodyParameterContract struct {
	// REQUIRED; body parameter name.
	Name *string `json:"name,omitempty"`

	// REQUIRED; body parameter value.
	Value *string `json:"value,omitempty"`
}

TokenBodyParameterContract - OAuth acquire token request body parameter (www-url-form-encoded).

type UserClient

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

UserClient contains the methods for the User group. Don't use this type directly, use NewUserClient() instead.

func NewUserClient

func NewUserClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *UserClient

NewUserClient creates a new instance of UserClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*UserClient) CreateOrUpdate

func (client *UserClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, userID string, parameters UserCreateParameters, options *UserClientCreateOrUpdateOptions) (UserClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or Updates a user. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. userID - User identifier. Must be unique in the current API Management service instance. parameters - Create or update parameters. options - UserClientCreateOrUpdateOptions contains the optional parameters for the UserClient.CreateOrUpdate method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateUser.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewUserClient("<subscription-id>", cred, nil)
	res, err := client.CreateOrUpdate(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<user-id>",
		armapimanagement.UserCreateParameters{
			Properties: &armapimanagement.UserCreateParameterProperties{
				Confirmation: armapimanagement.Confirmation("signup").ToPtr(),
				Email:        to.StringPtr("<email>"),
				FirstName:    to.StringPtr("<first-name>"),
				LastName:     to.StringPtr("<last-name>"),
			},
		},
		&armapimanagement.UserClientCreateOrUpdateOptions{Notify: nil,
			IfMatch: nil,
		})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.UserClientCreateOrUpdateResult)
}
Output:

func (*UserClient) Delete

func (client *UserClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, userID string, ifMatch string, options *UserClientDeleteOptions) (UserClientDeleteResponse, error)

Delete - Deletes specific user. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. userID - User identifier. Must be unique in the current API Management service instance. ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. options - UserClientDeleteOptions contains the optional parameters for the UserClient.Delete method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteUser.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewUserClient("<subscription-id>", cred, nil)
	_, err = client.Delete(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<user-id>",
		"<if-match>",
		&armapimanagement.UserClientDeleteOptions{DeleteSubscriptions: nil,
			Notify:  nil,
			AppType: nil,
		})
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*UserClient) GenerateSsoURL

func (client *UserClient) GenerateSsoURL(ctx context.Context, resourceGroupName string, serviceName string, userID string, options *UserClientGenerateSsoURLOptions) (UserClientGenerateSsoURLResponse, error)

GenerateSsoURL - Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. userID - User identifier. Must be unique in the current API Management service instance. options - UserClientGenerateSsoURLOptions contains the optional parameters for the UserClient.GenerateSsoURL method.

func (*UserClient) Get

func (client *UserClient) Get(ctx context.Context, resourceGroupName string, serviceName string, userID string, options *UserClientGetOptions) (UserClientGetResponse, error)

Get - Gets the details of the user specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. userID - User identifier. Must be unique in the current API Management service instance. options - UserClientGetOptions contains the optional parameters for the UserClient.Get method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetUser.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewUserClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<user-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.UserClientGetResult)
}
Output:

func (*UserClient) GetEntityTag

func (client *UserClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, userID string, options *UserClientGetEntityTagOptions) (UserClientGetEntityTagResponse, error)

GetEntityTag - Gets the entity state (Etag) version of the user specified by its identifier. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. userID - User identifier. Must be unique in the current API Management service instance. options - UserClientGetEntityTagOptions contains the optional parameters for the UserClient.GetEntityTag method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadUser.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewUserClient("<subscription-id>", cred, nil)
	_, err = client.GetEntityTag(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<user-id>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*UserClient) GetSharedAccessToken

func (client *UserClient) GetSharedAccessToken(ctx context.Context, resourceGroupName string, serviceName string, userID string, parameters UserTokenParameters, options *UserClientGetSharedAccessTokenOptions) (UserClientGetSharedAccessTokenResponse, error)

GetSharedAccessToken - Gets the Shared Access Authorization Token for the User. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. userID - User identifier. Must be unique in the current API Management service instance. parameters - Create Authorization Token parameters. options - UserClientGetSharedAccessTokenOptions contains the optional parameters for the UserClient.GetSharedAccessToken method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUserToken.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewUserClient("<subscription-id>", cred, nil)
	res, err := client.GetSharedAccessToken(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<user-id>",
		armapimanagement.UserTokenParameters{
			Properties: &armapimanagement.UserTokenParameterProperties{
				Expiry:  to.TimePtr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T00:44:24.2845269Z"); return t }()),
				KeyType: armapimanagement.KeyTypePrimary.ToPtr(),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.UserClientGetSharedAccessTokenResult)
}
Output:

func (*UserClient) ListByService

func (client *UserClient) ListByService(resourceGroupName string, serviceName string, options *UserClientListByServiceOptions) *UserClientListByServicePager

ListByService - Lists a collection of registered users in the specified service instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. options - UserClientListByServiceOptions contains the optional parameters for the UserClient.ListByService method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListUsers.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewUserClient("<subscription-id>", cred, nil)
	pager := client.ListByService("<resource-group-name>",
		"<service-name>",
		&armapimanagement.UserClientListByServiceOptions{Filter: nil,
			Top:          nil,
			Skip:         nil,
			ExpandGroups: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

func (*UserClient) Update

func (client *UserClient) Update(ctx context.Context, resourceGroupName string, serviceName string, userID string, ifMatch string, parameters UserUpdateParameters, options *UserClientUpdateOptions) (UserClientUpdateResponse, error)

Update - Updates the details of the user specified by its identifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. userID - User identifier. Must be unique in the current API Management service instance. ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. parameters - Update parameters. options - UserClientUpdateOptions contains the optional parameters for the UserClient.Update method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateUser.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewUserClient("<subscription-id>", cred, nil)
	res, err := client.Update(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<user-id>",
		"<if-match>",
		armapimanagement.UserUpdateParameters{
			Properties: &armapimanagement.UserUpdateParametersProperties{
				Email:     to.StringPtr("<email>"),
				FirstName: to.StringPtr("<first-name>"),
				LastName:  to.StringPtr("<last-name>"),
			},
		},
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.UserClientUpdateResult)
}
Output:

type UserClientCreateOrUpdateOptions added in v0.3.0

type UserClientCreateOrUpdateOptions struct {
	// ETag of the Entity. Not required when creating an entity, but required when updating an entity.
	IfMatch *string
	// Send an Email notification to the User.
	Notify *bool
}

UserClientCreateOrUpdateOptions contains the optional parameters for the UserClient.CreateOrUpdate method.

type UserClientCreateOrUpdateResponse added in v0.3.0

type UserClientCreateOrUpdateResponse struct {
	UserClientCreateOrUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

UserClientCreateOrUpdateResponse contains the response from method UserClient.CreateOrUpdate.

type UserClientCreateOrUpdateResult added in v0.3.0

type UserClientCreateOrUpdateResult struct {
	UserContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

UserClientCreateOrUpdateResult contains the result from method UserClient.CreateOrUpdate.

type UserClientDeleteOptions added in v0.3.0

type UserClientDeleteOptions struct {
	// Determines the type of application which send the create user request. Default is legacy publisher portal.
	AppType *AppType
	// Whether to delete user's subscription or not.
	DeleteSubscriptions *bool
	// Send an Account Closed Email notification to the User.
	Notify *bool
}

UserClientDeleteOptions contains the optional parameters for the UserClient.Delete method.

type UserClientDeleteResponse added in v0.3.0

type UserClientDeleteResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

UserClientDeleteResponse contains the response from method UserClient.Delete.

type UserClientGenerateSsoURLOptions added in v0.3.0

type UserClientGenerateSsoURLOptions struct {
}

UserClientGenerateSsoURLOptions contains the optional parameters for the UserClient.GenerateSsoURL method.

type UserClientGenerateSsoURLResponse added in v0.3.0

type UserClientGenerateSsoURLResponse struct {
	UserClientGenerateSsoURLResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

UserClientGenerateSsoURLResponse contains the response from method UserClient.GenerateSsoURL.

type UserClientGenerateSsoURLResult added in v0.3.0

type UserClientGenerateSsoURLResult struct {
	GenerateSsoURLResult
}

UserClientGenerateSsoURLResult contains the result from method UserClient.GenerateSsoURL.

type UserClientGetEntityTagOptions added in v0.3.0

type UserClientGetEntityTagOptions struct {
}

UserClientGetEntityTagOptions contains the optional parameters for the UserClient.GetEntityTag method.

type UserClientGetEntityTagResponse added in v0.3.0

type UserClientGetEntityTagResponse struct {
	UserClientGetEntityTagResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

UserClientGetEntityTagResponse contains the response from method UserClient.GetEntityTag.

type UserClientGetEntityTagResult added in v0.3.0

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

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

UserClientGetEntityTagResult contains the result from method UserClient.GetEntityTag.

type UserClientGetOptions added in v0.3.0

type UserClientGetOptions struct {
}

UserClientGetOptions contains the optional parameters for the UserClient.Get method.

type UserClientGetResponse added in v0.3.0

type UserClientGetResponse struct {
	UserClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

UserClientGetResponse contains the response from method UserClient.Get.

type UserClientGetResult added in v0.3.0

type UserClientGetResult struct {
	UserContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

UserClientGetResult contains the result from method UserClient.Get.

type UserClientGetSharedAccessTokenOptions added in v0.3.0

type UserClientGetSharedAccessTokenOptions struct {
}

UserClientGetSharedAccessTokenOptions contains the optional parameters for the UserClient.GetSharedAccessToken method.

type UserClientGetSharedAccessTokenResponse added in v0.3.0

type UserClientGetSharedAccessTokenResponse struct {
	UserClientGetSharedAccessTokenResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

UserClientGetSharedAccessTokenResponse contains the response from method UserClient.GetSharedAccessToken.

type UserClientGetSharedAccessTokenResult added in v0.3.0

type UserClientGetSharedAccessTokenResult struct {
	UserTokenResult
}

UserClientGetSharedAccessTokenResult contains the result from method UserClient.GetSharedAccessToken.

type UserClientListByServiceOptions added in v0.3.0

type UserClientListByServiceOptions struct {
	// Detailed Group in response.
	ExpandGroups *bool
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|-------------|-------------|-------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | state | filter | eq | |
	// | registrationDate | filter | ge, le, eq, ne, gt, lt | |
	// | note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | groups | expand | | |
	Filter *string
	// Number of records to skip.
	Skip *int32
	// Number of records to return.
	Top *int32
}

UserClientListByServiceOptions contains the optional parameters for the UserClient.ListByService method.

type UserClientListByServicePager added in v0.3.0

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

UserClientListByServicePager provides operations for iterating over paged responses.

func (*UserClientListByServicePager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*UserClientListByServicePager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*UserClientListByServicePager) PageResponse added in v0.3.0

PageResponse returns the current UserClientListByServiceResponse page.

type UserClientListByServiceResponse added in v0.3.0

type UserClientListByServiceResponse struct {
	UserClientListByServiceResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

UserClientListByServiceResponse contains the response from method UserClient.ListByService.

type UserClientListByServiceResult added in v0.3.0

type UserClientListByServiceResult struct {
	UserCollection
}

UserClientListByServiceResult contains the result from method UserClient.ListByService.

type UserClientUpdateOptions added in v0.3.0

type UserClientUpdateOptions struct {
}

UserClientUpdateOptions contains the optional parameters for the UserClient.Update method.

type UserClientUpdateResponse added in v0.3.0

type UserClientUpdateResponse struct {
	UserClientUpdateResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

UserClientUpdateResponse contains the response from method UserClient.Update.

type UserClientUpdateResult added in v0.3.0

type UserClientUpdateResult struct {
	UserContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

UserClientUpdateResult contains the result from method UserClient.Update.

type UserCollection

type UserCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// Next page link if any.
	NextLink *string `json:"nextLink,omitempty"`

	// Page values.
	Value []*UserContract `json:"value,omitempty"`
}

UserCollection - Paged Users list representation.

func (UserCollection) MarshalJSON

func (u UserCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserCollection.

type UserConfirmationPasswordClient

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

UserConfirmationPasswordClient contains the methods for the UserConfirmationPassword group. Don't use this type directly, use NewUserConfirmationPasswordClient() instead.

func NewUserConfirmationPasswordClient

func NewUserConfirmationPasswordClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *UserConfirmationPasswordClient

NewUserConfirmationPasswordClient creates a new instance of UserConfirmationPasswordClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*UserConfirmationPasswordClient) Send

Send - Sends confirmation If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. userID - User identifier. Must be unique in the current API Management service instance. options - UserConfirmationPasswordClientSendOptions contains the optional parameters for the UserConfirmationPasswordClient.Send method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUserConfirmationPasswordSend.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewUserConfirmationPasswordClient("<subscription-id>", cred, nil)
	_, err = client.Send(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<user-id>",
		&armapimanagement.UserConfirmationPasswordClientSendOptions{AppType: nil})
	if err != nil {
		log.Fatal(err)
	}
}
Output:

type UserConfirmationPasswordClientSendOptions added in v0.3.0

type UserConfirmationPasswordClientSendOptions struct {
	// Determines the type of application which send the create user request. Default is legacy publisher portal.
	AppType *AppType
}

UserConfirmationPasswordClientSendOptions contains the optional parameters for the UserConfirmationPasswordClient.Send method.

type UserConfirmationPasswordClientSendResponse added in v0.3.0

type UserConfirmationPasswordClientSendResponse struct {
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

UserConfirmationPasswordClientSendResponse contains the response from method UserConfirmationPasswordClient.Send.

type UserContract

type UserContract struct {
	// User entity contract properties.
	Properties *UserContractProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

UserContract - User details.

type UserContractProperties

type UserContractProperties struct {
	// Email address.
	Email *string `json:"email,omitempty"`

	// First name.
	FirstName *string `json:"firstName,omitempty"`

	// Collection of user identities.
	Identities []*UserIdentityContract `json:"identities,omitempty"`

	// Last name.
	LastName *string `json:"lastName,omitempty"`

	// Optional note about a user set by the administrator.
	Note *string `json:"note,omitempty"`

	// Date of user registration. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601
	// standard.
	RegistrationDate *time.Time `json:"registrationDate,omitempty"`

	// Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal
	// or call any APIs of subscribed products. Default state is Active.
	State *UserState `json:"state,omitempty"`

	// READ-ONLY; Collection of groups user is part of.
	Groups []*GroupContractProperties `json:"groups,omitempty" azure:"ro"`
}

UserContractProperties - User profile.

func (UserContractProperties) MarshalJSON

func (u UserContractProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserContractProperties.

func (*UserContractProperties) UnmarshalJSON

func (u *UserContractProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserContractProperties.

type UserCreateParameterProperties

type UserCreateParameterProperties struct {
	// REQUIRED; Email address. Must not be empty and must be unique within the service instance.
	Email *string `json:"email,omitempty"`

	// REQUIRED; First name.
	FirstName *string `json:"firstName,omitempty"`

	// REQUIRED; Last name.
	LastName *string `json:"lastName,omitempty"`

	// Determines the type of application which send the create user request. Default is legacy portal.
	AppType *AppType `json:"appType,omitempty"`

	// Determines the type of confirmation e-mail that will be sent to the newly created user.
	Confirmation *Confirmation `json:"confirmation,omitempty"`

	// Collection of user identities.
	Identities []*UserIdentityContract `json:"identities,omitempty"`

	// Optional note about a user set by the administrator.
	Note *string `json:"note,omitempty"`

	// User Password. If no value is provided, a default password is generated.
	Password *string `json:"password,omitempty"`

	// Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal
	// or call any APIs of subscribed products. Default state is Active.
	State *UserState `json:"state,omitempty"`
}

UserCreateParameterProperties - Parameters supplied to the Create User operation.

func (UserCreateParameterProperties) MarshalJSON

func (u UserCreateParameterProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserCreateParameterProperties.

type UserCreateParameters

type UserCreateParameters struct {
	// User entity create contract properties.
	Properties *UserCreateParameterProperties `json:"properties,omitempty"`
}

UserCreateParameters - User create details.

type UserEntityBaseParameters

type UserEntityBaseParameters struct {
	// Collection of user identities.
	Identities []*UserIdentityContract `json:"identities,omitempty"`

	// Optional note about a user set by the administrator.
	Note *string `json:"note,omitempty"`

	// Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal
	// or call any APIs of subscribed products. Default state is Active.
	State *UserState `json:"state,omitempty"`
}

UserEntityBaseParameters - User Entity Base Parameters set.

func (UserEntityBaseParameters) MarshalJSON

func (u UserEntityBaseParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserEntityBaseParameters.

type UserGroupClient

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

UserGroupClient contains the methods for the UserGroup group. Don't use this type directly, use NewUserGroupClient() instead.

func NewUserGroupClient

func NewUserGroupClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *UserGroupClient

NewUserGroupClient creates a new instance of UserGroupClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*UserGroupClient) List

func (client *UserGroupClient) List(resourceGroupName string, serviceName string, userID string, options *UserGroupClientListOptions) *UserGroupClientListPager

List - Lists all user groups. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. userID - User identifier. Must be unique in the current API Management service instance. options - UserGroupClientListOptions contains the optional parameters for the UserGroupClient.List method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListUserGroups.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewUserGroupClient("<subscription-id>", cred, nil)
	pager := client.List("<resource-group-name>",
		"<service-name>",
		"<user-id>",
		&armapimanagement.UserGroupClientListOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type UserGroupClientListOptions added in v0.3.0

type UserGroupClientListOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|------------------------|-----------------------------------|
	// | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string
	// Number of records to skip.
	Skip *int32
	// Number of records to return.
	Top *int32
}

UserGroupClientListOptions contains the optional parameters for the UserGroupClient.List method.

type UserGroupClientListPager added in v0.3.0

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

UserGroupClientListPager provides operations for iterating over paged responses.

func (*UserGroupClientListPager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*UserGroupClientListPager) NextPage added in v0.3.0

func (p *UserGroupClientListPager) NextPage(ctx context.Context) bool

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*UserGroupClientListPager) PageResponse added in v0.3.0

PageResponse returns the current UserGroupClientListResponse page.

type UserGroupClientListResponse added in v0.3.0

type UserGroupClientListResponse struct {
	UserGroupClientListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

UserGroupClientListResponse contains the response from method UserGroupClient.List.

type UserGroupClientListResult added in v0.3.0

type UserGroupClientListResult struct {
	GroupCollection
}

UserGroupClientListResult contains the result from method UserGroupClient.List.

type UserIdentitiesClient

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

UserIdentitiesClient contains the methods for the UserIdentities group. Don't use this type directly, use NewUserIdentitiesClient() instead.

func NewUserIdentitiesClient

func NewUserIdentitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *UserIdentitiesClient

NewUserIdentitiesClient creates a new instance of UserIdentitiesClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*UserIdentitiesClient) List

func (client *UserIdentitiesClient) List(resourceGroupName string, serviceName string, userID string, options *UserIdentitiesClientListOptions) *UserIdentitiesClientListPager

List - List of all user identities. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. userID - User identifier. Must be unique in the current API Management service instance. options - UserIdentitiesClientListOptions contains the optional parameters for the UserIdentitiesClient.List method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListUserIdentities.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewUserIdentitiesClient("<subscription-id>", cred, nil)
	pager := client.List("<resource-group-name>",
		"<service-name>",
		"<user-id>",
		nil)
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type UserIdentitiesClientListOptions added in v0.3.0

type UserIdentitiesClientListOptions struct {
}

UserIdentitiesClientListOptions contains the optional parameters for the UserIdentitiesClient.List method.

type UserIdentitiesClientListPager added in v0.3.0

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

UserIdentitiesClientListPager provides operations for iterating over paged responses.

func (*UserIdentitiesClientListPager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*UserIdentitiesClientListPager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*UserIdentitiesClientListPager) PageResponse added in v0.3.0

PageResponse returns the current UserIdentitiesClientListResponse page.

type UserIdentitiesClientListResponse added in v0.3.0

type UserIdentitiesClientListResponse struct {
	UserIdentitiesClientListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

UserIdentitiesClientListResponse contains the response from method UserIdentitiesClient.List.

type UserIdentitiesClientListResult added in v0.3.0

type UserIdentitiesClientListResult struct {
	UserIdentityCollection
}

UserIdentitiesClientListResult contains the result from method UserIdentitiesClient.List.

type UserIdentityCollection

type UserIdentityCollection struct {
	// Total record count number across all pages.
	Count *int64 `json:"count,omitempty"`

	// Next page link if any.
	NextLink *string `json:"nextLink,omitempty"`

	// User Identity values.
	Value []*UserIdentityContract `json:"value,omitempty"`
}

UserIdentityCollection - List of Users Identity list representation.

func (UserIdentityCollection) MarshalJSON

func (u UserIdentityCollection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserIdentityCollection.

type UserIdentityContract

type UserIdentityContract struct {
	// Identifier value within provider.
	ID *string `json:"id,omitempty"`

	// Identity provider name.
	Provider *string `json:"provider,omitempty"`
}

UserIdentityContract - User identity details.

type UserIdentityProperties

type UserIdentityProperties struct {
	// The client id of user assigned identity.
	ClientID *string `json:"clientId,omitempty"`

	// The principal id of user assigned identity.
	PrincipalID *string `json:"principalId,omitempty"`
}

type UserState

type UserState string

UserState - Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active.

const (
	// UserStateActive - User state is active.
	UserStateActive UserState = "active"
	// UserStateBlocked - User is blocked. Blocked users cannot authenticate at developer portal or call API.
	UserStateBlocked UserState = "blocked"
	// UserStateDeleted - User account is closed. All identities and related entities are removed.
	UserStateDeleted UserState = "deleted"
	// UserStatePending - User account is pending. Requires identity confirmation before it can be made active.
	UserStatePending UserState = "pending"
)

func PossibleUserStateValues

func PossibleUserStateValues() []UserState

PossibleUserStateValues returns the possible values for the UserState const type.

func (UserState) ToPtr

func (c UserState) ToPtr() *UserState

ToPtr returns a *UserState pointing to the current value.

type UserSubscriptionClient

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

UserSubscriptionClient contains the methods for the UserSubscription group. Don't use this type directly, use NewUserSubscriptionClient() instead.

func NewUserSubscriptionClient

func NewUserSubscriptionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *UserSubscriptionClient

NewUserSubscriptionClient creates a new instance of UserSubscriptionClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*UserSubscriptionClient) Get

func (client *UserSubscriptionClient) Get(ctx context.Context, resourceGroupName string, serviceName string, userID string, sid string, options *UserSubscriptionClientGetOptions) (UserSubscriptionClientGetResponse, error)

Get - Gets the specified Subscription entity associated with a particular user. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. userID - User identifier. Must be unique in the current API Management service instance. sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management. options - UserSubscriptionClientGetOptions contains the optional parameters for the UserSubscriptionClient.Get method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetUserSubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewUserSubscriptionClient("<subscription-id>", cred, nil)
	res, err := client.Get(ctx,
		"<resource-group-name>",
		"<service-name>",
		"<user-id>",
		"<sid>",
		nil)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Response result: %#v\n", res.UserSubscriptionClientGetResult)
}
Output:

func (*UserSubscriptionClient) List

func (client *UserSubscriptionClient) List(resourceGroupName string, serviceName string, userID string, options *UserSubscriptionClientListOptions) *UserSubscriptionClientListPager

List - Lists the collection of subscriptions of the specified user. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group. serviceName - The name of the API Management service. userID - User identifier. Must be unique in the current API Management service instance. options - UserSubscriptionClientListOptions contains the optional parameters for the UserSubscriptionClient.List method.

Example

x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListUserSubscriptions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client := armapimanagement.NewUserSubscriptionClient("<subscription-id>", cred, nil)
	pager := client.List("<resource-group-name>",
		"<service-name>",
		"<user-id>",
		&armapimanagement.UserSubscriptionClientListOptions{Filter: nil,
			Top:  nil,
			Skip: nil,
		})
	for {
		nextResult := pager.NextPage(ctx)
		if err := pager.Err(); err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		if !nextResult {
			break
		}
		for _, v := range pager.PageResponse().Value {
			log.Printf("Pager result: %#v\n", v)
		}
	}
}
Output:

type UserSubscriptionClientGetOptions added in v0.3.0

type UserSubscriptionClientGetOptions struct {
}

UserSubscriptionClientGetOptions contains the optional parameters for the UserSubscriptionClient.Get method.

type UserSubscriptionClientGetResponse added in v0.3.0

type UserSubscriptionClientGetResponse struct {
	UserSubscriptionClientGetResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

UserSubscriptionClientGetResponse contains the response from method UserSubscriptionClient.Get.

type UserSubscriptionClientGetResult added in v0.3.0

type UserSubscriptionClientGetResult struct {
	SubscriptionContract
	// ETag contains the information returned from the ETag header response.
	ETag *string
}

UserSubscriptionClientGetResult contains the result from method UserSubscriptionClient.Get.

type UserSubscriptionClientListOptions added in v0.3.0

type UserSubscriptionClientListOptions struct {
	// | Field | Usage | Supported operators | Supported functions |
	// |-------------|------------------------|-----------------------------------|
	// |name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// |displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// |stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// |ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// |scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// |userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	// |productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
	Filter *string
	// Number of records to skip.
	Skip *int32
	// Number of records to return.
	Top *int32
}

UserSubscriptionClientListOptions contains the optional parameters for the UserSubscriptionClient.List method.

type UserSubscriptionClientListPager added in v0.3.0

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

UserSubscriptionClientListPager provides operations for iterating over paged responses.

func (*UserSubscriptionClientListPager) Err added in v0.3.0

Err returns the last error encountered while paging.

func (*UserSubscriptionClientListPager) NextPage added in v0.3.0

NextPage returns true if the pager advanced to the next page. Returns false if there are no more pages or an error occurred.

func (*UserSubscriptionClientListPager) PageResponse added in v0.3.0

PageResponse returns the current UserSubscriptionClientListResponse page.

type UserSubscriptionClientListResponse added in v0.3.0

type UserSubscriptionClientListResponse struct {
	UserSubscriptionClientListResult
	// RawResponse contains the underlying HTTP response.
	RawResponse *http.Response
}

UserSubscriptionClientListResponse contains the response from method UserSubscriptionClient.List.

type UserSubscriptionClientListResult added in v0.3.0

type UserSubscriptionClientListResult struct {
	SubscriptionCollection
}

UserSubscriptionClientListResult contains the result from method UserSubscriptionClient.List.

type UserTokenParameterProperties

type UserTokenParameterProperties struct {
	// REQUIRED; The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following
	// format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
	Expiry *time.Time `json:"expiry,omitempty"`

	// REQUIRED; The Key to be used to generate token for user.
	KeyType *KeyType `json:"keyType,omitempty"`
}

UserTokenParameterProperties - Parameters supplied to the Get User Token operation.

func (UserTokenParameterProperties) MarshalJSON

func (u UserTokenParameterProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserTokenParameterProperties.

func (*UserTokenParameterProperties) UnmarshalJSON

func (u *UserTokenParameterProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserTokenParameterProperties.

type UserTokenParameters

type UserTokenParameters struct {
	// User Token Parameter contract properties.
	Properties *UserTokenParameterProperties `json:"properties,omitempty"`
}

UserTokenParameters - Get User Token parameters.

type UserTokenResult

type UserTokenResult struct {
	// Shared Access Authorization token for the User.
	Value *string `json:"value,omitempty"`
}

UserTokenResult - Get User Token response details.

type UserUpdateParameters

type UserUpdateParameters struct {
	// User entity update contract properties.
	Properties *UserUpdateParametersProperties `json:"properties,omitempty"`
}

UserUpdateParameters - User update parameters.

func (UserUpdateParameters) MarshalJSON

func (u UserUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserUpdateParameters.

type UserUpdateParametersProperties

type UserUpdateParametersProperties struct {
	// Email address. Must not be empty and must be unique within the service instance.
	Email *string `json:"email,omitempty"`

	// First name.
	FirstName *string `json:"firstName,omitempty"`

	// Collection of user identities.
	Identities []*UserIdentityContract `json:"identities,omitempty"`

	// Last name.
	LastName *string `json:"lastName,omitempty"`

	// Optional note about a user set by the administrator.
	Note *string `json:"note,omitempty"`

	// User Password.
	Password *string `json:"password,omitempty"`

	// Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal
	// or call any APIs of subscribed products. Default state is Active.
	State *UserState `json:"state,omitempty"`
}

UserUpdateParametersProperties - Parameters supplied to the Update User operation.

func (UserUpdateParametersProperties) MarshalJSON

func (u UserUpdateParametersProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserUpdateParametersProperties.

type Verbosity

type Verbosity string

Verbosity - The verbosity level applied to traces emitted by trace policies.

const (
	// VerbosityError - Only traces with 'severity' set to 'error' will be sent to the logger attached to this diagnostic instance.
	VerbosityError Verbosity = "error"
	// VerbosityInformation - Traces with 'severity' set to 'information' and 'error' will be sent to the logger attached to this
	// diagnostic instance.
	VerbosityInformation Verbosity = "information"
	// VerbosityVerbose - All the traces emitted by trace policies will be sent to the logger attached to this diagnostic instance.
	VerbosityVerbose Verbosity = "verbose"
)

func PossibleVerbosityValues

func PossibleVerbosityValues() []Verbosity

PossibleVerbosityValues returns the possible values for the Verbosity const type.

func (Verbosity) ToPtr

func (c Verbosity) ToPtr() *Verbosity

ToPtr returns a *Verbosity pointing to the current value.

type VersioningScheme

type VersioningScheme string

VersioningScheme - An value that determines where the API Version identifier will be located in a HTTP request.

const (
	// VersioningSchemeHeader - The API Version is passed in a HTTP header.
	VersioningSchemeHeader VersioningScheme = "Header"
	// VersioningSchemeQuery - The API Version is passed in a query parameter.
	VersioningSchemeQuery VersioningScheme = "Query"
	// VersioningSchemeSegment - The API Version is passed in a path segment.
	VersioningSchemeSegment VersioningScheme = "Segment"
)

func PossibleVersioningSchemeValues

func PossibleVersioningSchemeValues() []VersioningScheme

PossibleVersioningSchemeValues returns the possible values for the VersioningScheme const type.

func (VersioningScheme) ToPtr

ToPtr returns a *VersioningScheme pointing to the current value.

type VirtualNetworkConfiguration

type VirtualNetworkConfiguration struct {
	// The full resource ID of a subnet in a virtual network to deploy the API Management service in.
	SubnetResourceID *string `json:"subnetResourceId,omitempty"`

	// READ-ONLY; The name of the subnet.
	Subnetname *string `json:"subnetname,omitempty" azure:"ro"`

	// READ-ONLY; The virtual network ID. This is typically a GUID. Expect a null GUID by default.
	Vnetid *string `json:"vnetid,omitempty" azure:"ro"`
}

VirtualNetworkConfiguration - Configuration of a virtual network to which API Management service is deployed.

type VirtualNetworkType

type VirtualNetworkType string

VirtualNetworkType - The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only.

const (
	// VirtualNetworkTypeExternal - The service is part of Virtual Network and it is accessible from Internet.
	VirtualNetworkTypeExternal VirtualNetworkType = "External"
	// VirtualNetworkTypeInternal - The service is part of Virtual Network and it is only accessible from within the virtual network.
	VirtualNetworkTypeInternal VirtualNetworkType = "Internal"
	// VirtualNetworkTypeNone - The service is not part of any Virtual Network.
	VirtualNetworkTypeNone VirtualNetworkType = "None"
)

func PossibleVirtualNetworkTypeValues

func PossibleVirtualNetworkTypeValues() []VirtualNetworkType

PossibleVirtualNetworkTypeValues returns the possible values for the VirtualNetworkType const type.

func (VirtualNetworkType) ToPtr

ToPtr returns a *VirtualNetworkType pointing to the current value.

type X509CertificateName

type X509CertificateName struct {
	// Thumbprint for the Issuer of the Certificate.
	IssuerCertificateThumbprint *string `json:"issuerCertificateThumbprint,omitempty"`

	// Common Name of the Certificate.
	Name *string `json:"name,omitempty"`
}

X509CertificateName - Properties of server X509Names.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL