tenants

package
v0.20241004.1180715 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/resources/2015-11-01/tenants Documentation

The tenants SDK allows for interaction with Azure Resource Manager resources (API Version 2015-11-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/resources/2015-11-01/tenants"

Client Initialization

client := tenants.NewTenantsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: TenantsClient.CheckResourceName

ctx := context.TODO()

payload := tenants.ResourceName{
	// ...
}


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

Example Usage: TenantsClient.List

ctx := context.TODO()


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForResourceNameStatus

func PossibleValuesForResourceNameStatus() []string

Types

type CheckResourceNameOperationResponse

type CheckResourceNameOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CheckResourceNameResult
}

type CheckResourceNameResult

type CheckResourceNameResult struct {
	Name   *string             `json:"name,omitempty"`
	Status *ResourceNameStatus `json:"status,omitempty"`
	Type   *string             `json:"type,omitempty"`
}

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []TenantIdDescription
}

type ListCustomPager added in v0.20240628.1153531

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

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]TenantIdDescription
}

type ResourceName

type ResourceName struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

type ResourceNameStatus

type ResourceNameStatus string
const (
	ResourceNameStatusAllowed  ResourceNameStatus = "Allowed"
	ResourceNameStatusReserved ResourceNameStatus = "Reserved"
)

func (*ResourceNameStatus) UnmarshalJSON

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

type TenantIdDescription

type TenantIdDescription struct {
	Id       *string `json:"id,omitempty"`
	TenantId *string `json:"tenantId,omitempty"`
}

type TenantIdDescriptionOperationPredicate

type TenantIdDescriptionOperationPredicate struct {
	Id       *string
	TenantId *string
}

func (TenantIdDescriptionOperationPredicate) Matches

type TenantsClient

type TenantsClient struct {
	Client *resourcemanager.Client
}

func NewTenantsClientWithBaseURI

func NewTenantsClientWithBaseURI(sdkApi sdkEnv.Api) (*TenantsClient, error)

func (TenantsClient) CheckResourceName

func (c TenantsClient) CheckResourceName(ctx context.Context, input ResourceName) (result CheckResourceNameOperationResponse, err error)

CheckResourceName ...

func (TenantsClient) List

func (c TenantsClient) List(ctx context.Context) (result ListOperationResponse, err error)

List ...

func (TenantsClient) ListComplete

func (c TenantsClient) ListComplete(ctx context.Context) (ListCompleteResult, error)

ListComplete retrieves all the results into a single object

func (TenantsClient) ListCompleteMatchingPredicate

func (c TenantsClient) ListCompleteMatchingPredicate(ctx context.Context, predicate TenantIdDescriptionOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

Jump to

Keyboard shortcuts

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