Documentation
¶
Index ¶
- type ActionType
- type AssignmentReportProperties
- type BestPractice
- type BestPracticeList
- type BestPracticesClient
- type BestPracticesClientGetOptions
- type BestPracticesClientGetResponse
- type BestPracticesClientListByTenantOptions
- type BestPracticesClientListByTenantResponse
- type BestPracticesVersionsClient
- func (client *BestPracticesVersionsClient) Get(ctx context.Context, bestPracticeName string, versionName string, ...) (BestPracticesVersionsClientGetResponse, error)
- func (client *BestPracticesVersionsClient) NewListByTenantPager(bestPracticeName string, ...) *runtime.Pager[BestPracticesVersionsClientListByTenantResponse]
- type BestPracticesVersionsClientGetOptions
- type BestPracticesVersionsClientGetResponse
- type BestPracticesVersionsClientListByTenantOptions
- type BestPracticesVersionsClientListByTenantResponse
- type ClientFactory
- func (c *ClientFactory) NewBestPracticesClient() *BestPracticesClient
- func (c *ClientFactory) NewBestPracticesVersionsClient() *BestPracticesVersionsClient
- func (c *ClientFactory) NewConfigurationProfileAssignmentsClient() *ConfigurationProfileAssignmentsClient
- func (c *ClientFactory) NewConfigurationProfileHCIAssignmentsClient() *ConfigurationProfileHCIAssignmentsClient
- func (c *ClientFactory) NewConfigurationProfileHCRPAssignmentsClient() *ConfigurationProfileHCRPAssignmentsClient
- func (c *ClientFactory) NewConfigurationProfilesClient() *ConfigurationProfilesClient
- func (c *ClientFactory) NewConfigurationProfilesVersionsClient() *ConfigurationProfilesVersionsClient
- func (c *ClientFactory) NewHCIReportsClient() *HCIReportsClient
- func (c *ClientFactory) NewHCRPReportsClient() *HCRPReportsClient
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewReportsClient() *ReportsClient
- func (c *ClientFactory) NewServicePrincipalsClient() *ServicePrincipalsClient
- type ConfigurationProfile
- type ConfigurationProfileAssignment
- type ConfigurationProfileAssignmentList
- type ConfigurationProfileAssignmentProperties
- type ConfigurationProfileAssignmentsClient
- func (client *ConfigurationProfileAssignmentsClient) CreateOrUpdate(ctx context.Context, configurationProfileAssignmentName string, ...) (ConfigurationProfileAssignmentsClientCreateOrUpdateResponse, error)
- func (client *ConfigurationProfileAssignmentsClient) Delete(ctx context.Context, resourceGroupName string, ...) (ConfigurationProfileAssignmentsClientDeleteResponse, error)
- func (client *ConfigurationProfileAssignmentsClient) Get(ctx context.Context, resourceGroupName string, ...) (ConfigurationProfileAssignmentsClientGetResponse, error)
- func (client *ConfigurationProfileAssignmentsClient) NewListByClusterNamePager(resourceGroupName string, clusterName string, ...) *runtime.Pager[ConfigurationProfileAssignmentsClientListByClusterNameResponse]
- func (client *ConfigurationProfileAssignmentsClient) NewListByMachineNamePager(resourceGroupName string, machineName string, ...) *runtime.Pager[ConfigurationProfileAssignmentsClientListByMachineNameResponse]
- func (client *ConfigurationProfileAssignmentsClient) NewListBySubscriptionPager(options *ConfigurationProfileAssignmentsClientListBySubscriptionOptions) ...
- func (client *ConfigurationProfileAssignmentsClient) NewListByVirtualMachinesPager(resourceGroupName string, vmName string, ...) ...
- func (client *ConfigurationProfileAssignmentsClient) NewListPager(resourceGroupName string, ...) *runtime.Pager[ConfigurationProfileAssignmentsClientListResponse]
- type ConfigurationProfileAssignmentsClientCreateOrUpdateOptions
- type ConfigurationProfileAssignmentsClientCreateOrUpdateResponse
- type ConfigurationProfileAssignmentsClientDeleteOptions
- type ConfigurationProfileAssignmentsClientDeleteResponse
- type ConfigurationProfileAssignmentsClientGetOptions
- type ConfigurationProfileAssignmentsClientGetResponse
- type ConfigurationProfileAssignmentsClientListByClusterNameOptions
- type ConfigurationProfileAssignmentsClientListByClusterNameResponse
- type ConfigurationProfileAssignmentsClientListByMachineNameOptions
- type ConfigurationProfileAssignmentsClientListByMachineNameResponse
- type ConfigurationProfileAssignmentsClientListBySubscriptionOptions
- type ConfigurationProfileAssignmentsClientListBySubscriptionResponse
- type ConfigurationProfileAssignmentsClientListByVirtualMachinesOptions
- type ConfigurationProfileAssignmentsClientListByVirtualMachinesResponse
- type ConfigurationProfileAssignmentsClientListOptions
- type ConfigurationProfileAssignmentsClientListResponse
- type ConfigurationProfileHCIAssignmentsClient
- func (client *ConfigurationProfileHCIAssignmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, ...) (ConfigurationProfileHCIAssignmentsClientCreateOrUpdateResponse, error)
- func (client *ConfigurationProfileHCIAssignmentsClient) Delete(ctx context.Context, resourceGroupName string, clusterName string, ...) (ConfigurationProfileHCIAssignmentsClientDeleteResponse, error)
- func (client *ConfigurationProfileHCIAssignmentsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, ...) (ConfigurationProfileHCIAssignmentsClientGetResponse, error)
- type ConfigurationProfileHCIAssignmentsClientCreateOrUpdateOptions
- type ConfigurationProfileHCIAssignmentsClientCreateOrUpdateResponse
- type ConfigurationProfileHCIAssignmentsClientDeleteOptions
- type ConfigurationProfileHCIAssignmentsClientDeleteResponse
- type ConfigurationProfileHCIAssignmentsClientGetOptions
- type ConfigurationProfileHCIAssignmentsClientGetResponse
- type ConfigurationProfileHCRPAssignmentsClient
- func (client *ConfigurationProfileHCRPAssignmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, machineName string, ...) (ConfigurationProfileHCRPAssignmentsClientCreateOrUpdateResponse, error)
- func (client *ConfigurationProfileHCRPAssignmentsClient) Delete(ctx context.Context, resourceGroupName string, machineName string, ...) (ConfigurationProfileHCRPAssignmentsClientDeleteResponse, error)
- func (client *ConfigurationProfileHCRPAssignmentsClient) Get(ctx context.Context, resourceGroupName string, machineName string, ...) (ConfigurationProfileHCRPAssignmentsClientGetResponse, error)
- type ConfigurationProfileHCRPAssignmentsClientCreateOrUpdateOptions
- type ConfigurationProfileHCRPAssignmentsClientCreateOrUpdateResponse
- type ConfigurationProfileHCRPAssignmentsClientDeleteOptions
- type ConfigurationProfileHCRPAssignmentsClientDeleteResponse
- type ConfigurationProfileHCRPAssignmentsClientGetOptions
- type ConfigurationProfileHCRPAssignmentsClientGetResponse
- type ConfigurationProfileList
- type ConfigurationProfileProperties
- type ConfigurationProfileUpdate
- type ConfigurationProfilesClient
- func (client *ConfigurationProfilesClient) CreateOrUpdate(ctx context.Context, configurationProfileName string, resourceGroupName string, ...) (ConfigurationProfilesClientCreateOrUpdateResponse, error)
- func (client *ConfigurationProfilesClient) Delete(ctx context.Context, resourceGroupName string, configurationProfileName string, ...) (ConfigurationProfilesClientDeleteResponse, error)
- func (client *ConfigurationProfilesClient) Get(ctx context.Context, configurationProfileName string, resourceGroupName string, ...) (ConfigurationProfilesClientGetResponse, error)
- func (client *ConfigurationProfilesClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[ConfigurationProfilesClientListByResourceGroupResponse]
- func (client *ConfigurationProfilesClient) NewListBySubscriptionPager(options *ConfigurationProfilesClientListBySubscriptionOptions) *runtime.Pager[ConfigurationProfilesClientListBySubscriptionResponse]
- func (client *ConfigurationProfilesClient) Update(ctx context.Context, configurationProfileName string, resourceGroupName string, ...) (ConfigurationProfilesClientUpdateResponse, error)
- type ConfigurationProfilesClientCreateOrUpdateOptions
- type ConfigurationProfilesClientCreateOrUpdateResponse
- type ConfigurationProfilesClientDeleteOptions
- type ConfigurationProfilesClientDeleteResponse
- type ConfigurationProfilesClientGetOptions
- type ConfigurationProfilesClientGetResponse
- type ConfigurationProfilesClientListByResourceGroupOptions
- type ConfigurationProfilesClientListByResourceGroupResponse
- type ConfigurationProfilesClientListBySubscriptionOptions
- type ConfigurationProfilesClientListBySubscriptionResponse
- type ConfigurationProfilesClientUpdateOptions
- type ConfigurationProfilesClientUpdateResponse
- type ConfigurationProfilesVersionsClient
- func (client *ConfigurationProfilesVersionsClient) CreateOrUpdate(ctx context.Context, configurationProfileName string, versionName string, ...) (ConfigurationProfilesVersionsClientCreateOrUpdateResponse, error)
- func (client *ConfigurationProfilesVersionsClient) Delete(ctx context.Context, resourceGroupName string, configurationProfileName string, ...) (ConfigurationProfilesVersionsClientDeleteResponse, error)
- func (client *ConfigurationProfilesVersionsClient) Get(ctx context.Context, configurationProfileName string, versionName string, ...) (ConfigurationProfilesVersionsClientGetResponse, error)
- func (client *ConfigurationProfilesVersionsClient) NewListChildResourcesPager(configurationProfileName string, resourceGroupName string, ...) *runtime.Pager[ConfigurationProfilesVersionsClientListChildResourcesResponse]
- type ConfigurationProfilesVersionsClientCreateOrUpdateOptions
- type ConfigurationProfilesVersionsClientCreateOrUpdateResponse
- type ConfigurationProfilesVersionsClientDeleteOptions
- type ConfigurationProfilesVersionsClientDeleteResponse
- type ConfigurationProfilesVersionsClientGetOptions
- type ConfigurationProfilesVersionsClientGetResponse
- type ConfigurationProfilesVersionsClientListChildResourcesOptions
- type ConfigurationProfilesVersionsClientListChildResourcesResponse
- type CreatedByType
- type ErrorAdditionalInfo
- type ErrorDetail
- type ErrorResponse
- type HCIReportsClient
- func (client *HCIReportsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, ...) (HCIReportsClientGetResponse, error)
- func (client *HCIReportsClient) NewListByConfigurationProfileAssignmentsPager(resourceGroupName string, clusterName string, ...) *runtime.Pager[HCIReportsClientListByConfigurationProfileAssignmentsResponse]
- type HCIReportsClientGetOptions
- type HCIReportsClientGetResponse
- type HCIReportsClientListByConfigurationProfileAssignmentsOptions
- type HCIReportsClientListByConfigurationProfileAssignmentsResponse
- type HCRPReportsClient
- func (client *HCRPReportsClient) Get(ctx context.Context, resourceGroupName string, machineName string, ...) (HCRPReportsClientGetResponse, error)
- func (client *HCRPReportsClient) NewListByConfigurationProfileAssignmentsPager(resourceGroupName string, machineName string, ...) *runtime.Pager[HCRPReportsClientListByConfigurationProfileAssignmentsResponse]
- type HCRPReportsClientGetOptions
- type HCRPReportsClientGetResponse
- type HCRPReportsClientListByConfigurationProfileAssignmentsOptions
- type HCRPReportsClientListByConfigurationProfileAssignmentsResponse
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type Origin
- type ProxyResource
- type Report
- type ReportList
- type ReportResource
- type ReportsClient
- func (client *ReportsClient) Get(ctx context.Context, resourceGroupName string, ...) (ReportsClientGetResponse, error)
- func (client *ReportsClient) NewListByConfigurationProfileAssignmentsPager(resourceGroupName string, configurationProfileAssignmentName string, ...) *runtime.Pager[ReportsClientListByConfigurationProfileAssignmentsResponse]
- type ReportsClientGetOptions
- type ReportsClientGetResponse
- type ReportsClientListByConfigurationProfileAssignmentsOptions
- type ReportsClientListByConfigurationProfileAssignmentsResponse
- type Resource
- type ServicePrincipal
- type ServicePrincipalListResult
- type ServicePrincipalProperties
- type ServicePrincipalsClient
- func (client *ServicePrincipalsClient) Get(ctx context.Context, options *ServicePrincipalsClientGetOptions) (ServicePrincipalsClientGetResponse, error)
- func (client *ServicePrincipalsClient) NewListBySubscriptionPager(options *ServicePrincipalsClientListBySubscriptionOptions) *runtime.Pager[ServicePrincipalsClientListBySubscriptionResponse]
- type ServicePrincipalsClientGetOptions
- type ServicePrincipalsClientGetResponse
- type ServicePrincipalsClientListBySubscriptionOptions
- type ServicePrincipalsClientListBySubscriptionResponse
- type SystemData
- type TrackedResource
- type UpdateResource
Examples ¶
- BestPracticesClient.Get
- BestPracticesClient.NewListByTenantPager
- BestPracticesVersionsClient.Get
- BestPracticesVersionsClient.NewListByTenantPager
- ConfigurationProfileAssignmentsClient.CreateOrUpdate
- ConfigurationProfileAssignmentsClient.Delete
- ConfigurationProfileAssignmentsClient.Get
- ConfigurationProfileAssignmentsClient.NewListByClusterNamePager
- ConfigurationProfileAssignmentsClient.NewListByMachineNamePager
- ConfigurationProfileAssignmentsClient.NewListBySubscriptionPager
- ConfigurationProfileAssignmentsClient.NewListByVirtualMachinesPager
- ConfigurationProfileAssignmentsClient.NewListPager
- ConfigurationProfileHCIAssignmentsClient.CreateOrUpdate
- ConfigurationProfileHCIAssignmentsClient.Delete
- ConfigurationProfileHCIAssignmentsClient.Get
- ConfigurationProfileHCRPAssignmentsClient.CreateOrUpdate
- ConfigurationProfileHCRPAssignmentsClient.Delete
- ConfigurationProfileHCRPAssignmentsClient.Get
- ConfigurationProfilesClient.CreateOrUpdate
- ConfigurationProfilesClient.Delete
- ConfigurationProfilesClient.Get
- ConfigurationProfilesClient.NewListByResourceGroupPager
- ConfigurationProfilesClient.NewListBySubscriptionPager
- ConfigurationProfilesClient.Update
- ConfigurationProfilesVersionsClient.CreateOrUpdate
- ConfigurationProfilesVersionsClient.Delete
- ConfigurationProfilesVersionsClient.Get
- ConfigurationProfilesVersionsClient.NewListChildResourcesPager
- HCIReportsClient.Get
- HCIReportsClient.NewListByConfigurationProfileAssignmentsPager
- HCRPReportsClient.Get
- HCRPReportsClient.NewListByConfigurationProfileAssignmentsPager
- OperationsClient.NewListPager
- ReportsClient.Get
- ReportsClient.NewListByConfigurationProfileAssignmentsPager
- ServicePrincipalsClient.Get
- ServicePrincipalsClient.NewListBySubscriptionPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionType ¶
type ActionType string
ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
const (
ActionTypeInternal ActionType = "Internal"
)
func PossibleActionTypeValues ¶
func PossibleActionTypeValues() []ActionType
PossibleActionTypeValues returns the possible values for the ActionType const type.
type AssignmentReportProperties ¶
type AssignmentReportProperties struct {
// End time of the configuration profile assignment processing.
EndTime *string
// Start time of the configuration profile assignment processing.
StartTime *string
// READ-ONLY; The configurationProfile linked to the assignment.
ConfigurationProfile *string
// READ-ONLY; Duration of the configuration profile assignment processing.
Duration *string
// READ-ONLY; Error message, if any, returned by the configuration profile assignment processing.
Error *ErrorDetail
// READ-ONLY; Last modified time of the configuration profile assignment processing.
LastModifiedTime *string
// READ-ONLY; Version of the report format
ReportFormatVersion *string
// READ-ONLY; List of resources processed by the configuration profile assignment.
Resources []*ReportResource
// READ-ONLY; The status of the configuration profile assignment.
Status *string
// READ-ONLY; Type of the configuration profile assignment processing (Initial/Consistency).
Type *string
}
AssignmentReportProperties - Data related to the report detail.
func (AssignmentReportProperties) MarshalJSON ¶
func (a AssignmentReportProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AssignmentReportProperties.
func (*AssignmentReportProperties) UnmarshalJSON ¶
func (a *AssignmentReportProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AssignmentReportProperties.
type BestPractice ¶
type BestPractice struct {
// Properties of the best practice.
Properties *ConfigurationProfileProperties
// READ-ONLY; The fully qualified ID for the best practice. For example, /providers/Microsoft.Automanage/bestPractices/azureBestPracticesProduction
ID *string
// READ-ONLY; The name of the best practice. For example, azureBestPracticesProduction
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. For example, Microsoft.Automanage/bestPractices
Type *string
}
BestPractice - Definition of the Automanage best practice.
func (BestPractice) MarshalJSON ¶
func (b BestPractice) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BestPractice.
func (*BestPractice) UnmarshalJSON ¶
func (b *BestPractice) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BestPractice.
type BestPracticeList ¶
type BestPracticeList struct {
// Result of the list best practice operation.
Value []*BestPractice
}
BestPracticeList - The response of the list best practice operation.
func (BestPracticeList) MarshalJSON ¶
func (b BestPracticeList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BestPracticeList.
func (*BestPracticeList) UnmarshalJSON ¶
func (b *BestPracticeList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BestPracticeList.
type BestPracticesClient ¶
type BestPracticesClient struct {
// contains filtered or unexported fields
}
BestPracticesClient contains the methods for the BestPractices group. Don't use this type directly, use NewBestPracticesClient() instead.
func NewBestPracticesClient ¶
func NewBestPracticesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*BestPracticesClient, error)
NewBestPracticesClient creates a new instance of BestPracticesClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*BestPracticesClient) Get ¶
func (client *BestPracticesClient) Get(ctx context.Context, bestPracticeName string, options *BestPracticesClientGetOptions) (BestPracticesClientGetResponse, error)
Get - Get information about a Automanage best practice If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-04
- bestPracticeName - The Automanage best practice name.
- options - BestPracticesClientGetOptions contains the optional parameters for the BestPracticesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/getBestPractice.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewBestPracticesClient().Get(ctx, "azureBestPracticesProduction", 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.BestPractice = armautomanage.BestPractice{
// Name: to.Ptr("azureBestPracticesProduction"),
// Type: to.Ptr("Microsoft.Automanage/bestPractices"),
// ID: to.Ptr("/providers/Microsoft.Automanage/bestPractices/azureBestPracticesProduction"),
// Properties: &armautomanage.ConfigurationProfileProperties{
// Configuration: map[string]any{
// "Antimalware/Enable": true,
// "Antimalware/EnableRealTimeProtection": true,
// "Antimalware/RunScheduledScan": true,
// "Antimalware/ScanDay": "7",
// "Antimalware/ScanTimeInMinutes": "120",
// "Antimalware/ScanType": "Quick",
// "AzureSecurityCenter/Enable": true,
// "Backup/Enable": true,
// "Backup/InstantRpRetentionRangeInDays": "2",
// "Backup/PolicyName": "dailyBackupPolicy",
// "Backup/RetentionPolicy/DailySchedule/RetentionDuration/Count": "180",
// "Backup/RetentionPolicy/DailySchedule/RetentionDuration/DurationType": "Days",
// "Backup/RetentionPolicy/DailySchedule/RetentionTimes": "[ 2017-01-26T00:00:00Z ]",
// "Backup/RetentionPolicy/RetentionPolicyType": "LongTermRetentionPolicy",
// "Backup/SchedulePolicy/SchedulePolicyType": "SimpleSchedulePolicy",
// "Backup/SchedulePolicy/ScheduleRunFrequency": "Daily",
// "Backup/SchedulePolicy/ScheduleRunTimes": "[ 2017-01-26T00:00:00Z ]",
// "Backup/TimeZone": "UTC",
// "BootDiagnostics/Enable": true,
// "ChangeTrackingAndInventory/Enable": true,
// "GuestConfiguration/Enable": true,
// "LogAnalytics/Enable": true,
// "UpdateManagement/Enable": true,
// "VMInsights/Enable": true,
// },
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }
}
func (*BestPracticesClient) NewListByTenantPager ¶
func (client *BestPracticesClient) NewListByTenantPager(options *BestPracticesClientListByTenantOptions) *runtime.Pager[BestPracticesClientListByTenantResponse]
NewListByTenantPager - Retrieve a list of Automanage best practices
Generated from API version 2022-05-04
- options - BestPracticesClientListByTenantOptions contains the optional parameters for the BestPracticesClient.NewListByTenantPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/listBestPracticesByTenant.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewBestPracticesClient().NewListByTenantPager(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.BestPracticeList = armautomanage.BestPracticeList{
// Value: []*armautomanage.BestPractice{
// {
// Name: to.Ptr("azureBestPracticesProduction"),
// Type: to.Ptr("Microsoft.Automanage/bestPractices"),
// ID: to.Ptr("/providers/Microsoft.Automanage/bestPractices/azureBestPracticesProduction"),
// Properties: &armautomanage.ConfigurationProfileProperties{
// Configuration: map[string]any{
// "Antimalware/Enable": true,
// "Antimalware/EnableRealTimeProtection": true,
// "Antimalware/RunScheduledScan": true,
// "Antimalware/ScanDay": "7",
// "Antimalware/ScanTimeInMinutes": "120",
// "Antimalware/ScanType": "Quick",
// "AzureSecurityCenter/Enable": true,
// "Backup/Enable": true,
// "Backup/InstantRpRetentionRangeInDays": "2",
// "Backup/PolicyName": "dailyBackupPolicy",
// "Backup/RetentionPolicy/DailySchedule/RetentionDuration/Count": "180",
// "Backup/RetentionPolicy/DailySchedule/RetentionDuration/DurationType": "Days",
// "Backup/RetentionPolicy/DailySchedule/RetentionTimes": "[ 2017-01-26T00:00:00Z ]",
// "Backup/RetentionPolicy/RetentionPolicyType": "LongTermRetentionPolicy",
// "Backup/SchedulePolicy/SchedulePolicyType": "SimpleSchedulePolicy",
// "Backup/SchedulePolicy/ScheduleRunFrequency": "Daily",
// "Backup/SchedulePolicy/ScheduleRunTimes": "[ 2017-01-26T00:00:00Z ]",
// "Backup/TimeZone": "UTC",
// "BootDiagnostics/Enable": true,
// "ChangeTrackingAndInventory/Enable": true,
// "GuestConfiguration/Enable": true,
// "LogAnalytics/Enable": true,
// "UpdateManagement/Enable": true,
// "VMInsights/Enable": true,
// },
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// },
// {
// Name: to.Ptr("azureBestPracticesDevTest"),
// Type: to.Ptr("Microsoft.Automanage/bestPractices"),
// ID: to.Ptr("/providers/Microsoft.Automanage/bestPractices/azureBestPracticesDevTest"),
// Properties: &armautomanage.ConfigurationProfileProperties{
// Configuration: map[string]any{
// "Antimalware/Enable": true,
// "Antimalware/EnableRealTimeProtection": true,
// "Antimalware/RunScheduledScan": true,
// "Antimalware/ScanDay": "7",
// "Antimalware/ScanTimeInMinutes": "120",
// "Antimalware/ScanType": "Quick",
// "AzureSecurityCenter/Enable": true,
// "Backup/Enable": false,
// "BootDiagnostics/Enable": true,
// "ChangeTrackingAndInventory/Enable": true,
// "GuestConfiguration/Enable": true,
// "LogAnalytics/Enable": true,
// "UpdateManagement/Enable": true,
// "VMInsights/Enable": false,
// },
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }},
// }
}
}
type BestPracticesClientGetOptions ¶
type BestPracticesClientGetOptions struct {
}
BestPracticesClientGetOptions contains the optional parameters for the BestPracticesClient.Get method.
type BestPracticesClientGetResponse ¶
type BestPracticesClientGetResponse struct {
// Definition of the Automanage best practice.
BestPractice
}
BestPracticesClientGetResponse contains the response from method BestPracticesClient.Get.
type BestPracticesClientListByTenantOptions ¶
type BestPracticesClientListByTenantOptions struct {
}
BestPracticesClientListByTenantOptions contains the optional parameters for the BestPracticesClient.NewListByTenantPager method.
type BestPracticesClientListByTenantResponse ¶
type BestPracticesClientListByTenantResponse struct {
// The response of the list best practice operation.
BestPracticeList
}
BestPracticesClientListByTenantResponse contains the response from method BestPracticesClient.NewListByTenantPager.
type BestPracticesVersionsClient ¶
type BestPracticesVersionsClient struct {
// contains filtered or unexported fields
}
BestPracticesVersionsClient contains the methods for the BestPracticesVersions group. Don't use this type directly, use NewBestPracticesVersionsClient() instead.
func NewBestPracticesVersionsClient ¶
func NewBestPracticesVersionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*BestPracticesVersionsClient, error)
NewBestPracticesVersionsClient creates a new instance of BestPracticesVersionsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*BestPracticesVersionsClient) Get ¶
func (client *BestPracticesVersionsClient) Get(ctx context.Context, bestPracticeName string, versionName string, options *BestPracticesVersionsClientGetOptions) (BestPracticesVersionsClientGetResponse, error)
Get - Get information about a Automanage best practice version If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-04
- bestPracticeName - The Automanage best practice name.
- versionName - The Automanage best practice version name.
- options - BestPracticesVersionsClientGetOptions contains the optional parameters for the BestPracticesVersionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/getBestPracticeVersion.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewBestPracticesVersionsClient().Get(ctx, "azureBestPracticesProduction", "version1", 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.BestPractice = armautomanage.BestPractice{
// Name: to.Ptr("azureBestPracticesProduction/version1"),
// Type: to.Ptr("Microsoft.Automanage/bestPractices/versions"),
// ID: to.Ptr("/providers/Microsoft.Automanage/bestPractices/azureBestPracticesProduction/versions/version1"),
// Properties: &armautomanage.ConfigurationProfileProperties{
// Configuration: map[string]any{
// "Antimalware/Enable": true,
// "Antimalware/EnableRealTimeProtection": true,
// "Antimalware/RunScheduledScan": true,
// "Antimalware/ScanDay": "7",
// "Antimalware/ScanTimeInMinutes": "120",
// "Antimalware/ScanType": "Quick",
// "AzureSecurityCenter/Enable": true,
// "Backup/Enable": true,
// "Backup/InstantRpRetentionRangeInDays": "2",
// "Backup/PolicyName": "dailyBackupPolicy",
// "Backup/RetentionPolicy/DailySchedule/RetentionDuration/Count": "180",
// "Backup/RetentionPolicy/DailySchedule/RetentionDuration/DurationType": "Days",
// "Backup/RetentionPolicy/DailySchedule/RetentionTimes": "[ 2017-01-26T00:00:00Z ]",
// "Backup/RetentionPolicy/RetentionPolicyType": "LongTermRetentionPolicy",
// "Backup/SchedulePolicy/SchedulePolicyType": "SimpleSchedulePolicy",
// "Backup/SchedulePolicy/ScheduleRunFrequency": "Daily",
// "Backup/SchedulePolicy/ScheduleRunTimes": "[ 2017-01-26T00:00:00Z ]",
// "Backup/TimeZone": "UTC",
// "BootDiagnostics/Enable": true,
// "ChangeTrackingAndInventory/Enable": true,
// "GuestConfiguration/Enable": true,
// "LogAnalytics/Enable": true,
// "UpdateManagement/Enable": true,
// "VMInsights/Enable": true,
// },
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }
}
func (*BestPracticesVersionsClient) NewListByTenantPager ¶
func (client *BestPracticesVersionsClient) NewListByTenantPager(bestPracticeName string, options *BestPracticesVersionsClientListByTenantOptions) *runtime.Pager[BestPracticesVersionsClientListByTenantResponse]
NewListByTenantPager - Retrieve a list of Automanage best practices versions
Generated from API version 2022-05-04
- bestPracticeName - The Automanage best practice name.
- options - BestPracticesVersionsClientListByTenantOptions contains the optional parameters for the BestPracticesVersionsClient.NewListByTenantPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/listBestPracticesVersionsByTenant.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewBestPracticesVersionsClient().NewListByTenantPager("azureBestPracticesProduction", 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.BestPracticeList = armautomanage.BestPracticeList{
// Value: []*armautomanage.BestPractice{
// {
// Name: to.Ptr("azureBestPracticesProduction/version1"),
// Type: to.Ptr("Microsoft.Automanage/bestPractices/versions"),
// ID: to.Ptr("/providers/Microsoft.Automanage/bestPractices/azureBestPracticesProduction/versions/version1"),
// Properties: &armautomanage.ConfigurationProfileProperties{
// Configuration: map[string]any{
// "Antimalware/Enable": true,
// "Antimalware/EnableRealTimeProtection": true,
// "Antimalware/RunScheduledScan": true,
// "Antimalware/ScanDay": "7",
// "Antimalware/ScanTimeInMinutes": "120",
// "Antimalware/ScanType": "Quick",
// "AzureSecurityCenter/Enable": true,
// "Backup/Enable": true,
// "Backup/InstantRpRetentionRangeInDays": "2",
// "Backup/PolicyName": "dailyBackupPolicy",
// "Backup/RetentionPolicy/DailySchedule/RetentionDuration/Count": "180",
// "Backup/RetentionPolicy/DailySchedule/RetentionDuration/DurationType": "Days",
// "Backup/RetentionPolicy/DailySchedule/RetentionTimes": "[ 2017-01-26T00:00:00Z ]",
// "Backup/RetentionPolicy/RetentionPolicyType": "LongTermRetentionPolicy",
// "Backup/SchedulePolicy/SchedulePolicyType": "SimpleSchedulePolicy",
// "Backup/SchedulePolicy/ScheduleRunFrequency": "Daily",
// "Backup/SchedulePolicy/ScheduleRunTimes": "[ 2017-01-26T00:00:00Z ]",
// "Backup/TimeZone": "UTC",
// "BootDiagnostics/Enable": true,
// "ChangeTrackingAndInventory/Enable": true,
// "GuestConfiguration/Enable": true,
// "LogAnalytics/Enable": true,
// "UpdateManagement/Enable": true,
// "VMInsights/Enable": true,
// },
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// },
// {
// Name: to.Ptr("azureBestPracticesProduction/version2"),
// Type: to.Ptr("Microsoft.Automanage/bestPractices/versions"),
// ID: to.Ptr("/providers/Microsoft.Automanage/bestPractices/azureBestPracticesProduction/versions/version2"),
// Properties: &armautomanage.ConfigurationProfileProperties{
// Configuration: map[string]any{
// "Antimalware/Enable": true,
// "Antimalware/EnableRealTimeProtection": true,
// "Antimalware/RunScheduledScan": true,
// "Antimalware/ScanDay": "7",
// "Antimalware/ScanTimeInMinutes": "120",
// "Antimalware/ScanType": "Quick",
// "AzureSecurityCenter/Enable": true,
// "Backup/Enable": false,
// "BootDiagnostics/Enable": true,
// "ChangeTrackingAndInventory/Enable": true,
// "GuestConfiguration/Enable": true,
// "LogAnalytics/Enable": true,
// "UpdateManagement/Enable": true,
// "VMInsights/Enable": false,
// },
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }},
// }
}
}
type BestPracticesVersionsClientGetOptions ¶
type BestPracticesVersionsClientGetOptions struct {
}
BestPracticesVersionsClientGetOptions contains the optional parameters for the BestPracticesVersionsClient.Get method.
type BestPracticesVersionsClientGetResponse ¶
type BestPracticesVersionsClientGetResponse struct {
// Definition of the Automanage best practice.
BestPractice
}
BestPracticesVersionsClientGetResponse contains the response from method BestPracticesVersionsClient.Get.
type BestPracticesVersionsClientListByTenantOptions ¶
type BestPracticesVersionsClientListByTenantOptions struct {
}
BestPracticesVersionsClientListByTenantOptions contains the optional parameters for the BestPracticesVersionsClient.NewListByTenantPager method.
type BestPracticesVersionsClientListByTenantResponse ¶
type BestPracticesVersionsClientListByTenantResponse struct {
// The response of the list best practice operation.
BestPracticeList
}
BestPracticesVersionsClientListByTenantResponse contains the response from method BestPracticesVersionsClient.NewListByTenantPager.
type ClientFactory ¶
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 ¶
func NewClientFactory(subscriptionID string, 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.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewBestPracticesClient ¶
func (c *ClientFactory) NewBestPracticesClient() *BestPracticesClient
NewBestPracticesClient creates a new instance of BestPracticesClient.
func (*ClientFactory) NewBestPracticesVersionsClient ¶
func (c *ClientFactory) NewBestPracticesVersionsClient() *BestPracticesVersionsClient
NewBestPracticesVersionsClient creates a new instance of BestPracticesVersionsClient.
func (*ClientFactory) NewConfigurationProfileAssignmentsClient ¶
func (c *ClientFactory) NewConfigurationProfileAssignmentsClient() *ConfigurationProfileAssignmentsClient
NewConfigurationProfileAssignmentsClient creates a new instance of ConfigurationProfileAssignmentsClient.
func (*ClientFactory) NewConfigurationProfileHCIAssignmentsClient ¶
func (c *ClientFactory) NewConfigurationProfileHCIAssignmentsClient() *ConfigurationProfileHCIAssignmentsClient
NewConfigurationProfileHCIAssignmentsClient creates a new instance of ConfigurationProfileHCIAssignmentsClient.
func (*ClientFactory) NewConfigurationProfileHCRPAssignmentsClient ¶
func (c *ClientFactory) NewConfigurationProfileHCRPAssignmentsClient() *ConfigurationProfileHCRPAssignmentsClient
NewConfigurationProfileHCRPAssignmentsClient creates a new instance of ConfigurationProfileHCRPAssignmentsClient.
func (*ClientFactory) NewConfigurationProfilesClient ¶
func (c *ClientFactory) NewConfigurationProfilesClient() *ConfigurationProfilesClient
NewConfigurationProfilesClient creates a new instance of ConfigurationProfilesClient.
func (*ClientFactory) NewConfigurationProfilesVersionsClient ¶
func (c *ClientFactory) NewConfigurationProfilesVersionsClient() *ConfigurationProfilesVersionsClient
NewConfigurationProfilesVersionsClient creates a new instance of ConfigurationProfilesVersionsClient.
func (*ClientFactory) NewHCIReportsClient ¶
func (c *ClientFactory) NewHCIReportsClient() *HCIReportsClient
NewHCIReportsClient creates a new instance of HCIReportsClient.
func (*ClientFactory) NewHCRPReportsClient ¶
func (c *ClientFactory) NewHCRPReportsClient() *HCRPReportsClient
NewHCRPReportsClient creates a new instance of HCRPReportsClient.
func (*ClientFactory) NewOperationsClient ¶
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewReportsClient ¶
func (c *ClientFactory) NewReportsClient() *ReportsClient
NewReportsClient creates a new instance of ReportsClient.
func (*ClientFactory) NewServicePrincipalsClient ¶
func (c *ClientFactory) NewServicePrincipalsClient() *ServicePrincipalsClient
NewServicePrincipalsClient creates a new instance of ServicePrincipalsClient.
type ConfigurationProfile ¶
type ConfigurationProfile struct {
// REQUIRED; The geo-location where the resource lives
Location *string
// Properties of the configuration profile.
Properties *ConfigurationProfileProperties
// Resource tags.
Tags map[string]*string
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
ConfigurationProfile - Definition of the configuration profile.
func (ConfigurationProfile) MarshalJSON ¶
func (c ConfigurationProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConfigurationProfile.
func (*ConfigurationProfile) UnmarshalJSON ¶
func (c *ConfigurationProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationProfile.
type ConfigurationProfileAssignment ¶
type ConfigurationProfileAssignment struct {
// Properties of the configuration profile assignment.
Properties *ConfigurationProfileAssignmentProperties
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; Azure resource id. Indicates if this resource is managed by another Azure resource.
ManagedBy *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
ConfigurationProfileAssignment - Configuration profile assignment is an association between a VM and automanage profile configuration.
func (ConfigurationProfileAssignment) MarshalJSON ¶
func (c ConfigurationProfileAssignment) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConfigurationProfileAssignment.
func (*ConfigurationProfileAssignment) UnmarshalJSON ¶
func (c *ConfigurationProfileAssignment) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationProfileAssignment.
type ConfigurationProfileAssignmentList ¶
type ConfigurationProfileAssignmentList struct {
// Result of the list configuration profile assignment operation.
Value []*ConfigurationProfileAssignment
}
ConfigurationProfileAssignmentList - The response of the list configuration profile assignment operation.
func (ConfigurationProfileAssignmentList) MarshalJSON ¶
func (c ConfigurationProfileAssignmentList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConfigurationProfileAssignmentList.
func (*ConfigurationProfileAssignmentList) UnmarshalJSON ¶
func (c *ConfigurationProfileAssignmentList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationProfileAssignmentList.
type ConfigurationProfileAssignmentProperties ¶
type ConfigurationProfileAssignmentProperties struct {
// The Automanage configurationProfile ARM Resource URI.
ConfigurationProfile *string
// READ-ONLY; The status of onboarding, which only appears in the response.
Status *string
// READ-ONLY; The target VM resource URI
TargetID *string
}
ConfigurationProfileAssignmentProperties - Automanage configuration profile assignment properties.
func (ConfigurationProfileAssignmentProperties) MarshalJSON ¶
func (c ConfigurationProfileAssignmentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConfigurationProfileAssignmentProperties.
func (*ConfigurationProfileAssignmentProperties) UnmarshalJSON ¶
func (c *ConfigurationProfileAssignmentProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationProfileAssignmentProperties.
type ConfigurationProfileAssignmentsClient ¶
type ConfigurationProfileAssignmentsClient struct {
// contains filtered or unexported fields
}
ConfigurationProfileAssignmentsClient contains the methods for the ConfigurationProfileAssignments group. Don't use this type directly, use NewConfigurationProfileAssignmentsClient() instead.
func NewConfigurationProfileAssignmentsClient ¶
func NewConfigurationProfileAssignmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigurationProfileAssignmentsClient, error)
NewConfigurationProfileAssignmentsClient creates a new instance of ConfigurationProfileAssignmentsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ConfigurationProfileAssignmentsClient) CreateOrUpdate ¶
func (client *ConfigurationProfileAssignmentsClient) CreateOrUpdate(ctx context.Context, configurationProfileAssignmentName string, resourceGroupName string, vmName string, parameters ConfigurationProfileAssignment, options *ConfigurationProfileAssignmentsClientCreateOrUpdateOptions) (ConfigurationProfileAssignmentsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates an association between a VM and Automanage configuration profile If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-04
- configurationProfileAssignmentName - Name of the configuration profile assignment. Only default is supported.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- vmName - The name of the virtual machine.
- parameters - Parameters supplied to the create or update configuration profile assignment.
- options - ConfigurationProfileAssignmentsClientCreateOrUpdateOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/createOrUpdateConfigurationProfileAssignment.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/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewConfigurationProfileAssignmentsClient().CreateOrUpdate(ctx, "default", "myResourceGroupName", "myVMName", armautomanage.ConfigurationProfileAssignment{
Properties: &armautomanage.ConfigurationProfileAssignmentProperties{
ConfigurationProfile: to.Ptr("/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesProduction"),
},
}, 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.ConfigurationProfileAssignment = armautomanage.ConfigurationProfileAssignment{
// Name: to.Ptr("default"),
// ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName/providers/Microsoft.Automanage/AutomanageAssignments/default"),
// Properties: &armautomanage.ConfigurationProfileAssignmentProperties{
// ConfigurationProfile: to.Ptr("/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesProduction"),
// TargetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName"),
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }
}
func (*ConfigurationProfileAssignmentsClient) Delete ¶
func (client *ConfigurationProfileAssignmentsClient) Delete(ctx context.Context, resourceGroupName string, configurationProfileAssignmentName string, vmName string, options *ConfigurationProfileAssignmentsClientDeleteOptions) (ConfigurationProfileAssignmentsClientDeleteResponse, error)
Delete - Delete a configuration profile assignment If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-04
- resourceGroupName - The name of the resource group. The name is case insensitive.
- configurationProfileAssignmentName - Name of the configuration profile assignment
- vmName - The name of the virtual machine.
- options - ConfigurationProfileAssignmentsClientDeleteOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/deleteConfigurationProfileAssignment.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewConfigurationProfileAssignmentsClient().Delete(ctx, "myResourceGroupName", "default", "myVMName", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
}
func (*ConfigurationProfileAssignmentsClient) Get ¶
func (client *ConfigurationProfileAssignmentsClient) Get(ctx context.Context, resourceGroupName string, configurationProfileAssignmentName string, vmName string, options *ConfigurationProfileAssignmentsClientGetOptions) (ConfigurationProfileAssignmentsClientGetResponse, error)
Get - Get information about a configuration profile assignment If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-04
- resourceGroupName - The name of the resource group. The name is case insensitive.
- configurationProfileAssignmentName - The configuration profile assignment name.
- vmName - The name of the virtual machine.
- options - ConfigurationProfileAssignmentsClientGetOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/getConfigurationProfileAssignment.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewConfigurationProfileAssignmentsClient().Get(ctx, "myResourceGroupName", "default", "myVMName", 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.ConfigurationProfileAssignment = armautomanage.ConfigurationProfileAssignment{
// Name: to.Ptr("default"),
// Type: to.Ptr("Microsoft.Automanage/ConfigurationProfileAssignments"),
// ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName/providers/Microsoft.Automanage/configurationProfileAssignments/default"),
// Properties: &armautomanage.ConfigurationProfileAssignmentProperties{
// ConfigurationProfile: to.Ptr("/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesDevTest"),
// Status: to.Ptr("Compliant"),
// TargetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName"),
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }
}
func (*ConfigurationProfileAssignmentsClient) NewListByClusterNamePager ¶
func (client *ConfigurationProfileAssignmentsClient) NewListByClusterNamePager(resourceGroupName string, clusterName string, options *ConfigurationProfileAssignmentsClientListByClusterNameOptions) *runtime.Pager[ConfigurationProfileAssignmentsClientListByClusterNameResponse]
NewListByClusterNamePager - Get list of configuration profile assignments
Generated from API version 2022-05-04
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the Arc machine.
- options - ConfigurationProfileAssignmentsClientListByClusterNameOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.NewListByClusterNamePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/listConfigurationProfileAssignmentsByClusterName.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewConfigurationProfileAssignmentsClient().NewListByClusterNamePager("myResourceGroupName", "myClusterName", 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.ConfigurationProfileAssignmentList = armautomanage.ConfigurationProfileAssignmentList{
// Value: []*armautomanage.ConfigurationProfileAssignment{
// {
// Name: to.Ptr("default"),
// Type: to.Ptr("Microsoft.Automanage/ConfigurationProfileAssignments"),
// ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName/providers/Microsoft.Automanage/configurationProfileAssignments/default"),
// Properties: &armautomanage.ConfigurationProfileAssignmentProperties{
// ConfigurationProfile: to.Ptr("/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesDevTest"),
// Status: to.Ptr("Compliant"),
// TargetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName"),
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// },
// {
// Name: to.Ptr("default"),
// Type: to.Ptr("Microsoft.Automanage/ConfigurationProfileAssignments"),
// ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.HybridCompute/machines/myArcMachineName/providers/Microsoft.Automanage/configurationProfileAssignments/default"),
// Properties: &armautomanage.ConfigurationProfileAssignmentProperties{
// ConfigurationProfile: to.Ptr("/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesProduction"),
// Status: to.Ptr("NotCompliant "),
// TargetID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.HybridCompute/machines/myArcMachineName"),
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }},
// }
}
}
func (*ConfigurationProfileAssignmentsClient) NewListByMachineNamePager ¶
func (client *ConfigurationProfileAssignmentsClient) NewListByMachineNamePager(resourceGroupName string, machineName string, options *ConfigurationProfileAssignmentsClientListByMachineNameOptions) *runtime.Pager[ConfigurationProfileAssignmentsClientListByMachineNameResponse]
NewListByMachineNamePager - Get list of configuration profile assignments
Generated from API version 2022-05-04
- resourceGroupName - The name of the resource group. The name is case insensitive.
- machineName - The name of the Arc machine.
- options - ConfigurationProfileAssignmentsClientListByMachineNameOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.NewListByMachineNamePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/listConfigurationProfileAssignmentsByMachineName.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewConfigurationProfileAssignmentsClient().NewListByMachineNamePager("myResourceGroupName", "myMachineName", 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.ConfigurationProfileAssignmentList = armautomanage.ConfigurationProfileAssignmentList{
// Value: []*armautomanage.ConfigurationProfileAssignment{
// {
// Name: to.Ptr("default"),
// Type: to.Ptr("Microsoft.Automanage/ConfigurationProfileAssignments"),
// ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName/providers/Microsoft.Automanage/configurationProfileAssignments/default"),
// Properties: &armautomanage.ConfigurationProfileAssignmentProperties{
// ConfigurationProfile: to.Ptr("/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesDevTest"),
// Status: to.Ptr("Compliant"),
// TargetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName"),
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// },
// {
// Name: to.Ptr("default"),
// Type: to.Ptr("Microsoft.Automanage/ConfigurationProfileAssignments"),
// ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.HybridCompute/machines/myArcMachineName/providers/Microsoft.Automanage/configurationProfileAssignments/default"),
// Properties: &armautomanage.ConfigurationProfileAssignmentProperties{
// ConfigurationProfile: to.Ptr("/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesProduction"),
// Status: to.Ptr("NotCompliant "),
// TargetID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.HybridCompute/machines/myArcMachineName"),
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }},
// }
}
}
func (*ConfigurationProfileAssignmentsClient) NewListBySubscriptionPager ¶
func (client *ConfigurationProfileAssignmentsClient) NewListBySubscriptionPager(options *ConfigurationProfileAssignmentsClientListBySubscriptionOptions) *runtime.Pager[ConfigurationProfileAssignmentsClientListBySubscriptionResponse]
NewListBySubscriptionPager - Get list of configuration profile assignments under a given subscription
Generated from API version 2022-05-04
- options - ConfigurationProfileAssignmentsClientListBySubscriptionOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/listConfigurationProfileAssignmentsBySubscription.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewConfigurationProfileAssignmentsClient().NewListBySubscriptionPager(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.ConfigurationProfileAssignmentList = armautomanage.ConfigurationProfileAssignmentList{
// Value: []*armautomanage.ConfigurationProfileAssignment{
// {
// Name: to.Ptr("default"),
// Type: to.Ptr("Microsoft.Automanage/ConfigurationProfileAssignments"),
// ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName/providers/Microsoft.Automanage/configurationProfileAssignments/default"),
// Properties: &armautomanage.ConfigurationProfileAssignmentProperties{
// ConfigurationProfile: to.Ptr("/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesDevTest"),
// Status: to.Ptr("Compliant"),
// TargetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName"),
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// },
// {
// Name: to.Ptr("default"),
// Type: to.Ptr("Microsoft.Automanage/ConfigurationProfileAssignments"),
// ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.HybridCompute/machines/myArcMachineName/providers/Microsoft.Automanage/configurationProfileAssignments/default"),
// Properties: &armautomanage.ConfigurationProfileAssignmentProperties{
// ConfigurationProfile: to.Ptr("/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesProduction"),
// Status: to.Ptr("NotCompliant "),
// TargetID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.HybridCompute/machines/myArcMachineName"),
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }},
// }
}
}
func (*ConfigurationProfileAssignmentsClient) NewListByVirtualMachinesPager ¶
func (client *ConfigurationProfileAssignmentsClient) NewListByVirtualMachinesPager(resourceGroupName string, vmName string, options *ConfigurationProfileAssignmentsClientListByVirtualMachinesOptions) *runtime.Pager[ConfigurationProfileAssignmentsClientListByVirtualMachinesResponse]
NewListByVirtualMachinesPager - Get list of configuration profile assignments
Generated from API version 2022-05-04
- resourceGroupName - The name of the resource group. The name is case insensitive.
- vmName - The name of the virtual machine.
- options - ConfigurationProfileAssignmentsClientListByVirtualMachinesOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.NewListByVirtualMachinesPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/listConfigurationProfileAssignmentsByVirtualMachines.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewConfigurationProfileAssignmentsClient().NewListByVirtualMachinesPager("myResourceGroupName", "myVMName", 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.ConfigurationProfileAssignmentList = armautomanage.ConfigurationProfileAssignmentList{
// Value: []*armautomanage.ConfigurationProfileAssignment{
// {
// Name: to.Ptr("default"),
// Type: to.Ptr("Microsoft.Automanage/ConfigurationProfileAssignments"),
// ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName/providers/Microsoft.Automanage/configurationProfileAssignments/default"),
// Properties: &armautomanage.ConfigurationProfileAssignmentProperties{
// ConfigurationProfile: to.Ptr("/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesDevTest"),
// Status: to.Ptr("Compliant"),
// TargetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName"),
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// },
// {
// Name: to.Ptr("default"),
// Type: to.Ptr("Microsoft.Automanage/ConfigurationProfileAssignments"),
// ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.HybridCompute/machines/myArcMachineName/providers/Microsoft.Automanage/configurationProfileAssignments/default"),
// Properties: &armautomanage.ConfigurationProfileAssignmentProperties{
// ConfigurationProfile: to.Ptr("/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesProduction"),
// Status: to.Ptr("NotCompliant "),
// TargetID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.HybridCompute/machines/myArcMachineName"),
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }},
// }
}
}
func (*ConfigurationProfileAssignmentsClient) NewListPager ¶
func (client *ConfigurationProfileAssignmentsClient) NewListPager(resourceGroupName string, options *ConfigurationProfileAssignmentsClientListOptions) *runtime.Pager[ConfigurationProfileAssignmentsClientListResponse]
NewListPager - Get list of configuration profile assignments
Generated from API version 2022-05-04
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - ConfigurationProfileAssignmentsClientListOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/listConfigurationProfileAssignmentsByResourceGroup.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewConfigurationProfileAssignmentsClient().NewListPager("myResourceGroupName", 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.ConfigurationProfileAssignmentList = armautomanage.ConfigurationProfileAssignmentList{
// Value: []*armautomanage.ConfigurationProfileAssignment{
// {
// Name: to.Ptr("default"),
// Type: to.Ptr("Microsoft.Automanage/ConfigurationProfileAssignments"),
// ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName/providers/Microsoft.Automanage/configurationProfileAssignments/default"),
// Properties: &armautomanage.ConfigurationProfileAssignmentProperties{
// ConfigurationProfile: to.Ptr("/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesDevTest"),
// Status: to.Ptr("Compliant"),
// TargetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName"),
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// },
// {
// Name: to.Ptr("default"),
// Type: to.Ptr("Microsoft.Automanage/ConfigurationProfileAssignments"),
// ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.HybridCompute/machines/myArcMachineName/providers/Microsoft.Automanage/configurationProfileAssignments/default"),
// Properties: &armautomanage.ConfigurationProfileAssignmentProperties{
// ConfigurationProfile: to.Ptr("/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesProduction"),
// Status: to.Ptr("NotCompliant "),
// TargetID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.HybridCompute/machines/myArcMachineName"),
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }},
// }
}
}
type ConfigurationProfileAssignmentsClientCreateOrUpdateOptions ¶
type ConfigurationProfileAssignmentsClientCreateOrUpdateOptions struct {
}
ConfigurationProfileAssignmentsClientCreateOrUpdateOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.CreateOrUpdate method.
type ConfigurationProfileAssignmentsClientCreateOrUpdateResponse ¶
type ConfigurationProfileAssignmentsClientCreateOrUpdateResponse struct {
// Configuration profile assignment is an association between a VM and automanage profile configuration.
ConfigurationProfileAssignment
}
ConfigurationProfileAssignmentsClientCreateOrUpdateResponse contains the response from method ConfigurationProfileAssignmentsClient.CreateOrUpdate.
type ConfigurationProfileAssignmentsClientDeleteOptions ¶
type ConfigurationProfileAssignmentsClientDeleteOptions struct {
}
ConfigurationProfileAssignmentsClientDeleteOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.Delete method.
type ConfigurationProfileAssignmentsClientDeleteResponse ¶
type ConfigurationProfileAssignmentsClientDeleteResponse struct {
}
ConfigurationProfileAssignmentsClientDeleteResponse contains the response from method ConfigurationProfileAssignmentsClient.Delete.
type ConfigurationProfileAssignmentsClientGetOptions ¶
type ConfigurationProfileAssignmentsClientGetOptions struct {
}
ConfigurationProfileAssignmentsClientGetOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.Get method.
type ConfigurationProfileAssignmentsClientGetResponse ¶
type ConfigurationProfileAssignmentsClientGetResponse struct {
// Configuration profile assignment is an association between a VM and automanage profile configuration.
ConfigurationProfileAssignment
}
ConfigurationProfileAssignmentsClientGetResponse contains the response from method ConfigurationProfileAssignmentsClient.Get.
type ConfigurationProfileAssignmentsClientListByClusterNameOptions ¶
type ConfigurationProfileAssignmentsClientListByClusterNameOptions struct {
}
ConfigurationProfileAssignmentsClientListByClusterNameOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.NewListByClusterNamePager method.
type ConfigurationProfileAssignmentsClientListByClusterNameResponse ¶
type ConfigurationProfileAssignmentsClientListByClusterNameResponse struct {
// The response of the list configuration profile assignment operation.
ConfigurationProfileAssignmentList
}
ConfigurationProfileAssignmentsClientListByClusterNameResponse contains the response from method ConfigurationProfileAssignmentsClient.NewListByClusterNamePager.
type ConfigurationProfileAssignmentsClientListByMachineNameOptions ¶
type ConfigurationProfileAssignmentsClientListByMachineNameOptions struct {
}
ConfigurationProfileAssignmentsClientListByMachineNameOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.NewListByMachineNamePager method.
type ConfigurationProfileAssignmentsClientListByMachineNameResponse ¶
type ConfigurationProfileAssignmentsClientListByMachineNameResponse struct {
// The response of the list configuration profile assignment operation.
ConfigurationProfileAssignmentList
}
ConfigurationProfileAssignmentsClientListByMachineNameResponse contains the response from method ConfigurationProfileAssignmentsClient.NewListByMachineNamePager.
type ConfigurationProfileAssignmentsClientListBySubscriptionOptions ¶
type ConfigurationProfileAssignmentsClientListBySubscriptionOptions struct {
}
ConfigurationProfileAssignmentsClientListBySubscriptionOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.NewListBySubscriptionPager method.
type ConfigurationProfileAssignmentsClientListBySubscriptionResponse ¶
type ConfigurationProfileAssignmentsClientListBySubscriptionResponse struct {
// The response of the list configuration profile assignment operation.
ConfigurationProfileAssignmentList
}
ConfigurationProfileAssignmentsClientListBySubscriptionResponse contains the response from method ConfigurationProfileAssignmentsClient.NewListBySubscriptionPager.
type ConfigurationProfileAssignmentsClientListByVirtualMachinesOptions ¶
type ConfigurationProfileAssignmentsClientListByVirtualMachinesOptions struct {
}
ConfigurationProfileAssignmentsClientListByVirtualMachinesOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.NewListByVirtualMachinesPager method.
type ConfigurationProfileAssignmentsClientListByVirtualMachinesResponse ¶
type ConfigurationProfileAssignmentsClientListByVirtualMachinesResponse struct {
// The response of the list configuration profile assignment operation.
ConfigurationProfileAssignmentList
}
ConfigurationProfileAssignmentsClientListByVirtualMachinesResponse contains the response from method ConfigurationProfileAssignmentsClient.NewListByVirtualMachinesPager.
type ConfigurationProfileAssignmentsClientListOptions ¶
type ConfigurationProfileAssignmentsClientListOptions struct {
}
ConfigurationProfileAssignmentsClientListOptions contains the optional parameters for the ConfigurationProfileAssignmentsClient.NewListPager method.
type ConfigurationProfileAssignmentsClientListResponse ¶
type ConfigurationProfileAssignmentsClientListResponse struct {
// The response of the list configuration profile assignment operation.
ConfigurationProfileAssignmentList
}
ConfigurationProfileAssignmentsClientListResponse contains the response from method ConfigurationProfileAssignmentsClient.NewListPager.
type ConfigurationProfileHCIAssignmentsClient ¶
type ConfigurationProfileHCIAssignmentsClient struct {
// contains filtered or unexported fields
}
ConfigurationProfileHCIAssignmentsClient contains the methods for the ConfigurationProfileHCIAssignments group. Don't use this type directly, use NewConfigurationProfileHCIAssignmentsClient() instead.
func NewConfigurationProfileHCIAssignmentsClient ¶
func NewConfigurationProfileHCIAssignmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigurationProfileHCIAssignmentsClient, error)
NewConfigurationProfileHCIAssignmentsClient creates a new instance of ConfigurationProfileHCIAssignmentsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ConfigurationProfileHCIAssignmentsClient) CreateOrUpdate ¶
func (client *ConfigurationProfileHCIAssignmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, configurationProfileAssignmentName string, parameters ConfigurationProfileAssignment, options *ConfigurationProfileHCIAssignmentsClientCreateOrUpdateOptions) (ConfigurationProfileHCIAssignmentsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates an association between a AzureStackHCI cluster and Automanage configuration profile If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-04
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the Arc machine.
- configurationProfileAssignmentName - Name of the configuration profile assignment. Only default is supported.
- parameters - Parameters supplied to the create or update configuration profile assignment.
- options - ConfigurationProfileHCIAssignmentsClientCreateOrUpdateOptions contains the optional parameters for the ConfigurationProfileHCIAssignmentsClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/createOrUpdateConfigurationProfileHCIAssignment.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/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewConfigurationProfileHCIAssignmentsClient().CreateOrUpdate(ctx, "myResourceGroupName", "myClusterName", "default", armautomanage.ConfigurationProfileAssignment{
Properties: &armautomanage.ConfigurationProfileAssignmentProperties{
ConfigurationProfile: to.Ptr("/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesProduction"),
},
}, 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.ConfigurationProfileAssignment = armautomanage.ConfigurationProfileAssignment{
// Name: to.Ptr("default"),
// ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.AzureStackHci/clusters/myClusterName/providers/Microsoft.Automanage/AutomanageAssignments/default"),
// Properties: &armautomanage.ConfigurationProfileAssignmentProperties{
// ConfigurationProfile: to.Ptr("/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesProduction"),
// TargetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.AzureStackHci/clusters/myClusterName"),
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }
}
func (*ConfigurationProfileHCIAssignmentsClient) Delete ¶
func (client *ConfigurationProfileHCIAssignmentsClient) Delete(ctx context.Context, resourceGroupName string, clusterName string, configurationProfileAssignmentName string, options *ConfigurationProfileHCIAssignmentsClientDeleteOptions) (ConfigurationProfileHCIAssignmentsClientDeleteResponse, error)
Delete - Delete a configuration profile assignment If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-04
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the Arc machine.
- configurationProfileAssignmentName - Name of the configuration profile assignment
- options - ConfigurationProfileHCIAssignmentsClientDeleteOptions contains the optional parameters for the ConfigurationProfileHCIAssignmentsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/deleteConfigurationProfileHCIAssignment.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewConfigurationProfileHCIAssignmentsClient().Delete(ctx, "myResourceGroupName", "myClusterName", "default", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
}
func (*ConfigurationProfileHCIAssignmentsClient) Get ¶
func (client *ConfigurationProfileHCIAssignmentsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, configurationProfileAssignmentName string, options *ConfigurationProfileHCIAssignmentsClientGetOptions) (ConfigurationProfileHCIAssignmentsClientGetResponse, error)
Get - Get information about a configuration profile assignment If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-04
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the Arc machine.
- configurationProfileAssignmentName - The configuration profile assignment name.
- options - ConfigurationProfileHCIAssignmentsClientGetOptions contains the optional parameters for the ConfigurationProfileHCIAssignmentsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/getConfigurationProfileHCIAssignment.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewConfigurationProfileHCIAssignmentsClient().Get(ctx, "myResourceGroupName", "myClusterName", "default", 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.ConfigurationProfileAssignment = armautomanage.ConfigurationProfileAssignment{
// Name: to.Ptr("default"),
// Type: to.Ptr("Microsoft.Automanage/ConfigurationProfileAssignments"),
// ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/Microsoft.AzureStackHci/clusters/machines/myClusterName/providers/Microsoft.Automanage/configurationProfileAssignments/default"),
// Properties: &armautomanage.ConfigurationProfileAssignmentProperties{
// ConfigurationProfile: to.Ptr("/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesDevTest"),
// Status: to.Ptr("Compliant"),
// TargetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/Microsoft.AzureStackHci/clusters/machines/myClusterName"),
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }
}
type ConfigurationProfileHCIAssignmentsClientCreateOrUpdateOptions ¶
type ConfigurationProfileHCIAssignmentsClientCreateOrUpdateOptions struct {
}
ConfigurationProfileHCIAssignmentsClientCreateOrUpdateOptions contains the optional parameters for the ConfigurationProfileHCIAssignmentsClient.CreateOrUpdate method.
type ConfigurationProfileHCIAssignmentsClientCreateOrUpdateResponse ¶
type ConfigurationProfileHCIAssignmentsClientCreateOrUpdateResponse struct {
// Configuration profile assignment is an association between a VM and automanage profile configuration.
ConfigurationProfileAssignment
}
ConfigurationProfileHCIAssignmentsClientCreateOrUpdateResponse contains the response from method ConfigurationProfileHCIAssignmentsClient.CreateOrUpdate.
type ConfigurationProfileHCIAssignmentsClientDeleteOptions ¶
type ConfigurationProfileHCIAssignmentsClientDeleteOptions struct {
}
ConfigurationProfileHCIAssignmentsClientDeleteOptions contains the optional parameters for the ConfigurationProfileHCIAssignmentsClient.Delete method.
type ConfigurationProfileHCIAssignmentsClientDeleteResponse ¶
type ConfigurationProfileHCIAssignmentsClientDeleteResponse struct {
}
ConfigurationProfileHCIAssignmentsClientDeleteResponse contains the response from method ConfigurationProfileHCIAssignmentsClient.Delete.
type ConfigurationProfileHCIAssignmentsClientGetOptions ¶
type ConfigurationProfileHCIAssignmentsClientGetOptions struct {
}
ConfigurationProfileHCIAssignmentsClientGetOptions contains the optional parameters for the ConfigurationProfileHCIAssignmentsClient.Get method.
type ConfigurationProfileHCIAssignmentsClientGetResponse ¶
type ConfigurationProfileHCIAssignmentsClientGetResponse struct {
// Configuration profile assignment is an association between a VM and automanage profile configuration.
ConfigurationProfileAssignment
}
ConfigurationProfileHCIAssignmentsClientGetResponse contains the response from method ConfigurationProfileHCIAssignmentsClient.Get.
type ConfigurationProfileHCRPAssignmentsClient ¶
type ConfigurationProfileHCRPAssignmentsClient struct {
// contains filtered or unexported fields
}
ConfigurationProfileHCRPAssignmentsClient contains the methods for the ConfigurationProfileHCRPAssignments group. Don't use this type directly, use NewConfigurationProfileHCRPAssignmentsClient() instead.
func NewConfigurationProfileHCRPAssignmentsClient ¶
func NewConfigurationProfileHCRPAssignmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigurationProfileHCRPAssignmentsClient, error)
NewConfigurationProfileHCRPAssignmentsClient creates a new instance of ConfigurationProfileHCRPAssignmentsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ConfigurationProfileHCRPAssignmentsClient) CreateOrUpdate ¶
func (client *ConfigurationProfileHCRPAssignmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, machineName string, configurationProfileAssignmentName string, parameters ConfigurationProfileAssignment, options *ConfigurationProfileHCRPAssignmentsClientCreateOrUpdateOptions) (ConfigurationProfileHCRPAssignmentsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates an association between a ARC machine and Automanage configuration profile If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-04
- resourceGroupName - The name of the resource group. The name is case insensitive.
- machineName - The name of the Arc machine.
- configurationProfileAssignmentName - Name of the configuration profile assignment. Only default is supported.
- parameters - Parameters supplied to the create or update configuration profile assignment.
- options - ConfigurationProfileHCRPAssignmentsClientCreateOrUpdateOptions contains the optional parameters for the ConfigurationProfileHCRPAssignmentsClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/createOrUpdateConfigurationProfileHCRPAssignment.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/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewConfigurationProfileHCRPAssignmentsClient().CreateOrUpdate(ctx, "myResourceGroupName", "myMachineName", "default", armautomanage.ConfigurationProfileAssignment{
Properties: &armautomanage.ConfigurationProfileAssignmentProperties{
ConfigurationProfile: to.Ptr("/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesProduction"),
},
}, 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.ConfigurationProfileAssignment = armautomanage.ConfigurationProfileAssignment{
// Name: to.Ptr("default"),
// ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.HybridCompute/machines/myMachineName/providers/Microsoft.Automanage/AutomanageAssignments/default"),
// Properties: &armautomanage.ConfigurationProfileAssignmentProperties{
// ConfigurationProfile: to.Ptr("/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesProduction"),
// TargetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.HybridCompute/machines/myMachineName"),
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }
}
func (*ConfigurationProfileHCRPAssignmentsClient) Delete ¶
func (client *ConfigurationProfileHCRPAssignmentsClient) Delete(ctx context.Context, resourceGroupName string, machineName string, configurationProfileAssignmentName string, options *ConfigurationProfileHCRPAssignmentsClientDeleteOptions) (ConfigurationProfileHCRPAssignmentsClientDeleteResponse, error)
Delete - Delete a configuration profile assignment If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-04
- resourceGroupName - The name of the resource group. The name is case insensitive.
- machineName - The name of the Arc machine.
- configurationProfileAssignmentName - Name of the configuration profile assignment
- options - ConfigurationProfileHCRPAssignmentsClientDeleteOptions contains the optional parameters for the ConfigurationProfileHCRPAssignmentsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/deleteConfigurationProfileHCRPAssignment.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewConfigurationProfileHCRPAssignmentsClient().Delete(ctx, "myResourceGroupName", "myMachineName", "default", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
}
func (*ConfigurationProfileHCRPAssignmentsClient) Get ¶
func (client *ConfigurationProfileHCRPAssignmentsClient) Get(ctx context.Context, resourceGroupName string, machineName string, configurationProfileAssignmentName string, options *ConfigurationProfileHCRPAssignmentsClientGetOptions) (ConfigurationProfileHCRPAssignmentsClientGetResponse, error)
Get - Get information about a configuration profile assignment If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-04
- resourceGroupName - The name of the resource group. The name is case insensitive.
- machineName - The name of the Arc machine.
- configurationProfileAssignmentName - The configuration profile assignment name.
- options - ConfigurationProfileHCRPAssignmentsClientGetOptions contains the optional parameters for the ConfigurationProfileHCRPAssignmentsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/getConfigurationProfileHCRPAssignment.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewConfigurationProfileHCRPAssignmentsClient().Get(ctx, "myResourceGroupName", "myMachineName", "default", 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.ConfigurationProfileAssignment = armautomanage.ConfigurationProfileAssignment{
// Name: to.Ptr("default"),
// Type: to.Ptr("Microsoft.Automanage/ConfigurationProfileAssignments"),
// ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.HybridCompute/machines/myMachineName/providers/Microsoft.Automanage/configurationProfileAssignments/default"),
// Properties: &armautomanage.ConfigurationProfileAssignmentProperties{
// ConfigurationProfile: to.Ptr("/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesDevTest"),
// Status: to.Ptr("Compliant"),
// TargetID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.HybridCompute/machines/myMachineName"),
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }
}
type ConfigurationProfileHCRPAssignmentsClientCreateOrUpdateOptions ¶
type ConfigurationProfileHCRPAssignmentsClientCreateOrUpdateOptions struct {
}
ConfigurationProfileHCRPAssignmentsClientCreateOrUpdateOptions contains the optional parameters for the ConfigurationProfileHCRPAssignmentsClient.CreateOrUpdate method.
type ConfigurationProfileHCRPAssignmentsClientCreateOrUpdateResponse ¶
type ConfigurationProfileHCRPAssignmentsClientCreateOrUpdateResponse struct {
// Configuration profile assignment is an association between a VM and automanage profile configuration.
ConfigurationProfileAssignment
}
ConfigurationProfileHCRPAssignmentsClientCreateOrUpdateResponse contains the response from method ConfigurationProfileHCRPAssignmentsClient.CreateOrUpdate.
type ConfigurationProfileHCRPAssignmentsClientDeleteOptions ¶
type ConfigurationProfileHCRPAssignmentsClientDeleteOptions struct {
}
ConfigurationProfileHCRPAssignmentsClientDeleteOptions contains the optional parameters for the ConfigurationProfileHCRPAssignmentsClient.Delete method.
type ConfigurationProfileHCRPAssignmentsClientDeleteResponse ¶
type ConfigurationProfileHCRPAssignmentsClientDeleteResponse struct {
}
ConfigurationProfileHCRPAssignmentsClientDeleteResponse contains the response from method ConfigurationProfileHCRPAssignmentsClient.Delete.
type ConfigurationProfileHCRPAssignmentsClientGetOptions ¶
type ConfigurationProfileHCRPAssignmentsClientGetOptions struct {
}
ConfigurationProfileHCRPAssignmentsClientGetOptions contains the optional parameters for the ConfigurationProfileHCRPAssignmentsClient.Get method.
type ConfigurationProfileHCRPAssignmentsClientGetResponse ¶
type ConfigurationProfileHCRPAssignmentsClientGetResponse struct {
// Configuration profile assignment is an association between a VM and automanage profile configuration.
ConfigurationProfileAssignment
}
ConfigurationProfileHCRPAssignmentsClientGetResponse contains the response from method ConfigurationProfileHCRPAssignmentsClient.Get.
type ConfigurationProfileList ¶
type ConfigurationProfileList struct {
// Result of the list ConfigurationProfile operation.
Value []*ConfigurationProfile
}
ConfigurationProfileList - The response of the list configuration profile operation.
func (ConfigurationProfileList) MarshalJSON ¶
func (c ConfigurationProfileList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConfigurationProfileList.
func (*ConfigurationProfileList) UnmarshalJSON ¶
func (c *ConfigurationProfileList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationProfileList.
type ConfigurationProfileProperties ¶
type ConfigurationProfileProperties struct {
// configuration dictionary of the configuration profile.
Configuration any
}
ConfigurationProfileProperties - Automanage configuration profile properties.
func (ConfigurationProfileProperties) MarshalJSON ¶
func (c ConfigurationProfileProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConfigurationProfileProperties.
func (*ConfigurationProfileProperties) UnmarshalJSON ¶
func (c *ConfigurationProfileProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationProfileProperties.
type ConfigurationProfileUpdate ¶
type ConfigurationProfileUpdate struct {
// Properties of the configuration profile.
Properties *ConfigurationProfileProperties
// The tags of the resource.
Tags map[string]*string
}
ConfigurationProfileUpdate - Definition of the configuration profile.
func (ConfigurationProfileUpdate) MarshalJSON ¶
func (c ConfigurationProfileUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConfigurationProfileUpdate.
func (*ConfigurationProfileUpdate) UnmarshalJSON ¶
func (c *ConfigurationProfileUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationProfileUpdate.
type ConfigurationProfilesClient ¶
type ConfigurationProfilesClient struct {
// contains filtered or unexported fields
}
ConfigurationProfilesClient contains the methods for the ConfigurationProfiles group. Don't use this type directly, use NewConfigurationProfilesClient() instead.
func NewConfigurationProfilesClient ¶
func NewConfigurationProfilesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigurationProfilesClient, error)
NewConfigurationProfilesClient creates a new instance of ConfigurationProfilesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ConfigurationProfilesClient) CreateOrUpdate ¶
func (client *ConfigurationProfilesClient) CreateOrUpdate(ctx context.Context, configurationProfileName string, resourceGroupName string, parameters ConfigurationProfile, options *ConfigurationProfilesClientCreateOrUpdateOptions) (ConfigurationProfilesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates a configuration profile If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-04
- configurationProfileName - Name of the configuration profile.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- parameters - Parameters supplied to create or update configuration profile.
- options - ConfigurationProfilesClientCreateOrUpdateOptions contains the optional parameters for the ConfigurationProfilesClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/createOrUpdateConfigurationProfile.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/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewConfigurationProfilesClient().CreateOrUpdate(ctx, "customConfigurationProfile", "myResourceGroupName", armautomanage.ConfigurationProfile{
Location: to.Ptr("East US"),
Tags: map[string]*string{
"Organization": to.Ptr("Administration"),
},
Properties: &armautomanage.ConfigurationProfileProperties{
Configuration: map[string]any{
"Antimalware/Enable": false,
"AzureSecurityCenter/Enable": true,
"Backup/Enable": false,
"BootDiagnostics/Enable": true,
"ChangeTrackingAndInventory/Enable": true,
"GuestConfiguration/Enable": true,
"LogAnalytics/Enable": true,
"UpdateManagement/Enable": true,
"VMInsights/Enable": true,
},
},
}, 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.ConfigurationProfile = armautomanage.ConfigurationProfile{
// Name: to.Ptr("customConfigurationProfile"),
// Type: to.Ptr("Microsoft.Automanage/configurationProfiles"),
// ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Automanage/configurationProfiles/customConfigurationProfile"),
// Location: to.Ptr("East US"),
// Tags: map[string]*string{
// "Organization": to.Ptr("Administration"),
// },
// Properties: &armautomanage.ConfigurationProfileProperties{
// Configuration: map[string]any{
// "Antimalware/Enable": false,
// "AzureSecurityCenter/Enable": true,
// "Backup/Enable": false,
// "BootDiagnostics/Enable": true,
// "ChangeTrackingAndInventory/Enable": true,
// "GuestConfiguration/Enable": true,
// "LogAnalytics/Enable": true,
// "UpdateManagement/Enable": true,
// "VMInsights/Enable": true,
// },
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }
}
func (*ConfigurationProfilesClient) Delete ¶
func (client *ConfigurationProfilesClient) Delete(ctx context.Context, resourceGroupName string, configurationProfileName string, options *ConfigurationProfilesClientDeleteOptions) (ConfigurationProfilesClientDeleteResponse, error)
Delete - Delete a configuration profile If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-04
- resourceGroupName - The name of the resource group. The name is case insensitive.
- configurationProfileName - Name of the configuration profile
- options - ConfigurationProfilesClientDeleteOptions contains the optional parameters for the ConfigurationProfilesClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/deleteConfigurationProfile.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewConfigurationProfilesClient().Delete(ctx, "rg", "customConfigurationProfile", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
}
func (*ConfigurationProfilesClient) Get ¶
func (client *ConfigurationProfilesClient) Get(ctx context.Context, configurationProfileName string, resourceGroupName string, options *ConfigurationProfilesClientGetOptions) (ConfigurationProfilesClientGetResponse, error)
Get - Get information about a configuration profile If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-04
- configurationProfileName - The configuration profile name.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - ConfigurationProfilesClientGetOptions contains the optional parameters for the ConfigurationProfilesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/getConfigurationProfile.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewConfigurationProfilesClient().Get(ctx, "customConfigurationProfile", "myResourceGroupName", 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.ConfigurationProfile = armautomanage.ConfigurationProfile{
// Name: to.Ptr("customConfigurationProfile"),
// Type: to.Ptr("Microsoft.Automanage/ConfigurationProfiles"),
// ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Automanage/configurationProfiles/customConfigurationProfile"),
// Location: to.Ptr("East US"),
// Tags: map[string]*string{
// "Organization": to.Ptr("Administration"),
// },
// Properties: &armautomanage.ConfigurationProfileProperties{
// Configuration: map[string]any{
// "Antimalware/Enable": false,
// "AzureSecurityCenter/Enable": true,
// "Backup/Enable": false,
// "BootDiagnostics/Enable": true,
// "ChangeTrackingAndInventory/Enable": true,
// "GuestConfiguration/Enable": true,
// "LogAnalytics/Enable": true,
// "UpdateManagement/Enable": true,
// "VMInsights/Enable": true,
// },
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }
}
func (*ConfigurationProfilesClient) NewListByResourceGroupPager ¶
func (client *ConfigurationProfilesClient) NewListByResourceGroupPager(resourceGroupName string, options *ConfigurationProfilesClientListByResourceGroupOptions) *runtime.Pager[ConfigurationProfilesClientListByResourceGroupResponse]
NewListByResourceGroupPager - Retrieve a list of configuration profile within a given resource group
Generated from API version 2022-05-04
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - ConfigurationProfilesClientListByResourceGroupOptions contains the optional parameters for the ConfigurationProfilesClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/listConfigurationProfilesByResourceGroup.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewConfigurationProfilesClient().NewListByResourceGroupPager("myResourceGroupName", 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.ConfigurationProfileList = armautomanage.ConfigurationProfileList{
// Value: []*armautomanage.ConfigurationProfile{
// {
// Name: to.Ptr("customConfigurationProfile"),
// Type: to.Ptr("Microsoft.Automanage/ConfigurationProfiles"),
// ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Automanage/configurationProfiles/customConfigurationProfile"),
// Location: to.Ptr("East US"),
// Tags: map[string]*string{
// "Organization": to.Ptr("Administration"),
// },
// Properties: &armautomanage.ConfigurationProfileProperties{
// Configuration: map[string]any{
// "Antimalware/Enable": false,
// "AzureSecurityCenter/Enable": true,
// "Backup/Enable": false,
// "BootDiagnostics/Enable": true,
// "ChangeTrackingAndInventory/Enable": true,
// "GuestConfiguration/Enable": true,
// "LogAnalytics/Enable": true,
// "UpdateManagement/Enable": true,
// "VMInsights/Enable": true,
// },
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// },
// {
// Name: to.Ptr("customConfigurationProfile2"),
// Type: to.Ptr("Microsoft.Automanage/ConfigurationProfiles"),
// ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Automanage/configurationProfiles/customConfigurationProfile2"),
// Location: to.Ptr("East US"),
// Tags: map[string]*string{
// "Organization": to.Ptr("Administration"),
// },
// Properties: &armautomanage.ConfigurationProfileProperties{
// Configuration: map[string]any{
// "Antimalware/Enable": false,
// "AzureSecurityCenter/Enable": true,
// "Backup/Enable": false,
// "BootDiagnostics/Enable": true,
// "ChangeTrackingAndInventory/Enable": true,
// "GuestConfiguration/Enable": true,
// "LogAnalytics/Enable": true,
// "UpdateManagement/Enable": true,
// "VMInsights/Enable": true,
// },
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }},
// }
}
}
func (*ConfigurationProfilesClient) NewListBySubscriptionPager ¶
func (client *ConfigurationProfilesClient) NewListBySubscriptionPager(options *ConfigurationProfilesClientListBySubscriptionOptions) *runtime.Pager[ConfigurationProfilesClientListBySubscriptionResponse]
NewListBySubscriptionPager - Retrieve a list of configuration profile within a subscription
Generated from API version 2022-05-04
- options - ConfigurationProfilesClientListBySubscriptionOptions contains the optional parameters for the ConfigurationProfilesClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/listConfigurationProfilesBySubscription.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewConfigurationProfilesClient().NewListBySubscriptionPager(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.ConfigurationProfileList = armautomanage.ConfigurationProfileList{
// Value: []*armautomanage.ConfigurationProfile{
// {
// Name: to.Ptr("customConfigurationProfile"),
// Type: to.Ptr("Microsoft.Automanage/ConfigurationProfiles"),
// ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Automanage/configurationProfiles/customConfigurationProfile"),
// Location: to.Ptr("East US"),
// Tags: map[string]*string{
// "Organization": to.Ptr("Administration"),
// },
// Properties: &armautomanage.ConfigurationProfileProperties{
// Configuration: map[string]any{
// "Antimalware/Enable": false,
// "AzureSecurityCenter/Enable": true,
// "Backup/Enable": false,
// "BootDiagnostics/Enable": true,
// "ChangeTrackingAndInventory/Enable": true,
// "GuestConfiguration/Enable": true,
// "LogAnalytics/Enable": true,
// "UpdateManagement/Enable": true,
// "VMInsights/Enable": true,
// },
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// },
// {
// Name: to.Ptr("customConfigurationProfile2"),
// Type: to.Ptr("Microsoft.Automanage/ConfigurationProfiles"),
// ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Automanage/configurationProfiles/customConfigurationProfile2"),
// Location: to.Ptr("East US"),
// Tags: map[string]*string{
// "Organization": to.Ptr("Administration"),
// },
// Properties: &armautomanage.ConfigurationProfileProperties{
// Configuration: map[string]any{
// "Antimalware/Enable": false,
// "AzureSecurityCenter/Enable": true,
// "Backup/Enable": false,
// "BootDiagnostics/Enable": true,
// "ChangeTrackingAndInventory/Enable": true,
// "GuestConfiguration/Enable": true,
// "LogAnalytics/Enable": true,
// "UpdateManagement/Enable": true,
// "VMInsights/Enable": true,
// },
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }},
// }
}
}
func (*ConfigurationProfilesClient) Update ¶
func (client *ConfigurationProfilesClient) Update(ctx context.Context, configurationProfileName string, resourceGroupName string, parameters ConfigurationProfileUpdate, options *ConfigurationProfilesClientUpdateOptions) (ConfigurationProfilesClientUpdateResponse, error)
Update - Updates a configuration profile If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-04
- configurationProfileName - Name of the configuration profile.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- parameters - Parameters supplied to update configuration profile.
- options - ConfigurationProfilesClientUpdateOptions contains the optional parameters for the ConfigurationProfilesClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/updateConfigurationProfile.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/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewConfigurationProfilesClient().Update(ctx, "customConfigurationProfile", "myResourceGroupName", armautomanage.ConfigurationProfileUpdate{
Tags: map[string]*string{
"Organization": to.Ptr("Administration"),
},
Properties: &armautomanage.ConfigurationProfileProperties{
Configuration: map[string]any{
"Antimalware/Enable": false,
"AzureSecurityCenter/Enable": true,
"Backup/Enable": false,
"BootDiagnostics/Enable": true,
"ChangeTrackingAndInventory/Enable": true,
"GuestConfiguration/Enable": true,
"LogAnalytics/Enable": true,
"UpdateManagement/Enable": true,
"VMInsights/Enable": true,
},
},
}, 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.ConfigurationProfile = armautomanage.ConfigurationProfile{
// Name: to.Ptr("customConfigurationProfile"),
// Type: to.Ptr("Microsoft.Automanage/configurationProfiles"),
// ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Automanage/configurationProfiles/customConfigurationProfile"),
// Location: to.Ptr("East US"),
// Tags: map[string]*string{
// "Organization": to.Ptr("Administration"),
// },
// Properties: &armautomanage.ConfigurationProfileProperties{
// Configuration: map[string]any{
// "Antimalware/Enable": false,
// "AzureSecurityCenter/Enable": true,
// "Backup/Enable": false,
// "BootDiagnostics/Enable": true,
// "ChangeTrackingAndInventory/Enable": true,
// "GuestConfiguration/Enable": true,
// "LogAnalytics/Enable": true,
// "UpdateManagement/Enable": true,
// "VMInsights/Enable": true,
// },
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }
}
type ConfigurationProfilesClientCreateOrUpdateOptions ¶
type ConfigurationProfilesClientCreateOrUpdateOptions struct {
}
ConfigurationProfilesClientCreateOrUpdateOptions contains the optional parameters for the ConfigurationProfilesClient.CreateOrUpdate method.
type ConfigurationProfilesClientCreateOrUpdateResponse ¶
type ConfigurationProfilesClientCreateOrUpdateResponse struct {
// Definition of the configuration profile.
ConfigurationProfile
}
ConfigurationProfilesClientCreateOrUpdateResponse contains the response from method ConfigurationProfilesClient.CreateOrUpdate.
type ConfigurationProfilesClientDeleteOptions ¶
type ConfigurationProfilesClientDeleteOptions struct {
}
ConfigurationProfilesClientDeleteOptions contains the optional parameters for the ConfigurationProfilesClient.Delete method.
type ConfigurationProfilesClientDeleteResponse ¶
type ConfigurationProfilesClientDeleteResponse struct {
}
ConfigurationProfilesClientDeleteResponse contains the response from method ConfigurationProfilesClient.Delete.
type ConfigurationProfilesClientGetOptions ¶
type ConfigurationProfilesClientGetOptions struct {
}
ConfigurationProfilesClientGetOptions contains the optional parameters for the ConfigurationProfilesClient.Get method.
type ConfigurationProfilesClientGetResponse ¶
type ConfigurationProfilesClientGetResponse struct {
// Definition of the configuration profile.
ConfigurationProfile
}
ConfigurationProfilesClientGetResponse contains the response from method ConfigurationProfilesClient.Get.
type ConfigurationProfilesClientListByResourceGroupOptions ¶
type ConfigurationProfilesClientListByResourceGroupOptions struct {
}
ConfigurationProfilesClientListByResourceGroupOptions contains the optional parameters for the ConfigurationProfilesClient.NewListByResourceGroupPager method.
type ConfigurationProfilesClientListByResourceGroupResponse ¶
type ConfigurationProfilesClientListByResourceGroupResponse struct {
// The response of the list configuration profile operation.
ConfigurationProfileList
}
ConfigurationProfilesClientListByResourceGroupResponse contains the response from method ConfigurationProfilesClient.NewListByResourceGroupPager.
type ConfigurationProfilesClientListBySubscriptionOptions ¶
type ConfigurationProfilesClientListBySubscriptionOptions struct {
}
ConfigurationProfilesClientListBySubscriptionOptions contains the optional parameters for the ConfigurationProfilesClient.NewListBySubscriptionPager method.
type ConfigurationProfilesClientListBySubscriptionResponse ¶
type ConfigurationProfilesClientListBySubscriptionResponse struct {
// The response of the list configuration profile operation.
ConfigurationProfileList
}
ConfigurationProfilesClientListBySubscriptionResponse contains the response from method ConfigurationProfilesClient.NewListBySubscriptionPager.
type ConfigurationProfilesClientUpdateOptions ¶
type ConfigurationProfilesClientUpdateOptions struct {
}
ConfigurationProfilesClientUpdateOptions contains the optional parameters for the ConfigurationProfilesClient.Update method.
type ConfigurationProfilesClientUpdateResponse ¶
type ConfigurationProfilesClientUpdateResponse struct {
// Definition of the configuration profile.
ConfigurationProfile
}
ConfigurationProfilesClientUpdateResponse contains the response from method ConfigurationProfilesClient.Update.
type ConfigurationProfilesVersionsClient ¶
type ConfigurationProfilesVersionsClient struct {
// contains filtered or unexported fields
}
ConfigurationProfilesVersionsClient contains the methods for the ConfigurationProfilesVersions group. Don't use this type directly, use NewConfigurationProfilesVersionsClient() instead.
func NewConfigurationProfilesVersionsClient ¶
func NewConfigurationProfilesVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigurationProfilesVersionsClient, error)
NewConfigurationProfilesVersionsClient creates a new instance of ConfigurationProfilesVersionsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ConfigurationProfilesVersionsClient) CreateOrUpdate ¶
func (client *ConfigurationProfilesVersionsClient) CreateOrUpdate(ctx context.Context, configurationProfileName string, versionName string, resourceGroupName string, parameters ConfigurationProfile, options *ConfigurationProfilesVersionsClientCreateOrUpdateOptions) (ConfigurationProfilesVersionsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates a configuration profile version If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-04
- configurationProfileName - Name of the configuration profile.
- versionName - The configuration profile version name.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- parameters - Parameters supplied to create or update configuration profile.
- options - ConfigurationProfilesVersionsClientCreateOrUpdateOptions contains the optional parameters for the ConfigurationProfilesVersionsClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/createOrUpdateConfigurationProfileVersion.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/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewConfigurationProfilesVersionsClient().CreateOrUpdate(ctx, "customConfigurationProfile", "version1", "myResourceGroupName", armautomanage.ConfigurationProfile{
Location: to.Ptr("East US"),
Tags: map[string]*string{
"Organization": to.Ptr("Administration"),
},
Properties: &armautomanage.ConfigurationProfileProperties{
Configuration: map[string]any{
"Antimalware/Enable": false,
"AzureSecurityCenter/Enable": true,
"Backup/Enable": false,
"BootDiagnostics/Enable": true,
"ChangeTrackingAndInventory/Enable": true,
"GuestConfiguration/Enable": true,
"LogAnalytics/Enable": true,
"UpdateManagement/Enable": true,
"VMInsights/Enable": true,
},
},
}, 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.ConfigurationProfile = armautomanage.ConfigurationProfile{
// Name: to.Ptr("customConfigurationProfile/version1"),
// Type: to.Ptr("Microsoft.Automanage/configurationProfiles/versions"),
// ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Automanage/configurationProfiles/customConfigurationProfile/versions/version1"),
// Location: to.Ptr("East US"),
// Tags: map[string]*string{
// "Organization": to.Ptr("Administration"),
// },
// Properties: &armautomanage.ConfigurationProfileProperties{
// Configuration: map[string]any{
// "Antimalware/Enable": false,
// "AzureSecurityCenter/Enable": true,
// "Backup/Enable": false,
// "BootDiagnostics/Enable": true,
// "ChangeTrackingAndInventory/Enable": true,
// "GuestConfiguration/Enable": true,
// "LogAnalytics/Enable": true,
// "UpdateManagement/Enable": true,
// "VMInsights/Enable": true,
// },
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }
}
func (*ConfigurationProfilesVersionsClient) Delete ¶
func (client *ConfigurationProfilesVersionsClient) Delete(ctx context.Context, resourceGroupName string, configurationProfileName string, versionName string, options *ConfigurationProfilesVersionsClientDeleteOptions) (ConfigurationProfilesVersionsClientDeleteResponse, error)
Delete - Delete a configuration profile version If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-04
- resourceGroupName - The name of the resource group. The name is case insensitive.
- configurationProfileName - Name of the configuration profile
- versionName - The configuration profile version name.
- options - ConfigurationProfilesVersionsClientDeleteOptions contains the optional parameters for the ConfigurationProfilesVersionsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/deleteConfigurationProfileVersion.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewConfigurationProfilesVersionsClient().Delete(ctx, "rg", "customConfigurationProfile", "version1", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
}
func (*ConfigurationProfilesVersionsClient) Get ¶
func (client *ConfigurationProfilesVersionsClient) Get(ctx context.Context, configurationProfileName string, versionName string, resourceGroupName string, options *ConfigurationProfilesVersionsClientGetOptions) (ConfigurationProfilesVersionsClientGetResponse, error)
Get - Get information about a configuration profile version If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-04
- configurationProfileName - The configuration profile name.
- versionName - The configuration profile version name.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - ConfigurationProfilesVersionsClientGetOptions contains the optional parameters for the ConfigurationProfilesVersionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/getConfigurationProfileVersion.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewConfigurationProfilesVersionsClient().Get(ctx, "customConfigurationProfile", "version1", "myResourceGroupName", 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.ConfigurationProfile = armautomanage.ConfigurationProfile{
// Name: to.Ptr("customConfigurationProfile/version1"),
// Type: to.Ptr("Microsoft.Automanage/ConfigurationProfiles/versions"),
// ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Automanage/configurationProfiles/customConfigurationProfile/versions/version1"),
// Location: to.Ptr("East US"),
// Tags: map[string]*string{
// "Organization": to.Ptr("Administration"),
// },
// Properties: &armautomanage.ConfigurationProfileProperties{
// Configuration: map[string]any{
// "Antimalware/Enable": false,
// "AzureSecurityCenter/Enable": true,
// "Backup/Enable": false,
// "BootDiagnostics/Enable": true,
// "ChangeTrackingAndInventory/Enable": true,
// "GuestConfiguration/Enable": true,
// "LogAnalytics/Enable": true,
// "UpdateManagement/Enable": true,
// "VMInsights/Enable": true,
// },
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }
}
func (*ConfigurationProfilesVersionsClient) NewListChildResourcesPager ¶
func (client *ConfigurationProfilesVersionsClient) NewListChildResourcesPager(configurationProfileName string, resourceGroupName string, options *ConfigurationProfilesVersionsClientListChildResourcesOptions) *runtime.Pager[ConfigurationProfilesVersionsClientListChildResourcesResponse]
NewListChildResourcesPager - Retrieve a list of configuration profile version for a configuration profile
Generated from API version 2022-05-04
- configurationProfileName - Name of the configuration profile.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - ConfigurationProfilesVersionsClientListChildResourcesOptions contains the optional parameters for the ConfigurationProfilesVersionsClient.NewListChildResourcesPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/listConfigurationProfileVersions.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewConfigurationProfilesVersionsClient().NewListChildResourcesPager("customConfigurationProfile", "myResourceGroupName", 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.ConfigurationProfileList = armautomanage.ConfigurationProfileList{
// Value: []*armautomanage.ConfigurationProfile{
// {
// Name: to.Ptr("customConfigurationProfile/version1"),
// Type: to.Ptr("Microsoft.Automanage/ConfigurationProfiles/versions"),
// ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Automanage/configurationProfiles/customConfigurationProfile/versions/versions1"),
// Location: to.Ptr("East US"),
// Tags: map[string]*string{
// "Organization": to.Ptr("Administration"),
// },
// Properties: &armautomanage.ConfigurationProfileProperties{
// Configuration: map[string]any{
// "Antimalware/Enable": false,
// "AzureSecurityCenter/Enable": true,
// "Backup/Enable": false,
// "BootDiagnostics/Enable": true,
// "ChangeTrackingAndInventory/Enable": true,
// "GuestConfiguration/Enable": true,
// "LogAnalytics/Enable": true,
// "UpdateManagement/Enable": true,
// "VMInsights/Enable": true,
// },
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// },
// {
// Name: to.Ptr("customConfigurationProfile/version2"),
// Type: to.Ptr("Microsoft.Automanage/ConfigurationProfiles/versions"),
// ID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Automanage/configurationProfiles/customConfigurationProfile/versions/version2"),
// Location: to.Ptr("East US"),
// Tags: map[string]*string{
// "Organization": to.Ptr("Administration"),
// },
// Properties: &armautomanage.ConfigurationProfileProperties{
// Configuration: map[string]any{
// "Antimalware/Enable": false,
// "AzureSecurityCenter/Enable": true,
// "Backup/Enable": false,
// "BootDiagnostics/Enable": true,
// "ChangeTrackingAndInventory/Enable": true,
// "GuestConfiguration/Enable": true,
// "LogAnalytics/Enable": true,
// "UpdateManagement/Enable": true,
// "VMInsights/Enable": true,
// },
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }},
// }
}
}
type ConfigurationProfilesVersionsClientCreateOrUpdateOptions ¶
type ConfigurationProfilesVersionsClientCreateOrUpdateOptions struct {
}
ConfigurationProfilesVersionsClientCreateOrUpdateOptions contains the optional parameters for the ConfigurationProfilesVersionsClient.CreateOrUpdate method.
type ConfigurationProfilesVersionsClientCreateOrUpdateResponse ¶
type ConfigurationProfilesVersionsClientCreateOrUpdateResponse struct {
// Definition of the configuration profile.
ConfigurationProfile
}
ConfigurationProfilesVersionsClientCreateOrUpdateResponse contains the response from method ConfigurationProfilesVersionsClient.CreateOrUpdate.
type ConfigurationProfilesVersionsClientDeleteOptions ¶
type ConfigurationProfilesVersionsClientDeleteOptions struct {
}
ConfigurationProfilesVersionsClientDeleteOptions contains the optional parameters for the ConfigurationProfilesVersionsClient.Delete method.
type ConfigurationProfilesVersionsClientDeleteResponse ¶
type ConfigurationProfilesVersionsClientDeleteResponse struct {
}
ConfigurationProfilesVersionsClientDeleteResponse contains the response from method ConfigurationProfilesVersionsClient.Delete.
type ConfigurationProfilesVersionsClientGetOptions ¶
type ConfigurationProfilesVersionsClientGetOptions struct {
}
ConfigurationProfilesVersionsClientGetOptions contains the optional parameters for the ConfigurationProfilesVersionsClient.Get method.
type ConfigurationProfilesVersionsClientGetResponse ¶
type ConfigurationProfilesVersionsClientGetResponse struct {
// Definition of the configuration profile.
ConfigurationProfile
}
ConfigurationProfilesVersionsClientGetResponse contains the response from method ConfigurationProfilesVersionsClient.Get.
type ConfigurationProfilesVersionsClientListChildResourcesOptions ¶
type ConfigurationProfilesVersionsClientListChildResourcesOptions struct {
}
ConfigurationProfilesVersionsClientListChildResourcesOptions contains the optional parameters for the ConfigurationProfilesVersionsClient.NewListChildResourcesPager method.
type ConfigurationProfilesVersionsClientListChildResourcesResponse ¶
type ConfigurationProfilesVersionsClientListChildResourcesResponse struct {
// The response of the list configuration profile operation.
ConfigurationProfileList
}
ConfigurationProfilesVersionsClientListChildResourcesResponse contains the response from method ConfigurationProfilesVersionsClient.NewListChildResourcesPager.
type CreatedByType ¶
type CreatedByType string
CreatedByType - The type of identity that created the resource.
const ( CreatedByTypeApplication CreatedByType = "Application" CreatedByTypeKey CreatedByType = "Key" CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" CreatedByTypeUser CreatedByType = "User" )
func PossibleCreatedByTypeValues ¶
func PossibleCreatedByTypeValues() []CreatedByType
PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
type ErrorAdditionalInfo ¶
type ErrorAdditionalInfo struct {
// READ-ONLY; The additional info.
Info any
// READ-ONLY; The additional info type.
Type *string
}
ErrorAdditionalInfo - The resource management error additional info.
func (ErrorAdditionalInfo) MarshalJSON ¶
func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.
func (*ErrorAdditionalInfo) UnmarshalJSON ¶
func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.
type ErrorDetail ¶
type ErrorDetail struct {
// READ-ONLY; The error additional info.
AdditionalInfo []*ErrorAdditionalInfo
// READ-ONLY; The error code.
Code *string
// READ-ONLY; The error details.
Details []*ErrorDetail
// READ-ONLY; The error message.
Message *string
// READ-ONLY; The error target.
Target *string
}
ErrorDetail - The error detail.
func (ErrorDetail) MarshalJSON ¶
func (e ErrorDetail) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorDetail.
func (*ErrorDetail) UnmarshalJSON ¶
func (e *ErrorDetail) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.
type ErrorResponse ¶
type ErrorResponse struct {
// The error object.
Error *ErrorDetail
}
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.).
func (ErrorResponse) MarshalJSON ¶
func (e ErrorResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorResponse.
func (*ErrorResponse) UnmarshalJSON ¶
func (e *ErrorResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.
type HCIReportsClient ¶
type HCIReportsClient struct {
// contains filtered or unexported fields
}
HCIReportsClient contains the methods for the HCIReports group. Don't use this type directly, use NewHCIReportsClient() instead.
func NewHCIReportsClient ¶
func NewHCIReportsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HCIReportsClient, error)
NewHCIReportsClient creates a new instance of HCIReportsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*HCIReportsClient) Get ¶
func (client *HCIReportsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, configurationProfileAssignmentName string, reportName string, options *HCIReportsClientGetOptions) (HCIReportsClientGetResponse, error)
Get - Get information about a report associated with a configuration profile assignment run If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-04
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the Arc machine.
- configurationProfileAssignmentName - The configuration profile assignment name.
- reportName - The report name.
- options - HCIReportsClientGetOptions contains the optional parameters for the HCIReportsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/getHCIReport.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewHCIReportsClient().Get(ctx, "myResourceGroupName", "myClusterName", "default", "b4e9ee6b-1717-4ff0-a8d2-e6d72c33d5f4", 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.Report = armautomanage.Report{
// Name: to.Ptr("b4e9ee6b-1717-4ff0-a8d2-e6d72c33d5f4"),
// Type: to.Ptr("Microsoft.Automanage/configurationProfileAssignments/reports"),
// ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.AzureStackHci/clusters/myClusterName/providers/Microsoft.Automanage/configurationProfileAssignments/default/reports/b4e9ee6b-1717-4ff0-a8d2-e6d72c33d5f4"),
// Properties: &armautomanage.AssignmentReportProperties{
// Type: to.Ptr("Consistency"),
// ConfigurationProfile: to.Ptr("anyConfigurationProfile"),
// Duration: to.Ptr("PT15M32S"),
// EndTime: to.Ptr("2021-03-31T22:17:42Z"),
// LastModifiedTime: to.Ptr("2021-03-31T22:32:42Z"),
// ReportFormatVersion: to.Ptr("1.0"),
// Resources: []*armautomanage.ReportResource{
// {
// Name: to.Ptr("myResourceGroupName"),
// Type: to.Ptr("Microsoft.Resources/resourceGroups"),
// ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName"),
// Status: to.Ptr("Conformant"),
// }},
// StartTime: to.Ptr("2021-03-31T22:13:06Z"),
// Status: to.Ptr("Conformant"),
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }
}
func (*HCIReportsClient) NewListByConfigurationProfileAssignmentsPager ¶
func (client *HCIReportsClient) NewListByConfigurationProfileAssignmentsPager(resourceGroupName string, clusterName string, configurationProfileAssignmentName string, options *HCIReportsClientListByConfigurationProfileAssignmentsOptions) *runtime.Pager[HCIReportsClientListByConfigurationProfileAssignmentsResponse]
NewListByConfigurationProfileAssignmentsPager - Retrieve a list of reports within a given configuration profile assignment
Generated from API version 2022-05-04
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the Arc machine.
- configurationProfileAssignmentName - The configuration profile assignment name.
- options - HCIReportsClientListByConfigurationProfileAssignmentsOptions contains the optional parameters for the HCIReportsClient.NewListByConfigurationProfileAssignmentsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/listReportsByconfigurationProfileHCIAssignment.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewHCIReportsClient().NewListByConfigurationProfileAssignmentsPager("myResourceGroupName", "myClusterName", "default", 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.ReportList = armautomanage.ReportList{
// Value: []*armautomanage.Report{
// {
// Name: to.Ptr("b4e9ee6b-1717-4ff0-a8d2-e6d72c33d5f4"),
// Type: to.Ptr("Microsoft.Automanage/configurationProfileAssignments/reports"),
// ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/Microsoft.AzureStackHci/clusters/machines/myClusterName/providers/Microsoft.Automanage/configurationProfileAssignments/default/reports/b4e9ee6b-1717-4ff0-a8d2-e6d72c33d5f4"),
// Properties: &armautomanage.AssignmentReportProperties{
// Type: to.Ptr("Consistency"),
// ConfigurationProfile: to.Ptr("anyConfigurationProfile"),
// Duration: to.Ptr("PT15M32S"),
// EndTime: to.Ptr("2021-03-31T22:17:42Z"),
// LastModifiedTime: to.Ptr("2021-03-31T22:32:42Z"),
// ReportFormatVersion: to.Ptr("1.0"),
// Resources: []*armautomanage.ReportResource{
// {
// Name: to.Ptr("myResourceGroupName"),
// Type: to.Ptr("Microsoft.Resources/resourceGroups"),
// ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName"),
// Status: to.Ptr("Conformant"),
// }},
// StartTime: to.Ptr("2021-03-31T22:13:06Z"),
// Status: to.Ptr("Conformant"),
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// },
// {
// Name: to.Ptr("142cd92e-6413-49ba-94b0-8e74f251d828"),
// Type: to.Ptr("Microsoft.Automanage/configurationProfileAssignments/reports"),
// ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.AzureStackHci/clusters/myClusterName/providers/Microsoft.Automanage/configurationProfileAssignments/default/reports/142cd92e-6413-49ba-94b0-8e74f251d828"),
// Properties: &armautomanage.AssignmentReportProperties{
// Type: to.Ptr("Consistency"),
// ConfigurationProfile: to.Ptr("anyConfigurationProfile"),
// Duration: to.Ptr("PT15M32S"),
// EndTime: to.Ptr("2021-03-31T22:17:42Z"),
// LastModifiedTime: to.Ptr("2021-03-31T22:32:42Z"),
// ReportFormatVersion: to.Ptr("1.0"),
// Resources: []*armautomanage.ReportResource{
// {
// Name: to.Ptr("myResourceGroupName"),
// Type: to.Ptr("Microsoft.Resources/resourceGroups"),
// ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName"),
// Status: to.Ptr("Conformant"),
// }},
// StartTime: to.Ptr("2021-03-31T22:13:06Z"),
// Status: to.Ptr("Conformant"),
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }},
// }
}
}
type HCIReportsClientGetOptions ¶
type HCIReportsClientGetOptions struct {
}
HCIReportsClientGetOptions contains the optional parameters for the HCIReportsClient.Get method.
type HCIReportsClientGetResponse ¶
type HCIReportsClientGetResponse struct {
// Definition of the report.
Report
}
HCIReportsClientGetResponse contains the response from method HCIReportsClient.Get.
type HCIReportsClientListByConfigurationProfileAssignmentsOptions ¶
type HCIReportsClientListByConfigurationProfileAssignmentsOptions struct {
}
HCIReportsClientListByConfigurationProfileAssignmentsOptions contains the optional parameters for the HCIReportsClient.NewListByConfigurationProfileAssignmentsPager method.
type HCIReportsClientListByConfigurationProfileAssignmentsResponse ¶
type HCIReportsClientListByConfigurationProfileAssignmentsResponse struct {
// The response of the list report operation.
ReportList
}
HCIReportsClientListByConfigurationProfileAssignmentsResponse contains the response from method HCIReportsClient.NewListByConfigurationProfileAssignmentsPager.
type HCRPReportsClient ¶
type HCRPReportsClient struct {
// contains filtered or unexported fields
}
HCRPReportsClient contains the methods for the HCRPReports group. Don't use this type directly, use NewHCRPReportsClient() instead.
func NewHCRPReportsClient ¶
func NewHCRPReportsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HCRPReportsClient, error)
NewHCRPReportsClient creates a new instance of HCRPReportsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*HCRPReportsClient) Get ¶
func (client *HCRPReportsClient) Get(ctx context.Context, resourceGroupName string, machineName string, configurationProfileAssignmentName string, reportName string, options *HCRPReportsClientGetOptions) (HCRPReportsClientGetResponse, error)
Get - Get information about a report associated with a configuration profile assignment run If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-04
- resourceGroupName - The name of the resource group. The name is case insensitive.
- machineName - The name of the Arc machine.
- configurationProfileAssignmentName - The configuration profile assignment name.
- reportName - The report name.
- options - HCRPReportsClientGetOptions contains the optional parameters for the HCRPReportsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/getHCRPReport.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewHCRPReportsClient().Get(ctx, "myResourceGroupName", "myMachineName", "default", "b4e9ee6b-1717-4ff0-a8d2-e6d72c33d5f4", 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.Report = armautomanage.Report{
// Name: to.Ptr("b4e9ee6b-1717-4ff0-a8d2-e6d72c33d5f4"),
// Type: to.Ptr("Microsoft.Automanage/configurationProfileAssignments/reports"),
// ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.HybridCompute/machines/myClustereName/providers/Microsoft.Automanage/configurationProfileAssignments/default/reports/b4e9ee6b-1717-4ff0-a8d2-e6d72c33d5f4"),
// Properties: &armautomanage.AssignmentReportProperties{
// Type: to.Ptr("Consistency"),
// ConfigurationProfile: to.Ptr("anyConfigurationProfile"),
// Duration: to.Ptr("PT15M32S"),
// EndTime: to.Ptr("2021-03-31T22:17:42Z"),
// LastModifiedTime: to.Ptr("2021-03-31T22:32:42Z"),
// ReportFormatVersion: to.Ptr("1.0"),
// Resources: []*armautomanage.ReportResource{
// {
// Name: to.Ptr("myResourceGroupName"),
// Type: to.Ptr("Microsoft.Resources/resourceGroups"),
// ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName"),
// Status: to.Ptr("Conformant"),
// }},
// StartTime: to.Ptr("2021-03-31T22:13:06Z"),
// Status: to.Ptr("Conformant"),
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }
}
func (*HCRPReportsClient) NewListByConfigurationProfileAssignmentsPager ¶
func (client *HCRPReportsClient) NewListByConfigurationProfileAssignmentsPager(resourceGroupName string, machineName string, configurationProfileAssignmentName string, options *HCRPReportsClientListByConfigurationProfileAssignmentsOptions) *runtime.Pager[HCRPReportsClientListByConfigurationProfileAssignmentsResponse]
NewListByConfigurationProfileAssignmentsPager - Retrieve a list of reports within a given configuration profile assignment
Generated from API version 2022-05-04
- resourceGroupName - The name of the resource group. The name is case insensitive.
- machineName - The name of the Arc machine.
- configurationProfileAssignmentName - The configuration profile assignment name.
- options - HCRPReportsClientListByConfigurationProfileAssignmentsOptions contains the optional parameters for the HCRPReportsClient.NewListByConfigurationProfileAssignmentsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/listReportsByconfigurationProfileHCRPAssignment.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewHCRPReportsClient().NewListByConfigurationProfileAssignmentsPager("myResourceGroupName", "myMachineName", "default", 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.ReportList = armautomanage.ReportList{
// Value: []*armautomanage.Report{
// {
// Name: to.Ptr("b4e9ee6b-1717-4ff0-a8d2-e6d72c33d5f4"),
// Type: to.Ptr("Microsoft.Automanage/configurationProfileAssignments/reports"),
// ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.HybridCompute/machines/myMachineName/providers/Microsoft.Automanage/configurationProfileAssignments/default/reports/b4e9ee6b-1717-4ff0-a8d2-e6d72c33d5f4"),
// Properties: &armautomanage.AssignmentReportProperties{
// Type: to.Ptr("Consistency"),
// ConfigurationProfile: to.Ptr("anyConfigurationProfile"),
// Duration: to.Ptr("PT15M32S"),
// EndTime: to.Ptr("2021-03-31T22:17:42Z"),
// LastModifiedTime: to.Ptr("2021-03-31T22:32:42Z"),
// ReportFormatVersion: to.Ptr("1.0"),
// Resources: []*armautomanage.ReportResource{
// {
// Name: to.Ptr("myResourceGroupName"),
// Type: to.Ptr("Microsoft.Resources/resourceGroups"),
// ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName"),
// Status: to.Ptr("Conformant"),
// }},
// StartTime: to.Ptr("2021-03-31T22:13:06Z"),
// Status: to.Ptr("Conformant"),
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// },
// {
// Name: to.Ptr("142cd92e-6413-49ba-94b0-8e74f251d828"),
// Type: to.Ptr("Microsoft.Automanage/configurationProfileAssignments/reports"),
// ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.HybridCompute/machines/myMachineName/providers/Microsoft.Automanage/configurationProfileAssignments/default/reports/142cd92e-6413-49ba-94b0-8e74f251d828"),
// Properties: &armautomanage.AssignmentReportProperties{
// Type: to.Ptr("Consistency"),
// ConfigurationProfile: to.Ptr("anyConfigurationProfile"),
// Duration: to.Ptr("PT15M32S"),
// EndTime: to.Ptr("2021-03-31T22:17:42Z"),
// LastModifiedTime: to.Ptr("2021-03-31T22:32:42Z"),
// ReportFormatVersion: to.Ptr("1.0"),
// Resources: []*armautomanage.ReportResource{
// {
// Name: to.Ptr("myResourceGroupName"),
// Type: to.Ptr("Microsoft.Resources/resourceGroups"),
// ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName"),
// Status: to.Ptr("Conformant"),
// }},
// StartTime: to.Ptr("2021-03-31T22:13:06Z"),
// Status: to.Ptr("Conformant"),
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }},
// }
}
}
type HCRPReportsClientGetOptions ¶
type HCRPReportsClientGetOptions struct {
}
HCRPReportsClientGetOptions contains the optional parameters for the HCRPReportsClient.Get method.
type HCRPReportsClientGetResponse ¶
type HCRPReportsClientGetResponse struct {
// Definition of the report.
Report
}
HCRPReportsClientGetResponse contains the response from method HCRPReportsClient.Get.
type HCRPReportsClientListByConfigurationProfileAssignmentsOptions ¶
type HCRPReportsClientListByConfigurationProfileAssignmentsOptions struct {
}
HCRPReportsClientListByConfigurationProfileAssignmentsOptions contains the optional parameters for the HCRPReportsClient.NewListByConfigurationProfileAssignmentsPager method.
type HCRPReportsClientListByConfigurationProfileAssignmentsResponse ¶
type HCRPReportsClientListByConfigurationProfileAssignmentsResponse struct {
// The response of the list report operation.
ReportList
}
HCRPReportsClientListByConfigurationProfileAssignmentsResponse contains the response from method HCRPReportsClient.NewListByConfigurationProfileAssignmentsPager.
type Operation ¶
type Operation struct {
// Localized display information for this particular operation.
Display *OperationDisplay
// READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
ActionType *ActionType
// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane
// operations.
IsDataAction *bool
// READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write",
// "Microsoft.Compute/virtualMachines/capture/action"
Name *string
// READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
// value is "user,system"
Origin *Origin
}
Operation - Details of a REST API operation, returned from the Resource Provider Operations API
func (Operation) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Operation.
type OperationDisplay ¶
type OperationDisplay struct {
// READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views.
Description *string
// READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual
// Machine", "Restart Virtual Machine".
Operation *string
// READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft
// Compute".
Provider *string
// READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job
// Schedule Collections".
Resource *string
}
OperationDisplay - Localized display information for this particular operation.
func (OperationDisplay) MarshalJSON ¶
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶
func (o *OperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.
type OperationListResult ¶
type OperationListResult struct {
// READ-ONLY; URL to get the next set of operation list results (if there are any).
NextLink *string
// READ-ONLY; List of operations supported by the resource provider
Value []*Operation
}
OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
func (OperationListResult) MarshalJSON ¶
func (o OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationListResult.
func (*OperationListResult) UnmarshalJSON ¶
func (o *OperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.
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 ¶
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Lists all of the available Automanage REST API operations.
Generated from API version 2022-05-04
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/listOperations.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewOperationsClient().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.OperationListResult = armautomanage.OperationListResult{
// Value: []*armautomanage.Operation{
// {
// Name: to.Ptr("Microsoft.Automanage/register/action"),
// Display: &armautomanage.OperationDisplay{
// Description: to.Ptr("Registers the subscription for the Automanage Resource Provider"),
// Operation: to.Ptr("Register the Automanage Resource Provider"),
// Provider: to.Ptr("Microsoft Automanage"),
// Resource: to.Ptr("Automanage Resource Provider"),
// },
// },
// {
// Name: to.Ptr("Microsoft.Automanage/configurationProfileAssignments/write"),
// Display: &armautomanage.OperationDisplay{
// Description: to.Ptr("Create new configuration profile assignment."),
// Operation: to.Ptr("Microsoft.Automanage/configurationProfileAssignments/write"),
// Provider: to.Ptr("Microsoft Automanage"),
// Resource: to.Ptr("Microsoft.Automanage/configurationProfileAssignments"),
// },
// },
// {
// Name: to.Ptr("Microsoft.Automanage/configurationProfileAssignments/read"),
// Display: &armautomanage.OperationDisplay{
// Description: to.Ptr("Get configuration profile assignment."),
// Operation: to.Ptr("Microsoft.Automanage/configurationProfileAssignments/read"),
// Provider: to.Ptr("Microsoft Automanage"),
// Resource: to.Ptr("Microsoft.Automanage/configurationProfileAssignments"),
// },
// },
// {
// Name: to.Ptr("Microsoft.Automanage/configurationProfileAssignments/delete"),
// Display: &armautomanage.OperationDisplay{
// Description: to.Ptr("Delete configuration profile assignment."),
// Operation: to.Ptr("Microsoft.Automanage/configurationProfileAssignments/delete"),
// Provider: to.Ptr("Microsoft Automanage"),
// Resource: to.Ptr("Microsoft.Automanage/configurationProfileAssignments"),
// },
// },
// {
// Name: to.Ptr("Microsoft.Automanage/bestPractices/read"),
// Display: &armautomanage.OperationDisplay{
// Description: to.Ptr("Get Automanage bestPractice."),
// Operation: to.Ptr("Microsoft.Automanage/bestPractices/read"),
// Provider: to.Ptr("Microsoft Automanage"),
// Resource: to.Ptr("Microsoft.Automanage/bestPractices"),
// },
// },
// {
// Name: to.Ptr("Microsoft.Automanage/bestPractices/versions/read"),
// Display: &armautomanage.OperationDisplay{
// Description: to.Ptr("Get Automanage bestPractice version."),
// Operation: to.Ptr("Microsoft.Automanage/bestPractices/versions/read"),
// Provider: to.Ptr("Microsoft Automanage"),
// Resource: to.Ptr("Microsoft.Automanage/bestPractices/versions"),
// },
// },
// {
// Name: to.Ptr("Microsoft.Automanage/configurationProfiles/write"),
// Display: &armautomanage.OperationDisplay{
// Description: to.Ptr("Create new Automanage Configuration Profile ."),
// Operation: to.Ptr("Microsoft.Automanage/configurationProfiles/write"),
// Provider: to.Ptr("Microsoft Automanage"),
// Resource: to.Ptr("Microsoft.Automanage/configurationProfiles"),
// },
// },
// {
// Name: to.Ptr("Microsoft.Automanage/configurationProfiles/read"),
// Display: &armautomanage.OperationDisplay{
// Description: to.Ptr("Get Automanage Configuration Profile."),
// Operation: to.Ptr("Microsoft.Automanage/configurationProfiles/read"),
// Provider: to.Ptr("Microsoft Automanage"),
// Resource: to.Ptr("Microsoft.Automanage/configurationProfiles"),
// },
// },
// {
// Name: to.Ptr("Microsoft.Automanage/configurationProfiles/delete"),
// Display: &armautomanage.OperationDisplay{
// Description: to.Ptr("Delete Automanage Configuration Profile."),
// Operation: to.Ptr("Microsoft.Automanage/configurationProfiles/delete"),
// Provider: to.Ptr("Microsoft Automanage"),
// Resource: to.Ptr("Microsoft.Automanage/configurationProfiles"),
// },
// },
// {
// Name: to.Ptr("Microsoft.Automanage/configurationProfiles/versions/write"),
// Display: &armautomanage.OperationDisplay{
// Description: to.Ptr("Create new Automanage Configuration Profile version."),
// Operation: to.Ptr("Microsoft.Automanage/configurationProfiles/versions/write"),
// Provider: to.Ptr("Microsoft Automanage"),
// Resource: to.Ptr("Microsoft.Automanage/configurationProfiles/versions"),
// },
// },
// {
// Name: to.Ptr("Microsoft.Automanage/configurationProfiles/versions/read"),
// Display: &armautomanage.OperationDisplay{
// Description: to.Ptr("Get Automanage Configuration Profile version."),
// Operation: to.Ptr("Microsoft.Automanage/configurationProfiles/versions/read"),
// Provider: to.Ptr("Microsoft Automanage"),
// Resource: to.Ptr("Microsoft.Automanage/configurationProfiles/versions"),
// },
// },
// {
// Name: to.Ptr("Microsoft.Automanage/configurationProfiles/versions/delete"),
// Display: &armautomanage.OperationDisplay{
// Description: to.Ptr("Delete Automanage Configuration Profile version."),
// Operation: to.Ptr("Microsoft.Automanage/configurationProfiles/versions/delete"),
// Provider: to.Ptr("Microsoft Automanage"),
// Resource: to.Ptr("Microsoft.Automanage/configurationProfiles/versions"),
// },
// },
// {
// Name: to.Ptr("Microsoft.Automanage/configurationProfileAssignments/reports/read"),
// Display: &armautomanage.OperationDisplay{
// Description: to.Ptr("Get report for configuration profile assignment."),
// Operation: to.Ptr("Microsoft.Automanage/configurationProfileAssignments/reports/read"),
// Provider: to.Ptr("Microsoft Automanage"),
// Resource: to.Ptr("Microsoft.Automanage/configurationProfileAssignments/reports"),
// },
// },
// {
// Name: to.Ptr("Microsoft.Automanage/servicePrincipals/read"),
// Display: &armautomanage.OperationDisplay{
// Description: to.Ptr("Read the Automanage AAD first party service principal id and authorizationSet for the subscription. This service principal id is used to grant the Contributor RBAC permission to Automanage AAD first party Application."),
// Operation: to.Ptr("Microsoft.Automanage/servicePrincipals/read"),
// Provider: to.Ptr("Microsoft Automanage"),
// Resource: to.Ptr("Microsoft.Automanage/servicePrincipals"),
// },
// }},
// }
}
}
type OperationsClientListOptions ¶
type OperationsClientListOptions struct {
}
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶
type OperationsClientListResponse struct {
// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
OperationListResult
}
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type Origin ¶
type Origin string
Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"
func PossibleOriginValues ¶
func PossibleOriginValues() []Origin
PossibleOriginValues returns the possible values for the Origin const type.
type ProxyResource ¶
type ProxyResource struct {
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
func (ProxyResource) MarshalJSON ¶
func (p ProxyResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProxyResource.
func (*ProxyResource) UnmarshalJSON ¶
func (p *ProxyResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.
type Report ¶
type Report struct {
// The properties for the report.
Properties *AssignmentReportProperties
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
Report - Definition of the report.
func (Report) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Report.
func (*Report) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Report.
type ReportList ¶
type ReportList struct {
// Result of the list report operation.
Value []*Report
}
ReportList - The response of the list report operation.
func (ReportList) MarshalJSON ¶
func (r ReportList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ReportList.
func (*ReportList) UnmarshalJSON ¶
func (r *ReportList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ReportList.
type ReportResource ¶
type ReportResource struct {
// READ-ONLY; Error message, if any, returned when deploying the resource.
Error *ErrorDetail
// READ-ONLY; ARM id of the resource.
ID *string
// READ-ONLY; Name of the resource.
Name *string
// READ-ONLY; Status of the resource.
Status *string
// READ-ONLY; Type of the resource.
Type *string
}
ReportResource - Details about the resource processed by the configuration profile assignment
func (ReportResource) MarshalJSON ¶
func (r ReportResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ReportResource.
func (*ReportResource) UnmarshalJSON ¶
func (r *ReportResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ReportResource.
type ReportsClient ¶
type ReportsClient struct {
// contains filtered or unexported fields
}
ReportsClient contains the methods for the Reports group. Don't use this type directly, use NewReportsClient() instead.
func NewReportsClient ¶
func NewReportsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReportsClient, error)
NewReportsClient creates a new instance of ReportsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ReportsClient) Get ¶
func (client *ReportsClient) Get(ctx context.Context, resourceGroupName string, configurationProfileAssignmentName string, reportName string, vmName string, options *ReportsClientGetOptions) (ReportsClientGetResponse, error)
Get - Get information about a report associated with a configuration profile assignment run If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-04
- resourceGroupName - The name of the resource group. The name is case insensitive.
- configurationProfileAssignmentName - The configuration profile assignment name.
- reportName - The report name.
- vmName - The name of the virtual machine.
- options - ReportsClientGetOptions contains the optional parameters for the ReportsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/getReport.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewReportsClient().Get(ctx, "myResourceGroupName", "default", "b4e9ee6b-1717-4ff0-a8d2-e6d72c33d5f4", "myVMName", 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.Report = armautomanage.Report{
// Name: to.Ptr("b4e9ee6b-1717-4ff0-a8d2-e6d72c33d5f4"),
// Type: to.Ptr("Microsoft.Automanage/configurationProfileAssignments/reports"),
// ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName/providers/Microsoft.Automanage/configurationProfileAssignments/default/reports/b4e9ee6b-1717-4ff0-a8d2-e6d72c33d5f4"),
// Properties: &armautomanage.AssignmentReportProperties{
// Type: to.Ptr("Consistency"),
// ConfigurationProfile: to.Ptr("anyConfigurationProfile"),
// Duration: to.Ptr("PT15M32S"),
// EndTime: to.Ptr("2021-03-31T22:17:42Z"),
// LastModifiedTime: to.Ptr("2021-03-31T22:32:42Z"),
// ReportFormatVersion: to.Ptr("1.0"),
// Resources: []*armautomanage.ReportResource{
// {
// Name: to.Ptr("myResourceGroupName"),
// Type: to.Ptr("Microsoft.Resources/resourceGroups"),
// ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName"),
// Status: to.Ptr("Conformant"),
// }},
// StartTime: to.Ptr("2021-03-31T22:13:06Z"),
// Status: to.Ptr("Conformant"),
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }
}
func (*ReportsClient) NewListByConfigurationProfileAssignmentsPager ¶
func (client *ReportsClient) NewListByConfigurationProfileAssignmentsPager(resourceGroupName string, configurationProfileAssignmentName string, vmName string, options *ReportsClientListByConfigurationProfileAssignmentsOptions) *runtime.Pager[ReportsClientListByConfigurationProfileAssignmentsResponse]
NewListByConfigurationProfileAssignmentsPager - Retrieve a list of reports within a given configuration profile assignment
Generated from API version 2022-05-04
- resourceGroupName - The name of the resource group. The name is case insensitive.
- configurationProfileAssignmentName - The configuration profile assignment name.
- vmName - The name of the virtual machine.
- options - ReportsClientListByConfigurationProfileAssignmentsOptions contains the optional parameters for the ReportsClient.NewListByConfigurationProfileAssignmentsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/listReportsByconfigurationProfileAssignment.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewReportsClient().NewListByConfigurationProfileAssignmentsPager("myResourceGroupName", "default", "myVMName", 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.ReportList = armautomanage.ReportList{
// Value: []*armautomanage.Report{
// {
// Name: to.Ptr("b4e9ee6b-1717-4ff0-a8d2-e6d72c33d5f4"),
// Type: to.Ptr("Microsoft.Automanage/configurationProfileAssignments/reports"),
// ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName/providers/Microsoft.Automanage/configurationProfileAssignments/default/reports/b4e9ee6b-1717-4ff0-a8d2-e6d72c33d5f4"),
// Properties: &armautomanage.AssignmentReportProperties{
// Type: to.Ptr("Consistency"),
// ConfigurationProfile: to.Ptr("anyConfigurationProfile"),
// Duration: to.Ptr("PT15M32S"),
// EndTime: to.Ptr("2021-03-31T22:17:42Z"),
// LastModifiedTime: to.Ptr("2021-03-31T22:32:42Z"),
// ReportFormatVersion: to.Ptr("1.0"),
// Resources: []*armautomanage.ReportResource{
// {
// Name: to.Ptr("myResourceGroupName"),
// Type: to.Ptr("Microsoft.Resources/resourceGroups"),
// ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName"),
// Status: to.Ptr("Conformant"),
// }},
// StartTime: to.Ptr("2021-03-31T22:13:06Z"),
// Status: to.Ptr("Conformant"),
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// },
// {
// Name: to.Ptr("142cd92e-6413-49ba-94b0-8e74f251d828"),
// Type: to.Ptr("Microsoft.Automanage/configurationProfileAssignments/reports"),
// ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName/providers/Microsoft.Automanage/configurationProfileAssignments/default/reports/142cd92e-6413-49ba-94b0-8e74f251d828"),
// Properties: &armautomanage.AssignmentReportProperties{
// Type: to.Ptr("Consistency"),
// ConfigurationProfile: to.Ptr("anyConfigurationProfile"),
// Duration: to.Ptr("PT15M32S"),
// EndTime: to.Ptr("2021-03-31T22:17:42Z"),
// LastModifiedTime: to.Ptr("2021-03-31T22:32:42Z"),
// ReportFormatVersion: to.Ptr("1.0"),
// Resources: []*armautomanage.ReportResource{
// {
// Name: to.Ptr("myResourceGroupName"),
// Type: to.Ptr("Microsoft.Resources/resourceGroups"),
// ID: to.Ptr("/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName"),
// Status: to.Ptr("Conformant"),
// }},
// StartTime: to.Ptr("2021-03-31T22:13:06Z"),
// Status: to.Ptr("Conformant"),
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-03T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("user1@outlook.com"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-04T02:03:01.197Z"); return t}()),
// LastModifiedBy: to.Ptr("user2@outlook.com"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }},
// }
}
}
type ReportsClientGetOptions ¶
type ReportsClientGetOptions struct {
}
ReportsClientGetOptions contains the optional parameters for the ReportsClient.Get method.
type ReportsClientGetResponse ¶
type ReportsClientGetResponse struct {
// Definition of the report.
Report
}
ReportsClientGetResponse contains the response from method ReportsClient.Get.
type ReportsClientListByConfigurationProfileAssignmentsOptions ¶
type ReportsClientListByConfigurationProfileAssignmentsOptions struct {
}
ReportsClientListByConfigurationProfileAssignmentsOptions contains the optional parameters for the ReportsClient.NewListByConfigurationProfileAssignmentsPager method.
type ReportsClientListByConfigurationProfileAssignmentsResponse ¶
type ReportsClientListByConfigurationProfileAssignmentsResponse struct {
// The response of the list report operation.
ReportList
}
ReportsClientListByConfigurationProfileAssignmentsResponse contains the response from method ReportsClient.NewListByConfigurationProfileAssignmentsPager.
type Resource ¶
type Resource struct {
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
Resource - Common fields that are returned in the response for all Azure Resource Manager resources
func (Resource) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Resource.
func (*Resource) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Resource.
type ServicePrincipal ¶
type ServicePrincipal struct {
// The Service Principal properties for the subscription
Properties *ServicePrincipalProperties
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
ServicePrincipal - The Service Principal Id for the subscription.
func (ServicePrincipal) MarshalJSON ¶
func (s ServicePrincipal) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServicePrincipal.
func (*ServicePrincipal) UnmarshalJSON ¶
func (s *ServicePrincipal) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServicePrincipal.
type ServicePrincipalListResult ¶
type ServicePrincipalListResult struct {
// The list of servicePrincipals.
Value []*ServicePrincipal
}
ServicePrincipalListResult - The list of ServicePrincipals.
func (ServicePrincipalListResult) MarshalJSON ¶
func (s ServicePrincipalListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServicePrincipalListResult.
func (*ServicePrincipalListResult) UnmarshalJSON ¶
func (s *ServicePrincipalListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServicePrincipalListResult.
type ServicePrincipalProperties ¶
type ServicePrincipalProperties struct {
// READ-ONLY; Returns the contributor RBAC Role exist or not for the Service Principal Id.
AuthorizationSet *bool
// READ-ONLY; The Service Principal Id for the subscription.
ServicePrincipalID *string
}
ServicePrincipalProperties - The Service Principal properties for the subscription.
func (ServicePrincipalProperties) MarshalJSON ¶
func (s ServicePrincipalProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServicePrincipalProperties.
func (*ServicePrincipalProperties) UnmarshalJSON ¶
func (s *ServicePrincipalProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServicePrincipalProperties.
type ServicePrincipalsClient ¶
type ServicePrincipalsClient struct {
// contains filtered or unexported fields
}
ServicePrincipalsClient contains the methods for the ServicePrincipals group. Don't use this type directly, use NewServicePrincipalsClient() instead.
func NewServicePrincipalsClient ¶
func NewServicePrincipalsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServicePrincipalsClient, error)
NewServicePrincipalsClient creates a new instance of ServicePrincipalsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ServicePrincipalsClient) Get ¶
func (client *ServicePrincipalsClient) Get(ctx context.Context, options *ServicePrincipalsClientGetOptions) (ServicePrincipalsClientGetResponse, error)
Get - Get the Automanage AAD first party Application Service Principal details for the subscription id. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-04
- options - ServicePrincipalsClientGetOptions contains the optional parameters for the ServicePrincipalsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/getServicePrincipal.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewServicePrincipalsClient().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.ServicePrincipal = armautomanage.ServicePrincipal{
// Name: to.Ptr("default"),
// Type: to.Ptr("Microsoft.Automanage/ConfigurationProfileAssignments"),
// ID: to.Ptr("/subscriptions/subscriptionId/providers/Microsoft.Automanage/servicePrincipals/default"),
// Properties: &armautomanage.ServicePrincipalProperties{
// AuthorizationSet: to.Ptr(true),
// ServicePrincipalID: to.Ptr("<servicePrincipalId>"),
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T00:00:00.000Z"); return t}()),
// CreatedBy: to.Ptr("SYSTEM"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T00:00:00.000Z"); return t}()),
// LastModifiedBy: to.Ptr("SYSTEM"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }
}
func (*ServicePrincipalsClient) NewListBySubscriptionPager ¶
func (client *ServicePrincipalsClient) NewListBySubscriptionPager(options *ServicePrincipalsClientListBySubscriptionOptions) *runtime.Pager[ServicePrincipalsClientListBySubscriptionResponse]
NewListBySubscriptionPager - Get the Automanage AAD first party Application Service Principal details for the subscription id.
Generated from API version 2022-05-04
- options - ServicePrincipalsClientListBySubscriptionOptions contains the optional parameters for the ServicePrincipalsClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/2dcad6d6e9a96882eb6d317e7500a94be007a9c6/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/examples/listServicePrincipalBySubscription.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automanage/armautomanage"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armautomanage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewServicePrincipalsClient().NewListBySubscriptionPager(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.ServicePrincipalListResult = armautomanage.ServicePrincipalListResult{
// Value: []*armautomanage.ServicePrincipal{
// {
// Name: to.Ptr("default"),
// Type: to.Ptr("Microsoft.Automanage/ConfigurationProfileAssignments"),
// ID: to.Ptr("/subscriptions/subscriptionId/providers/Microsoft.Automanage/servicePrincipals/default"),
// Properties: &armautomanage.ServicePrincipalProperties{
// AuthorizationSet: to.Ptr(true),
// ServicePrincipalID: to.Ptr("<servicePrincipalId>"),
// },
// SystemData: &armautomanage.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T00:00:00.000Z"); return t}()),
// CreatedBy: to.Ptr("SYSTEM"),
// CreatedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T00:00:00.000Z"); return t}()),
// LastModifiedBy: to.Ptr("SYSTEM"),
// LastModifiedByType: to.Ptr(armautomanage.CreatedByTypeUser),
// },
// }},
// }
}
}
type ServicePrincipalsClientGetOptions ¶
type ServicePrincipalsClientGetOptions struct {
}
ServicePrincipalsClientGetOptions contains the optional parameters for the ServicePrincipalsClient.Get method.
type ServicePrincipalsClientGetResponse ¶
type ServicePrincipalsClientGetResponse struct {
// The Service Principal Id for the subscription.
ServicePrincipal
}
ServicePrincipalsClientGetResponse contains the response from method ServicePrincipalsClient.Get.
type ServicePrincipalsClientListBySubscriptionOptions ¶
type ServicePrincipalsClientListBySubscriptionOptions struct {
}
ServicePrincipalsClientListBySubscriptionOptions contains the optional parameters for the ServicePrincipalsClient.NewListBySubscriptionPager method.
type ServicePrincipalsClientListBySubscriptionResponse ¶
type ServicePrincipalsClientListBySubscriptionResponse struct {
// The list of ServicePrincipals.
ServicePrincipalListResult
}
ServicePrincipalsClientListBySubscriptionResponse contains the response from method ServicePrincipalsClient.NewListBySubscriptionPager.
type SystemData ¶
type SystemData struct {
// The timestamp of resource creation (UTC).
CreatedAt *time.Time
// The identity that created the resource.
CreatedBy *string
// The type of identity that created the resource.
CreatedByType *CreatedByType
// The timestamp of resource last modification (UTC)
LastModifiedAt *time.Time
// The identity that last modified the resource.
LastModifiedBy *string
// The type of identity that last modified the resource.
LastModifiedByType *CreatedByType
}
SystemData - Metadata pertaining to creation and last modification of the resource.
func (SystemData) MarshalJSON ¶
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.
type TrackedResource ¶
type TrackedResource struct {
// REQUIRED; The geo-location where the resource lives
Location *string
// Resource tags.
Tags map[string]*string
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'
func (TrackedResource) MarshalJSON ¶
func (t TrackedResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TrackedResource.
func (*TrackedResource) UnmarshalJSON ¶
func (t *TrackedResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.
type UpdateResource ¶
UpdateResource - Represents an update resource
func (UpdateResource) MarshalJSON ¶
func (u UpdateResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateResource.
func (*UpdateResource) UnmarshalJSON ¶
func (u *UpdateResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateResource.
Source Files
¶
- bestpractices_client.go
- bestpracticesversions_client.go
- build.go
- client_factory.go
- configurationprofileassignments_client.go
- configurationprofilehciassignments_client.go
- configurationprofilehcrpassignments_client.go
- configurationprofiles_client.go
- configurationprofilesversions_client.go
- constants.go
- hcireports_client.go
- hcrpreports_client.go
- models.go
- models_serde.go
- operations_client.go
- options.go
- reports_client.go
- response_types.go
- serviceprincipals_client.go
- time_rfc3339.go