organizations

package
v0.20241029.1112340 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MPL-2.0 Imports: 17 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/astronomer/2024-08-27/organizations Documentation

The organizations SDK allows for interaction with Azure Resource Manager astronomer (API Version 2024-08-27).

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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/astronomer/2024-08-27/organizations"

Client Initialization

client := organizations.NewOrganizationsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: OrganizationsClient.CreateOrUpdate

ctx := context.TODO()
id := organizations.NewOrganizationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "organizationName")

payload := organizations.OrganizationResource{
	// ...
}


if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: OrganizationsClient.Delete

ctx := context.TODO()
id := organizations.NewOrganizationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "organizationName")

if err := client.DeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: OrganizationsClient.Get

ctx := context.TODO()
id := organizations.NewOrganizationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "organizationName")

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: OrganizationsClient.ListByResourceGroup

ctx := context.TODO()
id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")

// 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: OrganizationsClient.ListBySubscription

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

// 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: OrganizationsClient.Update

ctx := context.TODO()
id := organizations.NewOrganizationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "organizationName")

payload := organizations.OrganizationResourceUpdate{
	// ...
}


if err := client.UpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForMarketplaceSubscriptionStatus

func PossibleValuesForMarketplaceSubscriptionStatus() []string

func PossibleValuesForRenewalMode

func PossibleValuesForRenewalMode() []string

func PossibleValuesForResourceProvisioningState

func PossibleValuesForResourceProvisioningState() []string

func PossibleValuesForSingleSignOnStates

func PossibleValuesForSingleSignOnStates() []string

func ValidateOrganizationID

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

ValidateOrganizationID checks that 'input' can be parsed as a Organization ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *OrganizationResource
}

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        *OrganizationResource
}

type LiftrBaseDataOrganizationProperties

type LiftrBaseDataOrganizationProperties struct {
	Marketplace                   LiftrBaseMarketplaceDetails                 `json:"marketplace"`
	PartnerOrganizationProperties *LiftrBaseDataPartnerOrganizationProperties `json:"partnerOrganizationProperties,omitempty"`
	ProvisioningState             *ResourceProvisioningState                  `json:"provisioningState,omitempty"`
	User                          LiftrBaseUserDetails                        `json:"user"`
}

type LiftrBaseDataPartnerOrganizationProperties

type LiftrBaseDataPartnerOrganizationProperties struct {
	OrganizationId         *string                          `json:"organizationId,omitempty"`
	OrganizationName       string                           `json:"organizationName"`
	SingleSignOnProperties *LiftrBaseSingleSignOnProperties `json:"singleSignOnProperties,omitempty"`
	WorkspaceId            *string                          `json:"workspaceId,omitempty"`
	WorkspaceName          *string                          `json:"workspaceName,omitempty"`
}

type LiftrBaseDataPartnerOrganizationPropertiesUpdate

type LiftrBaseDataPartnerOrganizationPropertiesUpdate struct {
	OrganizationId         *string                          `json:"organizationId,omitempty"`
	OrganizationName       *string                          `json:"organizationName,omitempty"`
	SingleSignOnProperties *LiftrBaseSingleSignOnProperties `json:"singleSignOnProperties,omitempty"`
	WorkspaceId            *string                          `json:"workspaceId,omitempty"`
	WorkspaceName          *string                          `json:"workspaceName,omitempty"`
}

type LiftrBaseMarketplaceDetails

type LiftrBaseMarketplaceDetails struct {
	OfferDetails       LiftrBaseOfferDetails          `json:"offerDetails"`
	SubscriptionId     *string                        `json:"subscriptionId,omitempty"`
	SubscriptionStatus *MarketplaceSubscriptionStatus `json:"subscriptionStatus,omitempty"`
}

type LiftrBaseMarketplaceDetailsUpdate added in v0.20241017.1093842

type LiftrBaseMarketplaceDetailsUpdate struct {
	OfferDetails       *LiftrBaseOfferDetailsUpdate   `json:"offerDetails,omitempty"`
	SubscriptionId     *string                        `json:"subscriptionId,omitempty"`
	SubscriptionStatus *MarketplaceSubscriptionStatus `json:"subscriptionStatus,omitempty"`
}

type LiftrBaseOfferDetails

