authorizationserver

package
v0.20240522.1080424 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

README

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

The authorizationserver SDK allows for interaction with the Azure Resource Manager Service apimanagement (API Version 2022-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/2022-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"
)

func (*AuthorizationMethod) UnmarshalJSON

func (s *AuthorizationMethod) UnmarshalJSON(bytes []byte) error

type AuthorizationServerClient

type AuthorizationServerClient struct {
	Client *resourcemanager.Client
}

func NewAuthorizationServerClientWithBaseURI

func NewAuthorizationServerClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationServerClient, error)

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 the results into a single object

func (AuthorizationServerClient) ListByServiceCompleteMatchingPredicate

ListByServiceCompleteMatchingPredicate retrieves all the results and then applies 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"`
	UseInApiDocumentation      *bool                         `json:"useInApiDocumentation,omitempty"`
	UseInTestConsole           *bool                         `json:"useInTestConsole,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) FromParseResult

func (id *AuthorizationServerId) FromParseResult(input resourceids.ParseResult) error

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"`
	UseInApiDocumentation      *bool                         `json:"useInApiDocumentation,omitempty"`
	UseInTestConsole           *bool                         `json:"useInTestConsole,omitempty"`
}

type BearerTokenSendingMethod

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

func (*BearerTokenSendingMethod) UnmarshalJSON

func (s *BearerTokenSendingMethod) UnmarshalJSON(bytes []byte) error

type ClientAuthenticationMethod

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

func (*ClientAuthenticationMethod) UnmarshalJSON

func (s *ClientAuthenticationMethod) UnmarshalJSON(bytes []byte) error

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

func (CreateOrUpdateOperationOptions) ToHeaders

func (CreateOrUpdateOperationOptions) ToOData

func (CreateOrUpdateOperationOptions) ToQuery

type CreateOrUpdateOperationResponse

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

type DeleteOperationOptions

type DeleteOperationOptions struct {
	IfMatch *string
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders

func (o DeleteOperationOptions) ToHeaders() *client.Headers

func (DeleteOperationOptions) ToOData

func (o DeleteOperationOptions) ToOData() *odata.Query

func (DeleteOperationOptions) ToQuery

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetEntityTagOperationResponse

type GetEntityTagOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetOperationResponse

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

type GrantType

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

func (*GrantType) UnmarshalJSON

func (s *GrantType) UnmarshalJSON(bytes []byte) error

type ListByServiceCompleteResult

type ListByServiceCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []AuthorizationServerContract
}

type ListByServiceOperationOptions

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

func DefaultListByServiceOperationOptions

func DefaultListByServiceOperationOptions() ListByServiceOperationOptions

func (ListByServiceOperationOptions) ToHeaders

func (ListByServiceOperationOptions) ToOData

func (ListByServiceOperationOptions) ToQuery

type ListByServiceOperationResponse

type ListByServiceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]AuthorizationServerContract
}

type ListSecretsOperationResponse

type ListSecretsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	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) FromParseResult

func (id *ServiceId) FromParseResult(input resourceids.ParseResult) error

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

func (UpdateOperationOptions) ToHeaders

func (o UpdateOperationOptions) ToHeaders() *client.Headers

func (UpdateOperationOptions) ToOData

func (o UpdateOperationOptions) ToOData() *odata.Query

func (UpdateOperationOptions) ToQuery

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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