resourcegraph

package
v36.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package resourcegraph implements the Azure ARM Resourcegraph service API version 2018-09-01-preview.

Index

Constants

View Source
const (
	// DefaultBaseURI is the default URI used for the service Resourcegraph
	DefaultBaseURI = "https://management.azure.com"
)

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

Types

type BaseClient

type BaseClient struct {
	autorest.Client
	BaseURI        string
	SubscriptionID string
}

BaseClient is the base client for Resourcegraph.

func New

func New(subscriptionID string) BaseClient

New creates an instance of the BaseClient client.

func NewWithBaseURI

func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient

NewWithBaseURI creates an instance of the BaseClient client.

func (BaseClient) ResourceChangeDetails

func (client BaseClient) ResourceChangeDetails(ctx context.Context, parameters ResourceChangeDetailsRequestParameters) (result ResourceChangeData, err error)

ResourceChangeDetails get resource change details. Parameters: parameters - the parameters for this request for resource change details.

func (BaseClient) ResourceChangeDetailsPreparer

func (client BaseClient) ResourceChangeDetailsPreparer(ctx context.Context, parameters ResourceChangeDetailsRequestParameters) (*http.Request, error)

ResourceChangeDetailsPreparer prepares the ResourceChangeDetails request.

func (BaseClient) ResourceChangeDetailsResponder

func (client BaseClient) ResourceChangeDetailsResponder(resp *http.Response) (result ResourceChangeData, err error)

ResourceChangeDetailsResponder handles the response to the ResourceChangeDetails request. The method always closes the http.Response Body.

func (BaseClient) ResourceChangeDetailsSender

func (client BaseClient) ResourceChangeDetailsSender(req *http.Request) (*http.Response, error)

ResourceChangeDetailsSender sends the ResourceChangeDetails request. The method will close the http.Response Body if it receives an error.

func (BaseClient) ResourceChanges

func (client BaseClient) ResourceChanges(ctx context.Context, parameters ResourceChangesRequestParameters) (result ResourceChangeList, err error)

ResourceChanges list changes to a resource for a given time interval. Parameters: parameters - the parameters for this request for changes.

func (BaseClient) ResourceChangesPreparer

func (client BaseClient) ResourceChangesPreparer(ctx context.Context, parameters ResourceChangesRequestParameters) (*http.Request, error)

ResourceChangesPreparer prepares the ResourceChanges request.

func (BaseClient) ResourceChangesResponder

func (client BaseClient) ResourceChangesResponder(resp *http.Response) (result ResourceChangeList, err error)

ResourceChangesResponder handles the response to the ResourceChanges request. The method always closes the http.Response Body.

func (BaseClient) ResourceChangesSender

func (client BaseClient) ResourceChangesSender(req *http.Request) (*http.Response, error)

ResourceChangesSender sends the ResourceChanges request. The method will close the http.Response Body if it receives an error.

func (BaseClient) Resources

func (client BaseClient) Resources(ctx context.Context, query QueryRequest) (result QueryResponse, err error)

Resources queries the resources managed by Azure Resource Manager for all subscriptions specified in the request. Parameters: query - request specifying query and its options.

func (BaseClient) ResourcesPreparer

func (client BaseClient) ResourcesPreparer(ctx context.Context, query QueryRequest) (*http.Request, error)

ResourcesPreparer prepares the Resources request.

func (BaseClient) ResourcesResponder

func (client BaseClient) ResourcesResponder(resp *http.Response) (result QueryResponse, err error)

ResourcesResponder handles the response to the Resources request. The method always closes the http.Response Body.

func (BaseClient) ResourcesSender

func (client BaseClient) ResourcesSender(req *http.Request) (*http.Response, error)

ResourcesSender sends the Resources request. The method will close the http.Response Body if it receives an error.

type BasicFacet

type BasicFacet interface {
	AsFacetResult() (*FacetResult, bool)
	AsFacetError() (*FacetError, bool)
	AsFacet() (*Facet, bool)
}

BasicFacet a facet containing additional statistics on the response of a query. Can be either FacetResult or FacetError.

type Column

type Column struct {
	// Name - Column name.
	Name *string `json:"name,omitempty"`
	// Type - Column data type. Possible values include: 'String', 'Integer', 'Number', 'Boolean', 'Object'
	Type ColumnDataType `json:"type,omitempty"`
}

