subaccount

package
v0.20240731.1170959 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2024 License: MPL-2.0 Imports: 15 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount Documentation

The subaccount SDK allows for interaction with the Azure Resource Manager Service logz (API Version 2020-10-01).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/subaccount"

Client Initialization

client := subaccount.NewSubAccountClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SubAccountClient.Create

ctx := context.TODO()
id := subaccount.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "accountValue")

payload := subaccount.LogzMonitorResource{
	// ...
}


if err := client.CreateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: SubAccountClient.Delete

ctx := context.TODO()
id := subaccount.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "accountValue")

if err := client.DeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: SubAccountClient.Get

ctx := context.TODO()
id := subaccount.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "accountValue")

read, err := client.Get(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: SubAccountClient.List

ctx := context.TODO()
id := subaccount.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue")

// alternatively `client.List(ctx, id)` can be used to do batched pagination
items, err := client.ListComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: SubAccountClient.ListMonitoredResources

ctx := context.TODO()
id := subaccount.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "accountValue")

// alternatively `client.ListMonitoredResources(ctx, id)` can be used to do batched pagination
items, err := client.ListMonitoredResourcesComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: SubAccountClient.Update

ctx := context.TODO()
id := subaccount.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "accountValue")

payload := subaccount.LogzMonitorResourceUpdateParameters{
	// ...
}


read, err := client.Update(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForLiftrResourceCategories

func PossibleValuesForLiftrResourceCategories() []string

func PossibleValuesForManagedIdentityTypes

func PossibleValuesForManagedIdentityTypes() []string

func PossibleValuesForMarketplaceSubscriptionStatus

func PossibleValuesForMarketplaceSubscriptionStatus() []string

func PossibleValuesForMonitoringStatus

func PossibleValuesForMonitoringStatus() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateAccountID

func ValidateAccountID(input interface{}, key string) (warnings []string, errors []error)

ValidateAccountID checks that 'input' can be parsed as a Account ID

func ValidateMonitorID

func ValidateMonitorID(input interface{}, key string) (warnings []string, errors []error)

ValidateMonitorID checks that 'input' can be parsed as a Monitor ID

Types

type AccountId

type AccountId struct {
	SubscriptionId    string
	ResourceGroupName string
	MonitorName       string
	AccountName       string
}

AccountId is a struct representing the Resource ID for a Account

func NewAccountID

func NewAccountID(subscriptionId string, resourceGroupName string, monitorName string, accountName string) AccountId

NewAccountID returns a new AccountId struct

func ParseAccountID

func ParseAccountID(input string) (*AccountId, error)

ParseAccountID parses 'input' into a AccountId

func ParseAccountIDInsensitively

func ParseAccountIDInsensitively(input string) (*AccountId, error)

ParseAccountIDInsensitively parses 'input' case-insensitively into a AccountId note: this method should only be used for API response data and not user input

func (*AccountId) FromParseResult

func (id *AccountId) FromParseResult(input resourceids.ParseResult) error

func (AccountId) ID

func (id AccountId) ID() string

ID returns the formatted Account ID

func (AccountId) Segments

func (id AccountId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Account ID

func (AccountId) String

func (id AccountId) String() string

String returns a human-readable description of this Account ID

type CreateOperationResponse

type CreateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *LogzMonitorResource
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *LogzMonitorResource
}

type IdentityProperties

type IdentityProperties struct {
	PrincipalId *string               `json:"principalId,omitempty"`
	TenantId    *string               `json:"tenantId,omitempty"`
	Type        *ManagedIdentityTypes `json:"type,omitempty"`
}

type LiftrResourceCategories

type LiftrResourceCategories string
const (
	LiftrResourceCategoriesMonitorLogs LiftrResourceCategories = "MonitorLogs"
	LiftrResourceCategoriesUnknown     LiftrResourceCategories = "Unknown"
)

func (*LiftrResourceCategories) UnmarshalJSON

func (s *LiftrResourceCategories) UnmarshalJSON(bytes []byte) error

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []LogzMonitorResource
}

type ListCustomPager added in v0.20240628.1153531

type ListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListCustomPager) NextPageLink() *odata.Link

type ListMonitoredResourcesCompleteResult

type ListMonitoredResourcesCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []MonitoredResource
}

type ListMonitoredResourcesCustomPager added in v0.20240628.1153531

type ListMonitoredResourcesCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListMonitoredResourcesCustomPager) NextPageLink() *odata.Link

