Documentation ¶
Index ¶
- type ClientFactory
- 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 ClientFactory ¶ added in v0.6.0
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶ added in v0.6.0
func NewClientFactory(credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewOperationClient ¶ added in v0.6.0
func (c *ClientFactory) NewOperationClient() *OperationClient
NewOperationClient creates a new instance of OperationClient.
func (*ClientFactory) NewPartnerClient ¶ added in v0.6.0
func (c *ClientFactory) NewPartnerClient() *PartnerClient
NewPartnerClient creates a new instance of PartnerClient.
func (*ClientFactory) NewPartnersClient ¶ added in v0.6.0
func (c *ClientFactory) NewPartnersClient() *PartnersClient
NewPartnersClient creates a new instance of PartnersClient.
type Error ¶
type Error struct { // this is the error response code Code *string // this is the ExtendedErrorInfo property Error *ExtendedErrorInfo // this is the extended error info message Message *string }
Error - this is the management partner operations error
func (Error) MarshalJSON ¶ added in v0.6.0
MarshalJSON implements the json.Marshaller interface for type Error.
func (*Error) UnmarshalJSON ¶ added in v0.6.0
UnmarshalJSON implements the json.Unmarshaller interface for type Error.
type ExtendedErrorInfo ¶
type ExtendedErrorInfo struct { // this is the error response code Code *string // this is the extended error info message Message *string }
ExtendedErrorInfo - this is the extended error info
func (ExtendedErrorInfo) MarshalJSON ¶ added in v0.6.0
func (e ExtendedErrorInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExtendedErrorInfo.
func (*ExtendedErrorInfo) UnmarshalJSON ¶ added in v0.6.0
func (e *ExtendedErrorInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedErrorInfo.
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.
Generated from API version 2018-02-01
- options - OperationClientListOptions contains the optional parameters for the OperationClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/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() clientFactory, err := armmanagementpartner.NewClientFactory(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewOperationClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.OperationList = armmanagementpartner.OperationList{ // Value: []*armmanagementpartner.OperationResponse{ // { // Name: to.Ptr("Microsoft.ManagementPartner/partners/read"), // Display: &armmanagementpartner.OperationDisplay{ // Description: to.Ptr("Read All ManagementPartner"), // Operation: to.Ptr("Get ManagementPartner"), // Provider: to.Ptr("Microsoft ManagementPartner"), // Resource: to.Ptr("ManagementPartner"), // }, // }, // { // Name: to.Ptr("Microsoft.ManagementPartner/partners/write"), // Display: &armmanagementpartner.OperationDisplay{ // Description: to.Ptr("Create any ManagementPartner"), // Operation: to.Ptr("Create ManagementPartner"), // Provider: to.Ptr("Microsoft ManagementPartner"), // Resource: to.Ptr("ManagementPartner"), // }, // }, // { // Name: to.Ptr("Microsoft.ManagementPartner/partners/action"), // Display: &armmanagementpartner.OperationDisplay{ // Description: to.Ptr("Update any ManagementPartner"), // Operation: to.Ptr("Update ManagementPartner"), // Provider: to.Ptr("Microsoft ManagementPartner"), // Resource: to.Ptr("ManagementPartner"), // }, // }, // { // Name: to.Ptr("Microsoft.ManagementPartner/partners/delete"), // Display: &armmanagementpartner.OperationDisplay{ // Description: to.Ptr("Delete any ManagementPartner"), // Operation: to.Ptr("Delete ManagementPartner"), // Provider: to.Ptr("Microsoft ManagementPartner"), // Resource: to.Ptr("ManagementPartner"), // }, // }}, // } } }
Output:
type OperationClientListOptions ¶ added in v0.2.0
type OperationClientListOptions struct { }
OperationClientListOptions contains the optional parameters for the OperationClient.NewListPager method.
type OperationClientListResponse ¶ added in v0.2.0
type OperationClientListResponse struct { // this is the management partner operations list OperationList }
OperationClientListResponse contains the response from method OperationClient.NewListPager.
type OperationDisplay ¶
type OperationDisplay struct { // the is management partner operation description Description *string // the is management partner operation Operation *string // the is management partner provider Provider *string // the is management partner resource Resource *string }
OperationDisplay - this is the management partner operation
func (OperationDisplay) MarshalJSON ¶ added in v0.6.0
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶ added in v0.6.0
func (o *OperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.
type OperationList ¶
type OperationList struct { // Url to get the next page of items. NextLink *string // this is the operation response list Value []*OperationResponse }
OperationList - this is the management partner operations list
func (OperationList) MarshalJSON ¶
func (o OperationList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationList.
func (*OperationList) UnmarshalJSON ¶ added in v0.6.0
func (o *OperationList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationList.
type OperationResponse ¶
type OperationResponse struct { // this is the operation display Display *OperationDisplay // this is the operation response name Name *string // the is operation response origin information Origin *string }
OperationResponse - this is the management partner operations response
func (OperationResponse) MarshalJSON ¶ added in v0.6.0
func (o OperationResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationResponse.
func (*OperationResponse) UnmarshalJSON ¶ added in v0.6.0
func (o *OperationResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationResponse.
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/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/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() clientFactory, err := armmanagementpartner.NewClientFactory(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPartnerClient().Create(ctx, "123456", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PartnerResponse = armmanagementpartner.PartnerResponse{ // Name: to.Ptr("123456"), // Type: to.Ptr("Microsoft.ManagementPartner/partner"), // Etag: to.Ptr[int32](3), // ID: to.Ptr("/providers/microsoft.managementpartner/partners/123456"), // Properties: &armmanagementpartner.PartnerProperties{ // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-20T01:23:40.528Z"); return t}()), // ObjectID: to.Ptr("aa67f786-0552-423e-8849-244ed12bf581"), // PartnerID: to.Ptr("123456"), // PartnerName: to.Ptr("Test_jefl"), // State: to.Ptr(armmanagementpartner.ManagementPartnerStateActive), // TenantID: to.Ptr("1b1121dd-6900-412a-af73-e8d44f81e1c1"), // UpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-20T01:52:57.912Z"); return t}()), // Version: to.Ptr[int32](3), // }, // } }
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/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/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() clientFactory, err := armmanagementpartner.NewClientFactory(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewPartnerClient().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/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/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() clientFactory, err := armmanagementpartner.NewClientFactory(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPartnerClient().Get(ctx, "123456", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PartnerResponse = armmanagementpartner.PartnerResponse{ // Name: to.Ptr("123456"), // Type: to.Ptr("Microsoft.ManagementPartner/partner"), // Etag: to.Ptr[int32](3), // ID: to.Ptr("/providers/microsoft.managementpartner/partners/123456"), // Properties: &armmanagementpartner.PartnerProperties{ // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-20T01:23:40.528Z"); return t}()), // ObjectID: to.Ptr("aa67f786-0552-423e-8849-244ed12bf581"), // PartnerID: to.Ptr("123456"), // PartnerName: to.Ptr("Test_jefl"), // State: to.Ptr(armmanagementpartner.ManagementPartnerStateActive), // TenantID: to.Ptr("1b1121dd-6900-412a-af73-e8d44f81e1c1"), // UpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-20T01:52:57.912Z"); return t}()), // Version: to.Ptr[int32](3), // }, // } }
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/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/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() clientFactory, err := armmanagementpartner.NewClientFactory(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPartnerClient().Update(ctx, "123456", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PartnerResponse = armmanagementpartner.PartnerResponse{ // Name: to.Ptr("123456"), // Type: to.Ptr("Microsoft.ManagementPartner/partner"), // Etag: to.Ptr[int32](3), // ID: to.Ptr("/providers/microsoft.managementpartner/partners/123456"), // Properties: &armmanagementpartner.PartnerProperties{ // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-20T01:23:40.528Z"); return t}()), // ObjectID: to.Ptr("aa67f786-0552-423e-8849-244ed12bf581"), // PartnerID: to.Ptr("123456"), // PartnerName: to.Ptr("Test_jefl"), // State: to.Ptr(armmanagementpartner.ManagementPartnerStateActive), // TenantID: to.Ptr("1b1121dd-6900-412a-af73-e8d44f81e1c1"), // UpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-20T01:52:57.912Z"); return t}()), // Version: to.Ptr[int32](3), // }, // } }
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 { // this is the management partner operations response 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 { // this is the management partner operations response 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 { // this is the management partner operations response 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 // This is the object id. ObjectID *string // This is the partner id PartnerID *string // This is the partner name PartnerName *string // This is the partner state State *ManagementPartnerState // This is the tenant id. TenantID *string // This is the DateTime when the partner was updated. UpdatedTime *time.Time // This is the version. Version *int32 }
PartnerProperties - this is the management partner properties
func (PartnerProperties) MarshalJSON ¶
func (p PartnerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PartnerProperties.
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 // Properties of the partner Properties *PartnerProperties // READ-ONLY; Identifier of the partner ID *string // READ-ONLY; Name of the partner Name *string // READ-ONLY; Type of resource. "Microsoft.ManagementPartner/partners" Type *string }
PartnerResponse - this is the management partner operations response
func (PartnerResponse) MarshalJSON ¶ added in v0.6.0
func (p PartnerResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PartnerResponse.
func (*PartnerResponse) UnmarshalJSON ¶ added in v0.6.0
func (p *PartnerResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PartnerResponse.
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/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/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() clientFactory, err := armmanagementpartner.NewClientFactory(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPartnersClient().Get(ctx, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PartnerResponse = armmanagementpartner.PartnerResponse{ // Name: to.Ptr("123456"), // Type: to.Ptr("Microsoft.ManagementPartner/partner"), // Etag: to.Ptr[int32](3), // ID: to.Ptr("/providers/microsoft.managementpartner/partners"), // Properties: &armmanagementpartner.PartnerProperties{ // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-20T01:23:40.528Z"); return t}()), // ObjectID: to.Ptr("aa67f786-0552-423e-8849-244ed12bf581"), // PartnerID: to.Ptr("123456"), // PartnerName: to.Ptr("Test_jefl"), // State: to.Ptr(armmanagementpartner.ManagementPartnerStateActive), // TenantID: to.Ptr("1b1121dd-6900-412a-af73-e8d44f81e1c1"), // UpdatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-20T01:52:57.912Z"); return t}()), // Version: to.Ptr[int32](3), // }, // } }
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 { // this is the management partner operations response PartnerResponse }
PartnersClientGetResponse contains the response from method PartnersClient.Get.