Column query result column descriptor.

type ColumnDataType

type ColumnDataType string

ColumnDataType enumerates the values for column data type.

const (
	// Boolean ...
	Boolean ColumnDataType = "boolean"
	// Integer ...
	Integer ColumnDataType = "integer"
	// Number ...
	Number ColumnDataType = "number"
	// Object ...
	Object ColumnDataType = "object"
	// String ...
	String ColumnDataType = "string"
)

func PossibleColumnDataTypeValues

func PossibleColumnDataTypeValues() []ColumnDataType

PossibleColumnDataTypeValues returns an array of possible values for the ColumnDataType const type.

type DateTimeInterval

type DateTimeInterval struct {
	// Start - A datetime indicating the inclusive/closed start of the time interval, i.e. `[`**`start`**`, end)`. Specifying a `start` that occurs chronologically after `end` will result in an error.
	Start *date.Time `json:"start,omitempty"`
	// End - A datetime indicating the exclusive/open end of the time interval, i.e. `[start, `**`end`**`)`. Specifying an `end` that occurs chronologically before `start` will result in an error.
	End *date.Time `json:"end,omitempty"`
}

DateTimeInterval an interval in time specifying the date and time for the inclusive start and exclusive end, i.e. `[start, end)`.

type Error

type Error struct {
	// Code - Error code identifying the specific error.
	Code *string `json:"code,omitempty"`
	// Message - A human readable error message.
	Message *string `json:"message,omitempty"`
	// Details - Error details
	Details *[]ErrorDetails `json:"details,omitempty"`
}

Error error details.

type ErrorDetails

type ErrorDetails struct {
	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
	AdditionalProperties map[string]interface{} `json:""`
	// Code - Error code identifying the specific error.
	Code *string `json:"code,omitempty"`
	// Message - A human readable error message.
	Message *string `json:"message,omitempty"`
}

ErrorDetails ...

func (ErrorDetails) MarshalJSON

func (ed ErrorDetails) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ErrorDetails.

func (*ErrorDetails) UnmarshalJSON

func (ed *ErrorDetails) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for ErrorDetails struct.

type ErrorFieldContract

type ErrorFieldContract struct {
	// Code - Property level error code.
	Code *string `json:"code,omitempty"`
	// Message - Human-readable representation of property-level error.
	Message *string `json:"message,omitempty"`
	// Target - Property name.
	Target *string `json:"target,omitempty"`
}

ErrorFieldContract error Field contract.

type ErrorResponse

type ErrorResponse struct {
	// Error - Error information.
	Error *Error `json:"error,omitempty"`
}

ErrorResponse an error response from the API.

type Facet

type Facet struct {
	// Expression - Facet expression, same as in the corresponding facet request.
	Expression *string `json:"expression,omitempty"`
	// ResultType - Possible values include: 'ResultTypeFacet', 'ResultTypeFacetResult', 'ResultTypeFacetError'
	ResultType ResultType `json:"resultType,omitempty"`
}

Facet a facet containing additional statistics on the response of a query. Can be either FacetResult or FacetError.

func (Facet) AsBasicFacet

func (f Facet) AsBasicFacet() (BasicFacet, bool)

AsBasicFacet is the BasicFacet implementation for Facet.

func (Facet) AsFacet

func (f Facet) AsFacet() (*Facet, bool)

AsFacet is the BasicFacet implementation for Facet.

func (Facet) AsFacetError

func (f Facet) AsFacetError() (*FacetError, bool)

AsFacetError is the BasicFacet implementation for Facet.

func (Facet) AsFacetResult

func (f Facet) AsFacetResult() (*FacetResult, bool)

AsFacetResult is the BasicFacet implementation for Facet.

func (Facet) MarshalJSON

func (f Facet) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Facet.

type FacetError

type FacetError struct {
	// Errors - An array containing detected facet errors with details.
	Errors *[]ErrorDetails `json:"errors,omitempty"`
	// Expression - Facet expression, same as in the corresponding facet request.
	Expression *string `json:"expression,omitempty"`
	// ResultType - Possible values include: 'ResultTypeFacet', 'ResultTypeFacetResult', 'ResultTypeFacetError'
	ResultType ResultType `json:"resultType,omitempty"`
}

FacetError a facet whose execution resulted in an error.

func (FacetError) AsBasicFacet

func (fe FacetError) AsBasicFacet() (BasicFacet, bool)