type LiftrBaseOfferDetails struct {
	EndDate     *string      `json:"endDate,omitempty"`
	OfferId     string       `json:"offerId"`
	PlanId      string       `json:"planId"`
	PlanName    *string      `json:"planName,omitempty"`
	PublisherId string       `json:"publisherId"`
	RenewalMode *RenewalMode `json:"renewalMode,omitempty"`
	TermId      *string      `json:"termId,omitempty"`
	TermUnit    *string      `json:"termUnit,omitempty"`
}

func (*LiftrBaseOfferDetails) GetEndDateAsTime

func (o *LiftrBaseOfferDetails) GetEndDateAsTime() (*time.Time, error)

func (*LiftrBaseOfferDetails) SetEndDateAsTime

func (o *LiftrBaseOfferDetails) SetEndDateAsTime(input time.Time)

type LiftrBaseOfferDetailsUpdate added in v0.20241017.1093842

type LiftrBaseOfferDetailsUpdate struct {
	OfferId     *string      `json:"offerId,omitempty"`
	PlanId      *string      `json:"planId,omitempty"`
	PlanName    *string      `json:"planName,omitempty"`
	PublisherId *string      `json:"publisherId,omitempty"`
	RenewalMode *RenewalMode `json:"renewalMode,omitempty"`
	TermId      *string      `json:"termId,omitempty"`
	TermUnit    *string      `json:"termUnit,omitempty"`
}

type LiftrBaseSingleSignOnProperties

type LiftrBaseSingleSignOnProperties struct {
	AadDomains        *[]string                  `json:"aadDomains,omitempty"`
	EnterpriseAppId   *string                    `json:"enterpriseAppId,omitempty"`
	ProvisioningState *ResourceProvisioningState `json:"provisioningState,omitempty"`
	SingleSignOnState *SingleSignOnStates        `json:"singleSignOnState,omitempty"`
	SingleSignOnURL   *string                    `json:"singleSignOnUrl,omitempty"`
}

type LiftrBaseUserDetails

type LiftrBaseUserDetails struct {
	EmailAddress string  `json:"emailAddress"`
	FirstName    string  `json:"firstName"`
	LastName     string  `json:"lastName"`
	PhoneNumber  *string `json:"phoneNumber,omitempty"`
	Upn          *string `json:"upn,omitempty"`
}

type LiftrBaseUserDetailsUpdate

type LiftrBaseUserDetailsUpdate struct {
	EmailAddress *string `json:"emailAddress,omitempty"`
	FirstName    *string `json:"firstName,omitempty"`
	LastName     *string `json:"lastName,omitempty"`
	PhoneNumber  *string `json:"phoneNumber,omitempty"`
	Upn          *string `json:"upn,omitempty"`
}

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []OrganizationResource
}

type ListByResourceGroupCustomPager

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

type ListByResourceGroupOperationResponse

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

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []OrganizationResource
}

type ListBySubscriptionCustomPager

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

type ListBySubscriptionOperationResponse

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

type MarketplaceSubscriptionStatus

type MarketplaceSubscriptionStatus string
const (
	MarketplaceSubscriptionStatusPendingFulfillmentStart MarketplaceSubscriptionStatus = "PendingFulfillmentStart"
	MarketplaceSubscriptionStatusSubscribed              MarketplaceSubscriptionStatus = "Subscribed"
	MarketplaceSubscriptionStatusSuspended               MarketplaceSubscriptionStatus = "Suspended"
	MarketplaceSubscriptionStatusUnsubscribed            MarketplaceSubscriptionStatus = "Unsubscribed"
)

func (*MarketplaceSubscriptionStatus) UnmarshalJSON

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

type OrganizationId

type OrganizationId struct {
	SubscriptionId    string
	ResourceGroupName string
	OrganizationName  string
}

OrganizationId is a struct representing the Resource ID for a Organization

func NewOrganizationID

func NewOrganizationID(subscriptionId string, resourceGroupName string, organizationName string) OrganizationId

NewOrganizationID returns a new OrganizationId struct

func ParseOrganizationID

func ParseOrganizationID(input string) (*OrganizationId, error)

ParseOrganizationID parses 'input' into a OrganizationId

func ParseOrganizationIDInsensitively

