authorizationserver

package
v0.20230425.1021638 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: MPL-2.0 Imports: 8 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2021-08-01/authorizationserver Documentation

The authorizationserver SDK allows for interaction with the Azure Resource Manager Service apimanagement (API Version 2021-08-01).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2021-08-01/authorizationserver"

Client Initialization

client := authorizationserver.NewAuthorizationServerClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AuthorizationServerClient.CreateOrUpdate

ctx := context.TODO()
id := authorizationserver.NewAuthorizationServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "authorizationServerValue")

payload := authorizationserver.AuthorizationServerContract{
	// ...
}


read, err := client.CreateOrUpdate(ctx, id, payload, authorizationserver.DefaultCreateOrUpdateOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: AuthorizationServerClient.Delete

ctx := context.TODO()
id := authorizationserver.NewAuthorizationServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "authorizationServerValue")

read, err := client.Delete(ctx, id, authorizationserver.DefaultDeleteOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: AuthorizationServerClient.Get

ctx := context.TODO()
id := authorizationserver.NewAuthorizationServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "authorizationServerValue")

read, err := client.Get(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: AuthorizationServerClient.GetEntityTag

ctx := context.TODO()
id := authorizationserver.NewAuthorizationServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "authorizationServerValue")

read, err := client.GetEntityTag(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: AuthorizationServerClient.ListByService

ctx := context.TODO()
id := authorizationserver.NewServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue")

// alternatively `client.ListByService(ctx, id, authorizationserver.DefaultListByServiceOperationOptions())` can be used to do batched pagination
items, err := client.ListByServiceComplete(ctx, id, authorizationserver.DefaultListByServiceOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: AuthorizationServerClient.ListSecrets

ctx := context.TODO()
id := authorizationserver.NewAuthorizationServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "authorizationServerValue")

read, err := client.ListSecrets(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: AuthorizationServerClient.Update

ctx := context.TODO()
id := authorizationserver.NewAuthorizationServerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "authorizationServerValue")

payload := authorizationserver.AuthorizationServerUpdateContract{
	// ...
}


read, err := client.Update(ctx, id, payload, authorizationserver.DefaultUpdateOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForAuthorizationMethod

func PossibleValuesForAuthorizationMethod() []string

func PossibleValuesForBearerTokenSendingMethod

func PossibleValuesForBearerTokenSendingMethod() []string

func PossibleValuesForClientAuthenticationMethod

func PossibleValuesForClientAuthenticationMethod() []string

func PossibleValuesForGrantType

func PossibleValuesForGrantType() []string

func ValidateAuthorizationServerID

func ValidateAuthorizationServerID(input interface{}, key string) (warnings []string, errors []error)

ValidateAuthorizationServerID checks that 'input' can be parsed as a Authorization Server ID

func ValidateServiceID

func ValidateServiceID(input interface{}, key string) (warnings []string, errors []error)

ValidateServiceID checks that 'input' can be parsed as a Service ID

Types

type AuthorizationMethod

type AuthorizationMethod string
const (
	AuthorizationMethodDELETE  AuthorizationMethod = "DELETE"
	AuthorizationMethodGET     AuthorizationMethod = "GET"
	AuthorizationMethodHEAD    AuthorizationMethod = "HEAD"
	AuthorizationMethodOPTIONS AuthorizationMethod = "OPTIONS"
	AuthorizationMethodPATCH   AuthorizationMethod = "PATCH"
	AuthorizationMethodPOST    AuthorizationMethod = "POST"
	AuthorizationMethodPUT     AuthorizationMethod = "PUT"
	AuthorizationMethodTRACE   AuthorizationMethod = "TRACE"
)

type AuthorizationServerClient

type AuthorizationServerClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewAuthorizationServerClientWithBaseURI

func NewAuthorizationServerClientWithBaseURI(endpoint string) AuthorizationServerClient

func (AuthorizationServerClient) CreateOrUpdate

CreateOrUpdate ...

func (AuthorizationServerClient) Delete

Delete ...

func (AuthorizationServerClient) Get

Get ...

func (AuthorizationServerClient) GetEntityTag

GetEntityTag ...

func (AuthorizationServerClient) ListByService

ListByService ...

func (AuthorizationServerClient) ListByServiceComplete

ListByServiceComplete retrieves all of the results into a single object

func (AuthorizationServerClient) ListByServiceCompleteMatchingPredicate

ListByServiceCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (AuthorizationServerClient) ListSecrets

ListSecrets ...

func (AuthorizationServerClient) Update

Update ...

type AuthorizationServerContract

type AuthorizationServerContract struct {
	Id         *string                                `json:"id,omitempty"`
	Name       *string                                `json:"name,omitempty"`
	Properties *AuthorizationServerContractProperties `json:"properties,omitempty"`
	Type       *string                                `json:"type,omitempty"`
}

type AuthorizationServerContractOperationPredicate

type AuthorizationServerContractOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (AuthorizationServerContractOperationPredicate) Matches

type AuthorizationServerContractProperties

type AuthorizationServerContractProperties struct {
	AuthorizationEndpoint      string                        `json:"authorizationEndpoint"`
	AuthorizationMethods       *[]AuthorizationMethod        `json:"authorizationMethods,omitempty"`
	BearerTokenSendingMethods  *[]BearerTokenSendingMethod   `json:"bearerTokenSendingMethods,omitempty"`
	ClientAuthenticationMethod *[]ClientAuthenticationMethod `json:"clientAuthenticationMethod,omitempty"`
	ClientId                   string                        `json:"clientId"`
	ClientRegistrationEndpoint string                        `json:"clientRegistrationEndpoint"`
	ClientSecret               *string                       `json:"clientSecret,omitempty"`
	DefaultScope               *string                       `json:"defaultScope,omitempty"`
	Description                *string                       `json:"description,omitempty"`
	DisplayName                string                        `json:"displayName"`
	GrantTypes                 []GrantType                   `json:"grantTypes"`
	ResourceOwnerPassword      *string                       `json:"resourceOwnerPassword,omitempty"`
	ResourceOwnerUsername      *string                       `json:"resourceOwnerUsername,omitempty"`
	SupportState               *bool                         `json:"supportState,omitempty"`
	TokenBodyParameters        *[]TokenBodyParameterContract `json:"tokenBodyParameters,omitempty"`
	TokenEndpoint              *string                       `json:"tokenEndpoint,omitempty"`
}

type AuthorizationServerId

type AuthorizationServerId struct {
	SubscriptionId          string
	ResourceGroupName       string
	ServiceName             string
	AuthorizationServerName string
}

AuthorizationServerId is a struct representing the Resource ID for a Authorization Server

func NewAuthorizationServerID

func NewAuthorizationServerID(subscriptionId string, resourceGroupName string, serviceName string, authorizationServerName string) AuthorizationServerId

NewAuthorizationServerID returns a new AuthorizationServerId struct

func ParseAuthorizationServerID

func ParseAuthorizationServerID(input string) (*AuthorizationServerId, error)

ParseAuthorizationServerID parses 'input' into a AuthorizationServerId

func ParseAuthorizationServerIDInsensitively

func ParseAuthorizationServerIDInsensitively(input string) (*AuthorizationServerId, error)

ParseAuthorizationServerIDInsensitively parses 'input' case-insensitively into a AuthorizationServerId note: this method should only be used for API response data and not user input

func (AuthorizationServerId) ID

func (id AuthorizationServerId) ID() string

ID returns the formatted Authorization Server ID

func (AuthorizationServerId) Segments

func (id AuthorizationServerId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Authorization Server ID

func (AuthorizationServerId) String

func (id AuthorizationServerId) String() string

String returns a human-readable description of this Authorization Server ID

type AuthorizationServerSecretsContract

type AuthorizationServerSecretsContract struct {
	ClientSecret          *string `json:"clientSecret,omitempty"`
	ResourceOwnerPassword *string `json:"resourceOwnerPassword,omitempty"`
	ResourceOwnerUsername *string `json:"resourceOwnerUsername,omitempty"`
}

type AuthorizationServerUpdateContract

type AuthorizationServerUpdateContract struct {
	Id         *string                                      `json:"id,omitempty"`
	Name       *string                                      `json:"name,omitempty"`
	Properties *AuthorizationServerUpdateContractProperties `json:"properties,omitempty"`
	Type       *string                                      `json:"type,omitempty"`
}

type AuthorizationServerUpdateContractProperties

type AuthorizationServerUpdateContractProperties struct {
	AuthorizationEndpoint      *string                       `json:"authorizationEndpoint,omitempty"`
	AuthorizationMethods       *[]AuthorizationMethod        `json:"authorizationMethods,omitempty"`
	BearerTokenSendingMethods  *[]BearerTokenSendingMethod   `json:"bearerTokenSendingMethods,omitempty"`
	ClientAuthenticationMethod *[]ClientAuthenticationMethod `json:"clientAuthenticationMethod,omitempty"`
	ClientId                   *string                       `json:"clientId,omitempty"`
	ClientRegistrationEndpoint *string                       `json:"clientRegistrationEndpoint,omitempty"`
	ClientSecret               *string                       `json:"clientSecret,omitempty"`
	DefaultScope               *string                       `json:"defaultScope,omitempty"`
	Description                *string                       `json:"description,omitempty"`
	DisplayName                *string                       `json:"displayName,omitempty"`
	GrantTypes                 *[]GrantType                  `json:"grantTypes,omitempty"`
	ResourceOwnerPassword      *string                       `json:"resourceOwnerPassword,omitempty"`
	ResourceOwnerUsername      *string                       `json:"resourceOwnerUsername,omitempty"`
	SupportState               *bool                         `json:"supportState,omitempty"`
	TokenBodyParameters        *[]TokenBodyParameterContract `json:"tokenBodyParameters,omitempty"`
	TokenEndpoint              *string                       `json:"tokenEndpoint,omitempty"`
}

type BearerTokenSendingMethod

type BearerTokenSendingMethod string
const (
	BearerTokenSendingMethodAuthorizationHeader BearerTokenSendingMethod = "authorizationHeader"
	BearerTokenSendingMethodQuery               BearerTokenSendingMethod = "query"
)

type ClientAuthenticationMethod

type ClientAuthenticationMethod string
const (
	ClientAuthenticationMethodBasic ClientAuthenticationMethod = "Basic"
	ClientAuthenticationMethodBody  ClientAuthenticationMethod = "Body"
)

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *AuthorizationServerContract
}

type DeleteOperationOptions

type DeleteOperationOptions struct {
	IfMatch *string
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type GetEntityTagOperationResponse

type GetEntityTagOperationResponse struct {
	HttpResponse *http.Response
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *AuthorizationServerContract
}

type GrantType

type GrantType string
const (
	GrantTypeAuthorizationCode     GrantType = "authorizationCode"
	GrantTypeClientCredentials     GrantType = "clientCredentials"
	GrantTypeImplicit              GrantType = "implicit"
	GrantTypeResourceOwnerPassword GrantType = "resourceOwnerPassword"
)

type ListByServiceCompleteResult

type ListByServiceCompleteResult struct {
	Items []AuthorizationServerContract
}

type ListByServiceOperationOptions

type ListByServiceOperationOptions struct {
	Filter *string
	Skip   *int64
	Top    *int64
}

func DefaultListByServiceOperationOptions

func DefaultListByServiceOperationOptions() ListByServiceOperationOptions

type ListByServiceOperationResponse

type ListByServiceOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]AuthorizationServerContract
	// contains filtered or unexported fields
}

func (ListByServiceOperationResponse) HasMore

func (ListByServiceOperationResponse) LoadMore

type ListSecretsOperationResponse

type ListSecretsOperationResponse struct {
	HttpResponse *http.Response
	Model        *AuthorizationServerSecretsContract
}

type ServiceId

type ServiceId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
}

ServiceId is a struct representing the Resource ID for a Service

func NewServiceID

func NewServiceID(subscriptionId string, resourceGroupName string, serviceName string) ServiceId

NewServiceID returns a new ServiceId struct

func ParseServiceID

func ParseServiceID(input string) (*ServiceId, error)

ParseServiceID parses 'input' into a ServiceId

func ParseServiceIDInsensitively

func ParseServiceIDInsensitively(input string) (*ServiceId, error)

ParseServiceIDInsensitively parses 'input' case-insensitively into a ServiceId note: this method should only be used for API response data and not user input

func (ServiceId) ID

func (id ServiceId) ID() string

ID returns the formatted Service ID

func (ServiceId) Segments

func (id ServiceId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Service ID

func (ServiceId) String

func (id ServiceId) String() string

String returns a human-readable description of this Service ID

type TokenBodyParameterContract

type TokenBodyParameterContract struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type UpdateOperationOptions

type UpdateOperationOptions struct {
	IfMatch *string
}

func DefaultUpdateOperationOptions

func DefaultUpdateOperationOptions() UpdateOperationOptions

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *AuthorizationServerContract
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL