Documentation ¶
Index ¶
- type AvailabilityStateValues
- type AvailabilityStatus
- type AvailabilityStatusListResult
- type AvailabilityStatusProperties
- type AvailabilityStatusPropertiesRecentlyResolved
- type AvailabilityStatusesClient
- func (client *AvailabilityStatusesClient) GetByResource(ctx context.Context, resourceURI string, ...) (AvailabilityStatusesClientGetByResourceResponse, error)
- func (client *AvailabilityStatusesClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[AvailabilityStatusesClientListByResourceGroupResponse]
- func (client *AvailabilityStatusesClient) NewListBySubscriptionIDPager(options *AvailabilityStatusesClientListBySubscriptionIDOptions) *runtime.Pager[AvailabilityStatusesClientListBySubscriptionIDResponse]
- func (client *AvailabilityStatusesClient) NewListPager(resourceURI string, options *AvailabilityStatusesClientListOptions) *runtime.Pager[AvailabilityStatusesClientListResponse]
- type AvailabilityStatusesClientGetByResourceOptions
- type AvailabilityStatusesClientGetByResourceResponse
- type AvailabilityStatusesClientListByResourceGroupOptions
- type AvailabilityStatusesClientListByResourceGroupResponse
- type AvailabilityStatusesClientListBySubscriptionIDOptions
- type AvailabilityStatusesClientListBySubscriptionIDResponse
- type AvailabilityStatusesClientListOptions
- type AvailabilityStatusesClientListResponse
- type ClientFactory
- type ErrorResponse
- type ErrorResponseError
- type ImpactedRegion
- type ImpactedResourceStatus
- type ImpactedResourceStatusProperties
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type ReasonChronicityTypes
- type ReasonTypeValues
- type RecommendedAction
- type Resource
- type ServiceImpactingEvent
- type ServiceImpactingEventIncidentProperties
- type ServiceImpactingEventStatus
- type StatusBanner
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AvailabilityStateValues ¶
type AvailabilityStateValues string
AvailabilityStateValues - Impacted resource status of the resource.
const ( AvailabilityStateValuesAvailable AvailabilityStateValues = "Available" AvailabilityStateValuesDegraded AvailabilityStateValues = "Degraded" AvailabilityStateValuesUnknown AvailabilityStateValues = "Unknown" )
func PossibleAvailabilityStateValuesValues ¶
func PossibleAvailabilityStateValuesValues() []AvailabilityStateValues
PossibleAvailabilityStateValuesValues returns the possible values for the AvailabilityStateValues const type.
type AvailabilityStatus ¶
type AvailabilityStatus struct { // Azure Resource Manager Identity for the availabilityStatuses resource. ID *string `json:"id,omitempty"` // Azure Resource Manager geo location of the resource. Location *string `json:"location,omitempty"` // current. Name *string `json:"name,omitempty"` // Properties of availability state. Properties *AvailabilityStatusProperties `json:"properties,omitempty"` // Microsoft.ResourceHealth/AvailabilityStatuses. Type *string `json:"type,omitempty"` }
AvailabilityStatus - availabilityStatus of a resource.
func (AvailabilityStatus) MarshalJSON ¶ added in v1.1.0
func (a AvailabilityStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AvailabilityStatus.
func (*AvailabilityStatus) UnmarshalJSON ¶ added in v1.1.0
func (a *AvailabilityStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AvailabilityStatus.
type AvailabilityStatusListResult ¶
type AvailabilityStatusListResult struct { // REQUIRED; The list of availabilityStatuses. Value []*AvailabilityStatus `json:"value,omitempty"` // The URI to fetch the next page of availabilityStatuses. Call ListNext() with this URI to fetch the next page of availabilityStatuses. NextLink *string `json:"nextLink,omitempty"` }
AvailabilityStatusListResult - The List availabilityStatus operation response.
func (AvailabilityStatusListResult) MarshalJSON ¶
func (a AvailabilityStatusListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AvailabilityStatusListResult.
func (*AvailabilityStatusListResult) UnmarshalJSON ¶ added in v1.1.0
func (a *AvailabilityStatusListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AvailabilityStatusListResult.
type AvailabilityStatusProperties ¶
type AvailabilityStatusProperties struct { // Availability status of the resource. When it is null, this availabilityStatus object represents an availability impacting // event AvailabilityState *AvailabilityStateValues `json:"availabilityState,omitempty"` // Details of the availability status. DetailedStatus *string `json:"detailedStatus,omitempty"` // In case of an availability impacting event, it describes the category of a PlatformInitiated health impacting event. Examples // are Planned, Unplanned etc. HealthEventCategory *string `json:"healthEventCategory,omitempty"` // In case of an availability impacting event, it describes where the health impacting event was originated. Examples are // PlatformInitiated, UserInitiated etc. HealthEventCause *string `json:"healthEventCause,omitempty"` // It is a unique Id that identifies the event HealthEventID *string `json:"healthEventId,omitempty"` // In case of an availability impacting event, it describes when the health impacting event was originated. Examples are Lifecycle, // Downtime, Fault Analysis etc. HealthEventType *string `json:"healthEventType,omitempty"` // Timestamp for when last change in health status occurred. OccurredTime *time.Time `json:"occurredTime,omitempty"` // Chronicity of the availability transition. ReasonChronicity *ReasonChronicityTypes `json:"reasonChronicity,omitempty"` // When the resource's availabilityState is Unavailable, it describes where the health impacting event was originated. Examples // are planned, unplanned, user initiated or an outage etc. ReasonType *string `json:"reasonType,omitempty"` // An annotation describing a change in the availabilityState to Available from Unavailable with a reasonType of type Unplanned RecentlyResolved *AvailabilityStatusPropertiesRecentlyResolved `json:"recentlyResolved,omitempty"` // Lists actions the user can take based on the current availabilityState of the resource. RecommendedActions []*RecommendedAction `json:"recommendedActions,omitempty"` // Timestamp for when the health was last checked. ReportedTime *time.Time `json:"reportedTime,omitempty"` // When the resource's availabilityState is Unavailable and the reasonType is not User Initiated, it provides the date and // time for when the issue is expected to be resolved. ResolutionETA *time.Time `json:"resolutionETA,omitempty"` // When the resource's availabilityState is Unavailable, it provides the Timestamp for when the health impacting event was // received. RootCauseAttributionTime *time.Time `json:"rootCauseAttributionTime,omitempty"` // Lists the service impacting events that may be affecting the health of the resource. ServiceImpactingEvents []*ServiceImpactingEvent `json:"serviceImpactingEvents,omitempty"` // Summary description of the availability status. Summary *string `json:"summary,omitempty"` // Title description of the availability status. Title *string `json:"title,omitempty"` }
AvailabilityStatusProperties - Properties of availability state.
func (AvailabilityStatusProperties) MarshalJSON ¶
func (a AvailabilityStatusProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AvailabilityStatusProperties.
func (*AvailabilityStatusProperties) UnmarshalJSON ¶
func (a *AvailabilityStatusProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AvailabilityStatusProperties.
type AvailabilityStatusPropertiesRecentlyResolved ¶ added in v0.5.0
type AvailabilityStatusPropertiesRecentlyResolved struct { // Timestamp when the availabilityState changes to Available. ResolvedTime *time.Time `json:"resolvedTime,omitempty"` UnavailabilitySummary *string `json:"unavailabilitySummary,omitempty"` UnavailableOccurredTime *time.Time `json:"unavailableOccurredTime,omitempty"` }
AvailabilityStatusPropertiesRecentlyResolved - An annotation describing a change in the availabilityState to Available from Unavailable with a reasonType of type Unplanned
func (AvailabilityStatusPropertiesRecentlyResolved) MarshalJSON ¶ added in v0.5.0
func (a AvailabilityStatusPropertiesRecentlyResolved) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AvailabilityStatusPropertiesRecentlyResolved.
func (*AvailabilityStatusPropertiesRecentlyResolved) UnmarshalJSON ¶ added in v0.5.0
func (a *AvailabilityStatusPropertiesRecentlyResolved) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AvailabilityStatusPropertiesRecentlyResolved.
type AvailabilityStatusesClient ¶
type AvailabilityStatusesClient struct {
// contains filtered or unexported fields
}
AvailabilityStatusesClient contains the methods for the AvailabilityStatuses group. Don't use this type directly, use NewAvailabilityStatusesClient() instead.
func NewAvailabilityStatusesClient ¶
func NewAvailabilityStatusesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailabilityStatusesClient, error)
NewAvailabilityStatusesClient creates a new instance of AvailabilityStatusesClient with the specified values.
- subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*AvailabilityStatusesClient) GetByResource ¶
func (client *AvailabilityStatusesClient) GetByResource(ctx context.Context, resourceURI string, options *AvailabilityStatusesClientGetByResourceOptions) (AvailabilityStatusesClientGetByResourceResponse, error)
GetByResource - Gets current availability status for a single resource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-05-01
- resourceURI - The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
- options - AvailabilityStatusesClientGetByResourceOptions contains the optional parameters for the AvailabilityStatusesClient.GetByResource method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2020-05-01/examples/AvailabilityStatus_GetByResource.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/resourcehealth/armresourcehealth" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armresourcehealth.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAvailabilityStatusesClient().GetByResource(ctx, "resourceUri", &armresourcehealth.AvailabilityStatusesClientGetByResourceOptions{Filter: nil, Expand: to.Ptr("recommendedactions"), }) 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.AvailabilityStatus = armresourcehealth.AvailabilityStatus{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.ResourceHealth/AvailabilityStatuses"), // ID: to.Ptr("/subscriptions/4abcdefgh-ijkl-mnop-qrstuvwxyz/resourceGroups/rhctestenv/providers/Microsoft.ClassicCompute/virtualMachines /rhctestenvV1PI/providers/Microsoft.ResourceHealth/availabilityStatuses/current"), // Location: to.Ptr("eastus"), // Properties: &armresourcehealth.AvailabilityStatusProperties{ // AvailabilityState: to.Ptr(armresourcehealth.AvailabilityStateValuesUnavailable), // DetailedStatus: to.Ptr("Disk problems are preventing us from automatically recovering your virtual machine"), // OccurredTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-29T09:12:00Z"); return t}()), // ReasonChronicity: to.Ptr(armresourcehealth.ReasonChronicityTypesPersistent), // ReasonType: to.Ptr("Unplanned"), // RecommendedActions: []*armresourcehealth.RecommendedAction{ // { // Action: to.Ptr("To start this virtual machine, open the resource blade and click Start"), // ActionURL: to.Ptr("<#ResourceBlade>"), // ActionURLText: to.Ptr("resource blade"), // }, // { // Action: to.Ptr("If you are experiencing problems you believe are caused by Azure, contact support"), // ActionURL: to.Ptr("<#SupportCase>"), // ActionURLText: to.Ptr("contact support"), // }}, // ReportedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-05-04T14:11:29.7598931Z"); return t}()), // ResolutionETA: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-29T09:37:00Z"); return t}()), // RootCauseAttributionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-29T09:13:00Z"); return t}()), // Summary: to.Ptr("We're sorry, we couldn't automatically recover your virtual machine"), // Title: to.Ptr("Unavailable"), // }, // } }
Output:
func (*AvailabilityStatusesClient) NewListByResourceGroupPager ¶ added in v0.6.0
func (client *AvailabilityStatusesClient) NewListByResourceGroupPager(resourceGroupName string, options *AvailabilityStatusesClientListByResourceGroupOptions) *runtime.Pager[AvailabilityStatusesClientListByResourceGroupResponse]
NewListByResourceGroupPager - Lists the current availability status for all the resources in the resource group.
Generated from API version 2020-05-01
- resourceGroupName - The name of the resource group.
- options - AvailabilityStatusesClientListByResourceGroupOptions contains the optional parameters for the AvailabilityStatusesClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2020-05-01/examples/AvailabilityStatuses_ListByResourceGroup.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/resourcehealth/armresourcehealth" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armresourcehealth.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewAvailabilityStatusesClient().NewListByResourceGroupPager("resourceGroupName", &armresourcehealth.AvailabilityStatusesClientListByResourceGroupOptions{Filter: nil, Expand: to.Ptr("recommendedactions"), }) 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.AvailabilityStatusListResult = armresourcehealth.AvailabilityStatusListResult{ // Value: []*armresourcehealth.AvailabilityStatus{ // { // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.ResourceHealth/AvailabilityStatuses"), // ID: to.Ptr("<resourceId>/providers/Microsoft.ResourceHealth/AvailabilityStatueses/current"), // Location: to.Ptr("eastus"), // Properties: &armresourcehealth.AvailabilityStatusProperties{ // AvailabilityState: to.Ptr(armresourcehealth.AvailabilityStateValuesAvailable), // DetailedStatus: to.Ptr("We have not seen any issues with your virtual machine"), // OccurredTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-29T09:12:00Z"); return t}()), // ReasonChronicity: to.Ptr(armresourcehealth.ReasonChronicityTypesPersistent), // ReasonType: to.Ptr("Unplanned"), // RecentlyResolved: &armresourcehealth.AvailabilityStatusPropertiesRecentlyResolved{ // ResolvedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-28T00:49:00Z"); return t}()), // UnavailabilitySummary: to.Ptr("We are sorry your SQL database is unavailable"), // UnavailableOccurredTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-28T00:48:00Z"); return t}()), // }, // RecommendedActions: []*armresourcehealth.RecommendedAction{ // { // Action: to.Ptr("To start this virtualmachine, open the resource blade and click Start"), // ActionURL: to.Ptr("<#ResourceBlade>"), // ActionURLText: to.Ptr("resourceblade"), // }}, // ReportedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-05-04T14:11:29.7598931Z"); return t}()), // Summary: to.Ptr("Vm is available"), // Title: to.Ptr("Available"), // }, // }, // { // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.ResourceHealth/AvailabilityStatuses"), // ID: to.Ptr("<resourceId>/providers/Microsoft.ResourceHealth/AvailabilityStatueses/current"), // Location: to.Ptr("eastus"), // Properties: &armresourcehealth.AvailabilityStatusProperties{ // AvailabilityState: to.Ptr(armresourcehealth.AvailabilityStateValuesUnavailable), // DetailedStatus: to.Ptr("Diskproblemsarepreventingusfromautomaticallyrecoveringyourvirtualmachine"), // OccurredTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-29T09:12:00Z"); return t}()), // ReasonChronicity: to.Ptr(armresourcehealth.ReasonChronicityTypesPersistent), // ReasonType: to.Ptr("Unplanned"), // RecommendedActions: []*armresourcehealth.RecommendedAction{ // { // Action: to.Ptr("To start this virtualmachine, open the resource blade"), // ActionURL: to.Ptr("<#ResourceBlade>"), // ActionURLText: to.Ptr("resourceblade"), // }, // { // Action: to.Ptr("If you are experiencing problems you believe are caused by Azure, contact support"), // ActionURL: to.Ptr("<#SupportCase>"), // ActionURLText: to.Ptr("contactsupport"), // }}, // ReportedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-05-04T14:11:29.7598931Z"); return t}()), // ResolutionETA: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-29T09:37:00Z"); return t}()), // RootCauseAttributionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-29T09:13:00Z"); return t}()), // Summary: to.Ptr("We are sorry, we couldn't automatically recovery our virtualmachine"), // Title: to.Ptr("Unavailable"), // }, // }}, // } } }
Output:
func (*AvailabilityStatusesClient) NewListBySubscriptionIDPager ¶ added in v0.6.0
func (client *AvailabilityStatusesClient) NewListBySubscriptionIDPager(options *AvailabilityStatusesClientListBySubscriptionIDOptions) *runtime.Pager[AvailabilityStatusesClientListBySubscriptionIDResponse]
NewListBySubscriptionIDPager - Lists the current availability status for all the resources in the subscription.
Generated from API version 2020-05-01
- options - AvailabilityStatusesClientListBySubscriptionIDOptions contains the optional parameters for the AvailabilityStatusesClient.NewListBySubscriptionIDPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2020-05-01/examples/AvailabilityStatuses_ListBySubscriptionId.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/resourcehealth/armresourcehealth" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armresourcehealth.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewAvailabilityStatusesClient().NewListBySubscriptionIDPager(&armresourcehealth.AvailabilityStatusesClientListBySubscriptionIDOptions{Filter: nil, Expand: to.Ptr("recommendedactions"), }) 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.AvailabilityStatusListResult = armresourcehealth.AvailabilityStatusListResult{ // Value: []*armresourcehealth.AvailabilityStatus{ // { // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.ResourceHealth/AvailabilityStatuses"), // ID: to.Ptr("<resourceId>/providers/Microsoft.ResourceHealth/AvailabilityStatueses/current"), // Location: to.Ptr("eastus"), // Properties: &armresourcehealth.AvailabilityStatusProperties{ // AvailabilityState: to.Ptr(armresourcehealth.AvailabilityStateValuesAvailable), // DetailedStatus: to.Ptr("We have not seen any issues with your virtual machine"), // OccurredTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-29T09:12:00Z"); return t}()), // ReasonChronicity: to.Ptr(armresourcehealth.ReasonChronicityTypesPersistent), // ReasonType: to.Ptr("Unplanned"), // RecentlyResolved: &armresourcehealth.AvailabilityStatusPropertiesRecentlyResolved{ // ResolvedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-28T00:49:00Z"); return t}()), // UnavailabilitySummary: to.Ptr("We are sorry your SQL database is unavailable"), // UnavailableOccurredTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-28T00:48:00Z"); return t}()), // }, // RecommendedActions: []*armresourcehealth.RecommendedAction{ // { // Action: to.Ptr("To start this virtualmachine, open the resource blade and click Start"), // ActionURL: to.Ptr("<#ResourceBlade>"), // ActionURLText: to.Ptr("resourceblade"), // }}, // ReportedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-05-04T14:11:29.7598931Z"); return t}()), // Summary: to.Ptr("Vm is available"), // Title: to.Ptr("Available"), // }, // }, // { // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.ResourceHealth/AvailabilityStatuses"), // ID: to.Ptr("<resourceId>/providers/Microsoft.ResourceHealth/AvailabilityStatueses/current"), // Location: to.Ptr("eastus"), // Properties: &armresourcehealth.AvailabilityStatusProperties{ // AvailabilityState: to.Ptr(armresourcehealth.AvailabilityStateValuesUnavailable), // DetailedStatus: to.Ptr("Diskproblemsarepreventingusfromautomaticallyrecoveringyourvirtualmachine"), // OccurredTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-29T09:12:00Z"); return t}()), // ReasonChronicity: to.Ptr(armresourcehealth.ReasonChronicityTypesPersistent), // ReasonType: to.Ptr("Unplanned"), // RecommendedActions: []*armresourcehealth.RecommendedAction{ // { // Action: to.Ptr("To start this virtualmachine, open the resource blade"), // ActionURL: to.Ptr("<#ResourceBlade>"), // ActionURLText: to.Ptr("resourceblade"), // }, // { // Action: to.Ptr("If you are experiencing problems you believe are caused by Azure, contact support"), // ActionURL: to.Ptr("<#SupportCase>"), // ActionURLText: to.Ptr("contactsupport"), // }}, // ReportedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-05-04T14:11:29.7598931Z"); return t}()), // ResolutionETA: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-29T09:37:00Z"); return t}()), // RootCauseAttributionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-29T09:13:00Z"); return t}()), // Summary: to.Ptr("We are sorry, we couldn't automatically recovery our virtualmachine"), // Title: to.Ptr("Unavailable"), // }, // }}, // } } }
Output:
func (*AvailabilityStatusesClient) NewListPager ¶ added in v0.6.0
func (client *AvailabilityStatusesClient) NewListPager(resourceURI string, options *AvailabilityStatusesClientListOptions) *runtime.Pager[AvailabilityStatusesClientListResponse]
NewListPager - Lists all historical availability transitions and impacting events for a single resource.
Generated from API version 2020-05-01
- resourceURI - The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
- options - AvailabilityStatusesClientListOptions contains the optional parameters for the AvailabilityStatusesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2020-05-01/examples/AvailabilityStatuses_List.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcehealth/armresourcehealth" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armresourcehealth.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewAvailabilityStatusesClient().NewListPager("resourceUri", &armresourcehealth.AvailabilityStatusesClientListOptions{Filter: nil, Expand: 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.AvailabilityStatusListResult = armresourcehealth.AvailabilityStatusListResult{ // Value: []*armresourcehealth.AvailabilityStatus{ // { // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.ResourceHealth/AvailabilityStatuses"), // ID: to.Ptr("/subscriptions/4abcdefgh-ijkl-mnop-qrstuvwxyz/resourceGroups/rhctestenv/providers/Microsoft.ClassicCompute/virtualMachines/rhctes tenvV1PI/providers/Microsoft.ResourceHealth/availabilityStatuses/current"), // Location: to.Ptr("eastus"), // Properties: &armresourcehealth.AvailabilityStatusProperties{ // AvailabilityState: to.Ptr(armresourcehealth.AvailabilityStateValuesUnavailable), // DetailedStatus: to.Ptr("Disk problems are preventing us from automatically recovering your virtual machine"), // OccurredTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-29T09:12:00Z"); return t}()), // ReasonChronicity: to.Ptr(armresourcehealth.ReasonChronicityTypesPersistent), // ReasonType: to.Ptr("Unplanned"), // ReportedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-05-04T14:11:29.7598931Z"); return t}()), // ResolutionETA: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-29T09:37:00Z"); return t}()), // RootCauseAttributionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-29T09:13:00Z"); return t}()), // ServiceImpactingEvents: []*armresourcehealth.ServiceImpactingEvent{ // { // CorrelationID: to.Ptr("b56d0180-2d6c-4f7b-b750-c1eca681874c"), // EventStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-05-02T19:23:13.7115125Z"); return t}()), // EventStatusLastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-05-02T19:27:04.9543491Z"); return t}()), // IncidentProperties: &armresourcehealth.ServiceImpactingEventIncidentProperties{ // IncidentType: to.Ptr("outage"), // Region: to.Ptr("East US"), // Service: to.Ptr("Virtual Machines"), // Title: to.Ptr("Virtual Machines - West Europe [West Europe]"), // }, // Status: &armresourcehealth.ServiceImpactingEventStatus{ // Value: to.Ptr("Resolved"), // }, // }}, // Summary: to.Ptr("We're sorry, we couldn't automatically recover your virtual machine"), // Title: to.Ptr("Unavailable"), // }, // }, // { // Name: to.Ptr("2016-03-28+16%3a23%3a00Z"), // Type: to.Ptr("Microsoft.ResourceHealth/AvailabilityStatuses"), // ID: to.Ptr("/subscriptions/4abcdefgh-ijkl-mnop-qrstuvwxyz/resourceGroups/rhctestenv/providers/Microsoft.ClassicCompute/virtualMachines/rhctes tenvV1PI/providers/Microsoft.ResourceHealth/availabilityStatuses/2016-03-28+16%3a23%3a00Z"), // Location: to.Ptr("eastus"), // Properties: &armresourcehealth.AvailabilityStatusProperties{ // AvailabilityState: to.Ptr(armresourcehealth.AvailabilityStateValuesAvailable), // DetailedStatus: to.Ptr("There aren’t any known Azure platform problems affecting this virtual machine"), // OccurredTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-28T16:23:00Z"); return t}()), // ReasonChronicity: to.Ptr(armresourcehealth.ReasonChronicityTypesPersistent), // Summary: to.Ptr("This virtual machine is running normally"), // }, // }}, // } } }
Output:
type AvailabilityStatusesClientGetByResourceOptions ¶ added in v0.3.0
type AvailabilityStatusesClientGetByResourceOptions struct { // Setting $expand=recommendedactions in url query expands the recommendedactions in the response. Expand *string // The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN Filter *string }
AvailabilityStatusesClientGetByResourceOptions contains the optional parameters for the AvailabilityStatusesClient.GetByResource method.
type AvailabilityStatusesClientGetByResourceResponse ¶ added in v0.3.0
type AvailabilityStatusesClientGetByResourceResponse struct {
AvailabilityStatus
}
AvailabilityStatusesClientGetByResourceResponse contains the response from method AvailabilityStatusesClient.GetByResource.
type AvailabilityStatusesClientListByResourceGroupOptions ¶ added in v0.3.0
type AvailabilityStatusesClientListByResourceGroupOptions struct { // Setting $expand=recommendedactions in url query expands the recommendedactions in the response. Expand *string // The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN Filter *string }
AvailabilityStatusesClientListByResourceGroupOptions contains the optional parameters for the AvailabilityStatusesClient.NewListByResourceGroupPager method.
type AvailabilityStatusesClientListByResourceGroupResponse ¶ added in v0.3.0
type AvailabilityStatusesClientListByResourceGroupResponse struct {
AvailabilityStatusListResult
}
AvailabilityStatusesClientListByResourceGroupResponse contains the response from method AvailabilityStatusesClient.NewListByResourceGroupPager.
type AvailabilityStatusesClientListBySubscriptionIDOptions ¶ added in v0.3.0
type AvailabilityStatusesClientListBySubscriptionIDOptions struct { // Setting $expand=recommendedactions in url query expands the recommendedactions in the response. Expand *string // The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN Filter *string }
AvailabilityStatusesClientListBySubscriptionIDOptions contains the optional parameters for the AvailabilityStatusesClient.NewListBySubscriptionIDPager method.
type AvailabilityStatusesClientListBySubscriptionIDResponse ¶ added in v0.3.0
type AvailabilityStatusesClientListBySubscriptionIDResponse struct {
AvailabilityStatusListResult
}
AvailabilityStatusesClientListBySubscriptionIDResponse contains the response from method AvailabilityStatusesClient.NewListBySubscriptionIDPager.
type AvailabilityStatusesClientListOptions ¶ added in v0.3.0
type AvailabilityStatusesClientListOptions struct { // Setting $expand=recommendedactions in url query expands the recommendedactions in the response. Expand *string // The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN Filter *string }
AvailabilityStatusesClientListOptions contains the optional parameters for the AvailabilityStatusesClient.NewListPager method.
type AvailabilityStatusesClientListResponse ¶ added in v0.3.0
type AvailabilityStatusesClientListResponse struct {
AvailabilityStatusListResult
}
AvailabilityStatusesClientListResponse contains the response from method AvailabilityStatusesClient.NewListPager.
type ClientFactory ¶ added in v1.1.0
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶ added in v1.1.0
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 - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewAvailabilityStatusesClient ¶ added in v1.1.0
func (c *ClientFactory) NewAvailabilityStatusesClient() *AvailabilityStatusesClient
func (*ClientFactory) NewOperationsClient ¶ added in v1.1.0
func (c *ClientFactory) NewOperationsClient() *OperationsClient
type ErrorResponse ¶
type ErrorResponse struct { // The error object. Error *ErrorResponseError `json:"error,omitempty"` }
ErrorResponse - Error details.
func (ErrorResponse) MarshalJSON ¶ added in v1.1.0
func (e ErrorResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorResponse.
func (*ErrorResponse) UnmarshalJSON ¶ added in v1.1.0
func (e *ErrorResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.
type ErrorResponseError ¶ added in v0.5.0
type ErrorResponseError struct { // READ-ONLY; The error code. Code *string `json:"code,omitempty" azure:"ro"` // READ-ONLY; The error details. Details *string `json:"details,omitempty" azure:"ro"` // READ-ONLY; The error message. Message *string `json:"message,omitempty" azure:"ro"` }
ErrorResponseError - The error object.
func (ErrorResponseError) MarshalJSON ¶ added in v1.1.0
func (e ErrorResponseError) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorResponseError.
func (*ErrorResponseError) UnmarshalJSON ¶ added in v1.1.0
func (e *ErrorResponseError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponseError.
type ImpactedRegion ¶
type ImpactedRegion struct { // The impacted region id. ID *string `json:"id,omitempty"` // The impacted region name. Name *string `json:"name,omitempty"` }
ImpactedRegion - Object of impacted region.
func (ImpactedRegion) MarshalJSON ¶ added in v1.1.0
func (i ImpactedRegion) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImpactedRegion.
func (*ImpactedRegion) UnmarshalJSON ¶ added in v1.1.0
func (i *ImpactedRegion) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImpactedRegion.
type ImpactedResourceStatus ¶ added in v0.5.0
type ImpactedResourceStatus struct { // Properties of impacted resource status. Properties *ImpactedResourceStatusProperties `json:"properties,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
ImpactedResourceStatus - impactedResource with health status
func (ImpactedResourceStatus) MarshalJSON ¶ added in v1.1.0
func (i ImpactedResourceStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImpactedResourceStatus.
func (*ImpactedResourceStatus) UnmarshalJSON ¶ added in v1.1.0
func (i *ImpactedResourceStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImpactedResourceStatus.
type ImpactedResourceStatusProperties ¶ added in v0.5.0
type ImpactedResourceStatusProperties struct { // Impacted resource status of the resource. AvailabilityState *AvailabilityStateValues `json:"availabilityState,omitempty"` // Timestamp for when last change in health status occurred. OccurredTime *time.Time `json:"occurredTime,omitempty"` // When the resource's availabilityState is Unavailable, it describes where the health impacting event was originated. ReasonType *ReasonTypeValues `json:"reasonType,omitempty"` // Summary description of the impacted resource status. Summary *string `json:"summary,omitempty"` // Title description of the impacted resource status. Title *string `json:"title,omitempty"` }
ImpactedResourceStatusProperties - Properties of impacted resource status.
func (ImpactedResourceStatusProperties) MarshalJSON ¶ added in v0.5.0
func (i ImpactedResourceStatusProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImpactedResourceStatusProperties.
func (*ImpactedResourceStatusProperties) UnmarshalJSON ¶ added in v0.5.0
func (i *ImpactedResourceStatusProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImpactedResourceStatusProperties.
type Operation ¶
type Operation struct { // Properties of the operation. Display *OperationDisplay `json:"display,omitempty"` // Name of the operation. Name *string `json:"name,omitempty"` }
Operation available in the resourcehealth resource provider.
func (Operation) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Operation.
type OperationDisplay ¶
type OperationDisplay struct { // Description of the operation. Description *string `json:"description,omitempty"` // Operation name. Operation *string `json:"operation,omitempty"` // Provider name. Provider *string `json:"provider,omitempty"` // Resource name. Resource *string `json:"resource,omitempty"` }
OperationDisplay - Properties of the operation.
func (OperationDisplay) MarshalJSON ¶ added in v1.1.0
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶ added in v1.1.0
func (o *OperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.
type OperationListResult ¶
type OperationListResult struct { // REQUIRED; List of operations available in the resourcehealth resource provider. Value []*Operation `json:"value,omitempty"` }
OperationListResult - Lists the operations response.
func (OperationListResult) MarshalJSON ¶
func (o OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationListResult.
func (*OperationListResult) UnmarshalJSON ¶ added in v1.1.0
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) List ¶
func (client *OperationsClient) List(ctx context.Context, options *OperationsClientListOptions) (OperationsClientListResponse, error)
List - Lists available operations for the resourcehealth resource provider If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-05-01
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2020-05-01/examples/Operations_List.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcehealth/armresourcehealth" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armresourcehealth.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewOperationsClient().List(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.OperationListResult = armresourcehealth.OperationListResult{ // Value: []*armresourcehealth.Operation{ // { // Name: to.Ptr("Microsoft.ResourceHealth/Operations/read"), // Display: &armresourcehealth.OperationDisplay{ // Description: to.Ptr("Get the operations available for the Microsoft ResourceHealth"), // Operation: to.Ptr("Get Operations"), // Provider: to.Ptr("Microsoft ResourceHealth"), // Resource: to.Ptr("Availability Status"), // }, // }, // { // Name: to.Ptr("Microsoft.ResourceHealth/Notifications/read"), // Display: &armresourcehealth.OperationDisplay{ // Description: to.Ptr("Receives ARM notifications"), // Operation: to.Ptr("Receive notification"), // Provider: to.Ptr("Microsoft ResourceHealth"), // Resource: to.Ptr("Notification"), // }, // }, // { // Name: to.Ptr("Microsoft.ResourceHealth/AvailabilityStatuses/read"), // Display: &armresourcehealth.OperationDisplay{ // Description: to.Ptr("Gets the availability statuses for all resources in the specified scope"), // Operation: to.Ptr("Get Availability Statuses"), // Provider: to.Ptr("Microsoft ResourceHealth"), // Resource: to.Ptr("Availability Status"), // }, // }, // { // Name: to.Ptr("Microsoft.ResourceHealth/AvailabilityStatuses/current/read"), // Display: &armresourcehealth.OperationDisplay{ // Description: to.Ptr("Gets the availability status for the specified resource"), // Operation: to.Ptr("Get Availability Status"), // Provider: to.Ptr("Microsoft ResourceHealth"), // Resource: to.Ptr("Availability Status"), // }, // }, // { // Name: to.Ptr("Microsoft.ResourceHealth/events/read"), // Display: &armresourcehealth.OperationDisplay{ // Description: to.Ptr("Get Service Health Events for given subscription"), // Operation: to.Ptr("Get Service Health Events"), // Provider: to.Ptr("Microsoft ResourceHealth"), // Resource: to.Ptr("Events"), // }, // }, // { // Name: to.Ptr("Microsoft.ResourceHealth/emergingissues/read"), // Display: &armresourcehealth.OperationDisplay{ // Description: to.Ptr("Get Azure services' emerging issues"), // Operation: to.Ptr("Get Azure Emerging Issues"), // Provider: to.Ptr("Microsoft ResourceHealth"), // Resource: to.Ptr("Emerging Issues"), // }, // }, // { // Name: to.Ptr("Microsoft.ResourceHealth/potentialoutages/read"), // Display: &armresourcehealth.OperationDisplay{ // Provider: to.Ptr("Microsoft ResourceHealth"), // }, // }, // { // Name: to.Ptr("Microsoft.ResourceHealth/impactedResources/read"), // Display: &armresourcehealth.OperationDisplay{ // Description: to.Ptr("Get Impacted Resources for given subscription"), // Operation: to.Ptr("Get Impacted Resources"), // Provider: to.Ptr("Microsoft ResourceHealth"), // Resource: to.Ptr("Impacted Resources"), // }, // }, // { // Name: to.Ptr("Microsoft.ResourceHealth/register/action"), // Display: &armresourcehealth.OperationDisplay{ // Description: to.Ptr("Registers the subscription for the Microsoft ResourceHealth"), // Operation: to.Ptr("Register with the Provider"), // Provider: to.Ptr("Microsoft ResourceHealth"), // Resource: to.Ptr("Registration"), // }, // }, // { // Name: to.Ptr("Microsoft.ResourceHealth/unregister/action"), // Display: &armresourcehealth.OperationDisplay{ // Description: to.Ptr("Unregisters the subscription for the Microsoft ResourceHealth"), // Operation: to.Ptr("Unregister with the Provider"), // Provider: to.Ptr("Microsoft ResourceHealth"), // Resource: to.Ptr("Unregistration"), // }, // }, // { // Name: to.Ptr("Microsoft.Resourcehealth/healthevent/action"), // Display: &armresourcehealth.OperationDisplay{ // Description: to.Ptr("Denotes the change in health state for the specified resource"), // Operation: to.Ptr("HealthEvent Change"), // Provider: to.Ptr("Microsoft ResourceHealth"), // Resource: to.Ptr("Availability Status"), // }, // }, // { // Name: to.Ptr("Microsoft.Resourcehealth/healthevent/Activated/action"), // Display: &armresourcehealth.OperationDisplay{ // Description: to.Ptr("Denotes the change in health state for the specified resource"), // Operation: to.Ptr("Health Event Activated"), // Provider: to.Ptr("Microsoft ResourceHealth"), // Resource: to.Ptr("Health Event"), // }, // }, // { // Name: to.Ptr("Microsoft.Resourcehealth/healthevent/Updated/action"), // Display: &armresourcehealth.OperationDisplay{ // Description: to.Ptr("Denotes the change in health state for the specified resource"), // Operation: to.Ptr("Health Event Updated"), // Provider: to.Ptr("Microsoft ResourceHealth"), // Resource: to.Ptr("Health Event"), // }, // }, // { // Name: to.Ptr("Microsoft.Resourcehealth/healthevent/Resolved/action"), // Display: &armresourcehealth.OperationDisplay{ // Description: to.Ptr("Denotes the change in health state for the specified resource"), // Operation: to.Ptr("Health Event Resolved"), // Provider: to.Ptr("Microsoft ResourceHealth"), // Resource: to.Ptr("Health Event"), // }, // }, // { // Name: to.Ptr("Microsoft.Resourcehealth/healthevent/InProgress/action"), // Display: &armresourcehealth.OperationDisplay{ // Description: to.Ptr("Denotes the change in health state for the specified resource"), // Operation: to.Ptr("Health Event InProgress"), // Provider: to.Ptr("Microsoft ResourceHealth"), // Resource: to.Ptr("Health Event"), // }, // }, // { // Name: to.Ptr("Microsoft.Resourcehealth/healthevent/Pending/action"), // Display: &armresourcehealth.OperationDisplay{ // Description: to.Ptr("Denotes the change in health state for the specified resource"), // Operation: to.Ptr("Health Event Pending"), // Provider: to.Ptr("Microsoft ResourceHealth"), // Resource: to.Ptr("Health Event"), // }, // }, // { // Name: to.Ptr("Microsoft.ResourceHealth/metadata/read"), // Display: &armresourcehealth.OperationDisplay{ // Description: to.Ptr("Gets Metadata"), // Operation: to.Ptr("Read Metadata"), // Provider: to.Ptr("Microsoft ResourceHealth"), // Resource: to.Ptr("Metadata"), // }, // }}, // } }
Output:
type OperationsClientListOptions ¶ added in v0.3.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
type OperationsClientListResponse ¶ added in v0.3.0
type OperationsClientListResponse struct {
OperationListResult
}
OperationsClientListResponse contains the response from method OperationsClient.List.
type ReasonChronicityTypes ¶
type ReasonChronicityTypes string
ReasonChronicityTypes - Chronicity of the availability transition.
const ( ReasonChronicityTypesPersistent ReasonChronicityTypes = "Persistent" ReasonChronicityTypesTransient ReasonChronicityTypes = "Transient" )
func PossibleReasonChronicityTypesValues ¶
func PossibleReasonChronicityTypesValues() []ReasonChronicityTypes
PossibleReasonChronicityTypesValues returns the possible values for the ReasonChronicityTypes const type.
type ReasonTypeValues ¶ added in v0.5.0
type ReasonTypeValues string
ReasonTypeValues - When the resource's availabilityState is Unavailable, it describes where the health impacting event was originated.
const ( ReasonTypeValuesPlanned ReasonTypeValues = "Planned" ReasonTypeValuesUnplanned ReasonTypeValues = "Unplanned" ReasonTypeValuesUserInitiated ReasonTypeValues = "UserInitiated" )
func PossibleReasonTypeValuesValues ¶ added in v0.5.0
func PossibleReasonTypeValuesValues() []ReasonTypeValues
PossibleReasonTypeValuesValues returns the possible values for the ReasonTypeValues const type.
type RecommendedAction ¶
type RecommendedAction struct { // Recommended action. Action *string `json:"action,omitempty"` // Link to the action ActionURL *string `json:"actionUrl,omitempty"` // Substring of action, it describes which text should host the action url. ActionURLText *string `json:"actionUrlText,omitempty"` }
RecommendedAction - Lists actions the user can take based on the current availabilityState of the resource.
func (RecommendedAction) MarshalJSON ¶ added in v1.1.0
func (r RecommendedAction) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecommendedAction.
func (*RecommendedAction) UnmarshalJSON ¶ added in v1.1.0
func (r *RecommendedAction) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RecommendedAction.
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 `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
Resource - Common fields that are returned in the response for all Azure Resource Manager resources
func (Resource) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type Resource.
func (*Resource) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Resource.
type ServiceImpactingEvent ¶
type ServiceImpactingEvent struct { // Correlation id for the event CorrelationID *string `json:"correlationId,omitempty"` // Timestamp for when the event started. EventStartTime *time.Time `json:"eventStartTime,omitempty"` // Timestamp for when event was submitted/detected. EventStatusLastModifiedTime *time.Time `json:"eventStatusLastModifiedTime,omitempty"` // Properties of the service impacting event. IncidentProperties *ServiceImpactingEventIncidentProperties `json:"incidentProperties,omitempty"` // Status of the service impacting event. Status *ServiceImpactingEventStatus `json:"status,omitempty"` }
ServiceImpactingEvent - Lists the service impacting events that may be affecting the health of the resource.
func (ServiceImpactingEvent) MarshalJSON ¶
func (s ServiceImpactingEvent) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceImpactingEvent.
func (*ServiceImpactingEvent) UnmarshalJSON ¶
func (s *ServiceImpactingEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceImpactingEvent.
type ServiceImpactingEventIncidentProperties ¶
type ServiceImpactingEventIncidentProperties struct { // Type of Event. IncidentType *string `json:"incidentType,omitempty"` // Region impacted by the event. Region *string `json:"region,omitempty"` // Service impacted by the event. Service *string `json:"service,omitempty"` // Title of the incident. Title *string `json:"title,omitempty"` }
ServiceImpactingEventIncidentProperties - Properties of the service impacting event.
func (ServiceImpactingEventIncidentProperties) MarshalJSON ¶ added in v1.1.0
func (s ServiceImpactingEventIncidentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceImpactingEventIncidentProperties.
func (*ServiceImpactingEventIncidentProperties) UnmarshalJSON ¶ added in v1.1.0
func (s *ServiceImpactingEventIncidentProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceImpactingEventIncidentProperties.
type ServiceImpactingEventStatus ¶
type ServiceImpactingEventStatus struct { // Current status of the event Value *string `json:"value,omitempty"` }
ServiceImpactingEventStatus - Status of the service impacting event.
func (ServiceImpactingEventStatus) MarshalJSON ¶ added in v1.1.0
func (s ServiceImpactingEventStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceImpactingEventStatus.
func (*ServiceImpactingEventStatus) UnmarshalJSON ¶ added in v1.1.0
func (s *ServiceImpactingEventStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceImpactingEventStatus.
type StatusBanner ¶
type StatusBanner struct { // The cloud type of this banner. Cloud *string `json:"cloud,omitempty"` // The last time modified on this banner. LastModifiedTime *time.Time `json:"lastModifiedTime,omitempty"` // The details of banner. Message *string `json:"message,omitempty"` // The banner title. Title *string `json:"title,omitempty"` }
StatusBanner - Banner type of emerging issue.
func (StatusBanner) MarshalJSON ¶
func (s StatusBanner) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StatusBanner.
func (*StatusBanner) UnmarshalJSON ¶
func (s *StatusBanner) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StatusBanner.