discoveredassets

package
v0.20241029.1112340 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MPL-2.0 Imports: 16 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/deviceregistry/2024-09-01-preview/discoveredassets Documentation

The discoveredassets SDK allows for interaction with Azure Resource Manager deviceregistry (API Version 2024-09-01-preview).

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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/deviceregistry/2024-09-01-preview/discoveredassets"

Client Initialization

client := discoveredassets.NewDiscoveredAssetsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DiscoveredAssetsClient.CreateOrReplace

ctx := context.TODO()
id := discoveredassets.NewDiscoveredAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "discoveredAssetName")

payload := discoveredassets.DiscoveredAsset{
	// ...
}


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

Example Usage: DiscoveredAssetsClient.Delete

ctx := context.TODO()
id := discoveredassets.NewDiscoveredAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "discoveredAssetName")

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

Example Usage: DiscoveredAssetsClient.Get

ctx := context.TODO()
id := discoveredassets.NewDiscoveredAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "discoveredAssetName")

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: DiscoveredAssetsClient.ListByResourceGroup

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

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

Example Usage: DiscoveredAssetsClient.ListBySubscription

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

Example Usage: DiscoveredAssetsClient.Update

ctx := context.TODO()
id := discoveredassets.NewDiscoveredAssetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "discoveredAssetName")

payload := discoveredassets.DiscoveredAssetUpdate{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForTopicRetainType

func PossibleValuesForTopicRetainType() []string

func ValidateDiscoveredAssetID

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

ValidateDiscoveredAssetID checks that 'input' can be parsed as a Discovered Asset ID

Types

type CreateOrReplaceOperationResponse

type CreateOrReplaceOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DiscoveredAsset
}

type DeleteOperationResponse

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

type DiscoveredAsset

type DiscoveredAsset struct {
	ExtendedLocation ExtendedLocation           `json:"extendedLocation"`
	Id               *string                    `json:"id,omitempty"`
	Location         string                     `json:"location"`
	Name             *string                    `json:"name,omitempty"`
	Properties       *DiscoveredAssetProperties `json:"properties,omitempty"`
	SystemData       *systemdata.SystemData     `json:"systemData,omitempty"`
	Tags             *map[string]string         `json:"tags,omitempty"`
	Type             *string                    `json:"type,omitempty"`
}

type DiscoveredAssetId

type DiscoveredAssetId struct {
	SubscriptionId      string
	ResourceGroupName   string
	DiscoveredAssetName string
}

DiscoveredAssetId is a struct representing the Resource ID for a Discovered Asset

func NewDiscoveredAssetID

func NewDiscoveredAssetID(subscriptionId string, resourceGroupName string, discoveredAssetName string) DiscoveredAssetId

NewDiscoveredAssetID returns a new DiscoveredAssetId struct

func ParseDiscoveredAssetID

func ParseDiscoveredAssetID(input string) (*DiscoveredAssetId, error)

ParseDiscoveredAssetID parses 'input' into a DiscoveredAssetId

func ParseDiscoveredAssetIDInsensitively

func ParseDiscoveredAssetIDInsensitively(input string) (*DiscoveredAssetId, error)

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

func (*DiscoveredAssetId) FromParseResult

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

func (DiscoveredAssetId) ID

func (id DiscoveredAssetId) ID() string

ID returns the formatted Discovered Asset ID

