resources

package
v0.20241009.1142232 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/resourcegraph/2024-04-01/resources Documentation

The resources SDK allows for interaction with Azure Resource Manager resourcegraph (API Version 2024-04-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/2024-04-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 BaseFacetImpl added in v0.20240920.1135249

type BaseFacetImpl struct {
	Expression string `json:"expression"`
	ResultType string `json:"resultType"`
}

func (BaseFacetImpl) Facet added in v0.20240920.1135249

func (s BaseFacetImpl) Facet() BaseFacetImpl

type ErrorDetails

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

type Facet

type Facet interface {
	Facet() BaseFacetImpl
}

func UnmarshalFacetImplementation added in v0.20240920.1135249

func UnmarshalFacetImplementation(input []byte) (Facet, error)

type FacetError

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

	Expression string `json:"expression"`
	ResultType string `json:"resultType"`
}

func (FacetError) Facet added in v0.20240920.1135249

func (s FacetError) Facet() BaseFacetImpl

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"`

	Expression string `json:"expression"`
	ResultType string `json:"resultType"`
}

func (FacetResult) Facet added in v0.20240920.1135249

func (s FacetResult) Facet() BaseFacetImpl

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{}
	// contains filtered or unexported fields
}

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).

func (RawFacetImpl) Facet added in v0.20240920.1135249

func (s RawFacetImpl) Facet() BaseFacetImpl

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