Documentation ¶
Index ¶
- type ClientFactory
- func (c *ClientFactory) NewMonitorClient() *MonitorClient
- func (c *ClientFactory) NewMonitorsClient() *MonitorsClient
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewSingleSignOnClient() *SingleSignOnClient
- func (c *ClientFactory) NewSubAccountClient() *SubAccountClient
- func (c *ClientFactory) NewSubAccountTagRulesClient() *SubAccountTagRulesClient
- func (c *ClientFactory) NewTagRulesClient() *TagRulesClient
- type CreatedByType
- type ErrorAdditionalInfo
- type ErrorDetail
- type ErrorResponse
- type FilteringTag
- type IdentityProperties
- type LiftrResourceCategories
- type LogRules
- type ManagedIdentityTypes
- type MarketplaceSubscriptionStatus
- type MonitorClient
- func (client *MonitorClient) NewListVMHostUpdatePager(resourceGroupName string, monitorName string, ...) *runtime.Pager[MonitorClientListVMHostUpdateResponse]
- func (client *MonitorClient) NewListVMHostsPager(resourceGroupName string, monitorName string, ...) *runtime.Pager[MonitorClientListVMHostsResponse]
- func (client *MonitorClient) VMHostPayload(ctx context.Context, resourceGroupName string, monitorName string, ...) (MonitorClientVMHostPayloadResponse, error)
- type MonitorClientListVMHostUpdateOptions
- type MonitorClientListVMHostUpdateResponse
- type MonitorClientListVMHostsOptions
- type MonitorClientListVMHostsResponse
- type MonitorClientVMHostPayloadOptions
- type MonitorClientVMHostPayloadResponse
- type MonitorProperties
- type MonitorResource
- type MonitorResourceListResponse
- type MonitorResourceUpdateParameters
- type MonitorUpdateProperties
- type MonitoredResource
- type MonitoredResourceListResponse
- type MonitoringStatus
- type MonitoringTagRules
- type MonitoringTagRulesListResponse
- type MonitoringTagRulesProperties
- type MonitorsClient
- func (client *MonitorsClient) BeginCreate(ctx context.Context, resourceGroupName string, monitorName string, ...) (*runtime.Poller[MonitorsClientCreateResponse], error)
- func (client *MonitorsClient) BeginDelete(ctx context.Context, resourceGroupName string, monitorName string, ...) (*runtime.Poller[MonitorsClientDeleteResponse], error)
- func (client *MonitorsClient) Get(ctx context.Context, resourceGroupName string, monitorName string, ...) (MonitorsClientGetResponse, error)
- func (client *MonitorsClient) NewListByResourceGroupPager(resourceGroupName string, options *MonitorsClientListByResourceGroupOptions) *runtime.Pager[MonitorsClientListByResourceGroupResponse]
- func (client *MonitorsClient) NewListBySubscriptionPager(options *MonitorsClientListBySubscriptionOptions) *runtime.Pager[MonitorsClientListBySubscriptionResponse]
- func (client *MonitorsClient) NewListMonitoredResourcesPager(resourceGroupName string, monitorName string, ...) *runtime.Pager[MonitorsClientListMonitoredResourcesResponse]
- func (client *MonitorsClient) NewListUserRolesPager(resourceGroupName string, monitorName string, ...) *runtime.Pager[MonitorsClientListUserRolesResponse]
- func (client *MonitorsClient) Update(ctx context.Context, resourceGroupName string, monitorName string, ...) (MonitorsClientUpdateResponse, error)
- type MonitorsClientBeginCreateOptions
- type MonitorsClientBeginDeleteOptions
- type MonitorsClientCreateResponse
- type MonitorsClientDeleteResponse
- type MonitorsClientGetOptions
- type MonitorsClientGetResponse
- type MonitorsClientListByResourceGroupOptions
- type MonitorsClientListByResourceGroupResponse
- type MonitorsClientListBySubscriptionOptions
- type MonitorsClientListBySubscriptionResponse
- type MonitorsClientListMonitoredResourcesOptions
- type MonitorsClientListMonitoredResourcesResponse
- type MonitorsClientListUserRolesOptions
- type MonitorsClientListUserRolesResponse
- type MonitorsClientUpdateOptions
- type MonitorsClientUpdateResponse
- type OperationDisplay
- type OperationListResult
- type OperationResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type OrganizationProperties
- type PlanData
- type ProvisioningState
- type SingleSignOnClient
- func (client *SingleSignOnClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, monitorName string, ...) (*runtime.Poller[SingleSignOnClientCreateOrUpdateResponse], error)
- func (client *SingleSignOnClient) Get(ctx context.Context, resourceGroupName string, monitorName string, ...) (SingleSignOnClientGetResponse, error)
- func (client *SingleSignOnClient) NewListPager(resourceGroupName string, monitorName string, ...) *runtime.Pager[SingleSignOnClientListResponse]
- type SingleSignOnClientBeginCreateOrUpdateOptions
- type SingleSignOnClientCreateOrUpdateResponse
- type SingleSignOnClientGetOptions
- type SingleSignOnClientGetResponse
- type SingleSignOnClientListOptions
- type SingleSignOnClientListResponse
- type SingleSignOnProperties
- type SingleSignOnResource
- type SingleSignOnResourceListResponse
- type SingleSignOnStates
- type SubAccountClient
- func (client *SubAccountClient) BeginCreate(ctx context.Context, resourceGroupName string, monitorName string, ...) (*runtime.Poller[SubAccountClientCreateResponse], error)
- func (client *SubAccountClient) BeginDelete(ctx context.Context, resourceGroupName string, monitorName string, ...) (*runtime.Poller[SubAccountClientDeleteResponse], error)
- func (client *SubAccountClient) Get(ctx context.Context, resourceGroupName string, monitorName string, ...) (SubAccountClientGetResponse, error)
- func (client *SubAccountClient) NewListMonitoredResourcesPager(resourceGroupName string, monitorName string, subAccountName string, ...) *runtime.Pager[SubAccountClientListMonitoredResourcesResponse]
- func (client *SubAccountClient) NewListPager(resourceGroupName string, monitorName string, ...) *runtime.Pager[SubAccountClientListResponse]
- func (client *SubAccountClient) NewListVMHostUpdatePager(resourceGroupName string, monitorName string, subAccountName string, ...) *runtime.Pager[SubAccountClientListVMHostUpdateResponse]
- func (client *SubAccountClient) NewListVMHostsPager(resourceGroupName string, monitorName string, subAccountName string, ...) *runtime.Pager[SubAccountClientListVMHostsResponse]
- func (client *SubAccountClient) Update(ctx context.Context, resourceGroupName string, monitorName string, ...) (SubAccountClientUpdateResponse, error)
- func (client *SubAccountClient) VMHostPayload(ctx context.Context, resourceGroupName string, monitorName string, ...) (SubAccountClientVMHostPayloadResponse, error)
- type SubAccountClientBeginCreateOptions
- type SubAccountClientBeginDeleteOptions
- type SubAccountClientCreateResponse
- type SubAccountClientDeleteResponse
- type SubAccountClientGetOptions
- type SubAccountClientGetResponse
- type SubAccountClientListMonitoredResourcesOptions
- type SubAccountClientListMonitoredResourcesResponse
- type SubAccountClientListOptions
- type SubAccountClientListResponse
- type SubAccountClientListVMHostUpdateOptions
- type SubAccountClientListVMHostUpdateResponse
- type SubAccountClientListVMHostsOptions
- type SubAccountClientListVMHostsResponse
- type SubAccountClientUpdateOptions
- type SubAccountClientUpdateResponse
- type SubAccountClientVMHostPayloadOptions
- type SubAccountClientVMHostPayloadResponse
- type SubAccountTagRulesClient
- func (client *SubAccountTagRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, monitorName string, ...) (SubAccountTagRulesClientCreateOrUpdateResponse, error)
- func (client *SubAccountTagRulesClient) Delete(ctx context.Context, resourceGroupName string, monitorName string, ...) (SubAccountTagRulesClientDeleteResponse, error)
- func (client *SubAccountTagRulesClient) Get(ctx context.Context, resourceGroupName string, monitorName string, ...) (SubAccountTagRulesClientGetResponse, error)
- func (client *SubAccountTagRulesClient) NewListPager(resourceGroupName string, monitorName string, subAccountName string, ...) *runtime.Pager[SubAccountTagRulesClientListResponse]
- type SubAccountTagRulesClientCreateOrUpdateOptions
- type SubAccountTagRulesClientCreateOrUpdateResponse
- type SubAccountTagRulesClientDeleteOptions
- type SubAccountTagRulesClientDeleteResponse
- type SubAccountTagRulesClientGetOptions
- type SubAccountTagRulesClientGetResponse
- type SubAccountTagRulesClientListOptions
- type SubAccountTagRulesClientListResponse
- type SystemData
- type TagAction
- type TagRulesClient
- func (client *TagRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, monitorName string, ...) (TagRulesClientCreateOrUpdateResponse, error)
- func (client *TagRulesClient) Delete(ctx context.Context, resourceGroupName string, monitorName string, ...) (TagRulesClientDeleteResponse, error)
- func (client *TagRulesClient) Get(ctx context.Context, resourceGroupName string, monitorName string, ...) (TagRulesClientGetResponse, error)
- func (client *TagRulesClient) NewListPager(resourceGroupName string, monitorName string, ...) *runtime.Pager[TagRulesClientListResponse]
- type TagRulesClientCreateOrUpdateOptions
- type TagRulesClientCreateOrUpdateResponse
- type TagRulesClientDeleteOptions
- type TagRulesClientDeleteResponse
- type TagRulesClientGetOptions
- type TagRulesClientGetResponse
- type TagRulesClientListOptions
- type TagRulesClientListResponse
- type UserInfo
- type UserRole
- type UserRoleListResponse
- type UserRoleRequest
- type UserRoleResponse
- type VMExtensionPayload
- type VMHostUpdateRequest
- type VMHostUpdateStates
- type VMResources
- type VMResourcesListResponse
Examples ¶
- MonitorClient.NewListVMHostUpdatePager
- MonitorClient.NewListVMHostsPager
- MonitorClient.VMHostPayload
- MonitorsClient.BeginCreate
- MonitorsClient.BeginDelete
- MonitorsClient.Get
- MonitorsClient.NewListByResourceGroupPager
- MonitorsClient.NewListBySubscriptionPager
- MonitorsClient.NewListMonitoredResourcesPager
- MonitorsClient.NewListUserRolesPager
- MonitorsClient.Update
- OperationsClient.NewListPager
- SingleSignOnClient.BeginCreateOrUpdate
- SingleSignOnClient.Get
- SingleSignOnClient.NewListPager
- SubAccountClient.BeginCreate
- SubAccountClient.BeginDelete
- SubAccountClient.Get
- SubAccountClient.NewListMonitoredResourcesPager
- SubAccountClient.NewListPager
- SubAccountClient.NewListVMHostUpdatePager
- SubAccountClient.NewListVMHostsPager
- SubAccountClient.Update
- SubAccountClient.VMHostPayload
- SubAccountTagRulesClient.CreateOrUpdate
- SubAccountTagRulesClient.Delete
- SubAccountTagRulesClient.Get
- SubAccountTagRulesClient.NewListPager
- TagRulesClient.CreateOrUpdate
- TagRulesClient.Delete
- TagRulesClient.Get
- TagRulesClient.NewListPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 - 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) NewMonitorClient ¶ added in v1.1.0
func (c *ClientFactory) NewMonitorClient() *MonitorClient
NewMonitorClient creates a new instance of MonitorClient.
func (*ClientFactory) NewMonitorsClient ¶ added in v1.1.0
func (c *ClientFactory) NewMonitorsClient() *MonitorsClient
NewMonitorsClient creates a new instance of MonitorsClient.
func (*ClientFactory) NewOperationsClient ¶ added in v1.1.0
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewSingleSignOnClient ¶ added in v1.1.0
func (c *ClientFactory) NewSingleSignOnClient() *SingleSignOnClient
NewSingleSignOnClient creates a new instance of SingleSignOnClient.
func (*ClientFactory) NewSubAccountClient ¶ added in v1.1.0
func (c *ClientFactory) NewSubAccountClient() *SubAccountClient
NewSubAccountClient creates a new instance of SubAccountClient.
func (*ClientFactory) NewSubAccountTagRulesClient ¶ added in v1.1.0
func (c *ClientFactory) NewSubAccountTagRulesClient() *SubAccountTagRulesClient
NewSubAccountTagRulesClient creates a new instance of SubAccountTagRulesClient.
func (*ClientFactory) NewTagRulesClient ¶ added in v1.1.0
func (c *ClientFactory) NewTagRulesClient() *TagRulesClient
NewTagRulesClient creates a new instance of TagRulesClient.
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 ¶ added in v1.1.0
func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.
func (*ErrorAdditionalInfo) UnmarshalJSON ¶ added in v1.1.0
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 ¶ added in v1.1.0
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 ¶ 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 FilteringTag ¶
type FilteringTag struct { // Valid actions for a filtering tag. Exclusion takes priority over inclusion. Action *TagAction // The name (also known as the key) of the tag. Name *string // The value of the tag. Value *string }
FilteringTag - The definition of a filtering tag. Filtering tags are used for capturing resources and include/exclude them from being monitored.
func (FilteringTag) MarshalJSON ¶ added in v1.1.0
func (f FilteringTag) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FilteringTag.
func (*FilteringTag) UnmarshalJSON ¶ added in v1.1.0
func (f *FilteringTag) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FilteringTag.
type IdentityProperties ¶
type IdentityProperties struct { Type *ManagedIdentityTypes // READ-ONLY; The identity ID. PrincipalID *string // READ-ONLY; The tenant ID of resource. TenantID *string }
func (IdentityProperties) MarshalJSON ¶ added in v1.1.0
func (i IdentityProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type IdentityProperties.
func (*IdentityProperties) UnmarshalJSON ¶ added in v1.1.0
func (i *IdentityProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProperties.
type LiftrResourceCategories ¶
type LiftrResourceCategories string
const ( LiftrResourceCategoriesMonitorLogs LiftrResourceCategories = "MonitorLogs" LiftrResourceCategoriesUnknown LiftrResourceCategories = "Unknown" )
func PossibleLiftrResourceCategoriesValues ¶
func PossibleLiftrResourceCategoriesValues() []LiftrResourceCategories
PossibleLiftrResourceCategoriesValues returns the possible values for the LiftrResourceCategories const type.
type LogRules ¶
type LogRules struct { // List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, // all resources will be captured. If only Exclude action is specified, the // rules will apply to the list of all available resources. If Include actions are specified, the rules will only include // resources with the associated tags. FilteringTags []*FilteringTag // Flag specifying if AAD logs should be sent for the Monitor resource. SendAADLogs *bool // Flag specifying if activity logs from Azure resources should be sent for the Monitor resource. SendActivityLogs *bool // Flag specifying if subscription logs should be sent for the Monitor resource. SendSubscriptionLogs *bool }
LogRules - Set of rules for sending logs for the Monitor resource.
func (LogRules) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type LogRules.
func (*LogRules) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type LogRules.
type ManagedIdentityTypes ¶
type ManagedIdentityTypes string
const ( ManagedIdentityTypesSystemAssigned ManagedIdentityTypes = "SystemAssigned" ManagedIdentityTypesUserAssigned ManagedIdentityTypes = "UserAssigned" )
func PossibleManagedIdentityTypesValues ¶
func PossibleManagedIdentityTypesValues() []ManagedIdentityTypes
PossibleManagedIdentityTypesValues returns the possible values for the ManagedIdentityTypes const type.
type MarketplaceSubscriptionStatus ¶
type MarketplaceSubscriptionStatus string
MarketplaceSubscriptionStatus - Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state.
const ( MarketplaceSubscriptionStatusActive MarketplaceSubscriptionStatus = "Active" MarketplaceSubscriptionStatusSuspended MarketplaceSubscriptionStatus = "Suspended" )
func PossibleMarketplaceSubscriptionStatusValues ¶
func PossibleMarketplaceSubscriptionStatusValues() []MarketplaceSubscriptionStatus
PossibleMarketplaceSubscriptionStatusValues returns the possible values for the MarketplaceSubscriptionStatus const type.
type MonitorClient ¶
type MonitorClient struct {
// contains filtered or unexported fields
}
MonitorClient contains the methods for the Monitor group. Don't use this type directly, use NewMonitorClient() instead.
func NewMonitorClient ¶
func NewMonitorClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MonitorClient, error)
NewMonitorClient creates a new instance of MonitorClient 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 (*MonitorClient) NewListVMHostUpdatePager ¶ added in v0.4.0
func (client *MonitorClient) NewListVMHostUpdatePager(resourceGroupName string, monitorName string, options *MonitorClientListVMHostUpdateOptions) *runtime.Pager[MonitorClientListVMHostUpdateResponse]
NewListVMHostUpdatePager - Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- options - MonitorClientListVMHostUpdateOptions contains the optional parameters for the MonitorClient.NewListVMHostUpdatePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MainAccount_VMHosts_Update.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewMonitorClient().NewListVMHostUpdatePager("myResourceGroup", "myMonitor", &armlogz.MonitorClientListVMHostUpdateOptions{Body: 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.VMResourcesListResponse = armlogz.VMResourcesListResponse{ // Value: []*armlogz.VMResources{ // { // AgentVersion: to.Ptr("1.0.0beta"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/virtual1"), // }}, // } } }
Output:
func (*MonitorClient) NewListVMHostsPager ¶ added in v0.4.0
func (client *MonitorClient) NewListVMHostsPager(resourceGroupName string, monitorName string, options *MonitorClientListVMHostsOptions) *runtime.Pager[MonitorClientListVMHostsResponse]
NewListVMHostsPager - List the compute resources currently being monitored by the Logz main account resource.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- options - MonitorClientListVMHostsOptions contains the optional parameters for the MonitorClient.NewListVMHostsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MainAccount_VMHosts_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/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewMonitorClient().NewListVMHostsPager("myResourceGroup", "myMonitor", 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.VMResourcesListResponse = armlogz.VMResourcesListResponse{ // Value: []*armlogz.VMResources{ // { // AgentVersion: to.Ptr("1.0.0beta"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/virtual1"), // }}, // } } }
Output:
func (*MonitorClient) VMHostPayload ¶
func (client *MonitorClient) VMHostPayload(ctx context.Context, resourceGroupName string, monitorName string, options *MonitorClientVMHostPayloadOptions) (MonitorClientVMHostPayloadResponse, error)
VMHostPayload - Returns the payload that needs to be passed in the request body for installing Logz.io agent on a VM. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- options - MonitorClientVMHostPayloadOptions contains the optional parameters for the MonitorClient.VMHostPayload method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MainAccount_VMHosts_Payload.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewMonitorClient().VMHostPayload(ctx, "myResourceGroup", "myMonitor", 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.VMExtensionPayload = armlogz.VMExtensionPayload{ // APIKey: to.Ptr("00000000-0000-0000-0000-000000000000"), // Region: to.Ptr("West US 2"), // } }
Output:
type MonitorClientListVMHostUpdateOptions ¶ added in v0.2.0
type MonitorClientListVMHostUpdateOptions struct { // Request body to update the collection for agent installed in the given monitor. Body *VMHostUpdateRequest }
MonitorClientListVMHostUpdateOptions contains the optional parameters for the MonitorClient.NewListVMHostUpdatePager method.
type MonitorClientListVMHostUpdateResponse ¶ added in v0.2.0
type MonitorClientListVMHostUpdateResponse struct { // Response of a list VM Host Update Operation. VMResourcesListResponse }
MonitorClientListVMHostUpdateResponse contains the response from method MonitorClient.NewListVMHostUpdatePager.
type MonitorClientListVMHostsOptions ¶ added in v0.2.0
type MonitorClientListVMHostsOptions struct { }
MonitorClientListVMHostsOptions contains the optional parameters for the MonitorClient.NewListVMHostsPager method.
type MonitorClientListVMHostsResponse ¶ added in v0.2.0
type MonitorClientListVMHostsResponse struct { // Response of a list VM Host Update Operation. VMResourcesListResponse }
MonitorClientListVMHostsResponse contains the response from method MonitorClient.NewListVMHostsPager.
type MonitorClientVMHostPayloadOptions ¶ added in v0.2.0
type MonitorClientVMHostPayloadOptions struct { }
MonitorClientVMHostPayloadOptions contains the optional parameters for the MonitorClient.VMHostPayload method.
type MonitorClientVMHostPayloadResponse ¶ added in v0.2.0
type MonitorClientVMHostPayloadResponse struct { // Response of payload to be passed while installing VM agent. VMExtensionPayload }
MonitorClientVMHostPayloadResponse contains the response from method MonitorClient.VMHostPayload.
type MonitorProperties ¶
type MonitorProperties struct { LogzOrganizationProperties *OrganizationProperties // Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will // go in Suspended state. MarketplaceSubscriptionStatus *MarketplaceSubscriptionStatus // Flag specifying if the resource monitoring is enabled or disabled. MonitoringStatus *MonitoringStatus PlanData *PlanData UserInfo *UserInfo // READ-ONLY LiftrResourceCategory *LiftrResourceCategories // READ-ONLY; The priority of the resource. LiftrResourcePreference *int32 // READ-ONLY; Flag specifying if the resource provisioning state as tracked by ARM. ProvisioningState *ProvisioningState }
MonitorProperties - Properties specific to the monitor resource.
func (MonitorProperties) MarshalJSON ¶ added in v1.1.0
func (m MonitorProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MonitorProperties.
func (*MonitorProperties) UnmarshalJSON ¶ added in v1.1.0
func (m *MonitorProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MonitorProperties.
type MonitorResource ¶ added in v0.2.0
type MonitorResource struct { // REQUIRED Location *string Identity *IdentityProperties // Properties specific to the monitor resource. Properties *MonitorProperties // Dictionary of Tags map[string]*string // READ-ONLY; ARM id of the monitor resource. ID *string // READ-ONLY; Name of the monitor resource. Name *string // READ-ONLY; The system metadata relating to this resource SystemData *SystemData // READ-ONLY; The type of the monitor resource. Type *string }
func (MonitorResource) MarshalJSON ¶ added in v0.2.0
func (m MonitorResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MonitorResource.
func (*MonitorResource) UnmarshalJSON ¶ added in v1.1.0
func (m *MonitorResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MonitorResource.
type MonitorResourceListResponse ¶ added in v0.2.0
type MonitorResourceListResponse struct { // Link to the next set of results, if any. NextLink *string // Results of a list operation. Value []*MonitorResource }
MonitorResourceListResponse - Response of a list operation.
func (MonitorResourceListResponse) MarshalJSON ¶ added in v0.2.0
func (m MonitorResourceListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MonitorResourceListResponse.
func (*MonitorResourceListResponse) UnmarshalJSON ¶ added in v1.1.0
func (m *MonitorResourceListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MonitorResourceListResponse.
type MonitorResourceUpdateParameters ¶ added in v0.2.0
type MonitorResourceUpdateParameters struct { // The set of properties that can be update in a PATCH request to a monitor resource. Properties *MonitorUpdateProperties // The new tags of the monitor resource. Tags map[string]*string }
MonitorResourceUpdateParameters - The parameters for a PATCH request to a monitor resource.
func (MonitorResourceUpdateParameters) MarshalJSON ¶ added in v0.2.0
func (m MonitorResourceUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MonitorResourceUpdateParameters.
func (*MonitorResourceUpdateParameters) UnmarshalJSON ¶ added in v1.1.0
func (m *MonitorResourceUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MonitorResourceUpdateParameters.
type MonitorUpdateProperties ¶
type MonitorUpdateProperties struct { // Flag specifying if the resource monitoring is enabled or disabled. MonitoringStatus *MonitoringStatus }
MonitorUpdateProperties - The set of properties that can be update in a PATCH request to a monitor resource.
func (MonitorUpdateProperties) MarshalJSON ¶ added in v1.1.0
func (m MonitorUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MonitorUpdateProperties.
func (*MonitorUpdateProperties) UnmarshalJSON ¶ added in v1.1.0
func (m *MonitorUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MonitorUpdateProperties.
type MonitoredResource ¶
type MonitoredResource struct { // The ARM id of the resource. ID *string // Reason for why the resource is sending logs (or why it is not sending). ReasonForLogsStatus *string // Reason for why the resource is sending metrics (or why it is not sending). ReasonForMetricsStatus *string // Flag indicating if resource is sending logs to Logz. SendingLogs *bool // Flag indicating if resource is sending metrics to Logz. SendingMetrics *bool // READ-ONLY; Metadata pertaining to creation and last modification of the resource. SystemData *SystemData }
MonitoredResource - The properties of a resource currently being monitored by the Logz monitor resource.
func (MonitoredResource) MarshalJSON ¶ added in v1.1.0
func (m MonitoredResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MonitoredResource.
func (*MonitoredResource) UnmarshalJSON ¶ added in v1.1.0
func (m *MonitoredResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MonitoredResource.
type MonitoredResourceListResponse ¶
type MonitoredResourceListResponse struct { // Link to the next set of results, if any. NextLink *string // Results of a list operation. Value []*MonitoredResource }
MonitoredResourceListResponse - Response of a list operation.
func (MonitoredResourceListResponse) MarshalJSON ¶
func (m MonitoredResourceListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MonitoredResourceListResponse.
func (*MonitoredResourceListResponse) UnmarshalJSON ¶ added in v1.1.0
func (m *MonitoredResourceListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MonitoredResourceListResponse.
type MonitoringStatus ¶
type MonitoringStatus string
MonitoringStatus - Flag specifying if the resource monitoring is enabled or disabled.
const ( MonitoringStatusDisabled MonitoringStatus = "Disabled" MonitoringStatusEnabled MonitoringStatus = "Enabled" )
func PossibleMonitoringStatusValues ¶
func PossibleMonitoringStatusValues() []MonitoringStatus
PossibleMonitoringStatusValues returns the possible values for the MonitoringStatus const type.
type MonitoringTagRules ¶
type MonitoringTagRules struct { // Definition of the properties for a TagRules resource. Properties *MonitoringTagRulesProperties // READ-ONLY; The id of the rule set. ID *string // READ-ONLY; Name of the rule set. Name *string // READ-ONLY; The system metadata relating to this resource SystemData *SystemData // READ-ONLY; The type of the rule set. Type *string }
MonitoringTagRules - Capture logs and metrics of Azure resources based on ARM tags.
func (MonitoringTagRules) MarshalJSON ¶ added in v1.1.0
func (m MonitoringTagRules) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MonitoringTagRules.
func (*MonitoringTagRules) UnmarshalJSON ¶ added in v1.1.0
func (m *MonitoringTagRules) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MonitoringTagRules.
type MonitoringTagRulesListResponse ¶
type MonitoringTagRulesListResponse struct { // Link to the next set of results, if any. NextLink *string // Results of a list operation. Value []*MonitoringTagRules }
MonitoringTagRulesListResponse - Response of a list operation.
func (MonitoringTagRulesListResponse) MarshalJSON ¶
func (m MonitoringTagRulesListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MonitoringTagRulesListResponse.
func (*MonitoringTagRulesListResponse) UnmarshalJSON ¶ added in v1.1.0
func (m *MonitoringTagRulesListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MonitoringTagRulesListResponse.
type MonitoringTagRulesProperties ¶
type MonitoringTagRulesProperties struct { // Set of rules for sending logs for the Monitor resource. LogRules *LogRules // READ-ONLY; Flag specifying if the resource provisioning state as tracked by ARM. ProvisioningState *ProvisioningState // READ-ONLY; Metadata pertaining to creation and last modification of the resource. SystemData *SystemData }
MonitoringTagRulesProperties - Definition of the properties for a TagRules resource.
func (MonitoringTagRulesProperties) MarshalJSON ¶ added in v1.1.0
func (m MonitoringTagRulesProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MonitoringTagRulesProperties.
func (*MonitoringTagRulesProperties) UnmarshalJSON ¶ added in v1.1.0
func (m *MonitoringTagRulesProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MonitoringTagRulesProperties.
type MonitorsClient ¶
type MonitorsClient struct {
// contains filtered or unexported fields
}
MonitorsClient contains the methods for the Monitors group. Don't use this type directly, use NewMonitorsClient() instead.
func NewMonitorsClient ¶
func NewMonitorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MonitorsClient, error)
NewMonitorsClient creates a new instance of MonitorsClient 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 (*MonitorsClient) BeginCreate ¶
func (client *MonitorsClient) BeginCreate(ctx context.Context, resourceGroupName string, monitorName string, options *MonitorsClientBeginCreateOptions) (*runtime.Poller[MonitorsClientCreateResponse], error)
BeginCreate - Create a monitor resource. This create operation can take upto 10 minutes to complete. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- options - MonitorsClientBeginCreateOptions contains the optional parameters for the MonitorsClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_Create.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewMonitorsClient().BeginCreate(ctx, "myResourceGroup", "myMonitor", &armlogz.MonitorsClientBeginCreateOptions{Body: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // 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.MonitorResource = armlogz.MonitorResource{ // Name: to.Ptr("myMonitor"), // Type: to.Ptr("Microsoft.Logz/monitors"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/monitors/myMonitor"), // Location: to.Ptr("West US 2"), // Properties: &armlogz.MonitorProperties{ // ProvisioningState: to.Ptr(armlogz.ProvisioningStateSucceeded), // }, // Tags: map[string]*string{ // "Environment": to.Ptr("Dev"), // }, // } }
Output:
func (*MonitorsClient) BeginDelete ¶
func (client *MonitorsClient) BeginDelete(ctx context.Context, resourceGroupName string, monitorName string, options *MonitorsClientBeginDeleteOptions) (*runtime.Poller[MonitorsClientDeleteResponse], error)
BeginDelete - Delete a monitor resource. This delete operation can take upto 10 minutes to complete. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- options - MonitorsClientBeginDeleteOptions contains the optional parameters for the MonitorsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewMonitorsClient().BeginDelete(ctx, "myResourceGroup", "myMonitor", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*MonitorsClient) Get ¶
func (client *MonitorsClient) Get(ctx context.Context, resourceGroupName string, monitorName string, options *MonitorsClientGetOptions) (MonitorsClientGetResponse, error)
Get - Get the properties of a specific monitor resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- options - MonitorsClientGetOptions contains the optional parameters for the MonitorsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewMonitorsClient().Get(ctx, "myResourceGroup", "myMonitor", 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.MonitorResource = armlogz.MonitorResource{ // Name: to.Ptr("myMonitor"), // Type: to.Ptr("Microsoft.Logz/monitors"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/monitors/myMonitor"), // Location: to.Ptr("West US"), // Properties: &armlogz.MonitorProperties{ // MonitoringStatus: to.Ptr(armlogz.MonitoringStatusEnabled), // PlanData: &armlogz.PlanData{ // BillingCycle: to.Ptr("Monthly"), // EffectiveDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-08-30T13:14:33.000Z"); return t}()), // PlanDetails: to.Ptr("logzapitestplan"), // UsageType: to.Ptr("Committed"), // }, // ProvisioningState: to.Ptr(armlogz.ProvisioningStateSucceeded), // UserInfo: &armlogz.UserInfo{ // EmailAddress: to.Ptr("alice@microsoft.com"), // FirstName: to.Ptr("Alice"), // LastName: to.Ptr("Bob"), // PhoneNumber: to.Ptr("123456"), // }, // }, // Tags: map[string]*string{ // "Environment": to.Ptr("Dev"), // }, // } }
Output:
func (*MonitorsClient) NewListByResourceGroupPager ¶ added in v0.4.0
func (client *MonitorsClient) NewListByResourceGroupPager(resourceGroupName string, options *MonitorsClientListByResourceGroupOptions) *runtime.Pager[MonitorsClientListByResourceGroupResponse]
NewListByResourceGroupPager - List all monitors under the specified resource group.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - MonitorsClientListByResourceGroupOptions contains the optional parameters for the MonitorsClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_ListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewMonitorsClient().NewListByResourceGroupPager("myResourceGroup", 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.MonitorResourceListResponse = armlogz.MonitorResourceListResponse{ // Value: []*armlogz.MonitorResource{ // { // Name: to.Ptr("myMonitor"), // Type: to.Ptr("Microsoft.Logz/monitors"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/monitors/myMonitor"), // Location: to.Ptr("West US"), // Properties: &armlogz.MonitorProperties{ // PlanData: &armlogz.PlanData{ // BillingCycle: to.Ptr("Monthly"), // EffectiveDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-08-30T13:14:33.000Z"); return t}()), // PlanDetails: to.Ptr("logzapitestplan"), // UsageType: to.Ptr("Committed"), // }, // ProvisioningState: to.Ptr(armlogz.ProvisioningStateSucceeded), // UserInfo: &armlogz.UserInfo{ // EmailAddress: to.Ptr("alice@microsoft.com"), // FirstName: to.Ptr("Alice"), // LastName: to.Ptr("Bob"), // PhoneNumber: to.Ptr("123456"), // }, // }, // Tags: map[string]*string{ // "Environment": to.Ptr("Dev"), // }, // }}, // } } }
Output:
func (*MonitorsClient) NewListBySubscriptionPager ¶ added in v0.4.0
func (client *MonitorsClient) NewListBySubscriptionPager(options *MonitorsClientListBySubscriptionOptions) *runtime.Pager[MonitorsClientListBySubscriptionResponse]
NewListBySubscriptionPager - List all monitors under the specified subscription.
Generated from API version 2020-10-01
- options - MonitorsClientListBySubscriptionOptions contains the optional parameters for the MonitorsClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_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/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewMonitorsClient().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.MonitorResourceListResponse = armlogz.MonitorResourceListResponse{ // Value: []*armlogz.MonitorResource{ // { // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/monitors/myMonitor"), // Location: to.Ptr("West US"), // Properties: &armlogz.MonitorProperties{ // MonitoringStatus: to.Ptr(armlogz.MonitoringStatusEnabled), // PlanData: &armlogz.PlanData{ // BillingCycle: to.Ptr("Monthly"), // EffectiveDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-08-30T13:14:33.000Z"); return t}()), // PlanDetails: to.Ptr("logzapitestplan"), // UsageType: to.Ptr("Committed"), // }, // ProvisioningState: to.Ptr(armlogz.ProvisioningStateSucceeded), // UserInfo: &armlogz.UserInfo{ // EmailAddress: to.Ptr("alice@microsoft.com"), // FirstName: to.Ptr("Alice"), // LastName: to.Ptr("Bob"), // PhoneNumber: to.Ptr("123456"), // }, // }, // Tags: map[string]*string{ // "Environment": to.Ptr("Dev"), // }, // }}, // } } }
Output:
func (*MonitorsClient) NewListMonitoredResourcesPager ¶ added in v0.4.0
func (client *MonitorsClient) NewListMonitoredResourcesPager(resourceGroupName string, monitorName string, options *MonitorsClientListMonitoredResourcesOptions) *runtime.Pager[MonitorsClientListMonitoredResourcesResponse]
NewListMonitoredResourcesPager - List the resources currently being monitored by the Logz monitor resource.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- options - MonitorsClientListMonitoredResourcesOptions contains the optional parameters for the MonitorsClient.NewListMonitoredResourcesPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MonitoredResources_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/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewMonitorsClient().NewListMonitoredResourcesPager("myResourceGroup", "myMonitor", 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.MonitoredResourceListResponse = armlogz.MonitoredResourceListResponse{ // Value: []*armlogz.MonitoredResource{ // { // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/monitors/myMonitor/listMonitoredResources"), // ReasonForLogsStatus: to.Ptr("CapturedByRules"), // ReasonForMetricsStatus: to.Ptr("CapturedByRules"), // SendingLogs: to.Ptr(true), // SendingMetrics: to.Ptr(true), // }}, // } } }
Output:
func (*MonitorsClient) NewListUserRolesPager ¶ added in v0.4.0
func (client *MonitorsClient) NewListUserRolesPager(resourceGroupName string, monitorName string, options *MonitorsClientListUserRolesOptions) *runtime.Pager[MonitorsClientListUserRolesResponse]
NewListUserRolesPager - List the user's roles configured on Logz.io side for the account corresponding to the monitor resource.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- options - MonitorsClientListUserRolesOptions contains the optional parameters for the MonitorsClient.NewListUserRolesPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MainAccount_listUserRoles.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewMonitorsClient().NewListUserRolesPager("myResourceGroup", "myMonitor", &armlogz.MonitorsClientListUserRolesOptions{Body: 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.UserRoleListResponse = armlogz.UserRoleListResponse{ // Value: []*armlogz.UserRoleResponse{ // { // Role: to.Ptr(armlogz.UserRoleAdmin), // }}, // } } }
Output:
func (*MonitorsClient) Update ¶
func (client *MonitorsClient) Update(ctx context.Context, resourceGroupName string, monitorName string, options *MonitorsClientUpdateOptions) (MonitorsClientUpdateResponse, error)
Update - Update a monitor resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- options - MonitorsClientUpdateOptions contains the optional parameters for the MonitorsClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_Update.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewMonitorsClient().Update(ctx, "myResourceGroup", "myMonitor", &armlogz.MonitorsClientUpdateOptions{Body: 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.MonitorResource = armlogz.MonitorResource{ // Name: to.Ptr("myMonitor"), // Type: to.Ptr("Microsoft.Logz/monitors"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/monitors/myMonitor"), // Location: to.Ptr("West US"), // Properties: &armlogz.MonitorProperties{ // MonitoringStatus: to.Ptr(armlogz.MonitoringStatusEnabled), // ProvisioningState: to.Ptr(armlogz.ProvisioningStateSucceeded), // }, // Tags: map[string]*string{ // "Environment": to.Ptr("Dev"), // }, // } }
Output:
type MonitorsClientBeginCreateOptions ¶ added in v0.2.0
type MonitorsClientBeginCreateOptions struct { Body *MonitorResource // Resumes the LRO from the provided token. ResumeToken string }
MonitorsClientBeginCreateOptions contains the optional parameters for the MonitorsClient.BeginCreate method.
type MonitorsClientBeginDeleteOptions ¶ added in v0.2.0
type MonitorsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MonitorsClientBeginDeleteOptions contains the optional parameters for the MonitorsClient.BeginDelete method.
type MonitorsClientCreateResponse ¶ added in v0.2.0
type MonitorsClientCreateResponse struct {
MonitorResource
}
MonitorsClientCreateResponse contains the response from method MonitorsClient.BeginCreate.
type MonitorsClientDeleteResponse ¶ added in v0.2.0
type MonitorsClientDeleteResponse struct { }
MonitorsClientDeleteResponse contains the response from method MonitorsClient.BeginDelete.
type MonitorsClientGetOptions ¶ added in v0.2.0
type MonitorsClientGetOptions struct { }
MonitorsClientGetOptions contains the optional parameters for the MonitorsClient.Get method.
type MonitorsClientGetResponse ¶ added in v0.2.0
type MonitorsClientGetResponse struct {
MonitorResource
}
MonitorsClientGetResponse contains the response from method MonitorsClient.Get.
type MonitorsClientListByResourceGroupOptions ¶ added in v0.2.0
type MonitorsClientListByResourceGroupOptions struct { }
MonitorsClientListByResourceGroupOptions contains the optional parameters for the MonitorsClient.NewListByResourceGroupPager method.
type MonitorsClientListByResourceGroupResponse ¶ added in v0.2.0
type MonitorsClientListByResourceGroupResponse struct { // Response of a list operation. MonitorResourceListResponse }
MonitorsClientListByResourceGroupResponse contains the response from method MonitorsClient.NewListByResourceGroupPager.
type MonitorsClientListBySubscriptionOptions ¶ added in v0.2.0
type MonitorsClientListBySubscriptionOptions struct { }
MonitorsClientListBySubscriptionOptions contains the optional parameters for the MonitorsClient.NewListBySubscriptionPager method.
type MonitorsClientListBySubscriptionResponse ¶ added in v0.2.0
type MonitorsClientListBySubscriptionResponse struct { // Response of a list operation. MonitorResourceListResponse }
MonitorsClientListBySubscriptionResponse contains the response from method MonitorsClient.NewListBySubscriptionPager.
type MonitorsClientListMonitoredResourcesOptions ¶ added in v0.2.0
type MonitorsClientListMonitoredResourcesOptions struct { }
MonitorsClientListMonitoredResourcesOptions contains the optional parameters for the MonitorsClient.NewListMonitoredResourcesPager method.
type MonitorsClientListMonitoredResourcesResponse ¶ added in v0.2.0
type MonitorsClientListMonitoredResourcesResponse struct { // Response of a list operation. MonitoredResourceListResponse }
MonitorsClientListMonitoredResourcesResponse contains the response from method MonitorsClient.NewListMonitoredResourcesPager.
type MonitorsClientListUserRolesOptions ¶ added in v0.2.0
type MonitorsClientListUserRolesOptions struct {
Body *UserRoleRequest
}
MonitorsClientListUserRolesOptions contains the optional parameters for the MonitorsClient.NewListUserRolesPager method.
type MonitorsClientListUserRolesResponse ¶ added in v0.2.0
type MonitorsClientListUserRolesResponse struct { // Response for list of user's role for Logz.io account. UserRoleListResponse }
MonitorsClientListUserRolesResponse contains the response from method MonitorsClient.NewListUserRolesPager.
type MonitorsClientUpdateOptions ¶ added in v0.2.0
type MonitorsClientUpdateOptions struct {
Body *MonitorResourceUpdateParameters
}
MonitorsClientUpdateOptions contains the optional parameters for the MonitorsClient.Update method.
type MonitorsClientUpdateResponse ¶ added in v0.2.0
type MonitorsClientUpdateResponse struct {
MonitorResource
}
MonitorsClientUpdateResponse contains the response from method MonitorsClient.Update.
type OperationDisplay ¶
type OperationDisplay struct { // Description of the operation, e.g., 'Write monitors'. Description *string // Operation type, e.g., read, write, delete, etc. Operation *string // Service provider, i.e., Microsoft.Logz. Provider *string // Type on which the operation is performed, e.g., 'monitors'. Resource *string }
OperationDisplay - The object that represents 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 { // URL to get the next set of operation list results if there are any. NextLink *string // List of operations supported by the Microsoft.Logz provider. Value []*OperationResult }
OperationListResult - Result of GET request to list the Microsoft.Logz operations.
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 OperationResult ¶
type OperationResult struct { // The object that represents the operation. Display *OperationDisplay // Indicates whether the operation is a data action IsDataAction *bool // Operation name, i.e., {provider}/{resource}/{operation}. Name *string // Origin of the operation Origin *string }
OperationResult - A Microsoft.Logz REST API operation.
func (OperationResult) MarshalJSON ¶ added in v1.1.0
func (o OperationResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationResult.
func (*OperationResult) UnmarshalJSON ¶ added in v1.1.0
func (o *OperationResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationResult.
type OperationsClient ¶
type OperationsClient struct {
// contains filtered or unexported fields
}
OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.
func NewOperationsClient ¶
func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)
NewOperationsClient creates a new instance of OperationsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*OperationsClient) NewListPager ¶ added in v0.4.0
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - List all operations provided by Microsoft.Logz.
Generated from API version 2020-10-01
- 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-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/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.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 = armlogz.OperationListResult{ // Value: []*armlogz.OperationResult{ // { // Name: to.Ptr("Microsoft.Logz/monitors/write"), // Display: &armlogz.OperationDisplay{ // Description: to.Ptr("Write monitors resource"), // Operation: to.Ptr("write"), // Provider: to.Ptr("Microsoft.Logz"), // Resource: to.Ptr("monitors"), // }, // }}, // } } }
Output:
type OperationsClientListOptions ¶ added in v0.2.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶ added in v0.2.0
type OperationsClientListResponse struct { // Result of GET request to list the Microsoft.Logz operations. OperationListResult }
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type OrganizationProperties ¶ added in v0.2.0
type OrganizationProperties struct { // Name of the Logz organization. CompanyName *string // The Id of the Enterprise App used for Single sign on. EnterpriseAppID *string // The login URL specific to this Logz Organization. SingleSignOnURL *string // READ-ONLY; Id of the Logz organization. ID *string }
func (OrganizationProperties) MarshalJSON ¶ added in v1.1.0
func (o OrganizationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OrganizationProperties.
func (*OrganizationProperties) UnmarshalJSON ¶ added in v1.1.0
func (o *OrganizationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OrganizationProperties.
type PlanData ¶
type PlanData struct { // different billing cycles like MONTHLY/WEEKLY. this could be enum BillingCycle *string // date when plan was applied EffectiveDate *time.Time // plan id as published by Logz PlanDetails *string // different usage type like PAYG/COMMITTED. this could be enum UsageType *string }
func (PlanData) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type PlanData.
func (*PlanData) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type PlanData.
type ProvisioningState ¶
type ProvisioningState string
ProvisioningState - Flag specifying if the resource provisioning state as tracked by ARM.
const ( ProvisioningStateAccepted ProvisioningState = "Accepted" ProvisioningStateCanceled ProvisioningState = "Canceled" ProvisioningStateCreating ProvisioningState = "Creating" ProvisioningStateDeleted ProvisioningState = "Deleted" ProvisioningStateDeleting ProvisioningState = "Deleting" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateNotSpecified ProvisioningState = "NotSpecified" ProvisioningStateSucceeded ProvisioningState = "Succeeded" ProvisioningStateUpdating ProvisioningState = "Updating" )
func PossibleProvisioningStateValues ¶
func PossibleProvisioningStateValues() []ProvisioningState
PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.
type SingleSignOnClient ¶
type SingleSignOnClient struct {
// contains filtered or unexported fields
}
SingleSignOnClient contains the methods for the SingleSignOn group. Don't use this type directly, use NewSingleSignOnClient() instead.
func NewSingleSignOnClient ¶
func NewSingleSignOnClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SingleSignOnClient, error)
NewSingleSignOnClient creates a new instance of SingleSignOnClient 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 (*SingleSignOnClient) BeginCreateOrUpdate ¶
func (client *SingleSignOnClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, monitorName string, configurationName string, options *SingleSignOnClientBeginCreateOrUpdateOptions) (*runtime.Poller[SingleSignOnClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- options - SingleSignOnClientBeginCreateOrUpdateOptions contains the optional parameters for the SingleSignOnClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SingleSignOnConfigurations_CreateOrUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSingleSignOnClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myMonitor", "default", &armlogz.SingleSignOnClientBeginCreateOrUpdateOptions{Body: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // 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.SingleSignOnResource = armlogz.SingleSignOnResource{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Logz/monitors"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Logz/monitors/myMonitor/singleSignOnConfigurations/default"), // Properties: &armlogz.SingleSignOnProperties{ // EnterpriseAppID: to.Ptr("00000000-0000-0000-0000-000000000000"), // ProvisioningState: to.Ptr(armlogz.ProvisioningStateSucceeded), // SingleSignOnState: to.Ptr(armlogz.SingleSignOnStatesEnable), // SingleSignOnURL: to.Ptr("https://www.logz.io/IAmSomeHash"), // }, // } }
Output:
func (*SingleSignOnClient) Get ¶
func (client *SingleSignOnClient) Get(ctx context.Context, resourceGroupName string, monitorName string, configurationName string, options *SingleSignOnClientGetOptions) (SingleSignOnClientGetResponse, error)
Get - Gets the Logz single sign-on resource for the given Monitor. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- options - SingleSignOnClientGetOptions contains the optional parameters for the SingleSignOnClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SingleSignOnConfigurations_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSingleSignOnClient().Get(ctx, "myResourceGroup", "myMonitor", "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.SingleSignOnResource = armlogz.SingleSignOnResource{ // Name: to.Ptr("default"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Logz/monitors/myMonitor/singleSignOnConfigurations/default"), // Properties: &armlogz.SingleSignOnProperties{ // EnterpriseAppID: to.Ptr("00000000-0000-0000-0000-000000000000"), // ProvisioningState: to.Ptr(armlogz.ProvisioningStateSucceeded), // SingleSignOnState: to.Ptr(armlogz.SingleSignOnStatesEnable), // SingleSignOnURL: to.Ptr("https://www.loz.io/IAmSomeHash"), // }, // } }
Output:
func (*SingleSignOnClient) NewListPager ¶ added in v0.4.0
func (client *SingleSignOnClient) NewListPager(resourceGroupName string, monitorName string, options *SingleSignOnClientListOptions) *runtime.Pager[SingleSignOnClientListResponse]
NewListPager - List the single sign-on configurations for a given monitor resource.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- options - SingleSignOnClientListOptions contains the optional parameters for the SingleSignOnClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SingleSignOnConfigurations_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/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSingleSignOnClient().NewListPager("myResourceGroup", "myMonitor", 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.SingleSignOnResourceListResponse = armlogz.SingleSignOnResourceListResponse{ // Value: []*armlogz.SingleSignOnResource{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Logz/monitors"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Logz/monitors/myMonitor/singleSignOnConfigurations/default"), // Properties: &armlogz.SingleSignOnProperties{ // EnterpriseAppID: to.Ptr("00000000-0000-0000-0000-000000000000"), // ProvisioningState: to.Ptr(armlogz.ProvisioningStateSucceeded), // SingleSignOnState: to.Ptr(armlogz.SingleSignOnStatesEnable), // SingleSignOnURL: to.Ptr("https://www.logz.io/IAmSomeHash"), // }, // }}, // } } }
Output:
type SingleSignOnClientBeginCreateOrUpdateOptions ¶ added in v0.2.0
type SingleSignOnClientBeginCreateOrUpdateOptions struct { Body *SingleSignOnResource // Resumes the LRO from the provided token. ResumeToken string }
SingleSignOnClientBeginCreateOrUpdateOptions contains the optional parameters for the SingleSignOnClient.BeginCreateOrUpdate method.
type SingleSignOnClientCreateOrUpdateResponse ¶ added in v0.2.0
type SingleSignOnClientCreateOrUpdateResponse struct {
SingleSignOnResource
}
SingleSignOnClientCreateOrUpdateResponse contains the response from method SingleSignOnClient.BeginCreateOrUpdate.
type SingleSignOnClientGetOptions ¶ added in v0.2.0
type SingleSignOnClientGetOptions struct { }
SingleSignOnClientGetOptions contains the optional parameters for the SingleSignOnClient.Get method.
type SingleSignOnClientGetResponse ¶ added in v0.2.0
type SingleSignOnClientGetResponse struct {
SingleSignOnResource
}
SingleSignOnClientGetResponse contains the response from method SingleSignOnClient.Get.
type SingleSignOnClientListOptions ¶ added in v0.2.0
type SingleSignOnClientListOptions struct { }
SingleSignOnClientListOptions contains the optional parameters for the SingleSignOnClient.NewListPager method.
type SingleSignOnClientListResponse ¶ added in v0.2.0
type SingleSignOnClientListResponse struct { // Response of a list operation. SingleSignOnResourceListResponse }
SingleSignOnClientListResponse contains the response from method SingleSignOnClient.NewListPager.
type SingleSignOnProperties ¶ added in v0.2.0
type SingleSignOnProperties struct { // The Id of the Enterprise App used for Single sign-on. EnterpriseAppID *string // Various states of the SSO resource SingleSignOnState *SingleSignOnStates // The login URL specific to this Logz Organization. SingleSignOnURL *string // READ-ONLY; Flag specifying if the resource provisioning state as tracked by ARM. ProvisioningState *ProvisioningState }
func (SingleSignOnProperties) MarshalJSON ¶ added in v1.1.0
func (s SingleSignOnProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SingleSignOnProperties.
func (*SingleSignOnProperties) UnmarshalJSON ¶ added in v1.1.0
func (s *SingleSignOnProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SingleSignOnProperties.
type SingleSignOnResource ¶ added in v0.2.0
type SingleSignOnResource struct { Properties *SingleSignOnProperties // READ-ONLY; ARM id of the resource. ID *string // READ-ONLY; Name of the configuration. Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the resource. SystemData *SystemData // READ-ONLY; The type of the resource. Type *string }
func (SingleSignOnResource) MarshalJSON ¶ added in v1.1.0
func (s SingleSignOnResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SingleSignOnResource.
func (*SingleSignOnResource) UnmarshalJSON ¶ added in v1.1.0
func (s *SingleSignOnResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SingleSignOnResource.
type SingleSignOnResourceListResponse ¶ added in v0.2.0
type SingleSignOnResourceListResponse struct { // Link to the next set of results, if any. NextLink *string // Results of a list operation. Value []*SingleSignOnResource }
SingleSignOnResourceListResponse - Response of a list operation.
func (SingleSignOnResourceListResponse) MarshalJSON ¶ added in v0.2.0
func (s SingleSignOnResourceListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SingleSignOnResourceListResponse.
func (*SingleSignOnResourceListResponse) UnmarshalJSON ¶ added in v1.1.0
func (s *SingleSignOnResourceListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SingleSignOnResourceListResponse.
type SingleSignOnStates ¶
type SingleSignOnStates string
SingleSignOnStates - Various states of the SSO resource
const ( SingleSignOnStatesDisable SingleSignOnStates = "Disable" SingleSignOnStatesEnable SingleSignOnStates = "Enable" SingleSignOnStatesExisting SingleSignOnStates = "Existing" SingleSignOnStatesInitial SingleSignOnStates = "Initial" )
func PossibleSingleSignOnStatesValues ¶
func PossibleSingleSignOnStatesValues() []SingleSignOnStates
PossibleSingleSignOnStatesValues returns the possible values for the SingleSignOnStates const type.
type SubAccountClient ¶
type SubAccountClient struct {
// contains filtered or unexported fields
}
SubAccountClient contains the methods for the SubAccount group. Don't use this type directly, use NewSubAccountClient() instead.
func NewSubAccountClient ¶
func NewSubAccountClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SubAccountClient, error)
NewSubAccountClient creates a new instance of SubAccountClient 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 (*SubAccountClient) BeginCreate ¶
func (client *SubAccountClient) BeginCreate(ctx context.Context, resourceGroupName string, monitorName string, subAccountName string, options *SubAccountClientBeginCreateOptions) (*runtime.Poller[SubAccountClientCreateResponse], error)
BeginCreate - Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- subAccountName - Sub Account resource name
- options - SubAccountClientBeginCreateOptions contains the optional parameters for the SubAccountClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_Create.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSubAccountClient().BeginCreate(ctx, "myResourceGroup", "myMonitor", "SubAccount1", &armlogz.SubAccountClientBeginCreateOptions{Body: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // 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.MonitorResource = armlogz.MonitorResource{ // Name: to.Ptr("myMonitor"), // Type: to.Ptr("Microsoft.Logz/monitors"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/monitors/myMonitor/accounts/SubAccount1"), // Location: to.Ptr("West US 2"), // Properties: &armlogz.MonitorProperties{ // ProvisioningState: to.Ptr(armlogz.ProvisioningStateSucceeded), // }, // Tags: map[string]*string{ // "Environment": to.Ptr("Dev"), // }, // } }
Output:
func (*SubAccountClient) BeginDelete ¶
func (client *SubAccountClient) BeginDelete(ctx context.Context, resourceGroupName string, monitorName string, subAccountName string, options *SubAccountClientBeginDeleteOptions) (*runtime.Poller[SubAccountClientDeleteResponse], error)
BeginDelete - Delete a sub account resource. This delete operation can take upto 10 minutes to complete. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- subAccountName - Sub Account resource name
- options - SubAccountClientBeginDeleteOptions contains the optional parameters for the SubAccountClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSubAccountClient().BeginDelete(ctx, "myResourceGroup", "myMonitor", "someName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*SubAccountClient) Get ¶
func (client *SubAccountClient) Get(ctx context.Context, resourceGroupName string, monitorName string, subAccountName string, options *SubAccountClientGetOptions) (SubAccountClientGetResponse, error)
Get - Get a sub account under a given monitor resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- subAccountName - Sub Account resource name
- options - SubAccountClientGetOptions contains the optional parameters for the SubAccountClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSubAccountClient().Get(ctx, "myResourceGroup", "myMonitor", "SubAccount1", 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.MonitorResource = armlogz.MonitorResource{ // Name: to.Ptr("myMonitor"), // Type: to.Ptr("Microsoft.Logz/monitors"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/monitors/myMonitor/accounts/SubAccount1"), // Location: to.Ptr("West US"), // Properties: &armlogz.MonitorProperties{ // MonitoringStatus: to.Ptr(armlogz.MonitoringStatusEnabled), // ProvisioningState: to.Ptr(armlogz.ProvisioningStateSucceeded), // }, // Tags: map[string]*string{ // "Environment": to.Ptr("Dev"), // }, // } }
Output:
func (*SubAccountClient) NewListMonitoredResourcesPager ¶ added in v0.4.0
func (client *SubAccountClient) NewListMonitoredResourcesPager(resourceGroupName string, monitorName string, subAccountName string, options *SubAccountClientListMonitoredResourcesOptions) *runtime.Pager[SubAccountClientListMonitoredResourcesResponse]
NewListMonitoredResourcesPager - List the resources currently being monitored by the Logz sub account resource.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- subAccountName - Sub Account resource name
- options - SubAccountClientListMonitoredResourcesOptions contains the optional parameters for the SubAccountClient.NewListMonitoredResourcesPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_MonitoredResources_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/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSubAccountClient().NewListMonitoredResourcesPager("myResourceGroup", "myMonitor", "SubAccount1", 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.MonitoredResourceListResponse = armlogz.MonitoredResourceListResponse{ // Value: []*armlogz.MonitoredResource{ // { // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/monitors/myMonitor/accounts/SubAccount1/listMonitoredResources"), // ReasonForLogsStatus: to.Ptr("CapturedByRules"), // ReasonForMetricsStatus: to.Ptr("CapturedByRules"), // SendingLogs: to.Ptr(true), // SendingMetrics: to.Ptr(true), // }}, // } } }
Output:
func (*SubAccountClient) NewListPager ¶ added in v0.4.0
func (client *SubAccountClient) NewListPager(resourceGroupName string, monitorName string, options *SubAccountClientListOptions) *runtime.Pager[SubAccountClientListResponse]
NewListPager - List the sub account under a given monitor resource.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- options - SubAccountClientListOptions contains the optional parameters for the SubAccountClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_ListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSubAccountClient().NewListPager("myResourceGroup", "myMonitor", 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.MonitorResourceListResponse = armlogz.MonitorResourceListResponse{ // Value: []*armlogz.MonitorResource{ // { // Name: to.Ptr("myMonitor"), // Type: to.Ptr("Microsoft.Logz/monitors"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/monitors/myMonitor/accounts"), // Location: to.Ptr("West US"), // Properties: &armlogz.MonitorProperties{ // MonitoringStatus: to.Ptr(armlogz.MonitoringStatusEnabled), // ProvisioningState: to.Ptr(armlogz.ProvisioningStateSucceeded), // }, // Tags: map[string]*string{ // "Environment": to.Ptr("Dev"), // }, // }}, // } } }
Output:
func (*SubAccountClient) NewListVMHostUpdatePager ¶ added in v0.4.0
func (client *SubAccountClient) NewListVMHostUpdatePager(resourceGroupName string, monitorName string, subAccountName string, options *SubAccountClientListVMHostUpdateOptions) *runtime.Pager[SubAccountClientListVMHostUpdateResponse]
NewListVMHostUpdatePager - Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- subAccountName - Sub Account resource name
- options - SubAccountClientListVMHostUpdateOptions contains the optional parameters for the SubAccountClient.NewListVMHostUpdatePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_VMHosts_Update.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSubAccountClient().NewListVMHostUpdatePager("myResourceGroup", "myMonitor", "SubAccount1", &armlogz.SubAccountClientListVMHostUpdateOptions{Body: 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.VMResourcesListResponse = armlogz.VMResourcesListResponse{ // Value: []*armlogz.VMResources{ // { // AgentVersion: to.Ptr("1.0.0beta"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/virtual1"), // }}, // } } }
Output:
func (*SubAccountClient) NewListVMHostsPager ¶ added in v0.4.0
func (client *SubAccountClient) NewListVMHostsPager(resourceGroupName string, monitorName string, subAccountName string, options *SubAccountClientListVMHostsOptions) *runtime.Pager[SubAccountClientListVMHostsResponse]
NewListVMHostsPager - List the compute resources currently being monitored by the Logz sub account resource.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- subAccountName - Sub Account resource name
- options - SubAccountClientListVMHostsOptions contains the optional parameters for the SubAccountClient.NewListVMHostsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_VMHosts_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/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSubAccountClient().NewListVMHostsPager("myResourceGroup", "myMonitor", "SubAccount1", 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.VMResourcesListResponse = armlogz.VMResourcesListResponse{ // Value: []*armlogz.VMResources{ // { // AgentVersion: to.Ptr("1.0.0beta"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/virtual1"), // }}, // } } }
Output:
func (*SubAccountClient) Update ¶
func (client *SubAccountClient) Update(ctx context.Context, resourceGroupName string, monitorName string, subAccountName string, options *SubAccountClientUpdateOptions) (SubAccountClientUpdateResponse, error)
Update - Update a monitor resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- subAccountName - Sub Account resource name
- options - SubAccountClientUpdateOptions contains the optional parameters for the SubAccountClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_Update.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSubAccountClient().Update(ctx, "myResourceGroup", "myMonitor", "SubAccount1", &armlogz.SubAccountClientUpdateOptions{Body: 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.MonitorResource = armlogz.MonitorResource{ // Name: to.Ptr("myMonitor"), // Type: to.Ptr("Microsoft.Logz/monitors"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/monitors/myMonitor/accounts/SubAccount1"), // Location: to.Ptr("West US"), // Properties: &armlogz.MonitorProperties{ // MonitoringStatus: to.Ptr(armlogz.MonitoringStatusEnabled), // ProvisioningState: to.Ptr(armlogz.ProvisioningStateSucceeded), // }, // Tags: map[string]*string{ // "Environment": to.Ptr("Dev"), // }, // } }
Output:
func (*SubAccountClient) VMHostPayload ¶
func (client *SubAccountClient) VMHostPayload(ctx context.Context, resourceGroupName string, monitorName string, subAccountName string, options *SubAccountClientVMHostPayloadOptions) (SubAccountClientVMHostPayloadResponse, error)
VMHostPayload - Returns the payload that needs to be passed as a request for installing Logz.io agent on a VM. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- subAccountName - Sub Account resource name
- options - SubAccountClientVMHostPayloadOptions contains the optional parameters for the SubAccountClient.VMHostPayload method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_VMHosts_Payload.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSubAccountClient().VMHostPayload(ctx, "myResourceGroup", "myMonitor", "SubAccount1", 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.VMExtensionPayload = armlogz.VMExtensionPayload{ // APIKey: to.Ptr("00000000-0000-0000-0000-000000000000"), // Region: to.Ptr("West US 2"), // } }
Output:
type SubAccountClientBeginCreateOptions ¶ added in v0.2.0
type SubAccountClientBeginCreateOptions struct { Body *MonitorResource // Resumes the LRO from the provided token. ResumeToken string }
SubAccountClientBeginCreateOptions contains the optional parameters for the SubAccountClient.BeginCreate method.
type SubAccountClientBeginDeleteOptions ¶ added in v0.2.0
type SubAccountClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SubAccountClientBeginDeleteOptions contains the optional parameters for the SubAccountClient.BeginDelete method.
type SubAccountClientCreateResponse ¶ added in v0.2.0
type SubAccountClientCreateResponse struct {
MonitorResource
}
SubAccountClientCreateResponse contains the response from method SubAccountClient.BeginCreate.
type SubAccountClientDeleteResponse ¶ added in v0.2.0
type SubAccountClientDeleteResponse struct { }
SubAccountClientDeleteResponse contains the response from method SubAccountClient.BeginDelete.
type SubAccountClientGetOptions ¶ added in v0.2.0
type SubAccountClientGetOptions struct { }
SubAccountClientGetOptions contains the optional parameters for the SubAccountClient.Get method.
type SubAccountClientGetResponse ¶ added in v0.2.0
type SubAccountClientGetResponse struct {
MonitorResource
}
SubAccountClientGetResponse contains the response from method SubAccountClient.Get.
type SubAccountClientListMonitoredResourcesOptions ¶ added in v0.2.0
type SubAccountClientListMonitoredResourcesOptions struct { }
SubAccountClientListMonitoredResourcesOptions contains the optional parameters for the SubAccountClient.NewListMonitoredResourcesPager method.
type SubAccountClientListMonitoredResourcesResponse ¶ added in v0.2.0
type SubAccountClientListMonitoredResourcesResponse struct { // Response of a list operation. MonitoredResourceListResponse }
SubAccountClientListMonitoredResourcesResponse contains the response from method SubAccountClient.NewListMonitoredResourcesPager.
type SubAccountClientListOptions ¶ added in v0.2.0
type SubAccountClientListOptions struct { }
SubAccountClientListOptions contains the optional parameters for the SubAccountClient.NewListPager method.
type SubAccountClientListResponse ¶ added in v0.2.0
type SubAccountClientListResponse struct { // Response of a list operation. MonitorResourceListResponse }
SubAccountClientListResponse contains the response from method SubAccountClient.NewListPager.
type SubAccountClientListVMHostUpdateOptions ¶ added in v0.2.0
type SubAccountClientListVMHostUpdateOptions struct { // Request body to update the collection for agent installed in the given monitor. Body *VMHostUpdateRequest }
SubAccountClientListVMHostUpdateOptions contains the optional parameters for the SubAccountClient.NewListVMHostUpdatePager method.
type SubAccountClientListVMHostUpdateResponse ¶ added in v0.2.0
type SubAccountClientListVMHostUpdateResponse struct { // Response of a list VM Host Update Operation. VMResourcesListResponse }
SubAccountClientListVMHostUpdateResponse contains the response from method SubAccountClient.NewListVMHostUpdatePager.
type SubAccountClientListVMHostsOptions ¶ added in v0.2.0
type SubAccountClientListVMHostsOptions struct { }
SubAccountClientListVMHostsOptions contains the optional parameters for the SubAccountClient.NewListVMHostsPager method.
type SubAccountClientListVMHostsResponse ¶ added in v0.2.0
type SubAccountClientListVMHostsResponse struct { // Response of a list VM Host Update Operation. VMResourcesListResponse }
SubAccountClientListVMHostsResponse contains the response from method SubAccountClient.NewListVMHostsPager.
type SubAccountClientUpdateOptions ¶ added in v0.2.0
type SubAccountClientUpdateOptions struct {
Body *MonitorResourceUpdateParameters
}
SubAccountClientUpdateOptions contains the optional parameters for the SubAccountClient.Update method.
type SubAccountClientUpdateResponse ¶ added in v0.2.0
type SubAccountClientUpdateResponse struct {
MonitorResource
}
SubAccountClientUpdateResponse contains the response from method SubAccountClient.Update.
type SubAccountClientVMHostPayloadOptions ¶ added in v0.2.0
type SubAccountClientVMHostPayloadOptions struct { }
SubAccountClientVMHostPayloadOptions contains the optional parameters for the SubAccountClient.VMHostPayload method.
type SubAccountClientVMHostPayloadResponse ¶ added in v0.2.0
type SubAccountClientVMHostPayloadResponse struct { // Response of payload to be passed while installing VM agent. VMExtensionPayload }
SubAccountClientVMHostPayloadResponse contains the response from method SubAccountClient.VMHostPayload.
type SubAccountTagRulesClient ¶
type SubAccountTagRulesClient struct {
// contains filtered or unexported fields
}
SubAccountTagRulesClient contains the methods for the SubAccountTagRules group. Don't use this type directly, use NewSubAccountTagRulesClient() instead.
func NewSubAccountTagRulesClient ¶
func NewSubAccountTagRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SubAccountTagRulesClient, error)
NewSubAccountTagRulesClient creates a new instance of SubAccountTagRulesClient 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 (*SubAccountTagRulesClient) CreateOrUpdate ¶
func (client *SubAccountTagRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, monitorName string, subAccountName string, ruleSetName string, options *SubAccountTagRulesClientCreateOrUpdateOptions) (SubAccountTagRulesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Create or update a tag rule set for a given sub account resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- subAccountName - Sub Account resource name
- options - SubAccountTagRulesClientCreateOrUpdateOptions contains the optional parameters for the SubAccountTagRulesClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccountTagRules_CreateOrUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSubAccountTagRulesClient().CreateOrUpdate(ctx, "myResourceGroup", "myMonitor", "SubAccount1", "default", &armlogz.SubAccountTagRulesClientCreateOrUpdateOptions{Body: 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.MonitoringTagRules = armlogz.MonitoringTagRules{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Logz/monitors/tagRules"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Logz/monitors/myMonitor/accounts/SubAccount1/tagRules/default"), // Properties: &armlogz.MonitoringTagRulesProperties{ // LogRules: &armlogz.LogRules{ // FilteringTags: []*armlogz.FilteringTag{ // { // Name: to.Ptr("Environment"), // Action: to.Ptr(armlogz.TagActionInclude), // Value: to.Ptr("Prod"), // }, // { // Name: to.Ptr("Environment"), // Action: to.Ptr(armlogz.TagActionExclude), // Value: to.Ptr("Dev"), // }}, // SendAADLogs: to.Ptr(false), // SendActivityLogs: to.Ptr(true), // SendSubscriptionLogs: to.Ptr(true), // }, // }, // } }
Output:
func (*SubAccountTagRulesClient) Delete ¶
func (client *SubAccountTagRulesClient) Delete(ctx context.Context, resourceGroupName string, monitorName string, subAccountName string, ruleSetName string, options *SubAccountTagRulesClientDeleteOptions) (SubAccountTagRulesClientDeleteResponse, error)
Delete - Delete a tag rule set for a given monitor resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- subAccountName - Sub Account resource name
- options - SubAccountTagRulesClientDeleteOptions contains the optional parameters for the SubAccountTagRulesClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccountTagRules_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewSubAccountTagRulesClient().Delete(ctx, "myResourceGroup", "myMonitor", "SubAccount1", "default", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*SubAccountTagRulesClient) Get ¶
func (client *SubAccountTagRulesClient) Get(ctx context.Context, resourceGroupName string, monitorName string, subAccountName string, ruleSetName string, options *SubAccountTagRulesClientGetOptions) (SubAccountTagRulesClientGetResponse, error)
Get - Get a tag rule set for a given monitor resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- subAccountName - Sub Account resource name
- options - SubAccountTagRulesClientGetOptions contains the optional parameters for the SubAccountTagRulesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccountTagRules_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSubAccountTagRulesClient().Get(ctx, "myResourceGroup", "myMonitor", "SubAccount1", "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.MonitoringTagRules = armlogz.MonitoringTagRules{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Logz/monitors/tagRules"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Logz/monitors/myMonitor/tagRules/default"), // Properties: &armlogz.MonitoringTagRulesProperties{ // LogRules: &armlogz.LogRules{ // FilteringTags: []*armlogz.FilteringTag{ // { // Name: to.Ptr("Environment"), // Action: to.Ptr(armlogz.TagActionInclude), // Value: to.Ptr("Prod"), // }, // { // Name: to.Ptr("Environment"), // Action: to.Ptr(armlogz.TagActionExclude), // Value: to.Ptr("Dev"), // }}, // SendAADLogs: to.Ptr(false), // SendActivityLogs: to.Ptr(true), // SendSubscriptionLogs: to.Ptr(true), // }, // }, // } }
Output:
func (*SubAccountTagRulesClient) NewListPager ¶ added in v0.4.0
func (client *SubAccountTagRulesClient) NewListPager(resourceGroupName string, monitorName string, subAccountName string, options *SubAccountTagRulesClientListOptions) *runtime.Pager[SubAccountTagRulesClientListResponse]
NewListPager - List the tag rules for a given sub account resource.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- subAccountName - Sub Account resource name
- options - SubAccountTagRulesClientListOptions contains the optional parameters for the SubAccountTagRulesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccountTagRules_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/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSubAccountTagRulesClient().NewListPager("myResourceGroup", "myMonitor", "SubAccount1", 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.MonitoringTagRulesListResponse = armlogz.MonitoringTagRulesListResponse{ // Value: []*armlogz.MonitoringTagRules{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Logz/monitors/tagRules"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Logz/monitors/myMonitor/accounts/subAccount1/tagRules/default"), // Properties: &armlogz.MonitoringTagRulesProperties{ // LogRules: &armlogz.LogRules{ // FilteringTags: []*armlogz.FilteringTag{ // { // Name: to.Ptr("Environment"), // Action: to.Ptr(armlogz.TagActionInclude), // Value: to.Ptr("Prod"), // }, // { // Name: to.Ptr("Environment"), // Action: to.Ptr(armlogz.TagActionExclude), // Value: to.Ptr("Dev"), // }}, // SendAADLogs: to.Ptr(false), // SendActivityLogs: to.Ptr(true), // SendSubscriptionLogs: to.Ptr(true), // }, // }, // }}, // } } }
Output:
type SubAccountTagRulesClientCreateOrUpdateOptions ¶ added in v0.2.0
type SubAccountTagRulesClientCreateOrUpdateOptions struct {
Body *MonitoringTagRules
}
SubAccountTagRulesClientCreateOrUpdateOptions contains the optional parameters for the SubAccountTagRulesClient.CreateOrUpdate method.
type SubAccountTagRulesClientCreateOrUpdateResponse ¶ added in v0.2.0
type SubAccountTagRulesClientCreateOrUpdateResponse struct { // Capture logs and metrics of Azure resources based on ARM tags. MonitoringTagRules }
SubAccountTagRulesClientCreateOrUpdateResponse contains the response from method SubAccountTagRulesClient.CreateOrUpdate.
type SubAccountTagRulesClientDeleteOptions ¶ added in v0.2.0
type SubAccountTagRulesClientDeleteOptions struct { }
SubAccountTagRulesClientDeleteOptions contains the optional parameters for the SubAccountTagRulesClient.Delete method.
type SubAccountTagRulesClientDeleteResponse ¶ added in v0.2.0
type SubAccountTagRulesClientDeleteResponse struct { // Location contains the information returned from the location header response. Location *string }
SubAccountTagRulesClientDeleteResponse contains the response from method SubAccountTagRulesClient.Delete.
type SubAccountTagRulesClientGetOptions ¶ added in v0.2.0
type SubAccountTagRulesClientGetOptions struct { }
SubAccountTagRulesClientGetOptions contains the optional parameters for the SubAccountTagRulesClient.Get method.
type SubAccountTagRulesClientGetResponse ¶ added in v0.2.0
type SubAccountTagRulesClientGetResponse struct { // Capture logs and metrics of Azure resources based on ARM tags. MonitoringTagRules }
SubAccountTagRulesClientGetResponse contains the response from method SubAccountTagRulesClient.Get.
type SubAccountTagRulesClientListOptions ¶ added in v0.2.0
type SubAccountTagRulesClientListOptions struct { }
SubAccountTagRulesClientListOptions contains the optional parameters for the SubAccountTagRulesClient.NewListPager method.
type SubAccountTagRulesClientListResponse ¶ added in v0.2.0
type SubAccountTagRulesClientListResponse struct { // Response of a list operation. MonitoringTagRulesListResponse }
SubAccountTagRulesClientListResponse contains the response from method SubAccountTagRulesClient.NewListPager.
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 TagAction ¶
type TagAction string
TagAction - Valid actions for a filtering tag. Exclusion takes priority over inclusion.
func PossibleTagActionValues ¶
func PossibleTagActionValues() []TagAction
PossibleTagActionValues returns the possible values for the TagAction const type.
type TagRulesClient ¶
type TagRulesClient struct {
// contains filtered or unexported fields
}
TagRulesClient contains the methods for the TagRules group. Don't use this type directly, use NewTagRulesClient() instead.
func NewTagRulesClient ¶
func NewTagRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TagRulesClient, error)
NewTagRulesClient creates a new instance of TagRulesClient 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 (*TagRulesClient) CreateOrUpdate ¶
func (client *TagRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, monitorName string, ruleSetName string, options *TagRulesClientCreateOrUpdateOptions) (TagRulesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Create or update a tag rule set for a given monitor resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- options - TagRulesClientCreateOrUpdateOptions contains the optional parameters for the TagRulesClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/TagRules_CreateOrUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewTagRulesClient().CreateOrUpdate(ctx, "myResourceGroup", "myMonitor", "default", &armlogz.TagRulesClientCreateOrUpdateOptions{Body: 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.MonitoringTagRules = armlogz.MonitoringTagRules{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Logz/monitors/tagRules"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Logz/monitors/myMonitor/tagRules/default"), // Properties: &armlogz.MonitoringTagRulesProperties{ // LogRules: &armlogz.LogRules{ // FilteringTags: []*armlogz.FilteringTag{ // { // Name: to.Ptr("Environment"), // Action: to.Ptr(armlogz.TagActionInclude), // Value: to.Ptr("Prod"), // }, // { // Name: to.Ptr("Environment"), // Action: to.Ptr(armlogz.TagActionExclude), // Value: to.Ptr("Dev"), // }}, // SendAADLogs: to.Ptr(false), // SendActivityLogs: to.Ptr(true), // SendSubscriptionLogs: to.Ptr(true), // }, // }, // } }
Output:
func (*TagRulesClient) Delete ¶
func (client *TagRulesClient) Delete(ctx context.Context, resourceGroupName string, monitorName string, ruleSetName string, options *TagRulesClientDeleteOptions) (TagRulesClientDeleteResponse, error)
Delete - Delete a tag rule set for a given monitor resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- options - TagRulesClientDeleteOptions contains the optional parameters for the TagRulesClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/TagRules_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewTagRulesClient().Delete(ctx, "myResourceGroup", "myMonitor", "default", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*TagRulesClient) Get ¶
func (client *TagRulesClient) Get(ctx context.Context, resourceGroupName string, monitorName string, ruleSetName string, options *TagRulesClientGetOptions) (TagRulesClientGetResponse, error)
Get - Get a tag rule set for a given monitor resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- options - TagRulesClientGetOptions contains the optional parameters for the TagRulesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/TagRules_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewTagRulesClient().Get(ctx, "myResourceGroup", "myMonitor", "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.MonitoringTagRules = armlogz.MonitoringTagRules{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Logz/monitors/tagRules"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Logz/monitors/myMonitor/tagRules/default"), // Properties: &armlogz.MonitoringTagRulesProperties{ // LogRules: &armlogz.LogRules{ // FilteringTags: []*armlogz.FilteringTag{ // { // Name: to.Ptr("Environment"), // Action: to.Ptr(armlogz.TagActionInclude), // Value: to.Ptr("Prod"), // }, // { // Name: to.Ptr("Environment"), // Action: to.Ptr(armlogz.TagActionExclude), // Value: to.Ptr("Dev"), // }}, // SendAADLogs: to.Ptr(false), // SendActivityLogs: to.Ptr(true), // SendSubscriptionLogs: to.Ptr(true), // }, // }, // } }
Output:
func (*TagRulesClient) NewListPager ¶ added in v0.4.0
func (client *TagRulesClient) NewListPager(resourceGroupName string, monitorName string, options *TagRulesClientListOptions) *runtime.Pager[TagRulesClientListResponse]
NewListPager - List the tag rules for a given monitor resource.
Generated from API version 2020-10-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Monitor resource name
- options - TagRulesClientListOptions contains the optional parameters for the TagRulesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/TagRules_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/logz/armlogz" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armlogz.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewTagRulesClient().NewListPager("myResourceGroup", "myMonitor", 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.MonitoringTagRulesListResponse = armlogz.MonitoringTagRulesListResponse{ // Value: []*armlogz.MonitoringTagRules{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Logz/monitors/tagRules"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Logz/monitors/myMonitor/tagRules/default"), // Properties: &armlogz.MonitoringTagRulesProperties{ // LogRules: &armlogz.LogRules{ // FilteringTags: []*armlogz.FilteringTag{ // { // Name: to.Ptr("Environment"), // Action: to.Ptr(armlogz.TagActionInclude), // Value: to.Ptr("Prod"), // }, // { // Name: to.Ptr("Environment"), // Action: to.Ptr(armlogz.TagActionExclude), // Value: to.Ptr("Dev"), // }}, // SendAADLogs: to.Ptr(false), // SendActivityLogs: to.Ptr(true), // SendSubscriptionLogs: to.Ptr(true), // }, // }, // }}, // } } }
Output:
type TagRulesClientCreateOrUpdateOptions ¶ added in v0.2.0
type TagRulesClientCreateOrUpdateOptions struct {
Body *MonitoringTagRules
}
TagRulesClientCreateOrUpdateOptions contains the optional parameters for the TagRulesClient.CreateOrUpdate method.
type TagRulesClientCreateOrUpdateResponse ¶ added in v0.2.0
type TagRulesClientCreateOrUpdateResponse struct { // Capture logs and metrics of Azure resources based on ARM tags. MonitoringTagRules }
TagRulesClientCreateOrUpdateResponse contains the response from method TagRulesClient.CreateOrUpdate.
type TagRulesClientDeleteOptions ¶ added in v0.2.0
type TagRulesClientDeleteOptions struct { }
TagRulesClientDeleteOptions contains the optional parameters for the TagRulesClient.Delete method.
type TagRulesClientDeleteResponse ¶ added in v0.2.0
type TagRulesClientDeleteResponse struct { // Location contains the information returned from the location header response. Location *string }
TagRulesClientDeleteResponse contains the response from method TagRulesClient.Delete.
type TagRulesClientGetOptions ¶ added in v0.2.0
type TagRulesClientGetOptions struct { }
TagRulesClientGetOptions contains the optional parameters for the TagRulesClient.Get method.
type TagRulesClientGetResponse ¶ added in v0.2.0
type TagRulesClientGetResponse struct { // Capture logs and metrics of Azure resources based on ARM tags. MonitoringTagRules }
TagRulesClientGetResponse contains the response from method TagRulesClient.Get.
type TagRulesClientListOptions ¶ added in v0.2.0
type TagRulesClientListOptions struct { }
TagRulesClientListOptions contains the optional parameters for the TagRulesClient.NewListPager method.
type TagRulesClientListResponse ¶ added in v0.2.0
type TagRulesClientListResponse struct { // Response of a list operation. MonitoringTagRulesListResponse }
TagRulesClientListResponse contains the response from method TagRulesClient.NewListPager.
type UserInfo ¶
type UserInfo struct { // Email of the user used by Logz for contacting them if needed EmailAddress *string // First Name of the user FirstName *string // Last Name of the user LastName *string // Phone number of the user used by Logz for contacting them if needed PhoneNumber *string }
func (UserInfo) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type UserInfo.
func (*UserInfo) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type UserInfo.
type UserRole ¶
type UserRole string
UserRole - User roles on configured in Logz.io account.
func PossibleUserRoleValues ¶
func PossibleUserRoleValues() []UserRole
PossibleUserRoleValues returns the possible values for the UserRole const type.
type UserRoleListResponse ¶
type UserRoleListResponse struct { // Link to the next set of results, if any. NextLink *string // List of user roles for Logz.io account. Value []*UserRoleResponse }
UserRoleListResponse - Response for list of user's role for Logz.io account.
func (UserRoleListResponse) MarshalJSON ¶
func (u UserRoleListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserRoleListResponse.
func (*UserRoleListResponse) UnmarshalJSON ¶ added in v1.1.0
func (u *UserRoleListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserRoleListResponse.
type UserRoleRequest ¶
type UserRoleRequest struct { // Email of the user used by Logz for contacting them if needed EmailAddress *string }
UserRoleRequest - Request for checking user's role for Logz.io account.
func (UserRoleRequest) MarshalJSON ¶ added in v1.1.0
func (u UserRoleRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserRoleRequest.
func (*UserRoleRequest) UnmarshalJSON ¶ added in v1.1.0
func (u *UserRoleRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserRoleRequest.
type UserRoleResponse ¶
type UserRoleResponse struct { // User roles on configured in Logz.io account. Role *UserRole }
UserRoleResponse - Response for checking user's role for Logz.io account.
func (UserRoleResponse) MarshalJSON ¶ added in v1.1.0
func (u UserRoleResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserRoleResponse.
func (*UserRoleResponse) UnmarshalJSON ¶ added in v1.1.0
func (u *UserRoleResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserRoleResponse.
type VMExtensionPayload ¶
type VMExtensionPayload struct { // API Key corresponding to the resource. APIKey *string // Logz.io region where the resource has been created. Region *string }
VMExtensionPayload - Response of payload to be passed while installing VM agent.
func (VMExtensionPayload) MarshalJSON ¶ added in v1.1.0
func (v VMExtensionPayload) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VMExtensionPayload.
func (*VMExtensionPayload) UnmarshalJSON ¶ added in v1.1.0
func (v *VMExtensionPayload) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VMExtensionPayload.
type VMHostUpdateRequest ¶
type VMHostUpdateRequest struct { // Specifies the state of the operation - install/ delete. State *VMHostUpdateStates // Request of a list vm host update operation. VMResourceIDs []*VMResources }
VMHostUpdateRequest - Request of a list VM Host Update Operation.
func (VMHostUpdateRequest) MarshalJSON ¶
func (v VMHostUpdateRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VMHostUpdateRequest.
func (*VMHostUpdateRequest) UnmarshalJSON ¶ added in v1.1.0
func (v *VMHostUpdateRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VMHostUpdateRequest.
type VMHostUpdateStates ¶
type VMHostUpdateStates string
VMHostUpdateStates - Various states of the updating vm extension on resource
const ( VMHostUpdateStatesDelete VMHostUpdateStates = "Delete" VMHostUpdateStatesInstall VMHostUpdateStates = "Install" )
func PossibleVMHostUpdateStatesValues ¶
func PossibleVMHostUpdateStatesValues() []VMHostUpdateStates
PossibleVMHostUpdateStatesValues returns the possible values for the VMHostUpdateStates const type.
type VMResources ¶
type VMResources struct { // Version of the Logz agent installed on the VM. AgentVersion *string // Request of a list vm host update operation. ID *string }
VMResources - VM Resource Ids
func (VMResources) MarshalJSON ¶ added in v1.1.0
func (v VMResources) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VMResources.
func (*VMResources) UnmarshalJSON ¶ added in v1.1.0
func (v *VMResources) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VMResources.
type VMResourcesListResponse ¶
type VMResourcesListResponse struct { // Link to the next set of results, if any. NextLink *string // Response of a list vm host update operation. Value []*VMResources }
VMResourcesListResponse - Response of a list VM Host Update Operation.
func (VMResourcesListResponse) MarshalJSON ¶
func (v VMResourcesListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VMResourcesListResponse.
func (*VMResourcesListResponse) UnmarshalJSON ¶ added in v1.1.0
func (v *VMResourcesListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VMResourcesListResponse.