func ParseOrganizationIDInsensitively(input string) (*OrganizationId, error)

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

func (*OrganizationId) FromParseResult

func (id *OrganizationId) FromParseResult(input resourceids.ParseResult) error

func (OrganizationId) ID

func (id OrganizationId) ID() string

ID returns the formatted Organization ID

func (OrganizationId) Segments

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

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

func (OrganizationId) String

func (id OrganizationId) String() string

String returns a human-readable description of this Organization ID

type OrganizationResource

type OrganizationResource struct {
	Id         *string                              `json:"id,omitempty"`
	Identity   *identity.SystemAndUserAssignedMap   `json:"identity,omitempty"`
	Location   string                               `json:"location"`
	Name       *string                              `json:"name,omitempty"`
	Properties *LiftrBaseDataOrganizationProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData               `json:"systemData,omitempty"`
	Tags       *map[string]string                   `json:"tags,omitempty"`
	Type       *string                              `json:"type,omitempty"`
}

type OrganizationResourceOperationPredicate

type OrganizationResourceOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (OrganizationResourceOperationPredicate) Matches

type OrganizationResourceUpdate

type OrganizationResourceUpdate struct {
	Identity   *identity.SystemAndUserAssignedMap    `json:"identity,omitempty"`
	Properties *OrganizationResourceUpdateProperties `json:"properties,omitempty"`
	Tags       *map[string]string                    `json:"tags,omitempty"`
}

type OrganizationResourceUpdateProperties

type OrganizationResourceUpdateProperties struct {
	Marketplace                   *LiftrBaseMarketplaceDetailsUpdate                `json:"marketplace,omitempty"`
	PartnerOrganizationProperties *LiftrBaseDataPartnerOrganizationPropertiesUpdate `json:"partnerOrganizationProperties,omitempty"`
	User                          *LiftrBaseUserDetailsUpdate                       `json:"user,omitempty"`
}

type OrganizationsClient

type OrganizationsClient struct {
	Client *resourcemanager.Client
}

func NewOrganizationsClientWithBaseURI

func NewOrganizationsClientWithBaseURI(sdkApi sdkEnv.Api) (*OrganizationsClient, error)

func (OrganizationsClient) CreateOrUpdate

CreateOrUpdate ...

func (OrganizationsClient) CreateOrUpdateThenPoll

func (c OrganizationsClient) CreateOrUpdateThenPoll(ctx context.Context, id OrganizationId, input OrganizationResource) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (OrganizationsClient) Delete

Delete ...

func (OrganizationsClient) DeleteThenPoll

func (c OrganizationsClient) DeleteThenPoll(ctx context.Context, id OrganizationId) error

DeleteThenPoll performs Delete then polls until it's completed

func (OrganizationsClient) Get

Get ...

func (OrganizationsClient) ListByResourceGroup

ListByResourceGroup ...

func (OrganizationsClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (OrganizationsClient) ListByResourceGroupCompleteMatchingPredicate

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

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (OrganizationsClient) ListBySubscription

ListBySubscription ...

func (OrganizationsClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (OrganizationsClient) ListBySubscriptionCompleteMatchingPredicate

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

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (OrganizationsClient) Update

Update ...

func (OrganizationsClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type RenewalMode

type RenewalMode string
const (
	RenewalModeAuto   RenewalMode = "Auto"
	RenewalModeManual RenewalMode = "Manual"
)

func (*RenewalMode) UnmarshalJSON

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

type ResourceProvisioningState

type ResourceProvisioningState string
const (
	ResourceProvisioningStateCanceled  ResourceProvisioningState = "Canceled"
	ResourceProvisioningStateFailed    ResourceProvisioningState = "Failed"
	ResourceProvisioningStateSucceeded ResourceProvisioningState = "Succeeded"
)

func (*ResourceProvisioningState) UnmarshalJSON

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

type SingleSignOnStates

type SingleSignOnStates string
const (
	SingleSignOnStatesDisable SingleSignOnStates = "Disable"
	SingleSignOnStatesEnable  SingleSignOnStates = "Enable"
	SingleSignOnStatesInitial SingleSignOnStates = "Initial"
)

func (*SingleSignOnStates) UnmarshalJSON

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

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *OrganizationResource
}

Jump to

Keyboard shortcuts

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