tenantaccess

package
v0.20221212.1131457 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: MPL-2.0 Imports: 8 Imported by: 0

README

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

The tenantaccess 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/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 added in v0.20220907.1111434

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

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

AccessId is a struct representing the Resource ID for a Access

func NewAccessID added in v0.20220907.1111434

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

NewAccessID returns a new AccessId struct

func ParseAccessID added in v0.20220907.1111434

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

ParseAccessID parses 'input' into a AccessId

func ParseAccessIDInsensitively added in v0.20220907.1111434

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) ID added in v0.20220907.1111434

func (id AccessId) ID() string

ID returns the formatted Access ID

func (AccessId) Segments added in v0.20220907.1111434

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

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

func (AccessId) String added in v0.20220907.1111434

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"
)

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

type CreateOperationResponse

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

type GetEntityTagOperationResponse

type GetEntityTagOperationResponse struct {
	HttpResponse *http.Response
}

type GetOperationResponse

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

type ListByServiceCompleteResult

type ListByServiceCompleteResult struct {
	Items []AccessInformationContract
}

type ListByServiceOperationOptions

type ListByServiceOperationOptions struct {
	Filter *string
}

func DefaultListByServiceOperationOptions

func DefaultListByServiceOperationOptions() ListByServiceOperationOptions

type ListByServiceOperationResponse

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

func (ListByServiceOperationResponse) HasMore

func (ListByServiceOperationResponse) LoadMore

type ListSecretsOperationResponse

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

type RegeneratePrimaryKeyOperationResponse

type RegeneratePrimaryKeyOperationResponse struct {
	HttpResponse *http.Response
}

type RegenerateSecondaryKeyOperationResponse

type RegenerateSecondaryKeyOperationResponse struct {
	HttpResponse *http.Response
}

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 TenantAccessClient

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

func NewTenantAccessClientWithBaseURI

func NewTenantAccessClientWithBaseURI(endpoint string) TenantAccessClient

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

func (TenantAccessClient) ListByServiceCompleteMatchingPredicate

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

ListByServiceCompleteMatchingPredicate retrieves all of the results and then applied 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

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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