tenants

package
v0.20230704.1182735 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: MPL-2.0 Imports: 12 Imported by: 1

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

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

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

ValidateB2CDirectoryID checks that 'input' can be parsed as a B 2 C Directory ID

Types

type B2CDirectoryId

type B2CDirectoryId struct {
	SubscriptionId string
	ResourceGroup  string
	DirectoryName  string
}

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

func (*BillingType) UnmarshalJSON added in v0.20230406.1124617

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

type CheckNameAvailabilityOperationResponse

type CheckNameAvailabilityOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CheckNameAvailabilityResult
}

type CheckNameAvailabilityRequest

type CheckNameAvailabilityRequest struct {
	CountryCode *string `json:"countryCode,omitempty"`
	Name        *string `json:"name,omitempty"`
}

type CheckNameAvailabilityResult

type CheckNameAvailabilityResult struct {
	Message       *string `json:"message,omitempty"`
	NameAvailable *bool   `json:"nameAvailable,omitempty"`
	Reason        *string `json:"reason,omitempty"`
}

type CreateOperationResponse

type CreateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

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 CreateTenantProperties struct {
	CountryCode string `json:"countryCode"`
	DisplayName string `json:"displayName"`
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetOperationResponse

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

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	Items []Tenant
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Tenant
}

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	Items []Tenant
}

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Tenant
}

type Location

type Location string
const (
	LocationAsiaPacific  Location = "Asia Pacific"
	LocationAustralia    Location = "Australia"
	LocationEurope       Location = "Europe"
	LocationGlobal       Location = "Global"
	LocationUnitedStates Location = "United States"
)

func (*Location) UnmarshalJSON added in v0.20230406.1124617

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

type Sku

type Sku struct {
	Name SkuName `json:"name"`
	Tier SkuTier `json:"tier"`
}

type SkuName

type SkuName string
const (
	SkuNamePremiumP1 SkuName = "PremiumP1"
	SkuNamePremiumP2 SkuName = "PremiumP2"
	SkuNameStandard  SkuName = "Standard"
)

func (*SkuName) UnmarshalJSON added in v0.20230406.1124617

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

type SkuTier

type SkuTier string
const (
	SkuTierA0 SkuTier = "A0"
)

func (*SkuTier) UnmarshalJSON added in v0.20230406.1124617

func (s *SkuTier) UnmarshalJSON(bytes []byte) 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

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

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

type TenantsClient struct {
	Client *resourcemanager.Client
}

func NewTenantsClientWithBaseURI

func NewTenantsClientWithBaseURI(api environments.Api) (*TenantsClient, error)

func (TenantsClient) CheckNameAvailability

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

Get ...

func (TenantsClient) ListByResourceGroup

ListByResourceGroup ...

func (TenantsClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (TenantsClient) ListByResourceGroupCompleteMatchingPredicate

func (c TenantsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate TenantOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (TenantsClient) ListBySubscription

ListBySubscription ...

func (TenantsClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (TenantsClient) ListBySubscriptionCompleteMatchingPredicate

func (c TenantsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate TenantOperationPredicate) (result ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (TenantsClient) Update

func (c TenantsClient) Update(ctx context.Context, id B2CDirectoryId, input UpdateTenant) (result UpdateOperationResponse, err error)

Update ...

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Tenant
}

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"`
}

Jump to

Keyboard shortcuts

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