resources

package
v0.20240313.1132601 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: MPL-2.0 Imports: 9 Imported by: 2

README

github.com/hashicorp/go-azure-sdk/resource-manager/resourcegraph/2022-10-01/resources Documentation

The resources SDK allows for interaction with the Azure Resource Manager Service resourcegraph (API Version 2022-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/resourcegraph/2022-10-01/resources"

Client Initialization

client := resources.NewResourcesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ResourcesClient.Resources

ctx := context.TODO()

payload := resources.QueryRequest{
	// ...
}


read, err := client.Resources(ctx, 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 PossibleValuesForAuthorizationScopeFilter

func PossibleValuesForAuthorizationScopeFilter() []string

func PossibleValuesForFacetSortOrder

func PossibleValuesForFacetSortOrder() []string

func PossibleValuesForResultFormat

func PossibleValuesForResultFormat() []string

func PossibleValuesForResultTruncated

func PossibleValuesForResultTruncated() []string

Types

type AuthorizationScopeFilter

type AuthorizationScopeFilter string
const (
	AuthorizationScopeFilterAtScopeAboveAndBelow AuthorizationScopeFilter = "AtScopeAboveAndBelow"
	AuthorizationScopeFilterAtScopeAndAbove      AuthorizationScopeFilter = "AtScopeAndAbove"
	AuthorizationScopeFilterAtScopeAndBelow      AuthorizationScopeFilter = "AtScopeAndBelow"
	AuthorizationScopeFilterAtScopeExact         AuthorizationScopeFilter = "AtScopeExact"
)

func (*AuthorizationScopeFilter) UnmarshalJSON

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

type ErrorDetails

type ErrorDetails struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

type Facet

type Facet interface {
}

type FacetError

type FacetError struct {
	Errors []ErrorDetails `json:"errors"`

	// Fields inherited from Facet
	Expression string `json:"expression"`
}

func (FacetError) MarshalJSON

func (s FacetError) MarshalJSON() ([]byte, error)

type FacetRequest

type FacetRequest struct {
	Expression string               `json:"expression"`
	Options    *FacetRequestOptions `json:"options,omitempty"`
}

type FacetRequestOptions

type FacetRequestOptions struct {
	Filter    *string         `json:"filter,omitempty"`
	SortBy    *string         `json:"sortBy,omitempty"`
	SortOrder *FacetSortOrder `json:"sortOrder,omitempty"`
	Top       *int64          `json:"$top,omitempty"`
}

type FacetResult

type FacetResult struct {
	Count        int64       `json:"count"`
	Data         interface{} `json:"data"`
	TotalRecords int64       `json:"totalRecords"`

	// Fields inherited from Facet
	Expression string `json:"expression"`
}

func (FacetResult) MarshalJSON

func (s FacetResult) MarshalJSON() ([]byte, error)

type FacetSortOrder

type FacetSortOrder string
const (
	FacetSortOrderAsc  FacetSortOrder = "asc"
	FacetSortOrderDesc FacetSortOrder = "desc"
)

func (*FacetSortOrder) UnmarshalJSON

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

type QueryRequest

type QueryRequest struct {
	Facets           *[]FacetRequest      `json:"facets,omitempty"`
	ManagementGroups *[]string            `json:"managementGroups,omitempty"`
	Options          *QueryRequestOptions `json:"options,omitempty"`
	Query            string               `json:"query"`
	Subscriptions    *[]string            `json:"subscriptions,omitempty"`
}

type QueryRequestOptions

type QueryRequestOptions struct {
	AllowPartialScopes       *bool                     `json:"allowPartialScopes,omitempty"`
	AuthorizationScopeFilter *AuthorizationScopeFilter `json:"authorizationScopeFilter,omitempty"`
	ResultFormat             *ResultFormat             `json:"resultFormat,omitempty"`
	Skip                     *int64                    `json:"$skip,omitempty"`
	SkipToken                *string                   `json:"$skipToken,omitempty"`
	Top                      *int64                    `json:"$top,omitempty"`
}

type QueryResponse

type QueryResponse struct {
	Count           int64           `json:"count"`
	Data            interface{}     `json:"data"`
	Facets          *[]Facet        `json:"facets,omitempty"`
	ResultTruncated ResultTruncated `json:"resultTruncated"`
	SkipToken       *string         `json:"$skipToken,omitempty"`
	TotalRecords    int64           `json:"totalRecords"`
}

func (*QueryResponse) UnmarshalJSON

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

type RawFacetImpl

type RawFacetImpl struct {
	Type   string
	Values map[string]interface{}
}

RawFacetImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g. this cannot be used as a Request Payload).

type ResourcesClient

type ResourcesClient struct {
	Client *resourcemanager.Client
}

func NewResourcesClientWithBaseURI

func NewResourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*ResourcesClient, error)

func (ResourcesClient) Resources

func (c ResourcesClient) Resources(ctx context.Context, input QueryRequest) (result ResourcesOperationResponse, err error)

Resources ...

type ResourcesOperationResponse

type ResourcesOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *QueryResponse
}

type ResultFormat

type ResultFormat string
const (
	ResultFormatObjectArray ResultFormat = "objectArray"
	ResultFormatTable       ResultFormat = "table"
)

func (*ResultFormat) UnmarshalJSON

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

type ResultTruncated

type ResultTruncated string
const (
	ResultTruncatedFalse ResultTruncated = "false"
	ResultTruncatedTrue  ResultTruncated = "true"
)

func (*ResultTruncated) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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