tenantaccess

package
v0.20240715.1103416 Latest Latest
Warning

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

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

README

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

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

Client Initialization

client := tenantaccess.NewTenantAccessClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: TenantAccessClient.Create

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

payload := tenantaccess.AccessInformationCreateParameters{
	// ...
}


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

Example Usage: TenantAccessClient.Get

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

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: TenantAccessClient.GetEntityTag

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

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

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

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

Example Usage: TenantAccessClient.ListSecrets

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

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: TenantAccessClient.RegeneratePrimaryKey

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

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

Example Usage: TenantAccessClient.RegenerateSecondaryKey

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

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

Example Usage: TenantAccessClient.Update

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

payload := tenantaccess.AccessInformationUpdateParameters{
	// ...
}


read, err := client.Update(ctx, id, payload, tenantaccess.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 PossibleValuesForAccessIdName

func PossibleValuesForAccessIdName() []string

func ValidateAccessID

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

ValidateAccessID checks that 'input' can be parsed as a Access 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 AccessId

type AccessId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	AccessName        AccessIdName
}

AccessId is a struct representing the Resource ID for a Access

func NewAccessID

func NewAccessID(subscriptionId string, resourceGroupName string, serviceName string, accessName AccessIdName) AccessId

NewAccessID returns a new AccessId struct

func ParseAccessID

func ParseAccessID(input string) (*AccessId, error)

ParseAccessID parses 'input' into a AccessId

func ParseAccessIDInsensitively

func ParseAccessIDInsensitively(input string) (*AccessId, error)

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

func (*AccessId) FromParseResult

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

func (AccessId) ID

func (id AccessId) ID() string

ID returns the formatted Access ID

func (AccessId) Segments

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

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

func (AccessId) String

func (id AccessId) String() string

String returns a human-readable description of this Access ID

type AccessIdName

type AccessIdName string
const (
	AccessIdNameAccess    AccessIdName = "access"
	AccessIdNameGitAccess AccessIdName = "gitAccess"
)

func (*AccessIdName) UnmarshalJSON

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

type AccessInformationContract

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

type AccessInformationContractOperationPredicate

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

func (AccessInformationContractOperationPredicate) Matches

type AccessInformationContractProperties

type AccessInformationContractProperties struct {
	Enabled     *bool   `json:"enabled,omitempty"`
	Id          *string `json:"id,omitempty"`
	PrincipalId *string `json:"principalId,omitempty"`
}

type AccessInformationCreateParameterProperties

type AccessInformationCreateParameterProperties struct {
	Enabled      *bool   `json:"enabled,omitempty"`
	PrimaryKey   *string `json:"primaryKey,omitempty"`
	PrincipalId  *string `json:"principalId,omitempty"`
	SecondaryKey *string `json:"secondaryKey,omitempty"`
}

type AccessInformationCreateParameters

type AccessInformationCreateParameters struct {
	Properties *AccessInformationCreateParameterProperties `json:"properties,omitempty"`
}

type AccessInformationSecretsContract

type AccessInformationSecretsContract struct {
	Enabled      *bool   `json:"enabled,omitempty"`
	Id           *string `json:"id,omitempty"`
	PrimaryKey   *string `json:"primaryKey,omitempty"`
	PrincipalId  *string `json:"principalId,omitempty"`
	SecondaryKey *string `json:"secondaryKey,omitempty"`
}

type AccessInformationUpdateParameterProperties

type AccessInformationUpdateParameterProperties struct {
	Enabled *bool `json:"enabled,omitempty"`
}

type AccessInformationUpdateParameters

type AccessInformationUpdateParameters struct {
	Properties *AccessInformationUpdateParameterProperties `json:"properties,omitempty"`
}

type CreateOperationOptions

type CreateOperationOptions struct {
	IfMatch *string
}

func DefaultCreateOperationOptions

func DefaultCreateOperationOptions() CreateOperationOptions

func (CreateOperationOptions) ToHeaders

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

func (CreateOperationOptions) ToOData

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

func (CreateOperationOptions) ToQuery

type CreateOperationResponse

type CreateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AccessInformationContract
}

type GetEntityTagOperationResponse

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

type GetOperationResponse

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

type ListByServiceCompleteResult

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

type ListByServiceCustomPager added in v0.20240628.1153531

type ListByServiceCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListByServiceCustomPager) NextPageLink() *odata.Link

type ListByServiceOperationOptions

type ListByServiceOperationOptions struct {
	Filter *string
}

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

type ListSecretsOperationResponse

type ListSecretsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AccessInformationSecretsContract
}

type RegeneratePrimaryKeyOperationResponse

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

type RegenerateSecondaryKeyOperationResponse

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

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 TenantAccessClient

type TenantAccessClient struct {
	Client *resourcemanager.Client
}

func NewTenantAccessClientWithBaseURI

func NewTenantAccessClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantAccessClient, error)

func (TenantAccessClient) Create

Create ...

func (TenantAccessClient) Get

Get ...

func (TenantAccessClient) GetEntityTag

func (c TenantAccessClient) GetEntityTag(ctx context.Context, id AccessId) (result GetEntityTagOperationResponse, err error)

GetEntityTag ...

func (TenantAccessClient) ListByService

ListByService ...

func (TenantAccessClient) ListByServiceComplete

ListByServiceComplete retrieves all the results into a single object

func (TenantAccessClient) ListByServiceCompleteMatchingPredicate

func (c TenantAccessClient) ListByServiceCompleteMatchingPredicate(ctx context.Context, id ServiceId, options ListByServiceOperationOptions, predicate AccessInformationContractOperationPredicate) (result ListByServiceCompleteResult, err error)

ListByServiceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (TenantAccessClient) ListSecrets

func (c TenantAccessClient) ListSecrets(ctx context.Context, id AccessId) (result ListSecretsOperationResponse, err error)

ListSecrets ...

func (TenantAccessClient) RegeneratePrimaryKey

func (c TenantAccessClient) RegeneratePrimaryKey(ctx context.Context, id AccessId) (result RegeneratePrimaryKeyOperationResponse, err error)

RegeneratePrimaryKey ...

func (TenantAccessClient) RegenerateSecondaryKey

func (c TenantAccessClient) RegenerateSecondaryKey(ctx context.Context, id AccessId) (result RegenerateSecondaryKeyOperationResponse, err error)

RegenerateSecondaryKey ...

func (TenantAccessClient) Update

Update ...

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

Jump to

Keyboard shortcuts

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