AsBasicFacet is the BasicFacet implementation for FacetError.

func (FacetError) AsFacet

func (fe FacetError) AsFacet() (*Facet, bool)

AsFacet is the BasicFacet implementation for FacetError.

func (FacetError) AsFacetError

func (fe FacetError) AsFacetError() (*FacetError, bool)

AsFacetError is the BasicFacet implementation for FacetError.

func (FacetError) AsFacetResult

func (fe FacetError) AsFacetResult() (*FacetResult, bool)

AsFacetResult is the BasicFacet implementation for FacetError.

func (FacetError) MarshalJSON

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

MarshalJSON is the custom marshaler for FacetError.

type FacetRequest

type FacetRequest struct {
	// Expression - The column or list of columns to summarize by
	Expression *string `json:"expression,omitempty"`
	// Options - The options for facet evaluation
	Options *FacetRequestOptions `json:"options,omitempty"`
}

FacetRequest a request to compute additional statistics (facets) over the query results.

type FacetRequestOptions

type FacetRequestOptions struct {
	// SortBy - The column name or query expression to sort on. Defaults to count if not present.
	SortBy *string `json:"sortBy,omitempty"`
	// SortOrder - The sorting order by the selected column (count by default). Possible values include: 'Asc', 'Desc'
	SortOrder FacetSortOrder `json:"sortOrder,omitempty"`
	// Filter - Specifies the filter condition for the 'where' clause which will be run on main query's result, just before the actual faceting.
	Filter *string `json:"filter,omitempty"`
	// Top - The maximum number of facet rows that should be returned.
	Top *int32 `json:"$top,omitempty"`
}

FacetRequestOptions the options for facet evaluation

type FacetResult

type FacetResult struct {
	// TotalRecords - Number of total records in the facet results.
	TotalRecords *int64 `json:"totalRecords,omitempty"`
	// Count - Number of records returned in the facet response.
	Count *int32 `json:"count,omitempty"`
	// Data - A table containing the desired facets. Only present if the facet is valid.
	Data *Table `json:"data,omitempty"`
	// Expression - Facet expression, same as in the corresponding facet request.
	Expression *string `json:"expression,omitempty"`
	// ResultType - Possible values include: 'ResultTypeFacet', 'ResultTypeFacetResult', 'ResultTypeFacetError'
	ResultType ResultType `json:"resultType,omitempty"`
}

FacetResult successfully executed facet containing additional statistics on the response of a query.

func (FacetResult) AsBasicFacet

func (fr FacetResult) AsBasicFacet() (BasicFacet, bool)

AsBasicFacet is the BasicFacet implementation for FacetResult.

func (FacetResult) AsFacet

func (fr FacetResult) AsFacet() (*Facet, bool)

AsFacet is the BasicFacet implementation for FacetResult.

func (FacetResult) AsFacetError

func (fr FacetResult) AsFacetError() (*FacetError, bool)

AsFacetError is the BasicFacet implementation for FacetResult.

func (FacetResult) AsFacetResult

func (fr FacetResult) AsFacetResult() (*FacetResult, bool)

AsFacetResult is the BasicFacet implementation for FacetResult.

func (FacetResult) MarshalJSON

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

MarshalJSON is the custom marshaler for FacetResult.

type FacetSortOrder

type FacetSortOrder string

FacetSortOrder enumerates the values for facet sort order.

const (
	// Asc ...
	Asc FacetSortOrder = "asc"
	// Desc ...
	Desc FacetSortOrder = "desc"
)

func PossibleFacetSortOrderValues

func PossibleFacetSortOrderValues() []FacetSortOrder

PossibleFacetSortOrderValues returns an array of possible values for the FacetSortOrder const type.

type GraphQueryClient

type GraphQueryClient struct {
	BaseClient
}

GraphQueryClient is the client for the GraphQuery methods of the Resourcegraph service.

func NewGraphQueryClient

func NewGraphQueryClient(subscriptionID string) GraphQueryClient

NewGraphQueryClient creates an instance of the GraphQueryClient client.

func NewGraphQueryClientWithBaseURI

func NewGraphQueryClientWithBaseURI(baseURI string, subscriptionID string) GraphQueryClient

NewGraphQueryClientWithBaseURI creates an instance of the GraphQueryClient client.

func (GraphQueryClient) CreateOrUpdate

