tenantaccess

package
v0.20220906.1075003 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 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.NewAccesID("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.NewAccesID("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.NewAccesID("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.NewAccesID("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.NewAccesID("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.NewAccesID("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.NewAccesID("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 ValidateAccesID

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

ValidateAccesID checks that 'input' can be parsed as a Acces 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 AccesId

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

AccesId is a struct representing the Resource ID for a Acces

func NewAccesID

func NewAccesID(subscriptionId string, resourceGroupName string, serviceName string, accessName AccessIdName) AccesId

NewAccesID returns a new AccesId struct

func ParseAccesID

func ParseAccesID(input string) (*AccesId, error)

ParseAccesID parses 'input' into a AccesId

func ParseAccesIDInsensitively

func ParseAccesIDInsensitively(input string) (*AccesId, error)

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

func (AccesId) ID

func (id AccesId) ID() string

ID returns the formatted Acces ID

func (AccesId) Segments

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

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

func (AccesId) String

func (id AccesId) String() string

String returns a human-readable description of this Acces 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

func (c TenantAccessClient) Get(ctx context.Context, id AccesId) (result GetOperationResponse, err error)

Get ...

func (TenantAccessClient) GetEntityTag

func (c TenantAccessClient) GetEntityTag(ctx context.Context, id AccesId) (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 AccesId) (result ListSecretsOperationResponse, err error)

ListSecrets ...

func (TenantAccessClient) RegeneratePrimaryKey

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

RegeneratePrimaryKey ...

func (TenantAccessClient) RegenerateSecondaryKey

func (c TenantAccessClient) RegenerateSecondaryKey(ctx context.Context, id AccesId) (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