func (DiscoveredAssetId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Discovered Asset ID

func (DiscoveredAssetId) String

func (id DiscoveredAssetId) String() string

String returns a human-readable description of this Discovered Asset ID

type DiscoveredAssetOperationPredicate

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

func (DiscoveredAssetOperationPredicate) Matches

type DiscoveredAssetProperties

type DiscoveredAssetProperties struct {
	AssetEndpointProfileRef      string               `json:"assetEndpointProfileRef"`
	Datasets                     *[]DiscoveredDataset `json:"datasets,omitempty"`
	DefaultDatasetsConfiguration *string              `json:"defaultDatasetsConfiguration,omitempty"`
	DefaultEventsConfiguration   *string              `json:"defaultEventsConfiguration,omitempty"`
	DefaultTopic                 *Topic               `json:"defaultTopic,omitempty"`
	DiscoveryId                  string               `json:"discoveryId"`
	DocumentationUri             *string              `json:"documentationUri,omitempty"`
	Events                       *[]DiscoveredEvent   `json:"events,omitempty"`
	HardwareRevision             *string              `json:"hardwareRevision,omitempty"`
	Manufacturer                 *string              `json:"manufacturer,omitempty"`
	ManufacturerUri              *string              `json:"manufacturerUri,omitempty"`
	Model                        *string              `json:"model,omitempty"`
	ProductCode                  *string              `json:"productCode,omitempty"`
	ProvisioningState            *ProvisioningState   `json:"provisioningState,omitempty"`
	SerialNumber                 *string              `json:"serialNumber,omitempty"`
	SoftwareRevision             *string              `json:"softwareRevision,omitempty"`
	Version                      int64                `json:"version"`
}

type DiscoveredAssetUpdate

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

type DiscoveredAssetUpdateProperties

type DiscoveredAssetUpdateProperties struct {
	Datasets                     *[]DiscoveredDataset `json:"datasets,omitempty"`
	DefaultDatasetsConfiguration *string              `json:"defaultDatasetsConfiguration,omitempty"`
	DefaultEventsConfiguration   *string              `json:"defaultEventsConfiguration,omitempty"`
	DefaultTopic                 *TopicUpdate         `json:"defaultTopic,omitempty"`
	DiscoveryId                  *string              `json:"discoveryId,omitempty"`
	DocumentationUri             *string              `json:"documentationUri,omitempty"`
	Events                       *[]DiscoveredEvent   `json:"events,omitempty"`
	HardwareRevision             *string              `json:"hardwareRevision,omitempty"`
	Manufacturer                 *string              `json:"manufacturer,omitempty"`
	ManufacturerUri              *string              `json:"manufacturerUri,omitempty"`
	Model                        *string              `json:"model,omitempty"`
	ProductCode                  *string              `json:"productCode,omitempty"`
	SerialNumber                 *string              `json:"serialNumber,omitempty"`
	SoftwareRevision             *string              `json:"softwareRevision,omitempty"`
	Version                      *int64               `json:"version,omitempty"`
}

type DiscoveredAssetsClient

type DiscoveredAssetsClient struct {
	Client *resourcemanager.Client
}

func NewDiscoveredAssetsClientWithBaseURI

func NewDiscoveredAssetsClientWithBaseURI(sdkApi sdkEnv.Api) (*DiscoveredAssetsClient, error)

func (DiscoveredAssetsClient) CreateOrReplace

CreateOrReplace ...

func (DiscoveredAssetsClient) CreateOrReplaceThenPoll

func (c DiscoveredAssetsClient) CreateOrReplaceThenPoll(ctx context.Context, id DiscoveredAssetId, input DiscoveredAsset) error

CreateOrReplaceThenPoll performs CreateOrReplace then polls until it's completed

func (DiscoveredAssetsClient) Delete

Delete ...

func (DiscoveredAssetsClient) DeleteThenPoll

func (c DiscoveredAssetsClient) DeleteThenPoll(ctx context.Context, id DiscoveredAssetId) error

DeleteThenPoll performs Delete then polls until it's completed

func (DiscoveredAssetsClient) Get

Get ...

func (DiscoveredAssetsClient) ListByResourceGroup

ListByResourceGroup ...

func (DiscoveredAssetsClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (DiscoveredAssetsClient) ListByResourceGroupCompleteMatchingPredicate

func (c DiscoveredAssetsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate DiscoveredAssetOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DiscoveredAssetsClient) ListBySubscription

ListBySubscription ...

func (DiscoveredAssetsClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (DiscoveredAssetsClient) ListBySubscriptionCompleteMatchingPredicate

func (c DiscoveredAssetsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate DiscoveredAssetOperationPredicate) (result ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DiscoveredAssetsClient) Update

Update ...

func (DiscoveredAssetsClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type DiscoveredDataPoint

type DiscoveredDataPoint struct {
	DataPointConfiguration *string `json:"dataPointConfiguration,omitempty"`
	DataSource             string  `json:"dataSource"`
	LastUpdatedOn          *string `json:"lastUpdatedOn,omitempty"`
	Name                   string  `json:"name"`
}

func (*DiscoveredDataPoint) GetLastUpdatedOnAsTime

func (o *DiscoveredDataPoint) GetLastUpdatedOnAsTime() (*time.Time, error)

func (*DiscoveredDataPoint) SetLastUpdatedOnAsTime

func (o *DiscoveredDataPoint) SetLastUpdatedOnAsTime(input time.Time)

type DiscoveredDataset

type DiscoveredDataset struct {
	DataPoints           *[]DiscoveredDataPoint `json:"dataPoints,omitempty"`
	DatasetConfiguration *string                `json:"datasetConfiguration,omitempty"`
	Name                 string                 `json:"name"`
	Topic                *Topic                 `json:"topic,omitempty"`
}

type DiscoveredEvent

type DiscoveredEvent struct {
	EventConfiguration *string `json:"eventConfiguration,omitempty"`
	EventNotifier      string  `json:"eventNotifier"`
	LastUpdatedOn      *string `json:"lastUpdatedOn,omitempty"`
	Name               string  `json:"name"`
	Topic              *Topic  `json:"topic,omitempty"`
}

func (*DiscoveredEvent) GetLastUpdatedOnAsTime

func (o *DiscoveredEvent) GetLastUpdatedOnAsTime() (*time.Time, error)

func (*DiscoveredEvent) SetLastUpdatedOnAsTime

func (o *DiscoveredEvent) SetLastUpdatedOnAsTime(input time.Time)

type ExtendedLocation

type ExtendedLocation struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

type GetOperationResponse

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

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []DiscoveredAsset
}

type ListByResourceGroupCustomPager

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

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]DiscoveredAsset
}

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []DiscoveredAsset
}

type ListBySubscriptionCustomPager

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

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]DiscoveredAsset
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted  ProvisioningState = "Accepted"
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
)

func (*ProvisioningState) UnmarshalJSON

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

type Topic

type Topic struct {
	Path   string           `json:"path"`
	Retain *TopicRetainType `json:"retain,omitempty"`
}

type TopicRetainType

type TopicRetainType string
const (
	TopicRetainTypeKeep  TopicRetainType = "Keep"
	TopicRetainTypeNever TopicRetainType = "Never"
)

func (*TopicRetainType) UnmarshalJSON

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

type TopicUpdate

type TopicUpdate struct {
	Path   *string          `json:"path,omitempty"`
	Retain *TopicRetainType `json:"retain,omitempty"`
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DiscoveredAsset
}

Jump to

Keyboard shortcuts

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