README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview/tenants
Documentation
The tenants
SDK allows for interaction with the Azure Resource Manager Service aadb2c
(API Version 2021-04-01-preview
).
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/aadb2c/2021-04-01-preview/tenants"
Client Initialization
client := tenants.NewTenantsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: TenantsClient.CheckNameAvailability
ctx := context.TODO()
id := tenants.NewSubscriptionID()
payload := tenants.CheckNameAvailabilityRequest{
// ...
}
read, err := client.CheckNameAvailability(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: TenantsClient.Create
ctx := context.TODO()
id := tenants.NewB2CDirectoryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "directoryValue")
payload := tenants.CreateTenant{
// ...
}
if err := client.CreateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: TenantsClient.Delete
ctx := context.TODO()
id := tenants.NewB2CDirectoryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "directoryValue")
if err := client.DeleteThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: TenantsClient.Get
ctx := context.TODO()
id := tenants.NewB2CDirectoryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "directoryValue")
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: TenantsClient.ListByResourceGroup
ctx := context.TODO()
id := tenants.NewResourceGroupID()
// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination
items, err := client.ListByResourceGroupComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: TenantsClient.ListBySubscription
ctx := context.TODO()
id := tenants.NewSubscriptionID()
// alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination
items, err := client.ListBySubscriptionComplete(ctx, id)
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: TenantsClient.Update
ctx := context.TODO()
id := tenants.NewB2CDirectoryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "directoryValue")
payload := tenants.UpdateTenant{
// ...
}
read, err := client.Update(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Documentation ¶
Index ¶
- func PossibleValuesForBillingType() []string
- func PossibleValuesForLocation() []string
- func PossibleValuesForSkuName() []string
- func PossibleValuesForSkuTier() []string
- func ValidateB2CDirectoryID(input interface{}, key string) (warnings []string, errors []error)
- type B2CDirectoryId
- type BillingConfig
- type BillingType
- type CheckNameAvailabilityOperationResponse
- type CheckNameAvailabilityRequest
- type CheckNameAvailabilityResult
- type CreateOperationResponse
- type CreateTenant
- type CreateTenantProperties
- type DeleteOperationResponse
- type GetOperationResponse
- type ListByResourceGroupCompleteResult
- type ListByResourceGroupOperationResponse
- type ListBySubscriptionCompleteResult
- type ListBySubscriptionOperationResponse
- type Location
- type Sku
- type SkuName
- type SkuTier
- type Tenant
- type TenantOperationPredicate
- type TenantProperties
- type TenantPropertiesForCreate
- type TenantsClient
- func (c TenantsClient) CheckNameAvailability(ctx context.Context, id commonids.SubscriptionId, ...) (result CheckNameAvailabilityOperationResponse, err error)
- func (c TenantsClient) Create(ctx context.Context, id B2CDirectoryId, input CreateTenant) (result CreateOperationResponse, err error)
- func (c TenantsClient) CreateThenPoll(ctx context.Context, id B2CDirectoryId, input CreateTenant) error
- func (c TenantsClient) Delete(ctx context.Context, id B2CDirectoryId) (result DeleteOperationResponse, err error)
- func (c TenantsClient) DeleteThenPoll(ctx context.Context, id B2CDirectoryId) error
- func (c TenantsClient) Get(ctx context.Context, id B2CDirectoryId) (result GetOperationResponse, err error)
- func (c TenantsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (resp ListByResourceGroupOperationResponse, err error)
- func (c TenantsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
- func (c TenantsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, ...) (resp ListByResourceGroupCompleteResult, err error)
- func (c TenantsClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (resp ListBySubscriptionOperationResponse, err error)
- func (c TenantsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error)
- func (c TenantsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, ...) (resp ListBySubscriptionCompleteResult, err error)
- func (c TenantsClient) Update(ctx context.Context, id B2CDirectoryId, input UpdateTenant) (result UpdateOperationResponse, err error)
- type UpdateOperationResponse
- type UpdateTenant
- type UpdateTenantProperties
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PossibleValuesForBillingType ¶
func PossibleValuesForBillingType() []string
func PossibleValuesForLocation ¶
func PossibleValuesForLocation() []string
func PossibleValuesForSkuName ¶
func PossibleValuesForSkuName() []string
func PossibleValuesForSkuTier ¶
func PossibleValuesForSkuTier() []string
func ValidateB2CDirectoryID ¶
ValidateB2CDirectoryID checks that 'input' can be parsed as a B 2 C Directory ID
Types ¶
type B2CDirectoryId ¶
B2CDirectoryId is a struct representing the Resource ID for a B 2 C Directory
func NewB2CDirectoryID ¶
func NewB2CDirectoryID(subscriptionId string, resourceGroup string, directoryName string) B2CDirectoryId
NewB2CDirectoryID returns a new B2CDirectoryId struct
func ParseB2CDirectoryID ¶
func ParseB2CDirectoryID(input string) (*B2CDirectoryId, error)
ParseB2CDirectoryID parses 'input' into a B2CDirectoryId
func ParseB2CDirectoryIDInsensitively ¶
func ParseB2CDirectoryIDInsensitively(input string) (*B2CDirectoryId, error)
ParseB2CDirectoryIDInsensitively parses 'input' case-insensitively into a B2CDirectoryId note: this method should only be used for API response data and not user input
func (B2CDirectoryId) ID ¶
func (id B2CDirectoryId) ID() string
ID returns the formatted B 2 C Directory ID
func (B2CDirectoryId) Segments ¶
func (id B2CDirectoryId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this B 2 C Directory ID
func (B2CDirectoryId) String ¶
func (id B2CDirectoryId) String() string
String returns a human-readable description of this B 2 C Directory ID
type BillingConfig ¶
type BillingConfig struct { BillingType *BillingType `json:"billingType,omitempty"` EffectiveStartDateUtc *string `json:"effectiveStartDateUtc,omitempty"` }
type BillingType ¶
type BillingType string
const ( BillingTypeAuths BillingType = "auths" BillingTypeMonthlyActiveUsers BillingType = "mau" )
type CheckNameAvailabilityOperationResponse ¶
type CheckNameAvailabilityOperationResponse struct { HttpResponse *http.Response Model *CheckNameAvailabilityResult }
type CreateOperationResponse ¶
type CreateOperationResponse struct { Poller polling.LongRunningPoller HttpResponse *http.Response }
type CreateTenant ¶
type CreateTenant struct { Location Location `json:"location"` Properties TenantPropertiesForCreate `json:"properties"` Sku Sku `json:"sku"` Tags *map[string]string `json:"tags,omitempty"` }
type CreateTenantProperties ¶
type DeleteOperationResponse ¶
type DeleteOperationResponse struct { Poller polling.LongRunningPoller HttpResponse *http.Response }
type GetOperationResponse ¶
type ListByResourceGroupCompleteResult ¶
type ListByResourceGroupCompleteResult struct {
Items []Tenant
}
type ListByResourceGroupOperationResponse ¶
type ListByResourceGroupOperationResponse struct { HttpResponse *http.Response Model *[]Tenant // contains filtered or unexported fields }
func (ListByResourceGroupOperationResponse) HasMore ¶
func (r ListByResourceGroupOperationResponse) HasMore() bool
func (ListByResourceGroupOperationResponse) LoadMore ¶
func (r ListByResourceGroupOperationResponse) LoadMore(ctx context.Context) (resp ListByResourceGroupOperationResponse, err error)
type ListBySubscriptionCompleteResult ¶
type ListBySubscriptionCompleteResult struct {
Items []Tenant
}
type ListBySubscriptionOperationResponse ¶
type ListBySubscriptionOperationResponse struct { HttpResponse *http.Response Model *[]Tenant // contains filtered or unexported fields }
func (ListBySubscriptionOperationResponse) HasMore ¶
func (r ListBySubscriptionOperationResponse) HasMore() bool
func (ListBySubscriptionOperationResponse) LoadMore ¶
func (r ListBySubscriptionOperationResponse) LoadMore(ctx context.Context) (resp ListBySubscriptionOperationResponse, err error)
type Tenant ¶
type Tenant struct { Id *string `json:"id,omitempty"` Location *Location `json:"location,omitempty"` Name *string `json:"name,omitempty"` Properties *TenantProperties `json:"properties,omitempty"` Sku *Sku `json:"sku,omitempty"` Tags *map[string]string `json:"tags,omitempty"` Type *string `json:"type,omitempty"` }
type TenantOperationPredicate ¶
func (TenantOperationPredicate) Matches ¶
func (p TenantOperationPredicate) Matches(input Tenant) bool
type TenantProperties ¶
type TenantProperties struct { BillingConfig *BillingConfig `json:"billingConfig,omitempty"` CountryCode *string `json:"countryCode,omitempty"` DisplayName *string `json:"displayName,omitempty"` TenantId *string `json:"tenantId,omitempty"` }
type TenantPropertiesForCreate ¶
type TenantPropertiesForCreate struct {
CreateTenantProperties CreateTenantProperties `json:"createTenantProperties"`
}
type TenantsClient ¶
func NewTenantsClientWithBaseURI ¶
func NewTenantsClientWithBaseURI(endpoint string) TenantsClient
func (TenantsClient) CheckNameAvailability ¶
func (c TenantsClient) CheckNameAvailability(ctx context.Context, id commonids.SubscriptionId, input CheckNameAvailabilityRequest) (result CheckNameAvailabilityOperationResponse, err error)
CheckNameAvailability ...
func (TenantsClient) Create ¶
func (c TenantsClient) Create(ctx context.Context, id B2CDirectoryId, input CreateTenant) (result CreateOperationResponse, err error)
Create ...
func (TenantsClient) CreateThenPoll ¶
func (c TenantsClient) CreateThenPoll(ctx context.Context, id B2CDirectoryId, input CreateTenant) error
CreateThenPoll performs Create then polls until it's completed
func (TenantsClient) Delete ¶
func (c TenantsClient) Delete(ctx context.Context, id B2CDirectoryId) (result DeleteOperationResponse, err error)
Delete ...
func (TenantsClient) DeleteThenPoll ¶
func (c TenantsClient) DeleteThenPoll(ctx context.Context, id B2CDirectoryId) error
DeleteThenPoll performs Delete then polls until it's completed
func (TenantsClient) Get ¶
func (c TenantsClient) Get(ctx context.Context, id B2CDirectoryId) (result GetOperationResponse, err error)
Get ...
func (TenantsClient) ListByResourceGroup ¶
func (c TenantsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (resp ListByResourceGroupOperationResponse, err error)
ListByResourceGroup ...
func (TenantsClient) ListByResourceGroupComplete ¶
func (c TenantsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
ListByResourceGroupComplete retrieves all of the results into a single object
func (TenantsClient) ListByResourceGroupCompleteMatchingPredicate ¶
func (c TenantsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate TenantOperationPredicate) (resp ListByResourceGroupCompleteResult, err error)
ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate
func (TenantsClient) ListBySubscription ¶
func (c TenantsClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (resp ListBySubscriptionOperationResponse, err error)
ListBySubscription ...
func (TenantsClient) ListBySubscriptionComplete ¶
func (c TenantsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error)
ListBySubscriptionComplete retrieves all of the results into a single object
func (TenantsClient) ListBySubscriptionCompleteMatchingPredicate ¶
func (c TenantsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate TenantOperationPredicate) (resp ListBySubscriptionCompleteResult, err error)
ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate
func (TenantsClient) Update ¶
func (c TenantsClient) Update(ctx context.Context, id B2CDirectoryId, input UpdateTenant) (result UpdateOperationResponse, err error)
Update ...
type UpdateOperationResponse ¶
type UpdateTenant ¶
type UpdateTenant struct { Properties UpdateTenantProperties `json:"properties"` Sku Sku `json:"sku"` Tags *map[string]string `json:"tags,omitempty"` }
type UpdateTenantProperties ¶
type UpdateTenantProperties struct {
BillingConfig *BillingConfig `json:"billingConfig,omitempty"`
}
Source Files ¶
- client.go
- constants.go
- id_b2cdirectory.go
- method_checknameavailability_autorest.go
- method_create_autorest.go
- method_delete_autorest.go
- method_get_autorest.go
- method_listbyresourcegroup_autorest.go
- method_listbysubscription_autorest.go
- method_update_autorest.go
- model_billingconfig.go
- model_checknameavailabilityrequest.go
- model_checknameavailabilityresult.go
- model_createtenant.go
- model_createtenantproperties.go
- model_sku.go
- model_tenant.go
- model_tenantproperties.go
- model_tenantpropertiesforcreate.go
- model_updatetenant.go
- model_updatetenantproperties.go
- predicates.go
- version.go