type ListMonitoredResourcesOperationResponse

type ListMonitoredResourcesOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]MonitoredResource
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]LogzMonitorResource
}

type LogzMonitorResource

type LogzMonitorResource struct {
	Id         *string                `json:"id,omitempty"`
	Identity   *IdentityProperties    `json:"identity,omitempty"`
	Location   string                 `json:"location"`
	Name       *string                `json:"name,omitempty"`
	Properties *MonitorProperties     `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Tags       *map[string]string     `json:"tags,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type LogzMonitorResourceOperationPredicate

type LogzMonitorResourceOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (LogzMonitorResourceOperationPredicate) Matches

type LogzMonitorResourceUpdateParameters

type LogzMonitorResourceUpdateParameters struct {
	Properties *MonitorUpdateProperties `json:"properties,omitempty"`
	Tags       *map[string]string       `json:"tags,omitempty"`
}

type LogzOrganizationProperties

type LogzOrganizationProperties struct {
	CompanyName     *string `json:"companyName,omitempty"`
	EnterpriseAppId *string `json:"enterpriseAppId,omitempty"`
	Id              *string `json:"id,omitempty"`
	SingleSignOnUrl *string `json:"singleSignOnUrl,omitempty"`
}

type ManagedIdentityTypes

type ManagedIdentityTypes string
const (
	ManagedIdentityTypesSystemAssigned ManagedIdentityTypes = "SystemAssigned"
	ManagedIdentityTypesUserAssigned   ManagedIdentityTypes = "UserAssigned"
)

func (*ManagedIdentityTypes) UnmarshalJSON

func (s *ManagedIdentityTypes) UnmarshalJSON(bytes []byte) error

type MarketplaceSubscriptionStatus

type MarketplaceSubscriptionStatus string
const (
	MarketplaceSubscriptionStatusActive    MarketplaceSubscriptionStatus = "Active"
	MarketplaceSubscriptionStatusSuspended MarketplaceSubscriptionStatus = "Suspended"
)

func (*MarketplaceSubscriptionStatus) UnmarshalJSON

func (s *MarketplaceSubscriptionStatus) UnmarshalJSON(bytes []byte) error

type MonitorId

type MonitorId struct {
	SubscriptionId    string
	ResourceGroupName string
	MonitorName       string
}

MonitorId is a struct representing the Resource ID for a Monitor

func NewMonitorID

func NewMonitorID(subscriptionId string, resourceGroupName string, monitorName string) MonitorId

NewMonitorID returns a new MonitorId struct

func ParseMonitorID

func ParseMonitorID(input string) (*MonitorId, error)

ParseMonitorID parses 'input' into a MonitorId

func ParseMonitorIDInsensitively

func ParseMonitorIDInsensitively(input string) (*MonitorId, error)

ParseMonitorIDInsensitively parses 'input' case-insensitively into a MonitorId note: this method should only be used for API response data and not user input

func (*MonitorId) FromParseResult

func (id *MonitorId) FromParseResult(input resourceids.ParseResult) error

func (MonitorId) ID

func (id MonitorId) ID() string

ID returns the formatted Monitor ID

func (MonitorId) Segments

func (id MonitorId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Monitor ID

func (MonitorId) String

func (id MonitorId) String() string

String returns a human-readable description of this Monitor ID

type MonitorProperties

type MonitorProperties struct {
	LiftrResourceCategory         *LiftrResourceCategories       `json:"liftrResourceCategory,omitempty"`
	LiftrResourcePreference       *int64                         `json:"liftrResourcePreference,omitempty"`
	LogzOrganizationProperties    *LogzOrganizationProperties    `json:"logzOrganizationProperties,omitempty"`
	MarketplaceSubscriptionStatus *MarketplaceSubscriptionStatus `json:"marketplaceSubscriptionStatus,omitempty"`
	MonitoringStatus              *MonitoringStatus              `json:"monitoringStatus,omitempty"`
	PlanData                      *PlanData                      `json:"planData,omitempty"`
	ProvisioningState             *ProvisioningState             `json:"provisioningState,omitempty"`
	UserInfo                      *UserInfo                      `json:"userInfo,omitempty"`
}

type MonitorUpdateProperties

type MonitorUpdateProperties struct {
	MonitoringStatus *MonitoringStatus `json:"monitoringStatus,omitempty"`
}

type MonitoredResource

type MonitoredResource struct {
	Id                     *string                `json:"id,omitempty"`
	ReasonForLogsStatus    *string                `json:"reasonForLogsStatus,omitempty"`
	ReasonForMetricsStatus *string                `json:"reasonForMetricsStatus,omitempty"`
	SendingLogs            *bool                  `json:"sendingLogs,omitempty"`
	SendingMetrics         *bool                  `json:"sendingMetrics,omitempty"`
	SystemData             *systemdata.SystemData `json:"systemData,omitempty"`
}

type MonitoredResourceOperationPredicate

type MonitoredResourceOperationPredicate struct {
	Id                     *string
	ReasonForLogsStatus    *string
	ReasonForMetricsStatus *string
	SendingLogs            *bool
	SendingMetrics         *bool
}

func (MonitoredResourceOperationPredicate) Matches

type MonitoringStatus

type MonitoringStatus string
const (
	MonitoringStatusDisabled MonitoringStatus = "Disabled"
	MonitoringStatusEnabled  MonitoringStatus = "Enabled"
)

func (*MonitoringStatus) UnmarshalJSON

func (s *MonitoringStatus) UnmarshalJSON(bytes []byte) error

type PlanData

type PlanData struct {
	BillingCycle  *string `json:"billingCycle,omitempty"`
	EffectiveDate *string `json:"effectiveDate,omitempty"`
	PlanDetails   *string `json:"planDetails,omitempty"`
	UsageType     *string `json:"usageType,omitempty"`
}

func (*PlanData) GetEffectiveDateAsTime

func (o *PlanData) GetEffectiveDateAsTime() (*time.Time, error)

func (*PlanData) SetEffectiveDateAsTime

func (o *PlanData) SetEffectiveDateAsTime(input time.Time)

type ProvisioningState

type ProvisioningState string
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 (*ProvisioningState) UnmarshalJSON

func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error

type SubAccountClient

type SubAccountClient struct {
	Client *resourcemanager.Client
}

func NewSubAccountClientWithBaseURI

func NewSubAccountClientWithBaseURI(sdkApi sdkEnv.Api) (*SubAccountClient, error)

func (SubAccountClient) Create

Create ...

func (SubAccountClient) CreateThenPoll

func (c SubAccountClient) CreateThenPoll(ctx context.Context, id AccountId, input LogzMonitorResource) error

CreateThenPoll performs Create then polls until it's completed

func (SubAccountClient) Delete

func (c SubAccountClient) Delete(ctx context.Context, id AccountId) (result DeleteOperationResponse, err error)

Delete ...

func (SubAccountClient) DeleteThenPoll

func (c SubAccountClient) DeleteThenPoll(ctx context.Context, id AccountId) error

DeleteThenPoll performs Delete then polls until it's completed

func (SubAccountClient) Get

func (c SubAccountClient) Get(ctx context.Context, id AccountId) (result GetOperationResponse, err error)

Get ...

func (SubAccountClient) List

func (c SubAccountClient) List(ctx context.Context, id MonitorId) (result ListOperationResponse, err error)

List ...

func (SubAccountClient) ListComplete

ListComplete retrieves all the results into a single object

func (SubAccountClient) ListCompleteMatchingPredicate

func (c SubAccountClient) ListCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate LogzMonitorResourceOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (SubAccountClient) ListMonitoredResources

func (c SubAccountClient) ListMonitoredResources(ctx context.Context, id AccountId) (result ListMonitoredResourcesOperationResponse, err error)

ListMonitoredResources ...

func (SubAccountClient) ListMonitoredResourcesComplete

func (c SubAccountClient) ListMonitoredResourcesComplete(ctx context.Context, id AccountId) (ListMonitoredResourcesCompleteResult, error)

ListMonitoredResourcesComplete retrieves all the results into a single object

func (SubAccountClient) ListMonitoredResourcesCompleteMatchingPredicate

func (c SubAccountClient) ListMonitoredResourcesCompleteMatchingPredicate(ctx context.Context, id AccountId, predicate MonitoredResourceOperationPredicate) (result ListMonitoredResourcesCompleteResult, err error)

ListMonitoredResourcesCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (SubAccountClient) Update

Update ...

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *LogzMonitorResource
}

type UserInfo

type UserInfo struct {
	EmailAddress *string `json:"emailAddress,omitempty"`
	FirstName    *string `json:"firstName,omitempty"`
	LastName     *string `json:"lastName,omitempty"`
	PhoneNumber  *string `json:"phoneNumber,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL