Documentation ¶
Index ¶
- type Error
- type ExtendedErrorInfo
- type ManagementPartnerState
- type OperationClient
- type OperationClientListOptions
- type OperationClientListResponse
- type OperationDisplay
- type OperationList
- type OperationResponse
- type PartnerClient
- func (client *PartnerClient) Create(ctx context.Context, partnerID string, options *PartnerClientCreateOptions) (PartnerClientCreateResponse, error)
- func (client *PartnerClient) Delete(ctx context.Context, partnerID string, options *PartnerClientDeleteOptions) (PartnerClientDeleteResponse, error)
- func (client *PartnerClient) Get(ctx context.Context, partnerID string, options *PartnerClientGetOptions) (PartnerClientGetResponse, error)
- func (client *PartnerClient) Update(ctx context.Context, partnerID string, options *PartnerClientUpdateOptions) (PartnerClientUpdateResponse, error)
- type PartnerClientCreateOptions
- type PartnerClientCreateResponse
- type PartnerClientDeleteOptions
- type PartnerClientDeleteResponse
- type PartnerClientGetOptions
- type PartnerClientGetResponse
- type PartnerClientUpdateOptions
- type PartnerClientUpdateResponse
- type PartnerProperties
- type PartnerResponse
- type PartnersClient
- type PartnersClientGetOptions
- type PartnersClientGetResponse
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { // this is the error response code Code *string `json:"code,omitempty"` // this is the ExtendedErrorInfo property Error *ExtendedErrorInfo `json:"error,omitempty"` // this is the extended error info message Message *string `json:"message,omitempty"` }
Error - this is the management partner operations error
type ExtendedErrorInfo ¶
type ExtendedErrorInfo struct { // this is the error response code Code *string `json:"code,omitempty"` // this is the extended error info message Message *string `json:"message,omitempty"` }
ExtendedErrorInfo - this is the extended error info
type ManagementPartnerState ¶
type ManagementPartnerState string
ManagementPartnerState - this is the management partner state: Active or Deleted
const ( ManagementPartnerStateActive ManagementPartnerState = "Active" ManagementPartnerStateDeleted ManagementPartnerState = "Deleted" )
func PossibleManagementPartnerStateValues ¶
func PossibleManagementPartnerStateValues() []ManagementPartnerState
PossibleManagementPartnerStateValues returns the possible values for the ManagementPartnerState const type.
type OperationClient ¶
type OperationClient struct {
// contains filtered or unexported fields
}
OperationClient contains the methods for the Operation group. Don't use this type directly, use NewOperationClient() instead.
func NewOperationClient ¶
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) NewListPager ¶ added in v0.4.0
func (client *OperationClient) NewListPager(options *OperationClientListOptions) *runtime.Pager[OperationClientListResponse]
NewListPager - List all the operations. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-02-01 options - OperationClientListOptions contains the optional parameters for the OperationClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/managementpartner/resource-manager/Microsoft.ManagementPartner/preview/2018-02-01/examples/GetOperations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementpartner/armmanagementpartner" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armmanagementpartner.NewOperationClient(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 OperationClientListOptions ¶ added in v0.2.0
type OperationClientListOptions struct { }
OperationClientListOptions contains the optional parameters for the OperationClient.List method.
type OperationClientListResponse ¶ added in v0.2.0
type OperationClientListResponse struct {
OperationList
}
OperationClientListResponse contains the response from method OperationClient.List.
type OperationDisplay ¶
type OperationDisplay struct { // the is management partner operation description Description *string `json:"description,omitempty"` // the is management partner operation Operation *string `json:"operation,omitempty"` // the is management partner provider Provider *string `json:"provider,omitempty"` // the is management partner resource Resource *string `json:"resource,omitempty"` }
OperationDisplay - this is the management partner operation
type OperationList ¶
type OperationList struct { // Url to get the next page of items. NextLink *string `json:"nextLink,omitempty"` // this is the operation response list Value []*OperationResponse `json:"value,omitempty"` }
OperationList - this is the management partner operations list
type OperationResponse ¶
type OperationResponse struct { // this is the operation display Display *OperationDisplay `json:"display,omitempty"` // this is the operation response name Name *string `json:"name,omitempty"` // the is operation response origin information Origin *string `json:"origin,omitempty"` }
OperationResponse - this is the management partner operations response
type PartnerClient ¶
type PartnerClient struct {
// contains filtered or unexported fields
}
PartnerClient contains the methods for the Partner group. Don't use this type directly, use NewPartnerClient() instead.
func NewPartnerClient ¶
func NewPartnerClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*PartnerClient, error)
NewPartnerClient creates a new instance of PartnerClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*PartnerClient) Create ¶
func (client *PartnerClient) Create(ctx context.Context, partnerID string, options *PartnerClientCreateOptions) (PartnerClientCreateResponse, error)
Create - Create a management partner for the objectId and tenantId. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-02-01 partnerID - Id of the Partner options - PartnerClientCreateOptions contains the optional parameters for the PartnerClient.Create method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/managementpartner/resource-manager/Microsoft.ManagementPartner/preview/2018-02-01/examples/PutPartnerDetails.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementpartner/armmanagementpartner" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armmanagementpartner.NewPartnerClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Create(ctx, "123456", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*PartnerClient) Delete ¶
func (client *PartnerClient) Delete(ctx context.Context, partnerID string, options *PartnerClientDeleteOptions) (PartnerClientDeleteResponse, error)
Delete - Delete the management partner for the objectId and tenantId. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-02-01 partnerID - Id of the Partner options - PartnerClientDeleteOptions contains the optional parameters for the PartnerClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/managementpartner/resource-manager/Microsoft.ManagementPartner/preview/2018-02-01/examples/DeletePartnerDetails.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementpartner/armmanagementpartner" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armmanagementpartner.NewPartnerClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = client.Delete(ctx, "123456", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*PartnerClient) Get ¶
func (client *PartnerClient) Get(ctx context.Context, partnerID string, options *PartnerClientGetOptions) (PartnerClientGetResponse, error)
Get - Get the management partner using the partnerId, objectId and tenantId. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-02-01 partnerID - Id of the Partner options - PartnerClientGetOptions contains the optional parameters for the PartnerClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/managementpartner/resource-manager/Microsoft.ManagementPartner/preview/2018-02-01/examples/GetPartnerDetails.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementpartner/armmanagementpartner" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armmanagementpartner.NewPartnerClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "123456", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*PartnerClient) Update ¶
func (client *PartnerClient) Update(ctx context.Context, partnerID string, options *PartnerClientUpdateOptions) (PartnerClientUpdateResponse, error)
Update - Update the management partner for the objectId and tenantId. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-02-01 partnerID - Id of the Partner options - PartnerClientUpdateOptions contains the optional parameters for the PartnerClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/managementpartner/resource-manager/Microsoft.ManagementPartner/preview/2018-02-01/examples/PatchPartnerDetails.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementpartner/armmanagementpartner" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armmanagementpartner.NewPartnerClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Update(ctx, "123456", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type PartnerClientCreateOptions ¶ added in v0.2.0
type PartnerClientCreateOptions struct { }
PartnerClientCreateOptions contains the optional parameters for the PartnerClient.Create method.
type PartnerClientCreateResponse ¶ added in v0.2.0
type PartnerClientCreateResponse struct {
PartnerResponse
}
PartnerClientCreateResponse contains the response from method PartnerClient.Create.
type PartnerClientDeleteOptions ¶ added in v0.2.0
type PartnerClientDeleteOptions struct { }
PartnerClientDeleteOptions contains the optional parameters for the PartnerClient.Delete method.
type PartnerClientDeleteResponse ¶ added in v0.2.0
type PartnerClientDeleteResponse struct { }
PartnerClientDeleteResponse contains the response from method PartnerClient.Delete.
type PartnerClientGetOptions ¶ added in v0.2.0
type PartnerClientGetOptions struct { }
PartnerClientGetOptions contains the optional parameters for the PartnerClient.Get method.
type PartnerClientGetResponse ¶ added in v0.2.0
type PartnerClientGetResponse struct {
PartnerResponse
}
PartnerClientGetResponse contains the response from method PartnerClient.Get.
type PartnerClientUpdateOptions ¶ added in v0.2.0
type PartnerClientUpdateOptions struct { }
PartnerClientUpdateOptions contains the optional parameters for the PartnerClient.Update method.
type PartnerClientUpdateResponse ¶ added in v0.2.0
type PartnerClientUpdateResponse struct {
PartnerResponse
}
PartnerClientUpdateResponse contains the response from method PartnerClient.Update.
type PartnerProperties ¶
type PartnerProperties struct { // This is the DateTime when the partner was created. CreatedTime *time.Time `json:"createdTime,omitempty"` // This is the object id. ObjectID *string `json:"objectId,omitempty"` // This is the partner id PartnerID *string `json:"partnerId,omitempty"` // This is the partner name PartnerName *string `json:"partnerName,omitempty"` // This is the partner state State *ManagementPartnerState `json:"state,omitempty"` // This is the tenant id. TenantID *string `json:"tenantId,omitempty"` // This is the DateTime when the partner was updated. UpdatedTime *time.Time `json:"updatedTime,omitempty"` // This is the version. Version *int32 `json:"version,omitempty"` }
PartnerProperties - this is the management partner properties
func (*PartnerProperties) UnmarshalJSON ¶
func (p *PartnerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PartnerProperties.
type PartnerResponse ¶
type PartnerResponse struct { // Type of the partner Etag *int32 `json:"etag,omitempty"` // Properties of the partner Properties *PartnerProperties `json:"properties,omitempty"` // READ-ONLY; Identifier of the partner ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Name of the partner Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Type of resource. "Microsoft.ManagementPartner/partners" Type *string `json:"type,omitempty" azure:"ro"` }
PartnerResponse - this is the management partner operations response
type PartnersClient ¶
type PartnersClient struct {
// contains filtered or unexported fields
}
PartnersClient contains the methods for the Partners group. Don't use this type directly, use NewPartnersClient() instead.
func NewPartnersClient ¶
func NewPartnersClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*PartnersClient, error)
NewPartnersClient creates a new instance of PartnersClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*PartnersClient) Get ¶
func (client *PartnersClient) Get(ctx context.Context, options *PartnersClientGetOptions) (PartnersClientGetResponse, error)
Get - Get the management partner using the objectId and tenantId. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2018-02-01 options - PartnersClientGetOptions contains the optional parameters for the PartnersClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/managementpartner/resource-manager/Microsoft.ManagementPartner/preview/2018-02-01/examples/GetPartnerDetailsNoPartnerId.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementpartner/armmanagementpartner" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armmanagementpartner.NewPartnersClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type PartnersClientGetOptions ¶ added in v0.2.0
type PartnersClientGetOptions struct { }
PartnersClientGetOptions contains the optional parameters for the PartnersClient.Get method.
type PartnersClientGetResponse ¶ added in v0.2.0
type PartnersClientGetResponse struct {
PartnerResponse
}
PartnersClientGetResponse contains the response from method PartnersClient.Get.