Documentation
¶
Index ¶
- type AmwAccount
- type Baseline
- type BaselineProperties
- type Category
- type Client
- func (client *Client) CreateOrUpdate(ctx context.Context, serviceGroupName string, sliName string, resource Sli, ...) (ClientCreateOrUpdateResponse, error)
- func (client *Client) Delete(ctx context.Context, serviceGroupName string, sliName string, ...) (ClientDeleteResponse, error)
- func (client *Client) Get(ctx context.Context, serviceGroupName string, sliName string, ...) (ClientGetResponse, error)
- func (client *Client) NewListByParentPager(serviceGroupName string, options *ClientListByParentOptions) *runtime.Pager[ClientListByParentResponse]
- type ClientCreateOrUpdateOptions
- type ClientCreateOrUpdateResponse
- type ClientDeleteOptions
- type ClientDeleteResponse
- type ClientFactory
- type ClientGetOptions
- type ClientGetResponse
- type ClientListByParentOptions
- type ClientListByParentResponse
- type Condition
- type ConditionOperator
- type CreatedByType
- type EvaluationCalculationType
- type EvaluationType
- type ExecutionState
- type ManagedServiceIdentity
- type ManagedServiceIdentityType
- type Metric
- type ProvisioningState
- type SamplingType
- type ScalarFunction
- type Signal
- type SignalSource
- type Sli
- type SliListResult
- type SliProperties
- type SliResource
- type SpatialAggregation
- type SpatialAggregationType
- type SystemData
- type TemporalAggregation
- type TemporalAggregationType
- type UserAssignedIdentity
- type WindowUptimeCriteria
- type WindowUptimeCriteriaComparator
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AmwAccount ¶
type AmwAccount struct {
// REQUIRED; The ARM resource ID of the managed identity with access to the source account.
Identity *string
// REQUIRED; The ARM resource ID of the account where metrics are emitted.
ResourceID *string
}
AmwAccount - Represents an Azure Monitor Workspace (AMW) account used for emitting metrics.
func (AmwAccount) MarshalJSON ¶
func (a AmwAccount) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AmwAccount.
func (*AmwAccount) UnmarshalJSON ¶
func (a *AmwAccount) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AmwAccount.
type Baseline ¶
type Baseline struct {
// REQUIRED; Specifies how evaluation is calculated, either based on calendar days or a rolling window.
EvaluationCalculationType *EvaluationCalculationType
// REQUIRED; The time frame (in days) used for SLI evaluation.
EvaluationPeriodDays *int32
// REQUIRED; The user-defined or Azure-defined target value used for comparison against the SLI value.
Value *float32
}
Baseline - Defines the target parameters for a Slo baseline.
func (Baseline) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Baseline.
func (*Baseline) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Baseline.
type BaselineProperties ¶
type BaselineProperties struct {
// REQUIRED; Defines the baseline target, which is compared against the SLI value to determine compliance.
Baseline *Baseline
}
BaselineProperties - Defines the properties of a baseline.
func (BaselineProperties) MarshalJSON ¶
func (b BaselineProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BaselineProperties.
func (*BaselineProperties) UnmarshalJSON ¶
func (b *BaselineProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BaselineProperties.
type Category ¶
type Category string
Category - Defines the category of an SLI
func PossibleCategoryValues ¶
func PossibleCategoryValues() []Category
PossibleCategoryValues returns the possible values for the Category const type.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client - Defines operations for managing SLI resources. Don't use this type directly, use NewClient() instead.
Generated from API version 2025-03-01-preview
func NewClient ¶
func NewClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error)
NewClient creates a new instance of Client with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - Contains optional client configuration. Pass nil to accept the default values.
func (*Client) CreateOrUpdate ¶
func (client *Client) CreateOrUpdate(ctx context.Context, serviceGroupName string, sliName string, resource Sli, options *ClientCreateOrUpdateOptions) (ClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates an SLI resource. If the operation fails it returns an *azcore.ResponseError type.
- serviceGroupName - The name of the service group.
- sliName - Name of the SLI that is given by the user.
- resource - Resource create parameters.
- options - ClientCreateOrUpdateOptions contains the optional parameters for the Client.CreateOrUpdate method.
Example ¶
Generated from example definition: 2025-03-01-preview/Slis_CreateOrUpdate.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armslis"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armslis.NewClientFactory(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewClient().CreateOrUpdate(ctx, "testSG", "testSli", armslis.Sli{
Properties: &armslis.SliResource{
Description: to.Ptr("Measures the performance characteristics of the GetContosoUsers() API. "),
Category: to.Ptr(armslis.CategoryLatency),
EvaluationType: to.Ptr(armslis.EvaluationTypeWindowBased),
EnableAlert: to.Ptr(true),
DestinationAmwAccounts: []*armslis.AmwAccount{
{
ResourceID: to.Ptr("/subscriptions//resourcegroups//providers/microsoft.monitor/accounts/"),
Identity: to.Ptr("/subscriptions//resourcegroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/"),
},
},
BaselineProperties: &armslis.BaselineProperties{
Baseline: &armslis.Baseline{
Value: to.Ptr[float32](99),
EvaluationPeriodDays: to.Ptr[int32](30),
EvaluationCalculationType: to.Ptr(armslis.EvaluationCalculationTypeCalendarDays),
},
},
SliProperties: &armslis.SliProperties{
WindowUptimeCriteria: &armslis.WindowUptimeCriteria{
Target: to.Ptr[float32](95),
Comparator: to.Ptr(armslis.WindowUptimeCriteriaComparatorGreaterThanOrEqual),
},
Signals: &armslis.Signal{
SignalSources: []*armslis.SignalSource{
{
SignalSourceID: to.Ptr("A"),
SourceAmwAccountManagedIdentity: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity"),
SourceAmwAccountResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAccount"),
MetricNamespace: to.Ptr("ContosoMetricsWest"),
MetricName: to.Ptr("Stamp1Latency"),
Filters: []*armslis.Condition{
{
DimensionName: to.Ptr("ApiName"),
Operator: to.Ptr(armslis.ConditionOperatorEqual),
Value: to.Ptr("GetContosoUsers"),
},
},
SpatialAggregation: &armslis.SpatialAggregation{
Type: to.Ptr(armslis.SpatialAggregationTypeAverage),
Dimensions: []*string{
to.Ptr("Region"),
to.Ptr("ResponseCode"),
},
},
TemporalAggregation: &armslis.TemporalAggregation{
Type: to.Ptr(armslis.TemporalAggregationTypeAverage),
WindowSizeMinutes: to.Ptr[int32](5),
},
},
{
SignalSourceID: to.Ptr("B"),
SourceAmwAccountManagedIdentity: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity"),
SourceAmwAccountResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAccount"),
MetricNamespace: to.Ptr("ContosoMetricsEast"),
MetricName: to.Ptr("Stamp2Latency"),
Filters: []*armslis.Condition{
{
DimensionName: to.Ptr("ApiName"),
Operator: to.Ptr(armslis.ConditionOperatorEqual),
Value: to.Ptr("GetContosoUsers"),
},
},
SpatialAggregation: &armslis.SpatialAggregation{
Type: to.Ptr(armslis.SpatialAggregationTypeAverage),
Dimensions: []*string{
to.Ptr("Region"),
to.Ptr("ResponseCode"),
},
},
TemporalAggregation: &armslis.TemporalAggregation{
Type: to.Ptr(armslis.TemporalAggregationTypeAverage),
WindowSizeMinutes: to.Ptr[int32](5),
},
},
},
SignalFormula: to.Ptr("(A + B) /2"),
},
},
},
}, 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 = armslis.ClientCreateOrUpdateResponse{
// Sli: armslis.Sli{
// ID: to.Ptr("/providers/Microsoft.Management/ServiceGroups/testSG/providers/Microsoft.Monitor/slis/testSli"),
// Name: to.Ptr("testSli"),
// Type: to.Ptr("Microsoft.Monitor/slis"),
// Properties: &armslis.SliResource{
// Description: to.Ptr("Measures the performance characteristics of the GetContosoUsers() API. "),
// Category: to.Ptr(armslis.CategoryLatency),
// EvaluationType: to.Ptr(armslis.EvaluationTypeWindowBased),
// ProvisioningState: to.Ptr(armslis.ProvisioningStateSucceeded),
// StreamingRuleID: to.Ptr("123"),
// StreamingRuleLastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-03-01T00:00:00Z"); return t}()),
// EnableAlert: to.Ptr(true),
// ExecutionState: &armslis.ExecutionState{
// Message: to.Ptr(""),
// State: to.Ptr("Succeeded"),
// },
// DestinationAmwAccounts: []*armslis.AmwAccount{
// {
// ResourceID: to.Ptr("/subscriptions//resourcegroups//providers/microsoft.monitor/accounts/"),
// Identity: to.Ptr("/subscriptions//resourcegroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/"),
// },
// },
// DestinationMetrics: []*armslis.Metric{
// {
// MetricNamespace: to.Ptr("ContosoMetricsOut"),
// MetricName: to.Ptr("Get API Latency:Uptime"),
// },
// {
// MetricNamespace: to.Ptr("ContosoMetricsOut"),
// MetricName: to.Ptr("Get API Latency:Downtime"),
// },
// {
// MetricNamespace: to.Ptr("ContosoMetricsOut"),
// MetricName: to.Ptr("Get API Latency:Value"),
// },
// },
// BaselineProperties: &armslis.BaselineProperties{
// Baseline: &armslis.Baseline{
// Value: to.Ptr[float32](99),
// EvaluationPeriodDays: to.Ptr[int32](30),
// EvaluationCalculationType: to.Ptr(armslis.EvaluationCalculationTypeCalendarDays),
// },
// },
// SliProperties: &armslis.SliProperties{
// WindowUptimeCriteria: &armslis.WindowUptimeCriteria{
// Target: to.Ptr[float32](95),
// Comparator: to.Ptr(armslis.WindowUptimeCriteriaComparatorGreaterThanOrEqual),
// },
// Signals: &armslis.Signal{
// SignalSources: []*armslis.SignalSource{
// {
// SignalSourceID: to.Ptr("A"),
// SourceAmwAccountManagedIdentity: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity"),
// SourceAmwAccountResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAccount"),
// MetricNamespace: to.Ptr("ContosoMetricsWest"),
// MetricName: to.Ptr("Stamp1Latency"),
// Filters: []*armslis.Condition{
// {
// DimensionName: to.Ptr("ApiName"),
// Operator: to.Ptr(armslis.ConditionOperatorEqual),
// Value: to.Ptr("GetContosoUsers"),
// },
// },
// SpatialAggregation: &armslis.SpatialAggregation{
// Type: to.Ptr(armslis.SpatialAggregationTypeAverage),
// Dimensions: []*string{
// to.Ptr("Region"),
// to.Ptr("ResponseCode"),
// },
// },
// TemporalAggregation: &armslis.TemporalAggregation{
// Type: to.Ptr(armslis.TemporalAggregationTypeAverage),
// WindowSizeMinutes: to.Ptr[int32](5),
// },
// },
// {
// SignalSourceID: to.Ptr("B"),
// SourceAmwAccountManagedIdentity: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity"),
// SourceAmwAccountResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAccount"),
// MetricNamespace: to.Ptr("ContosoMetricsEast"),
// MetricName: to.Ptr("Stamp2Latency"),
// Filters: []*armslis.Condition{
// {
// DimensionName: to.Ptr("ApiName"),
// Operator: to.Ptr(armslis.ConditionOperatorEqual),
// Value: to.Ptr("GetContosoUsers"),
// },
// },
// SpatialAggregation: &armslis.SpatialAggregation{
// Type: to.Ptr(armslis.SpatialAggregationTypeAverage),
// Dimensions: []*string{
// to.Ptr("Region"),
// to.Ptr("ResponseCode"),
// },
// },
// TemporalAggregation: &armslis.TemporalAggregation{
// Type: to.Ptr(armslis.TemporalAggregationTypeAverage),
// WindowSizeMinutes: to.Ptr[int32](5),
// },
// },
// },
// SignalFormula: to.Ptr("(A + B) /2"),
// },
// },
// },
// },
// }
}
Output:
func (*Client) Delete ¶
func (client *Client) Delete(ctx context.Context, serviceGroupName string, sliName string, options *ClientDeleteOptions) (ClientDeleteResponse, error)
Delete - Deletes an SLI resource. If the operation fails it returns an *azcore.ResponseError type.
- serviceGroupName - The name of the service group.
- sliName - Name of the SLI that is given by the user.
- options - ClientDeleteOptions contains the optional parameters for the Client.Delete method.
Example ¶
Generated from example definition: 2025-03-01-preview/Slis_Delete.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armslis"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armslis.NewClientFactory(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewClient().Delete(ctx, "testSG", "testSli", 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 = armslis.ClientDeleteResponse{
// }
}
Output:
func (*Client) Get ¶
func (client *Client) Get(ctx context.Context, serviceGroupName string, sliName string, options *ClientGetOptions) (ClientGetResponse, error)
Get - Gets an SLI resource. If the operation fails it returns an *azcore.ResponseError type.
- serviceGroupName - The name of the service group.
- sliName - Name of the SLI that is given by the user.
- options - ClientGetOptions contains the optional parameters for the Client.Get method.
Example ¶
Generated from example definition: 2025-03-01-preview/Slis_Get.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armslis"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armslis.NewClientFactory(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewClient().Get(ctx, "testSG", "testSli", 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 = armslis.ClientGetResponse{
// Sli: armslis.Sli{
// ID: to.Ptr("/providers/Microsoft.Management/ServiceGroups/testSG/providers/Microsoft.Monitor/slis/testSli"),
// Name: to.Ptr("testSli"),
// Type: to.Ptr("Microsoft.Monitor/slis"),
// Properties: &armslis.SliResource{
// Description: to.Ptr("Measures the performance characteristics of the GetContosoUsers() API. "),
// Category: to.Ptr(armslis.CategoryLatency),
// EvaluationType: to.Ptr(armslis.EvaluationTypeWindowBased),
// ProvisioningState: to.Ptr(armslis.ProvisioningStateSucceeded),
// StreamingRuleID: to.Ptr("123"),
// StreamingRuleLastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-03-01T00:00:00Z"); return t}()),
// EnableAlert: to.Ptr(true),
// ExecutionState: &armslis.ExecutionState{
// Message: to.Ptr(""),
// State: to.Ptr("Succeeded"),
// },
// DestinationAmwAccounts: []*armslis.AmwAccount{
// {
// ResourceID: to.Ptr("/subscriptions//resourcegroups//providers/microsoft.monitor/accounts/"),
// Identity: to.Ptr("/subscriptions//resourcegroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/"),
// },
// },
// DestinationMetrics: []*armslis.Metric{
// {
// MetricNamespace: to.Ptr("ContosoMetricsOut"),
// MetricName: to.Ptr("Get API Latency:Uptime"),
// },
// {
// MetricNamespace: to.Ptr("ContosoMetricsOut"),
// MetricName: to.Ptr("Get API Latency:Downtime"),
// },
// {
// MetricNamespace: to.Ptr("ContosoMetricsOut"),
// MetricName: to.Ptr("Get API Latency:Value"),
// },
// },
// BaselineProperties: &armslis.BaselineProperties{
// Baseline: &armslis.Baseline{
// Value: to.Ptr[float32](99),
// EvaluationPeriodDays: to.Ptr[int32](30),
// EvaluationCalculationType: to.Ptr(armslis.EvaluationCalculationTypeCalendarDays),
// },
// },
// SliProperties: &armslis.SliProperties{
// WindowUptimeCriteria: &armslis.WindowUptimeCriteria{
// Target: to.Ptr[float32](95),
// Comparator: to.Ptr(armslis.WindowUptimeCriteriaComparatorGreaterThanOrEqual),
// },
// Signals: &armslis.Signal{
// SignalSources: []*armslis.SignalSource{
// {
// SignalSourceID: to.Ptr("A"),
// SourceAmwAccountManagedIdentity: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity"),
// SourceAmwAccountResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAccount"),
// MetricNamespace: to.Ptr("ContosoMetricsWest"),
// MetricName: to.Ptr("Stamp1Latency"),
// Filters: []*armslis.Condition{
// {
// DimensionName: to.Ptr("ApiName"),
// Operator: to.Ptr(armslis.ConditionOperatorEqual),
// Value: to.Ptr("GetContosoUsers"),
// },
// },
// SpatialAggregation: &armslis.SpatialAggregation{
// Type: to.Ptr(armslis.SpatialAggregationTypeAverage),
// Dimensions: []*string{
// to.Ptr("Region"),
// to.Ptr("ResponseCode"),
// },
// },
// TemporalAggregation: &armslis.TemporalAggregation{
// Type: to.Ptr(armslis.TemporalAggregationTypeAverage),
// WindowSizeMinutes: to.Ptr[int32](5),
// },
// },
// {
// SignalSourceID: to.Ptr("B"),
// SourceAmwAccountManagedIdentity: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity"),
// SourceAmwAccountResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAccount"),
// MetricNamespace: to.Ptr("ContosoMetricsEast"),
// MetricName: to.Ptr("Stamp2Latency"),
// Filters: []*armslis.Condition{
// {
// DimensionName: to.Ptr("ApiName"),
// Operator: to.Ptr(armslis.ConditionOperatorEqual),
// Value: to.Ptr("GetContosoUsers"),
// },
// },
// SpatialAggregation: &armslis.SpatialAggregation{
// Type: to.Ptr(armslis.SpatialAggregationTypeAverage),
// Dimensions: []*string{
// to.Ptr("Region"),
// to.Ptr("ResponseCode"),
// },
// },
// TemporalAggregation: &armslis.TemporalAggregation{
// Type: to.Ptr(armslis.TemporalAggregationTypeAverage),
// WindowSizeMinutes: to.Ptr[int32](5),
// },
// },
// },
// SignalFormula: to.Ptr("(A + B) /2"),
// },
// },
// },
// },
// }
}
Output:
func (*Client) NewListByParentPager ¶
func (client *Client) NewListByParentPager(serviceGroupName string, options *ClientListByParentOptions) *runtime.Pager[ClientListByParentResponse]
NewListByParentPager - Lists all SLI resources under a parent resource.
- serviceGroupName - The name of the service group.
- options - ClientListByParentOptions contains the optional parameters for the Client.NewListByParentPager method.
Example ¶
Generated from example definition: 2025-03-01-preview/Slis_ListByParent.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armslis"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armslis.NewClientFactory(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewClient().NewListByParentPager("testSG", 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 = armslis.ClientListByParentResponse{
// SliListResult: armslis.SliListResult{
// Value: []*armslis.Sli{
// {
// ID: to.Ptr("/providers/Microsoft.Management/ServiceGroups/testSG/providers/Microsoft.Monitor/slis/testSli"),
// Name: to.Ptr("testSli"),
// Type: to.Ptr("Microsoft.Monitor/slis"),
// Properties: &armslis.SliResource{
// Description: to.Ptr("Measures the performance characteristics of the GetContosoUsers() API. "),
// Category: to.Ptr(armslis.CategoryLatency),
// EvaluationType: to.Ptr(armslis.EvaluationTypeWindowBased),
// ProvisioningState: to.Ptr(armslis.ProvisioningStateSucceeded),
// StreamingRuleID: to.Ptr("123"),
// StreamingRuleLastUpdatedTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-03-01T00:00:00Z"); return t}()),
// EnableAlert: to.Ptr(true),
// ExecutionState: &armslis.ExecutionState{
// Message: to.Ptr(""),
// State: to.Ptr("Succeeded"),
// },
// DestinationAmwAccounts: []*armslis.AmwAccount{
// {
// ResourceID: to.Ptr("/subscriptions//resourcegroups//providers/microsoft.monitor/accounts/"),
// Identity: to.Ptr("/subscriptions//resourcegroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/"),
// },
// },
// DestinationMetrics: []*armslis.Metric{
// {
// MetricNamespace: to.Ptr("ContosoMetricsOut"),
// MetricName: to.Ptr("Get API Latency:Uptime"),
// },
// {
// MetricNamespace: to.Ptr("ContosoMetricsOut"),
// MetricName: to.Ptr("Get API Latency:Downtime"),
// },
// {
// MetricNamespace: to.Ptr("ContosoMetricsOut"),
// MetricName: to.Ptr("Get API Latency:Value"),
// },
// },
// BaselineProperties: &armslis.BaselineProperties{
// Baseline: &armslis.Baseline{
// Value: to.Ptr[float32](99),
// EvaluationPeriodDays: to.Ptr[int32](30),
// EvaluationCalculationType: to.Ptr(armslis.EvaluationCalculationTypeCalendarDays),
// },
// },
// SliProperties: &armslis.SliProperties{
// WindowUptimeCriteria: &armslis.WindowUptimeCriteria{
// Target: to.Ptr[float32](95),
// Comparator: to.Ptr(armslis.WindowUptimeCriteriaComparatorGreaterThanOrEqual),
// },
// Signals: &armslis.Signal{
// SignalSources: []*armslis.SignalSource{
// {
// SignalSourceID: to.Ptr("A"),
// SourceAmwAccountManagedIdentity: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity"),
// SourceAmwAccountResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAccount"),
// MetricNamespace: to.Ptr("ContosoMetricsWest"),
// MetricName: to.Ptr("Stamp1Latency"),
// Filters: []*armslis.Condition{
// {
// DimensionName: to.Ptr("ApiName"),
// Operator: to.Ptr(armslis.ConditionOperatorEqual),
// Value: to.Ptr("GetContosoUsers"),
// },
// },
// SpatialAggregation: &armslis.SpatialAggregation{
// Type: to.Ptr(armslis.SpatialAggregationTypeAverage),
// Dimensions: []*string{
// to.Ptr("Region"),
// to.Ptr("ResponseCode"),
// },
// },
// TemporalAggregation: &armslis.TemporalAggregation{
// Type: to.Ptr(armslis.TemporalAggregationTypeAverage),
// WindowSizeMinutes: to.Ptr[int32](5),
// },
// },
// {
// SignalSourceID: to.Ptr("B"),
// SourceAmwAccountManagedIdentity: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity"),
// SourceAmwAccountResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAccount"),
// MetricNamespace: to.Ptr("ContosoMetricsEast"),
// MetricName: to.Ptr("Stamp2Latency"),
// Filters: []*armslis.Condition{
// {
// DimensionName: to.Ptr("ApiName"),
// Operator: to.Ptr(armslis.ConditionOperatorEqual),
// Value: to.Ptr("GetContosoUsers"),
// },
// },
// SpatialAggregation: &armslis.SpatialAggregation{
// Type: to.Ptr(armslis.SpatialAggregationTypeAverage),
// Dimensions: []*string{
// to.Ptr("Region"),
// to.Ptr("ResponseCode"),
// },
// },
// TemporalAggregation: &armslis.TemporalAggregation{
// Type: to.Ptr(armslis.TemporalAggregationTypeAverage),
// WindowSizeMinutes: to.Ptr[int32](5),
// },
// },
// },
// SignalFormula: to.Ptr("(A + B) /2"),
// },
// },
// },
// },
// },
// NextLink: to.Ptr("https://microsoft.com/a"),
// },
// }
}
}
Output:
type ClientCreateOrUpdateOptions ¶
type ClientCreateOrUpdateOptions struct {
}
ClientCreateOrUpdateOptions contains the optional parameters for the Client.CreateOrUpdate method.
type ClientCreateOrUpdateResponse ¶
type ClientCreateOrUpdateResponse struct {
// Represents an SLI resource within the ProviderHub.
Sli
}
ClientCreateOrUpdateResponse contains the response from method Client.CreateOrUpdate.
type ClientDeleteOptions ¶
type ClientDeleteOptions struct {
}
ClientDeleteOptions contains the optional parameters for the Client.Delete method.
type ClientDeleteResponse ¶
type ClientDeleteResponse struct {
}
ClientDeleteResponse contains the response from method Client.Delete.
type ClientFactory ¶
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶
func NewClientFactory(credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewClient ¶
func (c *ClientFactory) NewClient() *Client
NewClient creates a new instance of Client.
type ClientGetOptions ¶
type ClientGetOptions struct {
}
ClientGetOptions contains the optional parameters for the Client.Get method.
type ClientGetResponse ¶
type ClientGetResponse struct {
// Represents an SLI resource within the ProviderHub.
Sli
}
ClientGetResponse contains the response from method Client.Get.
type ClientListByParentOptions ¶
type ClientListByParentOptions struct {
}
ClientListByParentOptions contains the optional parameters for the Client.NewListByParentPager method.
type ClientListByParentResponse ¶
type ClientListByParentResponse struct {
// The response of a Sli list operation.
SliListResult
}
ClientListByParentResponse contains the response from method Client.NewListByParentPager.
type Condition ¶
type Condition struct {
// REQUIRED; Operator used in the filtering condition.
Operator *ConditionOperator
// REQUIRED; Value used in filtering. For most operators (eq, ne, lt, lte, gt, gte, startswith, notstartswith, contains, notcontains)
// this is a single value (for example "GetContosoUsers"). For the `in` and `notin` operators, multiple values must be joined
// by the delimiter `^^` (for example "east^^west^^north").
Value *string
// Dimension name used in filtering.
DimensionName *string
// Defines the sampling type.
SamplingType *SamplingType
// Scalar function applied for filtering.
ScalarFunction *ScalarFunction
}
Condition - Represents a filtering condition.
func (Condition) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Condition.
func (*Condition) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Condition.
type ConditionOperator ¶
type ConditionOperator string
ConditionOperator - Defines operators used in filter conditions.
const ( // ConditionOperatorContains - Contains the value. ConditionOperatorContains ConditionOperator = "contains" // ConditionOperatorEqual - Equal to. ConditionOperatorEqual ConditionOperator = "eq" // ConditionOperatorGreaterThan - Greater than. ConditionOperatorGreaterThan ConditionOperator = "gt" // ConditionOperatorGreaterThanOrEqual - Greater than or equal to. ConditionOperatorGreaterThanOrEqual ConditionOperator = "gte" // ConditionOperatorIn - Matches when `value` is one of the items in the `^^`-delimited list (for example, `value` = "east^^west^^north"). ConditionOperatorIn ConditionOperator = "in" // ConditionOperatorLessThan - Less than. ConditionOperatorLessThan ConditionOperator = "lt" // ConditionOperatorLessThanOrEqual - Less than or equal to. ConditionOperatorLessThanOrEqual ConditionOperator = "lte" // ConditionOperatorNotContains - Does not contain the value. ConditionOperatorNotContains ConditionOperator = "notcontains" // ConditionOperatorNotEqual - Not equal to. ConditionOperatorNotEqual ConditionOperator = "ne" // ConditionOperatorNotIn - Matches when `value` is none of the items in the `^^`-delimited list (for example, `value` = "east^^west^^north"). ConditionOperatorNotIn ConditionOperator = "notin" // ConditionOperatorNotStartsWith - Does not start with. ConditionOperatorNotStartsWith ConditionOperator = "notstartswith" // ConditionOperatorStartsWith - Starts with. ConditionOperatorStartsWith ConditionOperator = "startswith" )
func PossibleConditionOperatorValues ¶
func PossibleConditionOperatorValues() []ConditionOperator
PossibleConditionOperatorValues returns the possible values for the ConditionOperator const type.
type CreatedByType ¶
type CreatedByType string
CreatedByType - The kind of entity that created the resource.
const ( // CreatedByTypeApplication - The entity was created by an application. CreatedByTypeApplication CreatedByType = "Application" // CreatedByTypeKey - The entity was created by a key. CreatedByTypeKey CreatedByType = "Key" // CreatedByTypeManagedIdentity - The entity was created by a managed identity. CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" // CreatedByTypeUser - The entity was created by a user. CreatedByTypeUser CreatedByType = "User" )
func PossibleCreatedByTypeValues ¶
func PossibleCreatedByTypeValues() []CreatedByType
PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
type EvaluationCalculationType ¶
type EvaluationCalculationType string
EvaluationCalculationType - Specifies the method for evaluation calculation.
const ( // EvaluationCalculationTypeCalendarDays - Calculates evaluation based on a fixed calendar period. EvaluationCalculationTypeCalendarDays EvaluationCalculationType = "CalendarDays" // EvaluationCalculationTypeRollingDays - Calculates evaluation using a rolling time window. EvaluationCalculationTypeRollingDays EvaluationCalculationType = "RollingDays" )
func PossibleEvaluationCalculationTypeValues ¶
func PossibleEvaluationCalculationTypeValues() []EvaluationCalculationType
PossibleEvaluationCalculationTypeValues returns the possible values for the EvaluationCalculationType const type.
type EvaluationType ¶
type EvaluationType string
EvaluationType - Specifies how the SLI is evaluated.
const ( // EvaluationTypeRequestBased - Evaluates SLI based on request counts. EvaluationTypeRequestBased EvaluationType = "RequestBased" // EvaluationTypeWindowBased - Evaluates SLI based on time windows. EvaluationTypeWindowBased EvaluationType = "WindowBased" )
func PossibleEvaluationTypeValues ¶
func PossibleEvaluationTypeValues() []EvaluationType
PossibleEvaluationTypeValues returns the possible values for the EvaluationType const type.
type ExecutionState ¶
type ExecutionState struct {
// REQUIRED; The execution state value.
State *string
// A descriptive message related to the execution state.
Message *string
}
ExecutionState - Represents the current execution state of an SLI.
func (ExecutionState) MarshalJSON ¶
func (e ExecutionState) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExecutionState.
func (*ExecutionState) UnmarshalJSON ¶
func (e *ExecutionState) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExecutionState.
type ManagedServiceIdentity ¶
type ManagedServiceIdentity struct {
// REQUIRED; The type of managed identity assigned to this resource.
Type *ManagedServiceIdentityType
// The identities assigned to this resource by the user.
UserAssignedIdentities map[string]*UserAssignedIdentity
// READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned
// identity.
PrincipalID *string
// READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.
TenantID *string
}
ManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities)
func (ManagedServiceIdentity) MarshalJSON ¶
func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity.
func (*ManagedServiceIdentity) UnmarshalJSON ¶
func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity.
type ManagedServiceIdentityType ¶
type ManagedServiceIdentityType string
ManagedServiceIdentityType - Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
const ( // ManagedServiceIdentityTypeNone - No managed identity. ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None" // ManagedServiceIdentityTypeSystemAssigned - System assigned managed identity. ManagedServiceIdentityTypeSystemAssigned ManagedServiceIdentityType = "SystemAssigned" // ManagedServiceIdentityTypeSystemAssignedUserAssigned - System and user assigned managed identity. ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned,UserAssigned" // ManagedServiceIdentityTypeUserAssigned - User assigned managed identity. ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned" )
func PossibleManagedServiceIdentityTypeValues ¶
func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType
PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type.
type Metric ¶
type Metric struct {
// REQUIRED; The name of the metric.
MetricName *string
// REQUIRED; The namespace of the metric.
MetricNamespace *string
}
Metric - Defines a metric in the destination AMW account.
func (Metric) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Metric.
func (*Metric) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Metric.
type ProvisioningState ¶
type ProvisioningState string
ProvisioningState - Represents the provisioning state of the SLI resource.
const ( // ProvisioningStateCanceled - Resource creation was canceled. ProvisioningStateCanceled ProvisioningState = "Canceled" // ProvisioningStateFailed - Resource creation failed. ProvisioningStateFailed ProvisioningState = "Failed" // ProvisioningStateSucceeded - Resource has been created. ProvisioningStateSucceeded ProvisioningState = "Succeeded" )
func PossibleProvisioningStateValues ¶
func PossibleProvisioningStateValues() []ProvisioningState
PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.
type SamplingType ¶
type SamplingType string
SamplingType - Defines the available sampling types.
const ( // SamplingTypeAverage - Average value. SamplingTypeAverage SamplingType = "Average" // SamplingTypeCount - Count of occurrences. SamplingTypeCount SamplingType = "Count" // SamplingTypeMax - Maximum value. SamplingTypeMax SamplingType = "Max" // SamplingTypeMin - Minimum value. SamplingTypeMin SamplingType = "Min" // SamplingTypeSum - Summation. SamplingTypeSum SamplingType = "Sum" )
func PossibleSamplingTypeValues ¶
func PossibleSamplingTypeValues() []SamplingType
PossibleSamplingTypeValues returns the possible values for the SamplingType const type.
type ScalarFunction ¶
type ScalarFunction string
ScalarFunction - Defines scalar functions used in filtering.
const ( // ScalarFunctionAvg - Average value. ScalarFunctionAvg ScalarFunction = "avg" // ScalarFunctionMax - Maximum value. ScalarFunctionMax ScalarFunction = "max" // ScalarFunctionMin - Minimum value. ScalarFunctionMin ScalarFunction = "min" // ScalarFunctionSum - Summation. ScalarFunctionSum ScalarFunction = "sum" )
func PossibleScalarFunctionValues ¶
func PossibleScalarFunctionValues() []ScalarFunction
PossibleScalarFunctionValues returns the possible values for the ScalarFunction const type.
type Signal ¶
type Signal struct {
// REQUIRED; Mathematical formula used to combine multiple metrics.
SignalFormula *string
// REQUIRED; Sources of metrics used for SLIs.
SignalSources []*SignalSource
}
Signal - Represents a signal model used in SLI calculations.
func (Signal) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Signal.
func (*Signal) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Signal.
type SignalSource ¶
type SignalSource struct {
// REQUIRED; Filters applied to modify signal values.
Filters []*Condition
// REQUIRED; Name of the metric.
MetricName *string
// REQUIRED; Namespace of the metric.
MetricNamespace *string
// REQUIRED; Unique identifier for the signal source.
SignalSourceID *string
// REQUIRED; Managed identity for authenticating the signal source.
SourceAmwAccountManagedIdentity *string
// REQUIRED; Resource ID of the source AMW account.
SourceAmwAccountResourceID *string
// REQUIRED; Defines how measurements are aggregated across multiple time series.
SpatialAggregation *SpatialAggregation
// REQUIRED; Defines how measurements are aggregated over a specific time window within the same time series.
TemporalAggregation *TemporalAggregation
}
SignalSource - Represents a signal source used in SLIs.
func (SignalSource) MarshalJSON ¶
func (s SignalSource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SignalSource.
func (*SignalSource) UnmarshalJSON ¶
func (s *SignalSource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SignalSource.
type Sli ¶
type Sli struct {
// The managed service identities assigned to this resource.
Identity *ManagedServiceIdentity
// The resource-specific properties for this resource.
Properties *SliResource
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
Sli - Represents an SLI resource within the ProviderHub.
func (Sli) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Sli.
func (*Sli) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Sli.
type SliListResult ¶
type SliListResult struct {
// REQUIRED; The Sli items on this page
Value []*Sli
// The link to the next page of items
NextLink *string
}
SliListResult - The response of a Sli list operation.
func (SliListResult) MarshalJSON ¶
func (s SliListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SliListResult.
func (*SliListResult) UnmarshalJSON ¶
func (s *SliListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SliListResult.
type SliProperties ¶
type SliProperties struct {
// Represents good signals used in request-based SLI calculations.
GoodSignals *Signal
// Signals used for window-based SLI calculations.
Signals *Signal
// Represents total signals used in request-based SLI calculations.
TotalSignals *Signal
// Defines the uptime criteria for window-based SLIs.
WindowUptimeCriteria *WindowUptimeCriteria
}
SliProperties - Defines the properties of an SLI.
func (SliProperties) MarshalJSON ¶
func (s SliProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SliProperties.
func (*SliProperties) UnmarshalJSON ¶
func (s *SliProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SliProperties.
type SliResource ¶
type SliResource struct {
// REQUIRED; Defines the SLO baseline associated with the SLI.
BaselineProperties *BaselineProperties
// REQUIRED; Specifies the category of the SLI, used to classify signals such as Availability and Latency.
Category *Category
// REQUIRED; A user-provided description of the SLI, with a maximum length of 1000 characters.
Description *string
// REQUIRED; Destination AMW accounts.
DestinationAmwAccounts []*AmwAccount
// REQUIRED; A flag to determine whether alert is enabled.
EnableAlert *bool
// REQUIRED; Determines how the SLI is evaluated—either based on request counts or time windows.
EvaluationType *EvaluationType
// REQUIRED; Defines the SLI properties associated with the SLI.
SliProperties *SliProperties
// READ-ONLY; The destination Azure Monitor Workspace (AMW) accounts where the SLI emits metrics.
DestinationMetrics []*Metric
// READ-ONLY; Indicates the current execution status of the SLI resource in ARM responses.
ExecutionState *ExecutionState
// READ-ONLY; Indicates the provisioning status of the last operation.
ProvisioningState *ProvisioningState
// READ-ONLY; The streaming rule Id associated with the Sli resource.
StreamingRuleID *string
// READ-ONLY; The streaming rule last updated timestamp associated with the Sli resource.
StreamingRuleLastUpdatedTimestamp *time.Time
}
SliResource - Defines the root level properties of an SLI resource.
func (SliResource) MarshalJSON ¶
func (s SliResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SliResource.
func (*SliResource) UnmarshalJSON ¶
func (s *SliResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SliResource.
type SpatialAggregation ¶
type SpatialAggregation struct {
// REQUIRED; Dimensions considered for spatial aggregation.
Dimensions []*string
// REQUIRED; Type of spatial aggregation.
Type *SpatialAggregationType
}
SpatialAggregation - Represents the spatial aggregation model.
func (SpatialAggregation) MarshalJSON ¶
func (s SpatialAggregation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SpatialAggregation.
func (*SpatialAggregation) UnmarshalJSON ¶
func (s *SpatialAggregation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SpatialAggregation.
type SpatialAggregationType ¶
type SpatialAggregationType string
SpatialAggregationType - Defines the available spatial aggregation types for aggregating measurements across multiple time series.
const ( // SpatialAggregationTypeAverage - Average value. SpatialAggregationTypeAverage SpatialAggregationType = "Average" // SpatialAggregationTypeCount - Count of occurrences. SpatialAggregationTypeCount SpatialAggregationType = "Count" // SpatialAggregationTypeMax - Maximum value. SpatialAggregationTypeMax SpatialAggregationType = "Max" // SpatialAggregationTypeMin - Minimum value. SpatialAggregationTypeMin SpatialAggregationType = "Min" // SpatialAggregationTypeSum - Summation. SpatialAggregationTypeSum SpatialAggregationType = "Sum" )
func PossibleSpatialAggregationTypeValues ¶
func PossibleSpatialAggregationTypeValues() []SpatialAggregationType
PossibleSpatialAggregationTypeValues returns the possible values for the SpatialAggregationType const type.
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 TemporalAggregation ¶
type TemporalAggregation struct {
// REQUIRED; Type of temporal aggregation.
Type *TemporalAggregationType
// Time window size for aggregation, in minutes.
WindowSizeMinutes *int32
}
TemporalAggregation - Represents temporal aggregation settings.
func (TemporalAggregation) MarshalJSON ¶
func (t TemporalAggregation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TemporalAggregation.
func (*TemporalAggregation) UnmarshalJSON ¶
func (t *TemporalAggregation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TemporalAggregation.
type TemporalAggregationType ¶
type TemporalAggregationType string
TemporalAggregationType - Defines the available temporal aggregation types for aggregating measurements over a specific time window within the same time series.
const ( // TemporalAggregationTypeAverage - Average value. TemporalAggregationTypeAverage TemporalAggregationType = "Average" // TemporalAggregationTypeDelta - Delta over time. TemporalAggregationTypeDelta TemporalAggregationType = "Delta" // TemporalAggregationTypeIDelta - Instance delta. TemporalAggregationTypeIDelta TemporalAggregationType = "IDelta" // TemporalAggregationTypeIRate - Instance rate. TemporalAggregationTypeIRate TemporalAggregationType = "IRate" // TemporalAggregationTypeIncrease - Increase over time. TemporalAggregationTypeIncrease TemporalAggregationType = "Increase" // TemporalAggregationTypeMax - Maximum value. TemporalAggregationTypeMax TemporalAggregationType = "Max" // TemporalAggregationTypeMin - Minimum value. TemporalAggregationTypeMin TemporalAggregationType = "Min" // TemporalAggregationTypeRate - Rate over time. TemporalAggregationTypeRate TemporalAggregationType = "Rate" // TemporalAggregationTypeSum - Summation. TemporalAggregationTypeSum TemporalAggregationType = "Sum" )
func PossibleTemporalAggregationTypeValues ¶
func PossibleTemporalAggregationTypeValues() []TemporalAggregationType
PossibleTemporalAggregationTypeValues returns the possible values for the TemporalAggregationType const type.
type UserAssignedIdentity ¶
type UserAssignedIdentity struct {
// READ-ONLY; The client ID of the assigned identity.
ClientID *string
// READ-ONLY; The principal ID of the assigned identity.
PrincipalID *string
}
UserAssignedIdentity - User assigned identity properties
func (UserAssignedIdentity) MarshalJSON ¶
func (u UserAssignedIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity.
func (*UserAssignedIdentity) UnmarshalJSON ¶
func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity.
type WindowUptimeCriteria ¶
type WindowUptimeCriteria struct {
// REQUIRED; Comparison operator used for uptime evaluation.
Comparator *WindowUptimeCriteriaComparator
// REQUIRED; Threshold value used to determine uptime.
Target *float32
}
WindowUptimeCriteria - Represents criteria for determining uptime in window-based SLIs.
func (WindowUptimeCriteria) MarshalJSON ¶
func (w WindowUptimeCriteria) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WindowUptimeCriteria.
func (*WindowUptimeCriteria) UnmarshalJSON ¶
func (w *WindowUptimeCriteria) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WindowUptimeCriteria.
type WindowUptimeCriteriaComparator ¶
type WindowUptimeCriteriaComparator string
WindowUptimeCriteriaComparator - Defines comparison operators for window uptime criteria.
const ( // WindowUptimeCriteriaComparatorGreaterThan - Greater than the target value. WindowUptimeCriteriaComparatorGreaterThan WindowUptimeCriteriaComparator = "gt" // WindowUptimeCriteriaComparatorGreaterThanOrEqual - Greater than or equal to the target value. WindowUptimeCriteriaComparatorGreaterThanOrEqual WindowUptimeCriteriaComparator = "gte" // WindowUptimeCriteriaComparatorLessThan - Less than the target value. WindowUptimeCriteriaComparatorLessThan WindowUptimeCriteriaComparator = "lt" // WindowUptimeCriteriaComparatorLessThanOrEqual - Less than or equal to the target value. WindowUptimeCriteriaComparatorLessThanOrEqual WindowUptimeCriteriaComparator = "lte" )
func PossibleWindowUptimeCriteriaComparatorValues ¶
func PossibleWindowUptimeCriteriaComparatorValues() []WindowUptimeCriteriaComparator
PossibleWindowUptimeCriteriaComparatorValues returns the possible values for the WindowUptimeCriteriaComparator const type.