authorizationprovider

package
v0.20240411.1145857 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MPL-2.0 Imports: 9 Imported by: 1

README

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

The authorizationprovider 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/authorizationprovider"

Client Initialization

client := authorizationprovider.NewAuthorizationProviderClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AuthorizationProviderClient.CreateOrUpdate

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

payload := authorizationprovider.AuthorizationProviderContract{
	// ...
}


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

Example Usage: AuthorizationProviderClient.Delete

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

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

Example Usage: AuthorizationProviderClient.Get

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

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: AuthorizationProviderClient.ListByService

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateAuthorizationProviderID

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

ValidateAuthorizationProviderID checks that 'input' can be parsed as a Authorization Provider 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 AuthorizationProviderClient

type AuthorizationProviderClient struct {
	Client *resourcemanager.Client
}

func NewAuthorizationProviderClientWithBaseURI

func NewAuthorizationProviderClientWithBaseURI(sdkApi sdkEnv.Api) (*AuthorizationProviderClient, error)

func (AuthorizationProviderClient) CreateOrUpdate

CreateOrUpdate ...

func (AuthorizationProviderClient) Delete

Delete ...

func (AuthorizationProviderClient) Get

Get ...

func (AuthorizationProviderClient) ListByService

ListByService ...

func (AuthorizationProviderClient) ListByServiceComplete

ListByServiceComplete retrieves all the results into a single object

func (AuthorizationProviderClient) ListByServiceCompleteMatchingPredicate

ListByServiceCompleteMatchingPredicate retrieves all the results and then applies the predicate

type AuthorizationProviderContract

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

type AuthorizationProviderContractOperationPredicate

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

func (AuthorizationProviderContractOperationPredicate) Matches

type AuthorizationProviderContractProperties

type AuthorizationProviderContractProperties struct {
	DisplayName      *string                              `json:"displayName,omitempty"`
	IdentityProvider *string                              `json:"identityProvider,omitempty"`
	Oauth2           *AuthorizationProviderOAuth2Settings `json:"oauth2,omitempty"`
}

type AuthorizationProviderId

type AuthorizationProviderId struct {
	SubscriptionId          string
	ResourceGroupName       string
	ServiceName             string
	AuthorizationProviderId string
}

AuthorizationProviderId is a struct representing the Resource ID for a Authorization Provider

func NewAuthorizationProviderID

func NewAuthorizationProviderID(subscriptionId string, resourceGroupName string, serviceName string, authorizationProviderId string) AuthorizationProviderId

NewAuthorizationProviderID returns a new AuthorizationProviderId struct

func ParseAuthorizationProviderID

func ParseAuthorizationProviderID(input string) (*AuthorizationProviderId, error)

ParseAuthorizationProviderID parses 'input' into a AuthorizationProviderId

func ParseAuthorizationProviderIDInsensitively

func ParseAuthorizationProviderIDInsensitively(input string) (*AuthorizationProviderId, error)

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

func (*AuthorizationProviderId) FromParseResult

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

func (AuthorizationProviderId) ID

ID returns the formatted Authorization Provider ID

func (AuthorizationProviderId) Segments

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

func (AuthorizationProviderId) String

func (id AuthorizationProviderId) String() string

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

type AuthorizationProviderOAuth2GrantTypes

type AuthorizationProviderOAuth2GrantTypes struct {
	AuthorizationCode *map[string]string `json:"authorizationCode,omitempty"`
	ClientCredentials *map[string]string `json:"clientCredentials,omitempty"`
}

type AuthorizationProviderOAuth2Settings

type AuthorizationProviderOAuth2Settings struct {
	GrantTypes  *AuthorizationProviderOAuth2GrantTypes `json:"grantTypes,omitempty"`
	RedirectUrl *string                                `json:"redirectUrl,omitempty"`
}

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        *AuthorizationProviderContract
}

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 GetOperationResponse

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

type ListByServiceCompleteResult

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

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        *[]AuthorizationProviderContract
}

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

Jump to

Keyboard shortcuts

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