func (client GraphQueryClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, properties GraphQueryResource) (result GraphQueryResource, err error)

CreateOrUpdate create a new graph query. Parameters: resourceGroupName - the name of the resource group. resourceName - the name of the Graph Query resource. properties - properties that need to be specified to create a new graph query.

func (GraphQueryClient) CreateOrUpdatePreparer

func (client GraphQueryClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, properties GraphQueryResource) (*http.Request, error)

CreateOrUpdatePreparer prepares the CreateOrUpdate request.

func (GraphQueryClient) CreateOrUpdateResponder

func (client GraphQueryClient) CreateOrUpdateResponder(resp *http.Response) (result GraphQueryResource, err error)

CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always closes the http.Response Body.

func (GraphQueryClient) CreateOrUpdateSender

func (client GraphQueryClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error)

CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the http.Response Body if it receives an error.

func (GraphQueryClient) Delete

func (client GraphQueryClient) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result autorest.Response, err error)

Delete delete a graph query. Parameters: resourceGroupName - the name of the resource group. resourceName - the name of the Graph Query resource.

func (GraphQueryClient) DeletePreparer

func (client GraphQueryClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (GraphQueryClient) DeleteResponder

func (client GraphQueryClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (GraphQueryClient) DeleteSender

func (client GraphQueryClient) DeleteSender(req *http.Request) (*http.Response, error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

func (GraphQueryClient) Get

func (client GraphQueryClient) Get(ctx context.Context, resourceGroupName string, resourceName string) (result GraphQueryResource, err error)

Get get a single graph query by its resourceName. Parameters: resourceGroupName - the name of the resource group. resourceName - the name of the Graph Query resource.

func (GraphQueryClient) GetPreparer

func (client GraphQueryClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error)

GetPreparer prepares the Get request.

func (GraphQueryClient) GetResponder

func (client GraphQueryClient) GetResponder(resp *http.Response) (result GraphQueryResource, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (GraphQueryClient) GetSender

func (client GraphQueryClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (GraphQueryClient) List

func (client GraphQueryClient) List(ctx context.Context, resourceGroupName string) (result GraphQueryListResultPage, err error)

List get all graph queries defined within a specified subscription and resource group. Parameters: resourceGroupName - the name of the resource group.

func (GraphQueryClient) ListComplete

func (client GraphQueryClient) ListComplete(ctx context.Context, resourceGroupName string) (result GraphQueryListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (GraphQueryClient) ListPreparer

func (client GraphQueryClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error)

ListPreparer prepares the List request.

func (GraphQueryClient) ListResponder

func (client GraphQueryClient) ListResponder(resp *http.Response) (result GraphQueryListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (GraphQueryClient) ListSender

func (client GraphQueryClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

func (GraphQueryClient) Update

func (client GraphQueryClient) Update(ctx context.Context, resourceGroupName string, resourceName string, body GraphQueryUpdateParameters) (result GraphQueryResource, err error)

Update updates a graph query that has already been added. Parameters: resourceGroupName - the name of the resource group. resourceName - the name of the Graph Query resource. body - properties that need to be specified to create a new graph query.

func (GraphQueryClient) UpdatePreparer

func (client GraphQueryClient) UpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, body GraphQueryUpdateParameters) (*http.Request, error)

UpdatePreparer prepares the Update request.

func (GraphQueryClient) UpdateResponder

func (client GraphQueryClient) UpdateResponder(resp *http.Response) (result GraphQueryResource, err error)

UpdateResponder handles the response to the Update request. The method always closes the http.Response Body.

func (GraphQueryClient) UpdateSender

func (client GraphQueryClient) UpdateSender(req *http.Request) (*http.Response, error)

UpdateSender sends the Update request. The method will close the http.Response Body if it receives an error.

type GraphQueryError

type GraphQueryError struct {
	// Code - Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
	Code *string `json:"code,omitempty"`
	// Message - Human-readable representation of the error.
	Message *string `json:"message,omitempty"`
	// Details - The list of invalid fields send in request, in case of validation error.
	Details *[]ErrorFieldContract `json:"details,omitempty"`
}

GraphQueryError error message body that will indicate why the operation failed.

type GraphQueryListResult

type GraphQueryListResult struct {
	autorest.Response `json:"-"`
	// NextLink - URL to fetch the next set of queries.
	NextLink *string `json:"nextLink,omitempty"`
	// Value - READ-ONLY; An array of graph queries.
	Value *[]GraphQueryResource `json:"value,omitempty"`
}

GraphQueryListResult graph query list result.

func (GraphQueryListResult) IsEmpty

func (gqlr GraphQueryListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type GraphQueryListResultIterator

type GraphQueryListResultIterator struct {
	// contains filtered or unexported fields
}

GraphQueryListResultIterator provides access to a complete listing of GraphQueryResource values.

func NewGraphQueryListResultIterator

func NewGraphQueryListResultIterator(page GraphQueryListResultPage) GraphQueryListResultIterator

Creates a new instance of the GraphQueryListResultIterator type.

func (*GraphQueryListResultIterator) Next

func (iter *GraphQueryListResultIterator) Next() error

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*GraphQueryListResultIterator) NextWithContext

func (iter *GraphQueryListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (GraphQueryListResultIterator) NotDone

func (iter GraphQueryListResultIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (GraphQueryListResultIterator) Response

Response returns the raw server response from the last page request.

func (GraphQueryListResultIterator) Value

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type GraphQueryListResultPage

type GraphQueryListResultPage struct {
	// contains filtered or unexported fields
}

GraphQueryListResultPage contains a page of GraphQueryResource values.

func NewGraphQueryListResultPage

func NewGraphQueryListResultPage(getNextPage func(context.Context, GraphQueryListResult) (GraphQueryListResult, error)) GraphQueryListResultPage

Creates a new instance of the GraphQueryListResultPage type.

func (*GraphQueryListResultPage) Next

func (page *GraphQueryListResultPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*GraphQueryListResultPage) NextWithContext

func (page *GraphQueryListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (GraphQueryListResultPage) NotDone

func (page GraphQueryListResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (GraphQueryListResultPage) Response

Response returns the raw server response from the last page request.

func (GraphQueryListResultPage) Values

Values returns the slice of values for the current page or nil if there are no values.

type GraphQueryProperties

type GraphQueryProperties struct {
	// TimeModified - READ-ONLY; Date and time in UTC of the last modification that was made to this graph query definition.
	TimeModified *date.Time `json:"timeModified,omitempty"`
	// Description - The description of a graph query.
	Description *string `json:"description,omitempty"`
	// Query - KQL query that will be graph.
	Query *string `json:"query,omitempty"`
	// ResultKind - READ-ONLY; Enum indicating a type of graph query. Possible values include: 'Basic'
	ResultKind ResultKind `json:"resultKind,omitempty"`
}

GraphQueryProperties properties that contain a graph query.

type GraphQueryPropertiesUpdateParameters

type GraphQueryPropertiesUpdateParameters struct {
	// Description - The description of a graph query.
	Description *string `json:"description,omitempty"`
	// Query - KQL query that will be graph.
	Query *string `json:"query,omitempty"`
	// ResultKind - Enum indicating a type of graph query. Possible values include: 'Basic'
	ResultKind ResultKind `json:"resultKind,omitempty"`
}

GraphQueryPropertiesUpdateParameters properties that contain a workbook for PATCH operation.

type GraphQueryResource

type GraphQueryResource struct {
	autorest.Response `json:"-"`
	// GraphQueryProperties - Metadata describing a graph query for an Azure resource.
	*GraphQueryProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; Azure resource Id
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Azure resource name. This is GUID value. The display name should be assigned within properties field.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Azure resource type
	Type *string `json:"type,omitempty"`
	// ETag - READ-ONLY; This will be used to handle Optimistic Concurrency. If not present, it will always overwrite the existing resource without checking conflict.
	ETag *string `json:"eTag,omitempty"`
	// Tags - Resource tags
	Tags map[string]*string `json:"tags"`
}

GraphQueryResource graph Query entity definition.

func (GraphQueryResource) MarshalJSON

func (gqr GraphQueryResource) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for GraphQueryResource.

func (*GraphQueryResource) UnmarshalJSON

func (gqr *GraphQueryResource) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for GraphQueryResource struct.

type GraphQueryUpdateParameters

type GraphQueryUpdateParameters struct {
	// Tags - Resource tags
	Tags map[string]*string `json:"tags"`
	// ETag - READ-ONLY; This will be used to handle Optimistic Concurrency. If not present, it will always overwrite the existing resource without checking conflict.
	ETag *string `json:"eTag,omitempty"`
	// GraphQueryPropertiesUpdateParameters - Metadata describing a graph query for an Azure resource.
	*GraphQueryPropertiesUpdateParameters `json:"properties,omitempty"`
}

GraphQueryUpdateParameters the parameters that can be provided when updating workbook properties properties.

func (GraphQueryUpdateParameters) MarshalJSON

func (gqup GraphQueryUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for GraphQueryUpdateParameters.

func (*GraphQueryUpdateParameters) UnmarshalJSON

func (gqup *GraphQueryUpdateParameters) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for GraphQueryUpdateParameters struct.

type Operation

type Operation struct {
	// Name - Operation name: {provider}/{resource}/{operation}
	Name *string `json:"name,omitempty"`
	// Display - Display metadata associated with the operation.
	Display *OperationDisplay `json:"display,omitempty"`
	// Origin - The origin of operations.
	Origin *string `json:"origin,omitempty"`
}

Operation resource Graph REST API operation definition.

type OperationDisplay

type OperationDisplay struct {
	// Provider - Service provider: Microsoft Resource Graph.
	Provider *string `json:"provider,omitempty"`
	// Resource - Resource on which the operation is performed etc.
	Resource *string `json:"resource,omitempty"`
	// Operation - Type of operation: get, read, delete, etc.
	Operation *string `json:"operation,omitempty"`
	// Description - Description for the operation.
	Description *string `json:"description,omitempty"`
}

OperationDisplay display metadata associated with the operation.

type OperationListResult

type OperationListResult struct {
	autorest.Response `json:"-"`
	// Value - List of Resource Graph operations supported by the Resource Graph resource provider.
	Value *[]Operation `json:"value,omitempty"`
	// NextLink - The link used to get the next page of results.
	NextLink *string `json:"nextLink,omitempty"`
}

OperationListResult result of the request to list Resource Graph operations. It contains a list of operations and a URL link to get the next set of results.

func (OperationListResult) IsEmpty

func (olr OperationListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type OperationListResultIterator

type OperationListResultIterator struct {
	// contains filtered or unexported fields
}

OperationListResultIterator provides access to a complete listing of Operation values.

func NewOperationListResultIterator

func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator

Creates a new instance of the OperationListResultIterator type.

func (*OperationListResultIterator) Next

func (iter *OperationListResultIterator) Next() error

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*OperationListResultIterator) NextWithContext

func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (OperationListResultIterator) NotDone

func (iter OperationListResultIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (OperationListResultIterator) Response

Response returns the raw server response from the last page request.

func (OperationListResultIterator) Value

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type OperationListResultPage

type OperationListResultPage struct {
	// contains filtered or unexported fields
}

OperationListResultPage contains a page of Operation values.

func NewOperationListResultPage

func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage

Creates a new instance of the OperationListResultPage type.

func (*OperationListResultPage) Next

func (page *OperationListResultPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*OperationListResultPage) NextWithContext

func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (OperationListResultPage) NotDone

func (page OperationListResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (OperationListResultPage) Response

Response returns the raw server response from the last page request.

func (OperationListResultPage) Values

func (page OperationListResultPage) Values() []Operation

Values returns the slice of values for the current page or nil if there are no values.

type OperationsClient

type OperationsClient struct {
	BaseClient
}

OperationsClient is the client for the Operations methods of the Resourcegraph service.

func NewOperationsClient

func NewOperationsClient(subscriptionID string) OperationsClient

NewOperationsClient creates an instance of the OperationsClient client.

func NewOperationsClientWithBaseURI

func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient

NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.

func (OperationsClient) List

func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error)

List lists all of the available REST API operations.

func (OperationsClient) ListComplete

func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (OperationsClient) ListPreparer

func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error)

ListPreparer prepares the List request.

func (OperationsClient) ListResponder

func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (OperationsClient) ListSender

func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type QueryRequest

type QueryRequest struct {
	// Subscriptions - Azure subscriptions against which to execute the query.
	Subscriptions *[]string `json:"subscriptions,omitempty"`
	// Query - The resources query.
	Query *string `json:"query,omitempty"`
	// Options - The query evaluation options
	Options *QueryRequestOptions `json:"options,omitempty"`
	// Facets - An array of facet requests to be computed against the query result.
	Facets *[]FacetRequest `json:"facets,omitempty"`
}

QueryRequest describes a query to be executed.

type QueryRequestOptions

type QueryRequestOptions struct {
	// SkipToken - Continuation token for pagination, capturing the next page size and offset, as well as the context of the query.
	SkipToken *string `json:"$skipToken,omitempty"`
	// Top - The maximum number of rows that the query should return. Overrides the page size when “`$skipToken“` property is present.
	Top *int32 `json:"$top,omitempty"`
	// Skip - The number of rows to skip from the beginning of the results. Overrides the next page offset when “`$skipToken“` property is present.
	Skip *int32 `json:"$skip,omitempty"`
}

QueryRequestOptions the options for query evaluation

type QueryResponse

type QueryResponse struct {
	autorest.Response `json:"-"`
	// TotalRecords - Number of total records matching the query.
	TotalRecords *int64 `json:"totalRecords,omitempty"`
	// Count - Number of records returned in the current response. In the case of paging, this is the number of records in the current page.
	Count *int64 `json:"count,omitempty"`
	// ResultTruncated - Indicates whether the query results are truncated. Possible values include: 'True', 'False'
	ResultTruncated ResultTruncated `json:"resultTruncated,omitempty"`
	// SkipToken - When present, the value can be passed to a subsequent query call (together with the same query and subscriptions used in the current request) to retrieve the next page of data.
	SkipToken *string `json:"$skipToken,omitempty"`
	// Data - Query output in tabular format.
	Data *Table `json:"data,omitempty"`
	// Facets - Query facets.
	Facets *[]BasicFacet `json:"facets,omitempty"`
}

QueryResponse query result.

func (*QueryResponse) UnmarshalJSON

func (qr *QueryResponse) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for QueryResponse struct.

type Resource

type Resource struct {
	// ID - READ-ONLY; Azure resource Id
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Azure resource name. This is GUID value. The display name should be assigned within properties field.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Azure resource type
	Type *string `json:"type,omitempty"`
	// ETag - READ-ONLY; This will be used to handle Optimistic Concurrency. If not present, it will always overwrite the existing resource without checking conflict.
	ETag *string `json:"eTag,omitempty"`
	// Tags - Resource tags
	Tags map[string]*string `json:"tags"`
}

Resource an azure resource object

func (Resource) MarshalJSON

func (r Resource) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Resource.

type ResourceChangeData

type ResourceChangeData struct {
	autorest.Response `json:"-"`
	// ChangeID - The change ID. Valid and unique within the specified resource only.
	ChangeID *string `json:"changeId,omitempty"`
	// BeforeSnapshot - The snapshot before the change.
	BeforeSnapshot *ResourceChangeDataBeforeSnapshot `json:"beforeSnapshot,omitempty"`
	// AfterSnapshot - The snapshot after the change.
	AfterSnapshot *ResourceChangeDataAfterSnapshot `json:"afterSnapshot,omitempty"`
}

ResourceChangeData data on a specific change, represented by a pair of before and after resource snapshots.

type ResourceChangeDataAfterSnapshot

type ResourceChangeDataAfterSnapshot struct {
	// Timestamp - The time when the snapshot was created.
	// The snapshot timestamp provides an approximation as to when a modification to a resource was detected.  There can be a difference between the actual modification time and the detection time.  This is due to differences in how operations that modify a resource are processed, versus how operation that record resource snapshots are processed.
	Timestamp *date.Time `json:"timestamp,omitempty"`
	// Content - The resource snapshot content (in resourceChangeDetails response only).
	Content interface{} `json:"content,omitempty"`
}

ResourceChangeDataAfterSnapshot the snapshot after the change.

type ResourceChangeDataBeforeSnapshot

type ResourceChangeDataBeforeSnapshot struct {
	// Timestamp - The time when the snapshot was created.
	// The snapshot timestamp provides an approximation as to when a modification to a resource was detected.  There can be a difference between the actual modification time and the detection time.  This is due to differences in how operations that modify a resource are processed, versus how operation that record resource snapshots are processed.
	Timestamp *date.Time `json:"timestamp,omitempty"`
	// Content - The resource snapshot content (in resourceChangeDetails response only).
	Content interface{} `json:"content,omitempty"`
}

ResourceChangeDataBeforeSnapshot the snapshot before the change.

type ResourceChangeDetailsRequestParameters

type ResourceChangeDetailsRequestParameters struct {
	// ResourceID - Specifies the resource for a change details request.
	ResourceID *string `json:"resourceId,omitempty"`
	// ChangeID - Specifies the change ID.
	ChangeID *string `json:"changeId,omitempty"`
}

ResourceChangeDetailsRequestParameters the parameters for a specific change details request.

type ResourceChangeList

type ResourceChangeList struct {
	autorest.Response `json:"-"`
	// Changes - The pageable value returned by the operation, i.e. a list of changes to the resource.
	// - The list is ordered from the most recent changes to the least recent changes.
	// - This list will be empty if there were no changes during the requested interval.
	// - The `Before` snapshot timestamp value of the oldest change can be outside of the specified time interval.
	Changes *[]ResourceChangeData `json:"changes,omitempty"`
	// SkipToken - Skip token that encodes the skip information while executing the current request
	SkipToken interface{} `json:"$skipToken,omitempty"`
}

ResourceChangeList a list of changes associated with a resource over a specific time interval.

type ResourceChangesRequestParameters

type ResourceChangesRequestParameters struct {
	// ResourceID - Specifies the resource for a changes request.
	ResourceID *string `json:"resourceId,omitempty"`
	// Interval - Specifies the date and time interval for a changes request.
	Interval *ResourceChangesRequestParametersInterval `json:"interval,omitempty"`
	// SkipToken - Acts as the continuation token for paged responses.
	SkipToken *string `json:"$skipToken,omitempty"`
	// Top - The maximum number of changes the client can accept in a paged response.
	Top *int32 `json:"$top,omitempty"`
}

ResourceChangesRequestParameters the parameters for a specific changes request.

type ResourceChangesRequestParametersInterval

type ResourceChangesRequestParametersInterval struct {
	// Start - A datetime indicating the inclusive/closed start of the time interval, i.e. `[`**`start`**`, end)`. Specifying a `start` that occurs chronologically after `end` will result in an error.
	Start *date.Time `json:"start,omitempty"`
	// End - A datetime indicating the exclusive/open end of the time interval, i.e. `[start, `**`end`**`)`. Specifying an `end` that occurs chronologically before `start` will result in an error.
	End *date.Time `json:"end,omitempty"`
}

ResourceChangesRequestParametersInterval specifies the date and time interval for a changes request.

type ResourceSnapshotData

type ResourceSnapshotData struct {
	// Timestamp - The time when the snapshot was created.
	// The snapshot timestamp provides an approximation as to when a modification to a resource was detected.  There can be a difference between the actual modification time and the detection time.  This is due to differences in how operations that modify a resource are processed, versus how operation that record resource snapshots are processed.
	Timestamp *date.Time `json:"timestamp,omitempty"`
	// Content - The resource snapshot content (in resourceChangeDetails response only).
	Content interface{} `json:"content,omitempty"`
}

ResourceSnapshotData data on a specific resource snapshot.

type ResultKind

type ResultKind string

ResultKind enumerates the values for result kind.

const (
	// Basic ...
	Basic ResultKind = "basic"
)

func PossibleResultKindValues

func PossibleResultKindValues() []ResultKind

PossibleResultKindValues returns an array of possible values for the ResultKind const type.

type ResultTruncated

type ResultTruncated string

ResultTruncated enumerates the values for result truncated.

const (
	// False ...
	False ResultTruncated = "false"
	// True ...
	True ResultTruncated = "true"
)

func PossibleResultTruncatedValues

func PossibleResultTruncatedValues() []ResultTruncated

PossibleResultTruncatedValues returns an array of possible values for the ResultTruncated const type.

type ResultType

type ResultType string

ResultType enumerates the values for result type.

const (
	// ResultTypeFacet ...
	ResultTypeFacet ResultType = "Facet"
	// ResultTypeFacetError ...
	ResultTypeFacetError ResultType = "FacetError"
	// ResultTypeFacetResult ...
	ResultTypeFacetResult ResultType = "FacetResult"
)

func PossibleResultTypeValues

func PossibleResultTypeValues() []ResultType

PossibleResultTypeValues returns an array of possible values for the ResultType const type.

type Table

type Table struct {
	// Columns - Query result column descriptors.
	Columns *[]Column `json:"columns,omitempty"`
	// Rows - Query result rows.
	Rows *[][]interface{} `json:"rows,omitempty"`
}

Table query output in tabular format.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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