Documentation ¶
Index ¶
- type CloudDeployment
- type CloudUser
- type CompanyInfo
- type CreatedByType
- type DeploymentInfoClient
- type DeploymentInfoClientListOptions
- type DeploymentInfoClientListResponse
- type DeploymentInfoResponse
- type ElasticDeploymentStatus
- type ErrorResponseBody
- type FilteringTag
- type IdentityProperties
- type LiftrResourceCategories
- type LogRules
- type ManagedIdentityTypes
- type MonitorProperties
- type MonitorResource
- type MonitorResourceListResponse
- type MonitorResourceUpdateParameters
- type MonitoredResource
- type MonitoredResourceListResponse
- type MonitoredResourcesClient
- type MonitoredResourcesClientListOptions
- type MonitoredResourcesClientListResponse
- 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) NewListPager(options *MonitorsClientListOptions) *runtime.Pager[MonitorsClientListResponse]
- 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 MonitorsClientListOptions
- type MonitorsClientListResponse
- type MonitorsClientUpdateOptions
- type MonitorsClientUpdateResponse
- type OperationDisplay
- type OperationListResult
- type OperationName
- type OperationResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type Properties
- type ProvisioningState
- type ResourceProviderDefaultErrorResponse
- type ResourceSKU
- type SendingLogs
- type SystemData
- type TagAction
- type TagRulesClient
- func (client *TagRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, monitorName string, ...) (*runtime.Poller[TagRulesClientDeleteResponse], error)
- func (client *TagRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, monitorName string, ...) (TagRulesClientCreateOrUpdateResponse, 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 TagRulesClientBeginDeleteOptions
- type TagRulesClientCreateOrUpdateOptions
- type TagRulesClientCreateOrUpdateResponse
- type TagRulesClientDeleteResponse
- type TagRulesClientGetOptions
- type TagRulesClientGetResponse
- type TagRulesClientListOptions
- type TagRulesClientListResponse
- type UserInfo
- type VMCollectionClient
- type VMCollectionClientUpdateOptions
- type VMCollectionClientUpdateResponse
- type VMCollectionUpdate
- type VMHostClient
- type VMHostClientListOptions
- type VMHostClientListResponse
- type VMHostListResponse
- type VMIngestionClient
- type VMIngestionClientDetailsOptions
- type VMIngestionClientDetailsResponse
- type VMIngestionDetailsResponse
- type VMResources
Examples ¶
- DeploymentInfoClient.List
- MonitoredResourcesClient.NewListPager
- MonitorsClient.BeginCreate
- MonitorsClient.BeginDelete
- MonitorsClient.Get
- MonitorsClient.NewListByResourceGroupPager
- MonitorsClient.NewListPager
- MonitorsClient.Update
- OperationsClient.NewListPager
- TagRulesClient.BeginDelete
- TagRulesClient.CreateOrUpdate
- TagRulesClient.Get
- TagRulesClient.NewListPager
- VMCollectionClient.Update
- VMHostClient.NewListPager
- VMIngestionClient.Details
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudDeployment ¶ added in v0.2.0
type CloudDeployment struct { // READ-ONLY; Associated Azure subscription Id for the elastic deployment. AzureSubscriptionID *string `json:"azureSubscriptionId,omitempty" azure:"ro"` // READ-ONLY; Elastic deployment Id DeploymentID *string `json:"deploymentId,omitempty" azure:"ro"` // READ-ONLY; Region where Deployment at Elastic side took place. ElasticsearchRegion *string `json:"elasticsearchRegion,omitempty" azure:"ro"` // READ-ONLY; Elasticsearch ingestion endpoint of the Elastic deployment. ElasticsearchServiceURL *string `json:"elasticsearchServiceUrl,omitempty" azure:"ro"` // READ-ONLY; Kibana endpoint of the Elastic deployment. KibanaServiceURL *string `json:"kibanaServiceUrl,omitempty" azure:"ro"` // READ-ONLY; Kibana dashboard sso URL of the Elastic deployment. KibanaSsoURL *string `json:"kibanaSsoUrl,omitempty" azure:"ro"` // READ-ONLY; Elastic deployment name Name *string `json:"name,omitempty" azure:"ro"` }
CloudDeployment - Details of the user's elastic deployment associated with the monitor resource.
type CloudUser ¶ added in v0.2.0
type CloudUser struct { // READ-ONLY; Elastic cloud default dashboard sso URL of the Elastic user account. ElasticCloudSsoDefaultURL *string `json:"elasticCloudSsoDefaultUrl,omitempty" azure:"ro"` // READ-ONLY; Email of the Elastic User Account. EmailAddress *string `json:"emailAddress,omitempty" azure:"ro"` // READ-ONLY; User Id of the elastic account of the User. ID *string `json:"id,omitempty" azure:"ro"` }
CloudUser - Details of the user's elastic account.
type CompanyInfo ¶
type CompanyInfo struct { // Business of the company Business *string `json:"business,omitempty"` // Country of the company location. Country *string `json:"country,omitempty"` // Domain of the company Domain *string `json:"domain,omitempty"` // Number of employees in the company EmployeesNumber *string `json:"employeesNumber,omitempty"` // State of the company location. State *string `json:"state,omitempty"` }
CompanyInfo - Company information of the user to be passed to partners.
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 DeploymentInfoClient ¶
type DeploymentInfoClient struct {
// contains filtered or unexported fields
}
DeploymentInfoClient contains the methods for the DeploymentInfo group. Don't use this type directly, use NewDeploymentInfoClient() instead.
func NewDeploymentInfoClient ¶
func NewDeploymentInfoClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DeploymentInfoClient, error)
NewDeploymentInfoClient creates a new instance of DeploymentInfoClient with the specified values. subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*DeploymentInfoClient) List ¶
func (client *DeploymentInfoClient) List(ctx context.Context, resourceGroupName string, monitorName string, options *DeploymentInfoClientListOptions) (DeploymentInfoClientListResponse, error)
List - Fetch information regarding Elastic cloud deployment corresponding to the Elastic monitor resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-07-01-preview resourceGroupName - The name of the resource group to which the Elastic resource belongs. monitorName - Monitor resource name options - DeploymentInfoClientListOptions contains the optional parameters for the DeploymentInfoClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/DeploymentInfo_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/elastic/armelastic" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armelastic.NewDeploymentInfoClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.List(ctx, "myResourceGroup", "myMonitor", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type DeploymentInfoClientListOptions ¶ added in v0.2.0
type DeploymentInfoClientListOptions struct { }
DeploymentInfoClientListOptions contains the optional parameters for the DeploymentInfoClient.List method.
type DeploymentInfoClientListResponse ¶ added in v0.2.0
type DeploymentInfoClientListResponse struct {
DeploymentInfoResponse
}
DeploymentInfoClientListResponse contains the response from method DeploymentInfoClient.List.
type DeploymentInfoResponse ¶
type DeploymentInfoResponse struct { // READ-ONLY; Disk capacity of the elasticsearch in Elastic cloud deployment. DiskCapacity *string `json:"diskCapacity,omitempty" azure:"ro"` // READ-ONLY; RAM capacity of the elasticsearch in Elastic cloud deployment. MemoryCapacity *string `json:"memoryCapacity,omitempty" azure:"ro"` // READ-ONLY; The Elastic deployment status. Status *ElasticDeploymentStatus `json:"status,omitempty" azure:"ro"` // READ-ONLY; Version of the elasticsearch in Elastic cloud deployment. Version *string `json:"version,omitempty" azure:"ro"` }
DeploymentInfoResponse - The properties of deployment in Elastic cloud corresponding to the Elastic monitor resource.
type ElasticDeploymentStatus ¶
type ElasticDeploymentStatus string
ElasticDeploymentStatus - Flag specifying if the Elastic deployment status is healthy or not.
const ( ElasticDeploymentStatusHealthy ElasticDeploymentStatus = "Healthy" ElasticDeploymentStatusUnhealthy ElasticDeploymentStatus = "Unhealthy" )
func PossibleElasticDeploymentStatusValues ¶
func PossibleElasticDeploymentStatusValues() []ElasticDeploymentStatus
PossibleElasticDeploymentStatusValues returns the possible values for the ElasticDeploymentStatus const type.
type ErrorResponseBody ¶
type ErrorResponseBody struct { // Error code. Code *string `json:"code,omitempty"` // Error details. Details []*ErrorResponseBody `json:"details,omitempty"` // Error message. Message *string `json:"message,omitempty"` // Error target. Target *string `json:"target,omitempty"` }
ErrorResponseBody - Error response body.
type FilteringTag ¶
type FilteringTag struct { // Valid actions for a filtering tag. Action *TagAction `json:"action,omitempty"` // The name (also known as the key) of the tag. Name *string `json:"name,omitempty"` // The value of the tag. Value *string `json:"value,omitempty"` }
FilteringTag - The definition of a filtering tag. Filtering tags are used for capturing resources and include/exclude them from being monitored.
type IdentityProperties ¶
type IdentityProperties struct { // Managed identity type. Type *ManagedIdentityTypes `json:"type,omitempty"` // READ-ONLY; The identity ID. PrincipalID *string `json:"principalId,omitempty" azure:"ro"` // READ-ONLY; The tenant ID of resource. TenantID *string `json:"tenantId,omitempty" azure:"ro"` }
IdentityProperties - Identity properties.
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 `json:"filteringTags,omitempty"` // Flag specifying if AAD logs should be sent for the Monitor resource. SendAADLogs *bool `json:"sendAadLogs,omitempty"` // Flag specifying if activity logs from Azure resources should be sent for the Monitor resource. SendActivityLogs *bool `json:"sendActivityLogs,omitempty"` // Flag specifying if subscription logs should be sent for the Monitor resource. SendSubscriptionLogs *bool `json:"sendSubscriptionLogs,omitempty"` }
LogRules - Set of rules for sending logs for the Monitor resource.
func (LogRules) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type LogRules.
type ManagedIdentityTypes ¶
type ManagedIdentityTypes string
ManagedIdentityTypes - Managed Identity types.
const (
ManagedIdentityTypesSystemAssigned ManagedIdentityTypes = "SystemAssigned"
)
func PossibleManagedIdentityTypesValues ¶
func PossibleManagedIdentityTypesValues() []ManagedIdentityTypes
PossibleManagedIdentityTypesValues returns the possible values for the ManagedIdentityTypes const type.
type MonitorProperties ¶
type MonitorProperties struct { // Elastic cloud properties. ElasticProperties *Properties `json:"elasticProperties,omitempty"` // Flag specifying if the resource monitoring is enabled or disabled. MonitoringStatus *MonitoringStatus `json:"monitoringStatus,omitempty"` // Provisioning state of the monitor resource. ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` // User information. UserInfo *UserInfo `json:"userInfo,omitempty"` // READ-ONLY LiftrResourceCategory *LiftrResourceCategories `json:"liftrResourceCategory,omitempty" azure:"ro"` // READ-ONLY; The priority of the resource. LiftrResourcePreference *int32 `json:"liftrResourcePreference,omitempty" azure:"ro"` }
MonitorProperties - Properties specific to the monitor resource.
type MonitorResource ¶ added in v0.2.0
type MonitorResource struct { // REQUIRED; The location of the monitor resource Location *string `json:"location,omitempty"` // Identity properties of the monitor resource. Identity *IdentityProperties `json:"identity,omitempty"` // Properties of the monitor resource. Properties *MonitorProperties `json:"properties,omitempty"` // SKU of the monitor resource. SKU *ResourceSKU `json:"sku,omitempty"` // The tags of the monitor resource. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; ARM id of the monitor resource. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Name of the monitor resource. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The system metadata relating to this resource SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the monitor resource. Type *string `json:"type,omitempty" azure:"ro"` }
MonitorResource - Monitor resource.
func (MonitorResource) MarshalJSON ¶ added in v0.2.0
func (m MonitorResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller 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 `json:"nextLink,omitempty"` // Results of a list operation. Value []*MonitorResource `json:"value,omitempty"` }
MonitorResourceListResponse - Response of a list operation.
type MonitorResourceUpdateParameters ¶ added in v0.2.0
type MonitorResourceUpdateParameters struct { // elastic monitor resource tags. Tags map[string]*string `json:"tags,omitempty"` }
MonitorResourceUpdateParameters - Monitor resource update parameters.
func (MonitorResourceUpdateParameters) MarshalJSON ¶ added in v0.2.0
func (m MonitorResourceUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MonitorResourceUpdateParameters.
type MonitoredResource ¶
type MonitoredResource struct { // The ARM id of the resource. ID *string `json:"id,omitempty"` // Reason for why the resource is sending logs (or why it is not sending). ReasonForLogsStatus *string `json:"reasonForLogsStatus,omitempty"` // Flag indicating the status of the resource for sending logs operation to Elastic. SendingLogs *SendingLogs `json:"sendingLogs,omitempty"` }
MonitoredResource - The properties of a resource currently being monitored by the Elastic monitor resource.
type MonitoredResourceListResponse ¶
type MonitoredResourceListResponse struct { // Link to the next set of results, if any. NextLink *string `json:"nextLink,omitempty"` // Results of a list operation. Value []*MonitoredResource `json:"value,omitempty"` }
MonitoredResourceListResponse - Response of a list operation.
type MonitoredResourcesClient ¶
type MonitoredResourcesClient struct {
// contains filtered or unexported fields
}
MonitoredResourcesClient contains the methods for the MonitoredResources group. Don't use this type directly, use NewMonitoredResourcesClient() instead.
func NewMonitoredResourcesClient ¶
func NewMonitoredResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MonitoredResourcesClient, error)
NewMonitoredResourcesClient creates a new instance of MonitoredResourcesClient with the specified values. subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*MonitoredResourcesClient) NewListPager ¶ added in v0.4.0
func (client *MonitoredResourcesClient) NewListPager(resourceGroupName string, monitorName string, options *MonitoredResourcesClientListOptions) *runtime.Pager[MonitoredResourcesClientListResponse]
NewListPager - List the resources currently being monitored by the Elastic monitor resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-07-01-preview resourceGroupName - The name of the resource group to which the Elastic resource belongs. monitorName - Monitor resource name options - MonitoredResourcesClientListOptions contains the optional parameters for the MonitoredResourcesClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/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/elastic/armelastic" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armelastic.NewMonitoredResourcesClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager("myResourceGroup", "myMonitor", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type MonitoredResourcesClientListOptions ¶ added in v0.2.0
type MonitoredResourcesClientListOptions struct { }
MonitoredResourcesClientListOptions contains the optional parameters for the MonitoredResourcesClient.List method.
type MonitoredResourcesClientListResponse ¶ added in v0.2.0
type MonitoredResourcesClientListResponse struct {
MonitoredResourceListResponse
}
MonitoredResourcesClientListResponse contains the response from method MonitoredResourcesClient.List.
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 { // Properties of the monitoring tag rules. Properties *MonitoringTagRulesProperties `json:"properties,omitempty"` // READ-ONLY; The id of the rule set. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Name of the rule set. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The system metadata relating to this resource SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the rule set. Type *string `json:"type,omitempty" azure:"ro"` }
MonitoringTagRules - Capture logs and metrics of Azure resources based on ARM tags.
type MonitoringTagRulesListResponse ¶
type MonitoringTagRulesListResponse struct { // Link to the next set of results, if any. NextLink *string `json:"nextLink,omitempty"` // Results of a list operation. Value []*MonitoringTagRules `json:"value,omitempty"` }
MonitoringTagRulesListResponse - Response of a list operation.
type MonitoringTagRulesProperties ¶
type MonitoringTagRulesProperties struct { // Rules for sending logs. LogRules *LogRules `json:"logRules,omitempty"` // Provisioning state of the monitoring tag rules. ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` }
MonitoringTagRulesProperties - Definition of the properties for a TagRules resource.
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 Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) 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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-07-01-preview resourceGroupName - The name of the resource group to which the Elastic resource belongs. 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/tree/main/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/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/elastic/armelastic" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armelastic.NewMonitorsClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreate(ctx, "myResourceGroup", "myMonitor", &armelastic.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) } // TODO: use response item _ = res }
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-07-01-preview resourceGroupName - The name of the resource group to which the Elastic resource belongs. 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/tree/main/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/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/elastic/armelastic" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armelastic.NewMonitorsClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.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-07-01-preview resourceGroupName - The name of the resource group to which the Elastic resource belongs. 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/tree/main/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/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/elastic/armelastic" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armelastic.NewMonitorsClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "myResourceGroup", "myMonitor", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-07-01-preview resourceGroupName - The name of the resource group to which the Elastic resource belongs. options - MonitorsClientListByResourceGroupOptions contains the optional parameters for the MonitorsClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/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/elastic/armelastic" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armelastic.NewMonitorsClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("myResourceGroup", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*MonitorsClient) NewListPager ¶ added in v0.4.0
func (client *MonitorsClient) NewListPager(options *MonitorsClientListOptions) *runtime.Pager[MonitorsClientListResponse]
NewListPager - List all monitors under the specified subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-07-01-preview options - MonitorsClientListOptions contains the optional parameters for the MonitorsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/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/elastic/armelastic" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armelastic.NewMonitorsClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
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-07-01-preview resourceGroupName - The name of the resource group to which the Elastic resource belongs. 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/tree/main/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/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/elastic/armelastic" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armelastic.NewMonitorsClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Update(ctx, "myResourceGroup", "myMonitor", &armelastic.MonitorsClientUpdateOptions{Body: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type MonitorsClientBeginCreateOptions ¶ added in v0.2.0
type MonitorsClientBeginCreateOptions struct { // Elastic monitor resource model 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.Create.
type MonitorsClientDeleteResponse ¶ added in v0.2.0
type MonitorsClientDeleteResponse struct { }
MonitorsClientDeleteResponse contains the response from method MonitorsClient.Delete.
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.ListByResourceGroup method.
type MonitorsClientListByResourceGroupResponse ¶ added in v0.2.0
type MonitorsClientListByResourceGroupResponse struct {
MonitorResourceListResponse
}
MonitorsClientListByResourceGroupResponse contains the response from method MonitorsClient.ListByResourceGroup.
type MonitorsClientListOptions ¶ added in v0.2.0
type MonitorsClientListOptions struct { }
MonitorsClientListOptions contains the optional parameters for the MonitorsClient.List method.
type MonitorsClientListResponse ¶ added in v0.2.0
type MonitorsClientListResponse struct {
MonitorResourceListResponse
}
MonitorsClientListResponse contains the response from method MonitorsClient.List.
type MonitorsClientUpdateOptions ¶ added in v0.2.0
type MonitorsClientUpdateOptions struct { // Elastic resource model update parameters. 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 `json:"description,omitempty"` // Operation type, e.g., read, write, delete, etc. Operation *string `json:"operation,omitempty"` // Service provider, i.e., Microsoft.Elastic. Provider *string `json:"provider,omitempty"` // Type on which the operation is performed, e.g., 'monitors'. Resource *string `json:"resource,omitempty"` }
OperationDisplay - The object that represents the operation.
type OperationListResult ¶
type OperationListResult struct { // URL to get the next set of operation list results if there are any. NextLink *string `json:"nextLink,omitempty"` // List of operations supported by the Microsoft.Elastic provider. Value []*OperationResult `json:"value,omitempty"` }
OperationListResult - Result of GET request to list the Microsoft.Elastic operations.
type OperationName ¶
type OperationName string
OperationName - Operation to be performed on the given vm resource id.
const ( OperationNameAdd OperationName = "Add" OperationNameDelete OperationName = "Delete" )
func PossibleOperationNameValues ¶
func PossibleOperationNameValues() []OperationName
PossibleOperationNameValues returns the possible values for the OperationName const type.
type OperationResult ¶
type OperationResult struct { // The object that represents the operation. Display *OperationDisplay `json:"display,omitempty"` // Indicates whether the operation is a data action IsDataAction *bool `json:"isDataAction,omitempty"` // Operation name, i.e., {provider}/{resource}/{operation}. Name *string `json:"name,omitempty"` // Origin of the operation Origin *string `json:"origin,omitempty"` }
OperationResult - A Microsoft.Elastic REST API operation.
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.Elastic. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-07-01-preview options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/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/elastic/armelastic" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armelastic.NewOperationsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type OperationsClientListOptions ¶ added in v0.2.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
type OperationsClientListResponse ¶ added in v0.2.0
type OperationsClientListResponse struct {
OperationListResult
}
OperationsClientListResponse contains the response from method OperationsClient.List.
type Properties ¶ added in v0.2.0
type Properties struct { // Details of the elastic cloud deployment. ElasticCloudDeployment *CloudDeployment `json:"elasticCloudDeployment,omitempty"` // Details of the user's elastic account. ElasticCloudUser *CloudUser `json:"elasticCloudUser,omitempty"` }
Properties - Elastic Resource Properties.
type ProvisioningState ¶
type ProvisioningState string
ProvisioningState - Provisioning state of Elastic resource.
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 ResourceProviderDefaultErrorResponse ¶
type ResourceProviderDefaultErrorResponse struct { // READ-ONLY; Response body of Error Error *ErrorResponseBody `json:"error,omitempty" azure:"ro"` }
ResourceProviderDefaultErrorResponse - RP default error response.
type ResourceSKU ¶
type ResourceSKU struct { // REQUIRED; Name of the SKU. Name *string `json:"name,omitempty"` }
ResourceSKU - Microsoft.Elastic SKU.
type SendingLogs ¶
type SendingLogs string
SendingLogs - Flag indicating the status of the resource for sending logs operation to Elastic.
const ( SendingLogsFalse SendingLogs = "False" SendingLogsTrue SendingLogs = "True" )
func PossibleSendingLogsValues ¶
func PossibleSendingLogsValues() []SendingLogs
PossibleSendingLogsValues returns the possible values for the SendingLogs const type.
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time `json:"createdAt,omitempty"` // The identity that created the resource. CreatedBy *string `json:"createdBy,omitempty"` // The type of identity that created the resource. CreatedByType *CreatedByType `json:"createdByType,omitempty"` // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` // The identity that last modified the resource. LastModifiedBy *string `json:"lastModifiedBy,omitempty"` // The type of identity that last modified the resource. LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` }
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 Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*TagRulesClient) BeginDelete ¶
func (client *TagRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, monitorName string, ruleSetName string, options *TagRulesClientBeginDeleteOptions) (*runtime.Poller[TagRulesClientDeleteResponse], error)
BeginDelete - 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-07-01-preview resourceGroupName - The name of the resource group to which the Elastic resource belongs. monitorName - Monitor resource name ruleSetName - Tag Rule Set resource name options - TagRulesClientBeginDeleteOptions contains the optional parameters for the TagRulesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/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/elastic/armelastic" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armelastic.NewTagRulesClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "myResourceGroup", "myMonitor", "default", 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 (*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-07-01-preview resourceGroupName - The name of the resource group to which the Elastic resource belongs. monitorName - Monitor resource name ruleSetName - Tag Rule Set 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/tree/main/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/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/elastic/armelastic" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armelastic.NewTagRulesClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.CreateOrUpdate(ctx, "myResourceGroup", "myMonitor", "default", &armelastic.TagRulesClientCreateOrUpdateOptions{Body: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
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-07-01-preview resourceGroupName - The name of the resource group to which the Elastic resource belongs. monitorName - Monitor resource name ruleSetName - Tag Rule Set 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/tree/main/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/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/elastic/armelastic" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armelastic.NewTagRulesClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "myResourceGroup", "myMonitor", "default", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-07-01-preview resourceGroupName - The name of the resource group to which the Elastic resource belongs. monitorName - Monitor resource name options - TagRulesClientListOptions contains the optional parameters for the TagRulesClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/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/elastic/armelastic" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armelastic.NewTagRulesClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager("myResourceGroup", "myMonitor", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type TagRulesClientBeginDeleteOptions ¶ added in v0.2.0
type TagRulesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
TagRulesClientBeginDeleteOptions contains the optional parameters for the TagRulesClient.BeginDelete method.
type TagRulesClientCreateOrUpdateOptions ¶ added in v0.2.0
type TagRulesClientCreateOrUpdateOptions struct { // request body of MonitoringTagRules Body *MonitoringTagRules }
TagRulesClientCreateOrUpdateOptions contains the optional parameters for the TagRulesClient.CreateOrUpdate method.
type TagRulesClientCreateOrUpdateResponse ¶ added in v0.2.0
type TagRulesClientCreateOrUpdateResponse struct {
MonitoringTagRules
}
TagRulesClientCreateOrUpdateResponse contains the response from method TagRulesClient.CreateOrUpdate.
type TagRulesClientDeleteResponse ¶ added in v0.2.0
type TagRulesClientDeleteResponse struct { }
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 {
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.List method.
type TagRulesClientListResponse ¶ added in v0.2.0
type TagRulesClientListResponse struct {
MonitoringTagRulesListResponse
}
TagRulesClientListResponse contains the response from method TagRulesClient.List.
type UserInfo ¶
type UserInfo struct { // Company information of the user to be passed to partners. CompanyInfo *CompanyInfo `json:"companyInfo,omitempty"` // Company name of the user CompanyName *string `json:"companyName,omitempty"` // Email of the user used by Elastic for contacting them if needed EmailAddress *string `json:"emailAddress,omitempty"` // First name of the user FirstName *string `json:"firstName,omitempty"` // Last name of the user LastName *string `json:"lastName,omitempty"` }
UserInfo - User Information to be passed to partners.
type VMCollectionClient ¶
type VMCollectionClient struct {
// contains filtered or unexported fields
}
VMCollectionClient contains the methods for the VMCollection group. Don't use this type directly, use NewVMCollectionClient() instead.
func NewVMCollectionClient ¶
func NewVMCollectionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VMCollectionClient, error)
NewVMCollectionClient creates a new instance of VMCollectionClient with the specified values. subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*VMCollectionClient) Update ¶
func (client *VMCollectionClient) Update(ctx context.Context, resourceGroupName string, monitorName string, options *VMCollectionClientUpdateOptions) (VMCollectionClientUpdateResponse, error)
Update - Update the vm details that will be monitored by the Elastic monitor resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-07-01-preview resourceGroupName - The name of the resource group to which the Elastic resource belongs. monitorName - Monitor resource name options - VMCollectionClientUpdateOptions contains the optional parameters for the VMCollectionClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/VMCollection_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/elastic/armelastic" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armelastic.NewVMCollectionClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = client.Update(ctx, "myResourceGroup", "myMonitor", &armelastic.VMCollectionClientUpdateOptions{Body: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
type VMCollectionClientUpdateOptions ¶ added in v0.2.0
type VMCollectionClientUpdateOptions struct { // VM resource Id Body *VMCollectionUpdate }
VMCollectionClientUpdateOptions contains the optional parameters for the VMCollectionClient.Update method.
type VMCollectionClientUpdateResponse ¶ added in v0.2.0
type VMCollectionClientUpdateResponse struct { }
VMCollectionClientUpdateResponse contains the response from method VMCollectionClient.Update.
type VMCollectionUpdate ¶
type VMCollectionUpdate struct { // Operation to be performed for given VM. OperationName *OperationName `json:"operationName,omitempty"` // ARM id of the VM resource. VMResourceID *string `json:"vmResourceId,omitempty"` }
VMCollectionUpdate - Update VM resource collection.
type VMHostClient ¶
type VMHostClient struct {
// contains filtered or unexported fields
}
VMHostClient contains the methods for the VMHost group. Don't use this type directly, use NewVMHostClient() instead.
func NewVMHostClient ¶
func NewVMHostClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VMHostClient, error)
NewVMHostClient creates a new instance of VMHostClient with the specified values. subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*VMHostClient) NewListPager ¶ added in v0.4.0
func (client *VMHostClient) NewListPager(resourceGroupName string, monitorName string, options *VMHostClientListOptions) *runtime.Pager[VMHostClientListResponse]
NewListPager - List the vm resources currently being monitored by the Elastic monitor resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-07-01-preview resourceGroupName - The name of the resource group to which the Elastic resource belongs. monitorName - Monitor resource name options - VMHostClientListOptions contains the optional parameters for the VMHostClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/VMHost_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/elastic/armelastic" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armelastic.NewVMHostClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager("myResourceGroup", "myMonitor", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type VMHostClientListOptions ¶ added in v0.2.0
type VMHostClientListOptions struct { }
VMHostClientListOptions contains the optional parameters for the VMHostClient.List method.
type VMHostClientListResponse ¶ added in v0.2.0
type VMHostClientListResponse struct {
VMHostListResponse
}
VMHostClientListResponse contains the response from method VMHostClient.List.
type VMHostListResponse ¶
type VMHostListResponse struct { // Link to the next Vm resource Id, if any. NextLink *string `json:"nextLink,omitempty"` // Results of a list operation. Value []*VMResources `json:"value,omitempty"` }
VMHostListResponse - Response of a list operation.
type VMIngestionClient ¶
type VMIngestionClient struct {
// contains filtered or unexported fields
}
VMIngestionClient contains the methods for the VMIngestion group. Don't use this type directly, use NewVMIngestionClient() instead.
func NewVMIngestionClient ¶
func NewVMIngestionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VMIngestionClient, error)
NewVMIngestionClient creates a new instance of VMIngestionClient with the specified values. subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*VMIngestionClient) Details ¶
func (client *VMIngestionClient) Details(ctx context.Context, resourceGroupName string, monitorName string, options *VMIngestionClientDetailsOptions) (VMIngestionClientDetailsResponse, error)
Details - List the vm ingestion details that will be monitored by the Elastic monitor resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-07-01-preview resourceGroupName - The name of the resource group to which the Elastic resource belongs. monitorName - Monitor resource name options - VMIngestionClientDetailsOptions contains the optional parameters for the VMIngestionClient.Details method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/elastic/resource-manager/Microsoft.Elastic/preview/2020-07-01-preview/examples/VMIngestion_Details.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elastic/armelastic" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armelastic.NewVMIngestionClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Details(ctx, "myResourceGroup", "myMonitor", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type VMIngestionClientDetailsOptions ¶ added in v0.2.0
type VMIngestionClientDetailsOptions struct { }
VMIngestionClientDetailsOptions contains the optional parameters for the VMIngestionClient.Details method.
type VMIngestionClientDetailsResponse ¶ added in v0.2.0
type VMIngestionClientDetailsResponse struct {
VMIngestionDetailsResponse
}
VMIngestionClientDetailsResponse contains the response from method VMIngestionClient.Details.
type VMIngestionDetailsResponse ¶
type VMIngestionDetailsResponse struct { // The cloudId of given Elastic monitor resource. CloudID *string `json:"cloudId,omitempty"` // Ingestion details to install agent on given VM. IngestionKey *string `json:"ingestionKey,omitempty"` }
VMIngestionDetailsResponse - The vm ingestion details to install an agent.
type VMResources ¶
type VMResources struct { // The ARM id of the VM resource. VMResourceID *string `json:"vmResourceId,omitempty"` }
VMResources - The vm resource properties that is currently being monitored by the Elastic monitor resource.
Source Files ¶
- build.go
- zz_generated_constants.go
- zz_generated_deploymentinfo_client.go
- zz_generated_models.go
- zz_generated_models_serde.go
- zz_generated_monitoredresources_client.go
- zz_generated_monitors_client.go
- zz_generated_operations_client.go
- zz_generated_response_types.go
- zz_generated_tagrules_client.go
- zz_generated_time_rfc3339.go
- zz_generated_vmcollection_client.go
- zz_generated_vmhost_client.go
- zz_generated_vmingestion_client.go