topology

package
v0.20230518.1140509 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: MPL-2.0 Imports: 11 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/security/2020-01-01/topology Documentation

The topology SDK allows for interaction with the Azure Resource Manager Service security (API Version 2020-01-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/security/2020-01-01/topology"

Client Initialization

client := topology.NewTopologyClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: TopologyClient.Get

ctx := context.TODO()
id := topology.NewTopologyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "topologyValue")

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: TopologyClient.List

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

// 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: TopologyClient.ListByHomeRegion

ctx := context.TODO()
id := topology.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue")

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateLocationID

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

ValidateLocationID checks that 'input' can be parsed as a Location ID

func ValidateTopologyID

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

ValidateTopologyID checks that 'input' can be parsed as a Topology ID

Types

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *TopologyResource
}

type ListByHomeRegionCompleteResult

type ListByHomeRegionCompleteResult struct {
	Items []TopologyResource
}

type ListByHomeRegionOperationResponse

type ListByHomeRegionOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]TopologyResource
	// contains filtered or unexported fields
}

func (ListByHomeRegionOperationResponse) HasMore

func (ListByHomeRegionOperationResponse) LoadMore

type ListCompleteResult

type ListCompleteResult struct {
	Items []TopologyResource
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]TopologyResource
	// contains filtered or unexported fields
}

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

type LocationId

type LocationId struct {
	SubscriptionId string
	LocationName   string
}

LocationId is a struct representing the Resource ID for a Location

func NewLocationID

func NewLocationID(subscriptionId string, locationName string) LocationId

NewLocationID returns a new LocationId struct

func ParseLocationID

func ParseLocationID(input string) (*LocationId, error)

ParseLocationID parses 'input' into a LocationId

func ParseLocationIDInsensitively

func ParseLocationIDInsensitively(input string) (*LocationId, error)

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

func (LocationId) ID

func (id LocationId) ID() string

ID returns the formatted Location ID

func (LocationId) Segments

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

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

func (LocationId) String

func (id LocationId) String() string

String returns a human-readable description of this Location ID

type TopologyClient

type TopologyClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewTopologyClientWithBaseURI

func NewTopologyClientWithBaseURI(endpoint string) TopologyClient

func (TopologyClient) Get

func (c TopologyClient) Get(ctx context.Context, id TopologyId) (result GetOperationResponse, err error)

Get ...

func (TopologyClient) List

List ...

func (TopologyClient) ListByHomeRegion

func (c TopologyClient) ListByHomeRegion(ctx context.Context, id LocationId) (resp ListByHomeRegionOperationResponse, err error)

ListByHomeRegion ...

func (TopologyClient) ListByHomeRegionComplete

func (c TopologyClient) ListByHomeRegionComplete(ctx context.Context, id LocationId) (ListByHomeRegionCompleteResult, error)

ListByHomeRegionComplete retrieves all of the results into a single object

func (TopologyClient) ListByHomeRegionCompleteMatchingPredicate

func (c TopologyClient) ListByHomeRegionCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate TopologyResourceOperationPredicate) (resp ListByHomeRegionCompleteResult, err error)

ListByHomeRegionCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (TopologyClient) ListComplete

ListComplete retrieves all of the results into a single object

func (TopologyClient) ListCompleteMatchingPredicate

func (c TopologyClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate TopologyResourceOperationPredicate) (resp ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type TopologyId

type TopologyId struct {
	SubscriptionId    string
	ResourceGroupName string
	LocationName      string
	TopologyName      string
}

TopologyId is a struct representing the Resource ID for a Topology

func NewTopologyID

func NewTopologyID(subscriptionId string, resourceGroupName string, locationName string, topologyName string) TopologyId

NewTopologyID returns a new TopologyId struct

func ParseTopologyID

func ParseTopologyID(input string) (*TopologyId, error)

ParseTopologyID parses 'input' into a TopologyId

func ParseTopologyIDInsensitively

func ParseTopologyIDInsensitively(input string) (*TopologyId, error)

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

func (TopologyId) ID

func (id TopologyId) ID() string

ID returns the formatted Topology ID

func (TopologyId) Segments

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

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

func (TopologyId) String

func (id TopologyId) String() string

String returns a human-readable description of this Topology ID

type TopologyResource

type TopologyResource struct {
	Id         *string                     `json:"id,omitempty"`
	Location   *string                     `json:"location,omitempty"`
	Name       *string                     `json:"name,omitempty"`
	Properties *TopologyResourceProperties `json:"properties,omitempty"`
	Type       *string                     `json:"type,omitempty"`
}

type TopologyResourceOperationPredicate

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

func (TopologyResourceOperationPredicate) Matches

type TopologyResourceProperties

type TopologyResourceProperties struct {
	CalculatedDateTime *string                   `json:"calculatedDateTime,omitempty"`
	TopologyResources  *[]TopologySingleResource `json:"topologyResources,omitempty"`
}

func (*TopologyResourceProperties) GetCalculatedDateTimeAsTime

func (o *TopologyResourceProperties) GetCalculatedDateTimeAsTime() (*time.Time, error)

func (*TopologyResourceProperties) SetCalculatedDateTimeAsTime

func (o *TopologyResourceProperties) SetCalculatedDateTimeAsTime(input time.Time)

type TopologySingleResource

type TopologySingleResource struct {
	Children             *[]TopologySingleResourceChild  `json:"children,omitempty"`
	Location             *string                         `json:"location,omitempty"`
	NetworkZones         *string                         `json:"networkZones,omitempty"`
	Parents              *[]TopologySingleResourceParent `json:"parents,omitempty"`
	RecommendationsExist *bool                           `json:"recommendationsExist,omitempty"`
	ResourceId           *string                         `json:"resourceId,omitempty"`
	Severity             *string                         `json:"severity,omitempty"`
	TopologyScore        *int64                          `json:"topologyScore,omitempty"`
}

type TopologySingleResourceChild

type TopologySingleResourceChild struct {
	ResourceId *string `json:"resourceId,omitempty"`
}

type TopologySingleResourceParent

type TopologySingleResourceParent struct {
	ResourceId *string `json:"resourceId,omitempty"`
}

Jump to

Keyboard shortcuts

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