Documentation
¶
Index ¶
- type AccessTokenResult
- type App
- type AppOperation
- type AppOperationDisplay
- type AppOperationsResponseWithContinuation
- type AppPlan
- type AppProperties
- type AppResponseWithContinuation
- type ApplicationsClient
- type ApplicationsClientListOptions
- type ApplicationsClientListResponse
- type Client
- func (client *Client) BeginCreateResource(ctx context.Context, parameters ResourceCreation, ...) (*runtime.Poller[ClientCreateResourceResponse], error)
- func (client *Client) BeginDelete(ctx context.Context, resourceID string, parameters DeleteOptions, ...) (*runtime.Poller[ClientDeleteResponse], error)
- func (client *Client) BeginUpdateResource(ctx context.Context, resourceID string, parameters ResourceCreation, ...) (*runtime.Poller[ClientUpdateResourceResponse], error)
- func (client *Client) GetResource(ctx context.Context, resourceID string, options *ClientGetResourceOptions) (ClientGetResourceResponse, error)
- type ClientBeginCreateResourceOptions
- type ClientBeginDeleteOptions
- type ClientBeginUpdateResourceOptions
- type ClientCreateResourceResponse
- type ClientDeleteResponse
- type ClientGetResourceOptions
- type ClientGetResourceResponse
- type ClientUpdateResourceResponse
- type CreationProperties
- type DeleteOptions
- type ErrorAdditionalInfo
- type ErrorDetail
- type ErrorResponse
- type MoveResource
- type OperationClient
- type OperationClientBeginGetOptions
- type OperationClientGetResponse
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type PaymentChannelType
- type Properties
- type PropertiesTerm
- type Resource
- type ResourceCreation
- type ResourceProperties
- type ResourceResponseWithContinuation
- type ResourcesClient
- type ResourcesClientListAccessTokenOptions
- type ResourcesClientListAccessTokenResponse
- type ResourcesClientListOptions
- type ResourcesClientListResponse
- type Result
- type SaasAppStatus
- type SaasResourceStatus
- type SubscriptionLevelClient
- func (client *SubscriptionLevelClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, ...) (*runtime.Poller[SubscriptionLevelClientCreateOrUpdateResponse], error)
- func (client *SubscriptionLevelClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, ...) (*runtime.Poller[SubscriptionLevelClientDeleteResponse], error)
- func (client *SubscriptionLevelClient) BeginMoveResources(ctx context.Context, resourceGroupName string, ...) (*runtime.Poller[SubscriptionLevelClientMoveResourcesResponse], error)
- func (client *SubscriptionLevelClient) BeginUpdate(ctx context.Context, resourceGroupName string, resourceName string, ...) (*runtime.Poller[SubscriptionLevelClientUpdateResponse], error)
- func (client *SubscriptionLevelClient) BeginUpdateToUnsubscribed(ctx context.Context, resourceGroupName string, resourceName string, ...) (*runtime.Poller[SubscriptionLevelClientUpdateToUnsubscribedResponse], error)
- func (client *SubscriptionLevelClient) Get(ctx context.Context, resourceGroupName string, resourceName string, ...) (SubscriptionLevelClientGetResponse, error)
- func (client *SubscriptionLevelClient) ListAccessToken(ctx context.Context, resourceGroupName string, resourceName string, ...) (SubscriptionLevelClientListAccessTokenResponse, error)
- func (client *SubscriptionLevelClient) NewListByAzureSubscriptionPager(options *SubscriptionLevelClientListByAzureSubscriptionOptions) *runtime.Pager[SubscriptionLevelClientListByAzureSubscriptionResponse]
- func (client *SubscriptionLevelClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[SubscriptionLevelClientListByResourceGroupResponse]
- func (client *SubscriptionLevelClient) ValidateMoveResources(ctx context.Context, resourceGroupName string, ...) (SubscriptionLevelClientValidateMoveResourcesResponse, error)
- type SubscriptionLevelClientBeginCreateOrUpdateOptions
- type SubscriptionLevelClientBeginDeleteOptions
- type SubscriptionLevelClientBeginMoveResourcesOptions
- type SubscriptionLevelClientBeginUpdateOptions
- type SubscriptionLevelClientBeginUpdateToUnsubscribedOptions
- type SubscriptionLevelClientCreateOrUpdateResponse
- type SubscriptionLevelClientDeleteResponse
- type SubscriptionLevelClientGetOptions
- type SubscriptionLevelClientGetResponse
- type SubscriptionLevelClientListAccessTokenOptions
- type SubscriptionLevelClientListAccessTokenResponse
- type SubscriptionLevelClientListByAzureSubscriptionOptions
- type SubscriptionLevelClientListByAzureSubscriptionResponse
- type SubscriptionLevelClientListByResourceGroupOptions
- type SubscriptionLevelClientListByResourceGroupResponse
- type SubscriptionLevelClientMoveResourcesResponse
- type SubscriptionLevelClientUpdateResponse
- type SubscriptionLevelClientUpdateToUnsubscribedResponse
- type SubscriptionLevelClientValidateMoveResourcesOptions
- type SubscriptionLevelClientValidateMoveResourcesResponse
Examples ¶
- ApplicationsClient.NewListPager
- Client.BeginCreateResource
- Client.BeginDelete
- Client.BeginUpdateResource
- Client.GetResource
- OperationClient.BeginGet
- OperationsClient.NewListPager
- ResourcesClient.ListAccessToken
- ResourcesClient.NewListPager
- SubscriptionLevelClient.BeginCreateOrUpdate
- SubscriptionLevelClient.BeginDelete
- SubscriptionLevelClient.BeginMoveResources
- SubscriptionLevelClient.BeginUpdate
- SubscriptionLevelClient.BeginUpdateToUnsubscribed
- SubscriptionLevelClient.Get
- SubscriptionLevelClient.ListAccessToken
- SubscriptionLevelClient.NewListByAzureSubscriptionPager
- SubscriptionLevelClient.NewListByResourceGroupPager
- SubscriptionLevelClient.ValidateMoveResources
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessTokenResult ¶
type AccessTokenResult struct { // The Publisher Offer Base Uri PublisherOfferBaseURI *string `json:"publisherOfferBaseUri,omitempty"` // The generated token Token *string `json:"token,omitempty"` }
AccessTokenResult - the ISV access token result response.
type App ¶ added in v0.2.0
type App struct { // the resource location. Location *string `json:"location,omitempty"` // the resource name. Name *string `json:"name,omitempty"` // the resource properties. Properties *AppProperties `json:"properties,omitempty"` // the resource tags. Tags map[string]*string `json:"tags,omitempty"` // the resource type. Type *string `json:"type,omitempty"` // READ-ONLY; the resource Id. ID *string `json:"id,omitempty" azure:"ro"` }
App - the saasApp resource.
type AppOperation ¶ added in v0.2.0
type AppOperation struct { // the operation display Display *AppOperationDisplay `json:"display,omitempty"` // whether the operation is a data action or not. IsDataAction *bool `json:"isDataAction,omitempty"` // the operation name Name *string `json:"name,omitempty"` // the operation origin Origin *string `json:"origin,omitempty"` }
AppOperation - saas app operations
type AppOperationDisplay ¶ added in v0.2.0
type AppOperationDisplay struct { // Description of the operation for display purposes Description *string `json:"description,omitempty"` // Name of the operation for display purposes Operation *string `json:"operation,omitempty"` // Name of the provider for display purposes Provider *string `json:"provider,omitempty"` // Name of the resource type for display purposes Resource *string `json:"resource,omitempty"` }
AppOperationDisplay - Saas app operation display
type AppOperationsResponseWithContinuation ¶ added in v0.2.0
type AppOperationsResponseWithContinuation struct { // the next link to query to get the remaining results. NextLink *string `json:"nextLink,omitempty"` // the value of response. Value []*AppOperation `json:"value,omitempty"` }
AppOperationsResponseWithContinuation - saas app operation response with continuation.
type AppPlan ¶ added in v0.2.0
type AppPlan struct { // the plan id. Name *string `json:"name,omitempty"` // the offer id. Product *string `json:"product,omitempty"` // the publisher id. Publisher *string `json:"publisher,omitempty"` }
AppPlan - Saas resource plan.
type AppProperties ¶ added in v0.2.0
type AppProperties struct { // the resource plan details. SaasAppPlan *AppPlan `json:"saasAppPlan,omitempty"` // the Saas resource status. Status *SaasAppStatus `json:"status,omitempty"` }
AppProperties - Saas resource properties.
type AppResponseWithContinuation ¶ added in v0.2.0
type AppResponseWithContinuation struct { // the next link to query to get the remaining results. NextLink *string `json:"nextLink,omitempty"` // the value of response. Value []*App `json:"value,omitempty"` }
AppResponseWithContinuation - saas app response with continuation.
type ApplicationsClient ¶
type ApplicationsClient struct {
// contains filtered or unexported fields
}
ApplicationsClient contains the methods for the Applications group. Don't use this type directly, use NewApplicationsClient() instead.
func NewApplicationsClient ¶
func NewApplicationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationsClient, error)
NewApplicationsClient creates a new instance of ApplicationsClient with the specified values. subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ApplicationsClient) NewListPager ¶ added in v0.4.0
func (client *ApplicationsClient) NewListPager(resourceGroupName string, options *ApplicationsClientListOptions) *runtime.Pager[ApplicationsClientListResponse]
NewListPager - Gets all SaaS resources by subscription id and resource group name. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-03-01-beta resourceGroupName - The name of the resource group. options - ApplicationsClientListOptions contains the optional parameters for the ApplicationsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV1/SaaSGetApplications.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/saas/armsaas" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsaas.NewApplicationsClient("bc6c2f82-a39d-41b8-a648-71527498a23e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager("myResourceGroup", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ApplicationsClientListOptions ¶ added in v0.2.0
type ApplicationsClientListOptions struct { }
ApplicationsClientListOptions contains the optional parameters for the ApplicationsClient.List method.
type ApplicationsClientListResponse ¶ added in v0.2.0
type ApplicationsClientListResponse struct {
AppResponseWithContinuation
}
ApplicationsClientListResponse contains the response from method ApplicationsClient.List.
type Client ¶ added in v0.2.0
type Client struct {
// contains filtered or unexported fields
}
Client contains the methods for the SaaS group. Don't use this type directly, use NewClient() instead.
func NewClient ¶ added in v0.2.0
func NewClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error)
NewClient creates a new instance of Client with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*Client) BeginCreateResource ¶ added in v0.2.0
func (client *Client) BeginCreateResource(ctx context.Context, parameters ResourceCreation, options *ClientBeginCreateResourceOptions) (*runtime.Poller[ClientCreateResourceResponse], error)
BeginCreateResource - Creates a SaaS resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-03-01-beta parameters - Parameters supplied to the create saas operation. options - ClientBeginCreateResourceOptions contains the optional parameters for the Client.BeginCreateResource method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV2/SaasPut.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/saas/armsaas" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsaas.NewClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateResource(ctx, armsaas.ResourceCreation{ Properties: &armsaas.CreationProperties{ OfferID: to.Ptr("microsofthealthcarebot"), PaymentChannelMetadata: map[string]*string{ "AzureSubscriptionId": to.Ptr("155af98a-3205-47e7-883b-a2ab9db9f88d"), }, PaymentChannelType: to.Ptr(armsaas.PaymentChannelTypeSubscriptionDelegated), PublisherID: to.Ptr("microsoft-hcb"), SaasResourceName: to.Ptr("testRunnerFromArm"), SKUID: to.Ptr("free"), TermID: to.Ptr("hjdtn7tfnxcy"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*Client) BeginDelete ¶ added in v0.2.0
func (client *Client) BeginDelete(ctx context.Context, resourceID string, parameters DeleteOptions, options *ClientBeginDeleteOptions) (*runtime.Poller[ClientDeleteResponse], error)
BeginDelete - Deletes the specified SaaS. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-03-01-beta resourceID - The Saas resource ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) parameters - Parameters supplied to delete saas operation. options - ClientBeginDeleteOptions contains the optional parameters for the Client.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV2/SaasDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/saas/armsaas" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsaas.NewClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "115c3523-1fae-757f-af86-7b27cfd29805", armsaas.DeleteOptions{ ReasonCode: to.Ptr[float32](0), UnsubscribeOnly: to.Ptr(true), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*Client) BeginUpdateResource ¶ added in v0.2.0
func (client *Client) BeginUpdateResource(ctx context.Context, resourceID string, parameters ResourceCreation, options *ClientBeginUpdateResourceOptions) (*runtime.Poller[ClientUpdateResourceResponse], error)
BeginUpdateResource - Updates a SaaS resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-03-01-beta resourceID - The Saas resource ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) parameters - Parameters supplied to the update saas operation. options - ClientBeginUpdateResourceOptions contains the optional parameters for the Client.BeginUpdateResource method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV2/SaasPatch.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/saas/armsaas" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsaas.NewClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdateResource(ctx, "115c3523-1fae-757f-af86-7b27cfd29805", armsaas.ResourceCreation{ Properties: &armsaas.CreationProperties{ SKUID: to.Ptr("premium"), }, Tags: map[string]*string{}, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*Client) GetResource ¶ added in v0.2.0
func (client *Client) GetResource(ctx context.Context, resourceID string, options *ClientGetResourceOptions) (ClientGetResourceResponse, error)
GetResource - Gets information about the specified SaaS. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-03-01-beta resourceID - The Saas resource ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) options - ClientGetResourceOptions contains the optional parameters for the Client.GetResource method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV2/SaasGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/saas/armsaas" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsaas.NewClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GetResource(ctx, "115c3523-1fae-757f-af86-7b27cfd29805", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type ClientBeginCreateResourceOptions ¶ added in v0.2.0
type ClientBeginCreateResourceOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ClientBeginCreateResourceOptions contains the optional parameters for the Client.BeginCreateResource method.
type ClientBeginDeleteOptions ¶ added in v0.2.0
type ClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ClientBeginDeleteOptions contains the optional parameters for the Client.BeginDelete method.
type ClientBeginUpdateResourceOptions ¶ added in v0.2.0
type ClientBeginUpdateResourceOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ClientBeginUpdateResourceOptions contains the optional parameters for the Client.BeginUpdateResource method.
type ClientCreateResourceResponse ¶ added in v0.2.0
type ClientCreateResourceResponse struct {
Resource
}
ClientCreateResourceResponse contains the response from method Client.CreateResource.
type ClientDeleteResponse ¶ added in v0.2.0
type ClientDeleteResponse struct { }
ClientDeleteResponse contains the response from method Client.Delete.
type ClientGetResourceOptions ¶ added in v0.2.0
type ClientGetResourceOptions struct { }
ClientGetResourceOptions contains the optional parameters for the Client.GetResource method.
type ClientGetResourceResponse ¶ added in v0.2.0
type ClientGetResourceResponse struct {
Resource
}
ClientGetResourceResponse contains the response from method Client.GetResource.
type ClientUpdateResourceResponse ¶ added in v0.2.0
type ClientUpdateResourceResponse struct {
Resource
}
ClientUpdateResourceResponse contains the response from method Client.UpdateResource.
type CreationProperties ¶ added in v0.2.0
type CreationProperties struct { // Whether the SaaS subscription will auto renew upon term end. AutoRenew *bool `json:"autoRenew,omitempty"` // The offer id. OfferID *string `json:"offerId,omitempty"` // The metadata about the SaaS subscription such as the AzureSubscriptionId and ResourceUri. PaymentChannelMetadata map[string]*string `json:"paymentChannelMetadata,omitempty"` // The Payment channel for the SaasSubscription. PaymentChannelType *PaymentChannelType `json:"paymentChannelType,omitempty"` // The publisher id. PublisherID *string `json:"publisherId,omitempty"` // The environment in the publisher side for this resource. PublisherTestEnvironment *string `json:"publisherTestEnvironment,omitempty"` // The seat count. Quantity *float32 `json:"quantity,omitempty"` // The plan id. SKUID *string `json:"skuId,omitempty"` // The SaaS resource name. SaasResourceName *string `json:"saasResourceName,omitempty"` // The saas session id used for dev service migration request. SaasSessionID *string `json:"saasSessionId,omitempty"` // The saas subscription id used for tenant to subscription level migration request. SaasSubscriptionID *string `json:"saasSubscriptionId,omitempty"` // The current Term id. TermID *string `json:"termId,omitempty"` }
CreationProperties - properties for creation saas
func (CreationProperties) MarshalJSON ¶ added in v0.2.0
func (c CreationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CreationProperties.
type DeleteOptions ¶
type DeleteOptions struct { // the feedback Feedback *string `json:"feedback,omitempty"` // The reasonCode ReasonCode *float32 `json:"reasonCode,omitempty"` // whether it is unsubscribeOnly UnsubscribeOnly *bool `json:"unsubscribeOnly,omitempty"` }
DeleteOptions - delete Options
type ErrorAdditionalInfo ¶
type ErrorAdditionalInfo struct { // READ-ONLY; The additional info. Info interface{} `json:"info,omitempty" azure:"ro"` // READ-ONLY; The additional info type. Type *string `json:"type,omitempty" azure:"ro"` }
ErrorAdditionalInfo - The resource management error additional info.
type ErrorDetail ¶
type ErrorDetail struct { // READ-ONLY; The error additional info. AdditionalInfo []*ErrorAdditionalInfo `json:"additionalInfo,omitempty" azure:"ro"` // READ-ONLY; The error code. Code *string `json:"code,omitempty" azure:"ro"` // READ-ONLY; The error details. Details []*ErrorDetail `json:"details,omitempty" azure:"ro"` // READ-ONLY; The error message. Message *string `json:"message,omitempty" azure:"ro"` // READ-ONLY; The error target. Target *string `json:"target,omitempty" azure:"ro"` }
ErrorDetail - The error detail.
type ErrorResponse ¶
type ErrorResponse struct { // The error object. Error *ErrorDetail `json:"error,omitempty"` }
ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
type MoveResource ¶
type MoveResource struct { // The resource uris to move Resources []*string `json:"resources,omitempty"` // The target resource group uri for the move TargetResourceGroup *string `json:"targetResourceGroup,omitempty"` }
MoveResource - Resource Move Options
func (MoveResource) MarshalJSON ¶
func (m MoveResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MoveResource.
type OperationClient ¶ added in v0.2.0
type OperationClient struct {
// contains filtered or unexported fields
}
OperationClient contains the methods for the SaaSOperation group. Don't use this type directly, use NewOperationClient() instead.
func NewOperationClient ¶ added in v0.2.0
func NewOperationClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationClient, error)
NewOperationClient creates a new instance of OperationClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*OperationClient) BeginGet ¶ added in v0.2.0
func (client *OperationClient) BeginGet(ctx context.Context, operationID string, options *OperationClientBeginGetOptions) (*runtime.Poller[OperationClientGetResponse], error)
BeginGet - Gets information about the specified operation progress. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-03-01-beta operationID - the operation Id parameter. options - OperationClientBeginGetOptions contains the optional parameters for the OperationClient.BeginGet method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/OperationResults/Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/saas/armsaas" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsaas.NewOperationClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginGet(ctx, "5f35cb4c-8065-45b3-9116-5ba335462e95", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
type OperationClientBeginGetOptions ¶ added in v0.2.0
type OperationClientBeginGetOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
OperationClientBeginGetOptions contains the optional parameters for the OperationClient.BeginGet method.
type OperationClientGetResponse ¶ added in v0.2.0
type OperationClientGetResponse struct {
Resource
}
OperationClientGetResponse contains the response from method OperationClient.Get.
type OperationsClient ¶
type OperationsClient struct {
// contains filtered or unexported fields
}
OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.
func NewOperationsClient ¶
func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)
NewOperationsClient creates a new instance of OperationsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*OperationsClient) NewListPager ¶ added in v0.4.0
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Gets all SaaS app operations. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-03-01-beta options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV1/SaaSGetOperations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/saas/armsaas" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsaas.NewOperationsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type OperationsClientListOptions ¶ added in v0.2.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
type OperationsClientListResponse ¶ added in v0.2.0
type OperationsClientListResponse struct {
AppOperationsResponseWithContinuation
}
OperationsClientListResponse contains the response from method OperationsClient.List.
type PaymentChannelType ¶
type PaymentChannelType string
PaymentChannelType - The Payment channel for the SaasSubscription.
const ( PaymentChannelTypeCustomerDelegated PaymentChannelType = "CustomerDelegated" PaymentChannelTypeSubscriptionDelegated PaymentChannelType = "SubscriptionDelegated" )
func PossiblePaymentChannelTypeValues ¶
func PossiblePaymentChannelTypeValues() []PaymentChannelType
PossiblePaymentChannelTypeValues returns the possible values for the PaymentChannelType const type.
type Properties ¶ added in v0.2.0
type Properties struct { // Whether the current term is a Free Trial term IsFreeTrial *bool `json:"isFreeTrial,omitempty"` // The last modifier date if this resource. LastModified *string `json:"lastModified,omitempty"` // The SaaS Subscription Status. Status *SaasResourceStatus `json:"status,omitempty"` // The current Term object. Term *PropertiesTerm `json:"term,omitempty"` // READ-ONLY; The created date of this resource. Created *string `json:"created,omitempty" azure:"ro"` }
Properties - saas resource properties
type PropertiesTerm ¶ added in v0.2.0
type PropertiesTerm struct { // The end date of the current term EndDate *string `json:"endDate,omitempty"` // The start date of the current term StartDate *string `json:"startDate,omitempty"` // The unit indicating Monthly / Yearly TermUnit *string `json:"termUnit,omitempty"` }
PropertiesTerm - The current Term object.
type Resource ¶ added in v0.2.0
type Resource struct { // saas properties Properties *ResourceProperties `json:"properties,omitempty"` // the resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; The resource uri ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
Resource - SaaS REST API resource definition.
type ResourceCreation ¶ added in v0.2.0
type ResourceCreation struct { // Resource location. Only value allowed for SaaS is 'global' Location *string `json:"location,omitempty"` // The resource name Name *string `json:"name,omitempty"` // Properties of the SaaS resource that are relevant for creation. Properties *CreationProperties `json:"properties,omitempty"` // the resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; The resource uri ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ResourceCreation - SaaS REST API resource definition for creation.
func (ResourceCreation) MarshalJSON ¶ added in v0.2.0
func (r ResourceCreation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceCreation.
type ResourceProperties ¶ added in v0.2.0
type ResourceProperties struct { // Whether the SaaS subscription will auto renew upon term end. AutoRenew *bool `json:"autoRenew,omitempty"` // Whether the current term is a Free Trial term IsFreeTrial *bool `json:"isFreeTrial,omitempty"` // The last modifier date if this resource. LastModified *string `json:"lastModified,omitempty"` // The offer id. OfferID *string `json:"offerId,omitempty"` // The metadata about the SaaS subscription such as the AzureSubscriptionId and ResourceUri. PaymentChannelMetadata map[string]*string `json:"paymentChannelMetadata,omitempty"` // The Payment channel for the SaasSubscription. PaymentChannelType *PaymentChannelType `json:"paymentChannelType,omitempty"` // The publisher id. PublisherID *string `json:"publisherId,omitempty"` // The environment in the publisher side for this resource. PublisherTestEnvironment *string `json:"publisherTestEnvironment,omitempty"` // The seat count. Quantity *float32 `json:"quantity,omitempty"` // The plan id. SKUID *string `json:"skuId,omitempty"` // The SaaS resource name. SaasResourceName *string `json:"saasResourceName,omitempty"` // The saas session id used for dev service migration request. SaasSessionID *string `json:"saasSessionId,omitempty"` // The saas subscription id used for tenant to subscription level migration request. SaasSubscriptionID *string `json:"saasSubscriptionId,omitempty"` // The SaaS Subscription Status. Status *SaasResourceStatus `json:"status,omitempty"` // The current Term object. Term *PropertiesTerm `json:"term,omitempty"` // The current Term id. TermID *string `json:"termId,omitempty"` // READ-ONLY; The created date of this resource. Created *string `json:"created,omitempty" azure:"ro"` }
ResourceProperties - saas properties
func (ResourceProperties) MarshalJSON ¶ added in v0.2.0
func (r ResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceProperties.
type ResourceResponseWithContinuation ¶ added in v0.2.0
type ResourceResponseWithContinuation struct { // the next link to query to get the remaining results. NextLink *string `json:"nextLink,omitempty"` // the value of response. Value []*Resource `json:"value,omitempty"` }
ResourceResponseWithContinuation - saas resources response with continuation.
type ResourcesClient ¶ added in v0.2.0
type ResourcesClient struct {
// contains filtered or unexported fields
}
ResourcesClient contains the methods for the SaasResources group. Don't use this type directly, use NewResourcesClient() instead.
func NewResourcesClient ¶ added in v0.2.0
func NewResourcesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourcesClient, error)
NewResourcesClient creates a new instance of ResourcesClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ResourcesClient) ListAccessToken ¶ added in v0.2.0
func (client *ResourcesClient) ListAccessToken(ctx context.Context, resourceID string, options *ResourcesClientListAccessTokenOptions) (ResourcesClientListAccessTokenResponse, error)
ListAccessToken - Gets the ISV access token for a SaaS resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-03-01-beta resourceID - The Saas resource ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) options - ResourcesClientListAccessTokenOptions contains the optional parameters for the ResourcesClient.ListAccessToken method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV2/ListAccessTokenPost.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/saas/armsaas" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsaas.NewResourcesClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.ListAccessToken(ctx, "c825645b-e31b-9cf4-1cee-2aba9e58bc7c", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*ResourcesClient) NewListPager ¶ added in v0.4.0
func (client *ResourcesClient) NewListPager(options *ResourcesClientListOptions) *runtime.Pager[ResourcesClientListResponse]
NewListPager - Get All Resources If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-03-01-beta options - ResourcesClientListOptions contains the optional parameters for the ResourcesClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV2/SaaSGetAllResources.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/saas/armsaas" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsaas.NewResourcesClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ResourcesClientListAccessTokenOptions ¶ added in v0.2.0
type ResourcesClientListAccessTokenOptions struct { }
ResourcesClientListAccessTokenOptions contains the optional parameters for the ResourcesClient.ListAccessToken method.
type ResourcesClientListAccessTokenResponse ¶ added in v0.2.0
type ResourcesClientListAccessTokenResponse struct {
AccessTokenResult
}
ResourcesClientListAccessTokenResponse contains the response from method ResourcesClient.ListAccessToken.
type ResourcesClientListOptions ¶ added in v0.2.0
type ResourcesClientListOptions struct { }
ResourcesClientListOptions contains the optional parameters for the ResourcesClient.List method.
type ResourcesClientListResponse ¶ added in v0.2.0
type ResourcesClientListResponse struct {
ResourceResponseWithContinuation
}
ResourcesClientListResponse contains the response from method ResourcesClient.List.
type Result ¶
type Result struct { // Sample property of type string SampleProperty *string `json:"sampleProperty,omitempty"` }
Result - Sample result definition
type SaasAppStatus ¶
type SaasAppStatus string
SaasAppStatus - the Saas resource status.
const ( SaasAppStatusDeactivated SaasAppStatus = "Deactivated" SaasAppStatusPending SaasAppStatus = "Pending" SaasAppStatusSubscribed SaasAppStatus = "Subscribed" SaasAppStatusSuspended SaasAppStatus = "Suspended" SaasAppStatusUnsubscribed SaasAppStatus = "Unsubscribed" )
func PossibleSaasAppStatusValues ¶
func PossibleSaasAppStatusValues() []SaasAppStatus
PossibleSaasAppStatusValues returns the possible values for the SaasAppStatus const type.
type SaasResourceStatus ¶
type SaasResourceStatus string
SaasResourceStatus - The SaaS Subscription Status.
const ( SaasResourceStatusNotStarted SaasResourceStatus = "NotStarted" SaasResourceStatusPendingFulfillmentStart SaasResourceStatus = "PendingFulfillmentStart" SaasResourceStatusSubscribed SaasResourceStatus = "Subscribed" SaasResourceStatusSuspended SaasResourceStatus = "Suspended" SaasResourceStatusUnsubscribed SaasResourceStatus = "Unsubscribed" )
func PossibleSaasResourceStatusValues ¶
func PossibleSaasResourceStatusValues() []SaasResourceStatus
PossibleSaasResourceStatusValues returns the possible values for the SaasResourceStatus const type.
type SubscriptionLevelClient ¶ added in v0.2.0
type SubscriptionLevelClient struct {
// contains filtered or unexported fields
}
SubscriptionLevelClient contains the methods for the SaasSubscriptionLevel group. Don't use this type directly, use NewSubscriptionLevelClient() instead.
func NewSubscriptionLevelClient ¶ added in v0.2.0
func NewSubscriptionLevelClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SubscriptionLevelClient, error)
NewSubscriptionLevelClient creates a new instance of SubscriptionLevelClient with the specified values. subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*SubscriptionLevelClient) BeginCreateOrUpdate ¶ added in v0.2.0
func (client *SubscriptionLevelClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters ResourceCreation, options *SubscriptionLevelClientBeginCreateOrUpdateOptions) (*runtime.Poller[SubscriptionLevelClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a SaaS resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-03-01-beta resourceGroupName - The name of the resource group. resourceName - The name of the resource. parameters - Parameters supplied to the create or update subscription level saas operation. options - SubscriptionLevelClientBeginCreateOrUpdateOptions contains the optional parameters for the SubscriptionLevelClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasSubscriptionLevel/SaasPut.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/saas/armsaas" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsaas.NewSubscriptionLevelClient("c825645b-e31b-9cf4-1cee-2aba9e58bc7c", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, "my-saas-rg", "MyContosoSubscription", armsaas.ResourceCreation{ Name: to.Ptr("MyContosoSubscription"), Location: to.Ptr("global"), Properties: &armsaas.CreationProperties{ OfferID: to.Ptr("contosoOffer"), PaymentChannelMetadata: map[string]*string{ "AzureSubscriptionId": to.Ptr("155af98a-3205-47e7-883b-a2ab9db9f88d"), }, PaymentChannelType: to.Ptr(armsaas.PaymentChannelTypeSubscriptionDelegated), PublisherID: to.Ptr("microsoft-contoso"), SaasResourceName: to.Ptr("MyContosoSubscription"), SKUID: to.Ptr("free"), TermID: to.Ptr("hjdtn7tfnxcy"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*SubscriptionLevelClient) BeginDelete ¶ added in v0.2.0
func (client *SubscriptionLevelClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, options *SubscriptionLevelClientBeginDeleteOptions) (*runtime.Poller[SubscriptionLevelClientDeleteResponse], error)
BeginDelete - Deletes the specified SaaS. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-03-01-beta resourceGroupName - The name of the resource group. resourceName - The name of the resource. options - SubscriptionLevelClientBeginDeleteOptions contains the optional parameters for the SubscriptionLevelClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasSubscriptionLevel/SaasDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/saas/armsaas" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsaas.NewSubscriptionLevelClient("c825645b-e31b-9cf4-1cee-2aba9e58bc7c", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "my-saas-rg", "MyContosoSubscription", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*SubscriptionLevelClient) BeginMoveResources ¶ added in v0.2.0
func (client *SubscriptionLevelClient) BeginMoveResources(ctx context.Context, resourceGroupName string, moveResourceParameter MoveResource, options *SubscriptionLevelClientBeginMoveResourcesOptions) (*runtime.Poller[SubscriptionLevelClientMoveResourcesResponse], error)
BeginMoveResources - Move a specified Subscription Level SaaS. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-03-01-beta resourceGroupName - The name of the resource group. moveResourceParameter - Object that represents the resources to move. options - SubscriptionLevelClientBeginMoveResourcesOptions contains the optional parameters for the SubscriptionLevelClient.BeginMoveResources method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasSubscriptionLevel/ResourceMove.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/saas/armsaas" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsaas.NewSubscriptionLevelClient("c825645b-e31b-9cf4-1cee-2aba9e58bc7c", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginMoveResources(ctx, "my-saas-rg", armsaas.MoveResource{ Resources: []*string{ to.Ptr("/subscriptions/c825645b-e31b-9cf4-1cee-2aba9e58bc7c/resourceGroups/my-saas-rg/providers/Microsoft.SaaS/resources/saas1"), to.Ptr("/subscriptions/c825645b-e31b-9cf4-1cee-2aba9e58bc7c/resourceGroups/my-saas-rg/providers/Microsoft.SaaS/resources/saas2"), to.Ptr("/subscriptions/c825645b-e31b-9cf4-1cee-2aba9e58bc7c/resourceGroups/my-saas-rg/providers/Microsoft.SaaS/resources/saas3")}, TargetResourceGroup: to.Ptr("/subscriptions/5122d0a3-1e10-4baf-bdc5-c2a452489525/resourceGroups/new-saas-rg"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*SubscriptionLevelClient) BeginUpdate ¶ added in v0.2.0
func (client *SubscriptionLevelClient) BeginUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters ResourceCreation, options *SubscriptionLevelClientBeginUpdateOptions) (*runtime.Poller[SubscriptionLevelClientUpdateResponse], error)
BeginUpdate - Updates a SaaS Subscription Level resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-03-01-beta resourceGroupName - The name of the resource group. resourceName - The name of the resource. parameters - Parameters supplied to the update saas operation. options - SubscriptionLevelClientBeginUpdateOptions contains the optional parameters for the SubscriptionLevelClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasSubscriptionLevel/SaasPatch.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/saas/armsaas" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsaas.NewSubscriptionLevelClient("c825645b-e31b-9cf4-1cee-2aba9e58bc7c", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdate(ctx, "my-saas-rg", "MyContosoSubscription", armsaas.ResourceCreation{ Properties: &armsaas.CreationProperties{ SKUID: to.Ptr("premium"), }, Tags: map[string]*string{}, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*SubscriptionLevelClient) BeginUpdateToUnsubscribed ¶ added in v0.2.0
func (client *SubscriptionLevelClient) BeginUpdateToUnsubscribed(ctx context.Context, resourceGroupName string, resourceName string, parameters DeleteOptions, options *SubscriptionLevelClientBeginUpdateToUnsubscribedOptions) (*runtime.Poller[SubscriptionLevelClientUpdateToUnsubscribedResponse], error)
BeginUpdateToUnsubscribed - Unsubscribe from a specified Subscription Level SaaS. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-03-01-beta resourceGroupName - The name of the resource group. resourceName - The name of the resource. parameters - Parameters supplied to unsubscribe saas operation. options - SubscriptionLevelClientBeginUpdateToUnsubscribedOptions contains the optional parameters for the SubscriptionLevelClient.BeginUpdateToUnsubscribed method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasSubscriptionLevel/SaasUnsubscribe.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/saas/armsaas" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsaas.NewSubscriptionLevelClient("c825645b-e31b-9cf4-1cee-2aba9e58bc7c", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdateToUnsubscribed(ctx, "my-saas-rg", "MyContosoSubscription", armsaas.DeleteOptions{ Feedback: to.Ptr("No longer need this SaaS"), ReasonCode: to.Ptr[float32](0), UnsubscribeOnly: to.Ptr(true), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*SubscriptionLevelClient) Get ¶ added in v0.2.0
func (client *SubscriptionLevelClient) Get(ctx context.Context, resourceGroupName string, resourceName string, options *SubscriptionLevelClientGetOptions) (SubscriptionLevelClientGetResponse, error)
Get - Gets information about the specified Subscription Level SaaS. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-03-01-beta resourceGroupName - The name of the resource group. resourceName - The name of the resource. options - SubscriptionLevelClientGetOptions contains the optional parameters for the SubscriptionLevelClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasSubscriptionLevel/SaasGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/saas/armsaas" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsaas.NewSubscriptionLevelClient("c825645b-e31b-9cf4-1cee-2aba9e58bc7c", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "my-saas-rg", "MyContosoSubscription", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*SubscriptionLevelClient) ListAccessToken ¶ added in v0.2.0
func (client *SubscriptionLevelClient) ListAccessToken(ctx context.Context, resourceGroupName string, resourceName string, options *SubscriptionLevelClientListAccessTokenOptions) (SubscriptionLevelClientListAccessTokenResponse, error)
ListAccessToken - Gets the ISV access token for a specified Subscription Level SaaS. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-03-01-beta resourceGroupName - The name of the resource group. resourceName - The name of the resource. options - SubscriptionLevelClientListAccessTokenOptions contains the optional parameters for the SubscriptionLevelClient.ListAccessToken method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasSubscriptionLevel/ListAccessTokenPost.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/saas/armsaas" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsaas.NewSubscriptionLevelClient("c825645b-e31b-9cf4-1cee-2aba9e58bc7c", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.ListAccessToken(ctx, "my-saas-rg", "MyContosoSubscription", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*SubscriptionLevelClient) NewListByAzureSubscriptionPager ¶ added in v0.4.0
func (client *SubscriptionLevelClient) NewListByAzureSubscriptionPager(options *SubscriptionLevelClientListByAzureSubscriptionOptions) *runtime.Pager[SubscriptionLevelClientListByAzureSubscriptionResponse]
NewListByAzureSubscriptionPager - Gets information about all the Subscription Level SaaS in a certain Azure subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-03-01-beta options - SubscriptionLevelClientListByAzureSubscriptionOptions contains the optional parameters for the SubscriptionLevelClient.ListByAzureSubscription method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasSubscriptionLevel/SaasGetAllInAzureSubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/saas/armsaas" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsaas.NewSubscriptionLevelClient("c825645b-e31b-9cf4-1cee-2aba9e58bc7c", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByAzureSubscriptionPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*SubscriptionLevelClient) NewListByResourceGroupPager ¶ added in v0.4.0
func (client *SubscriptionLevelClient) NewListByResourceGroupPager(resourceGroupName string, options *SubscriptionLevelClientListByResourceGroupOptions) *runtime.Pager[SubscriptionLevelClientListByResourceGroupResponse]
NewListByResourceGroupPager - Gets information about all the Subscription Level SaaS in a certain resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-03-01-beta resourceGroupName - The name of the resource group. options - SubscriptionLevelClientListByResourceGroupOptions contains the optional parameters for the SubscriptionLevelClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasSubscriptionLevel/SaasGetAllInResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/saas/armsaas" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsaas.NewSubscriptionLevelClient("c825645b-e31b-9cf4-1cee-2aba9e58bc7c", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("my-saas-rg", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*SubscriptionLevelClient) ValidateMoveResources ¶ added in v0.2.0
func (client *SubscriptionLevelClient) ValidateMoveResources(ctx context.Context, resourceGroupName string, moveResourceParameter MoveResource, options *SubscriptionLevelClientValidateMoveResourcesOptions) (SubscriptionLevelClientValidateMoveResourcesResponse, error)
ValidateMoveResources - Validate whether a specified Subscription Level SaaS can be moved. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-03-01-beta resourceGroupName - The name of the resource group. moveResourceParameter - Object that represents the resources to move. options - SubscriptionLevelClientValidateMoveResourcesOptions contains the optional parameters for the SubscriptionLevelClient.ValidateMoveResources method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasSubscriptionLevel/ValidateResourceMove.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/saas/armsaas" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsaas.NewSubscriptionLevelClient("c825645b-e31b-9cf4-1cee-2aba9e58bc7c", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = client.ValidateMoveResources(ctx, "my-saas-rg", armsaas.MoveResource{ Resources: []*string{ to.Ptr("/subscriptions/c825645b-e31b-9cf4-1cee-2aba9e58bc7c/resourceGroups/my-saas-rg/providers/Microsoft.SaaS/resources/saas1"), to.Ptr("/subscriptions/c825645b-e31b-9cf4-1cee-2aba9e58bc7c/resourceGroups/my-saas-rg/providers/Microsoft.SaaS/resources/saas2"), to.Ptr("/subscriptions/c825645b-e31b-9cf4-1cee-2aba9e58bc7c/resourceGroups/my-saas-rg/providers/Microsoft.SaaS/resources/saas3")}, TargetResourceGroup: to.Ptr("/subscriptions/5122d0a3-1e10-4baf-bdc5-c2a452489525/resourceGroups/new-saas-rg"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
type SubscriptionLevelClientBeginCreateOrUpdateOptions ¶ added in v0.2.0
type SubscriptionLevelClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SubscriptionLevelClientBeginCreateOrUpdateOptions contains the optional parameters for the SubscriptionLevelClient.BeginCreateOrUpdate method.
type SubscriptionLevelClientBeginDeleteOptions ¶ added in v0.2.0
type SubscriptionLevelClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SubscriptionLevelClientBeginDeleteOptions contains the optional parameters for the SubscriptionLevelClient.BeginDelete method.
type SubscriptionLevelClientBeginMoveResourcesOptions ¶ added in v0.2.0
type SubscriptionLevelClientBeginMoveResourcesOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SubscriptionLevelClientBeginMoveResourcesOptions contains the optional parameters for the SubscriptionLevelClient.BeginMoveResources method.
type SubscriptionLevelClientBeginUpdateOptions ¶ added in v0.2.0
type SubscriptionLevelClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SubscriptionLevelClientBeginUpdateOptions contains the optional parameters for the SubscriptionLevelClient.BeginUpdate method.
type SubscriptionLevelClientBeginUpdateToUnsubscribedOptions ¶ added in v0.2.0
type SubscriptionLevelClientBeginUpdateToUnsubscribedOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SubscriptionLevelClientBeginUpdateToUnsubscribedOptions contains the optional parameters for the SubscriptionLevelClient.BeginUpdateToUnsubscribed method.
type SubscriptionLevelClientCreateOrUpdateResponse ¶ added in v0.2.0
type SubscriptionLevelClientCreateOrUpdateResponse struct {
Resource
}
SubscriptionLevelClientCreateOrUpdateResponse contains the response from method SubscriptionLevelClient.CreateOrUpdate.
type SubscriptionLevelClientDeleteResponse ¶ added in v0.2.0
type SubscriptionLevelClientDeleteResponse struct { }
SubscriptionLevelClientDeleteResponse contains the response from method SubscriptionLevelClient.Delete.
type SubscriptionLevelClientGetOptions ¶ added in v0.2.0
type SubscriptionLevelClientGetOptions struct { }
SubscriptionLevelClientGetOptions contains the optional parameters for the SubscriptionLevelClient.Get method.
type SubscriptionLevelClientGetResponse ¶ added in v0.2.0
type SubscriptionLevelClientGetResponse struct {
Resource
}
SubscriptionLevelClientGetResponse contains the response from method SubscriptionLevelClient.Get.
type SubscriptionLevelClientListAccessTokenOptions ¶ added in v0.2.0
type SubscriptionLevelClientListAccessTokenOptions struct { }
SubscriptionLevelClientListAccessTokenOptions contains the optional parameters for the SubscriptionLevelClient.ListAccessToken method.
type SubscriptionLevelClientListAccessTokenResponse ¶ added in v0.2.0
type SubscriptionLevelClientListAccessTokenResponse struct {
AccessTokenResult
}
SubscriptionLevelClientListAccessTokenResponse contains the response from method SubscriptionLevelClient.ListAccessToken.
type SubscriptionLevelClientListByAzureSubscriptionOptions ¶ added in v0.2.0
type SubscriptionLevelClientListByAzureSubscriptionOptions struct { }
SubscriptionLevelClientListByAzureSubscriptionOptions contains the optional parameters for the SubscriptionLevelClient.ListByAzureSubscription method.
type SubscriptionLevelClientListByAzureSubscriptionResponse ¶ added in v0.2.0
type SubscriptionLevelClientListByAzureSubscriptionResponse struct {
ResourceResponseWithContinuation
}
SubscriptionLevelClientListByAzureSubscriptionResponse contains the response from method SubscriptionLevelClient.ListByAzureSubscription.
type SubscriptionLevelClientListByResourceGroupOptions ¶ added in v0.2.0
type SubscriptionLevelClientListByResourceGroupOptions struct { }
SubscriptionLevelClientListByResourceGroupOptions contains the optional parameters for the SubscriptionLevelClient.ListByResourceGroup method.
type SubscriptionLevelClientListByResourceGroupResponse ¶ added in v0.2.0
type SubscriptionLevelClientListByResourceGroupResponse struct {
ResourceResponseWithContinuation
}
SubscriptionLevelClientListByResourceGroupResponse contains the response from method SubscriptionLevelClient.ListByResourceGroup.
type SubscriptionLevelClientMoveResourcesResponse ¶ added in v0.2.0
type SubscriptionLevelClientMoveResourcesResponse struct { }
SubscriptionLevelClientMoveResourcesResponse contains the response from method SubscriptionLevelClient.MoveResources.
type SubscriptionLevelClientUpdateResponse ¶ added in v0.2.0
type SubscriptionLevelClientUpdateResponse struct {
Resource
}
SubscriptionLevelClientUpdateResponse contains the response from method SubscriptionLevelClient.Update.
type SubscriptionLevelClientUpdateToUnsubscribedResponse ¶ added in v0.2.0
type SubscriptionLevelClientUpdateToUnsubscribedResponse struct { }
SubscriptionLevelClientUpdateToUnsubscribedResponse contains the response from method SubscriptionLevelClient.UpdateToUnsubscribed.
type SubscriptionLevelClientValidateMoveResourcesOptions ¶ added in v0.2.0
type SubscriptionLevelClientValidateMoveResourcesOptions struct { }
SubscriptionLevelClientValidateMoveResourcesOptions contains the optional parameters for the SubscriptionLevelClient.ValidateMoveResources method.
type SubscriptionLevelClientValidateMoveResourcesResponse ¶ added in v0.2.0
type SubscriptionLevelClientValidateMoveResourcesResponse struct { }
SubscriptionLevelClientValidateMoveResourcesResponse contains the response from method SubscriptionLevelClient.ValidateMoveResources.
Source Files
¶
- build.go
- zz_generated_applications_client.go
- zz_generated_client.go
- zz_generated_constants.go
- zz_generated_models.go
- zz_generated_models_serde.go
- zz_generated_operation_client.go
- zz_generated_operations_client.go
- zz_generated_resources_client.go
- zz_generated_response_types.go
- zz_generated_subscriptionlevel_client.go