azure-sdk-for-go: github.com/Azure/azure-sdk-for-go/services/resourcegraph/mgmt/2019-04-01/resourcegraph Index | Files | Directories

package resourcegraph

import "github.com/Azure/azure-sdk-for-go/services/resourcegraph/mgmt/2019-04-01/resourcegraph"

Package resourcegraph implements the Azure ARM Resourcegraph service API version 2019-04-01.

Azure Resource Graph API Reference

Index

Package Files

client.go models.go operations.go version.go

Constants

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

func UserAgent Uses

func UserAgent() string

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

func Version Uses

func Version() string

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

type BaseClient Uses

type BaseClient struct {
    autorest.Client
    BaseURI string
}

BaseClient is the base client for Resourcegraph.

func New Uses

func New() BaseClient

New creates an instance of the BaseClient client.

func NewWithBaseURI Uses

func NewWithBaseURI(baseURI string) BaseClient

NewWithBaseURI creates an instance of the BaseClient client.

func (BaseClient) Resources Uses

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 Uses

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

ResourcesPreparer prepares the Resources request.

func (BaseClient) ResourcesResponder Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

func PossibleColumnDataTypeValues() []ColumnDataType

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

type Error Uses

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 Uses

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 Uses

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

MarshalJSON is the custom marshaler for ErrorDetails.

func (*ErrorDetails) UnmarshalJSON Uses

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

UnmarshalJSON is the custom unmarshaler for ErrorDetails struct.

type ErrorResponse Uses

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

ErrorResponse an error response from the API.

type Facet Uses

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 Uses

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

AsBasicFacet is the BasicFacet implementation for Facet.

func (Facet) AsFacet Uses

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

AsFacet is the BasicFacet implementation for Facet.

func (Facet) AsFacetError Uses

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

AsFacetError is the BasicFacet implementation for Facet.

func (Facet) AsFacetResult Uses

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

AsFacetResult is the BasicFacet implementation for Facet.

func (Facet) MarshalJSON Uses

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

MarshalJSON is the custom marshaler for Facet.

type FacetError Uses

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 Uses

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

AsBasicFacet is the BasicFacet implementation for FacetError.

func (FacetError) AsFacet Uses

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

AsFacet is the BasicFacet implementation for FacetError.

func (FacetError) AsFacetError Uses

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

AsFacetError is the BasicFacet implementation for FacetError.

func (FacetError) AsFacetResult Uses

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

AsFacetResult is the BasicFacet implementation for FacetError.

func (FacetError) MarshalJSON Uses

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

MarshalJSON is the custom marshaler for FacetError.

type FacetRequest Uses

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 Uses

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 Uses

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 interface{} `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 Uses

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

AsBasicFacet is the BasicFacet implementation for FacetResult.

func (FacetResult) AsFacet Uses

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

AsFacet is the BasicFacet implementation for FacetResult.

func (FacetResult) AsFacetError Uses

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

AsFacetError is the BasicFacet implementation for FacetResult.

func (FacetResult) AsFacetResult Uses

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

AsFacetResult is the BasicFacet implementation for FacetResult.

func (FacetResult) MarshalJSON Uses

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

MarshalJSON is the custom marshaler for FacetResult.

type FacetSortOrder Uses

type FacetSortOrder string

FacetSortOrder enumerates the values for facet sort order.

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

func PossibleFacetSortOrderValues Uses

func PossibleFacetSortOrderValues() []FacetSortOrder

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

type Operation Uses

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 Uses

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 Uses

type OperationListResult struct {
    autorest.Response `json:"-"`
    // Value - List of Resource Graph operations supported by the Resource Graph resource provider.
    Value *[]Operation `json:"value,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.

type OperationsClient Uses

type OperationsClient struct {
    BaseClient
}

OperationsClient is the azure Resource Graph API Reference

func NewOperationsClient Uses

func NewOperationsClient() OperationsClient

NewOperationsClient creates an instance of the OperationsClient client.

func NewOperationsClientWithBaseURI Uses

func NewOperationsClientWithBaseURI(baseURI string) OperationsClient

NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.

func (OperationsClient) List Uses

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

List lists all of the available REST API operations.

func (OperationsClient) ListPreparer Uses

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

ListPreparer prepares the List request.

func (OperationsClient) ListResponder Uses

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 Uses

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 Uses

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 Uses

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"`
    // ResultFormat - Defines in which format query result returned. Possible values include: 'ResultFormatTable', 'ResultFormatObjectArray'
    ResultFormat ResultFormat `json:"resultFormat,omitempty"`
}

QueryRequestOptions the options for query evaluation

type QueryResponse Uses

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 interface{} `json:"data,omitempty"`
    // Facets - Query facets.
    Facets *[]BasicFacet `json:"facets,omitempty"`
}

QueryResponse query result.

func (*QueryResponse) UnmarshalJSON Uses

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

UnmarshalJSON is the custom unmarshaler for QueryResponse struct.

type ResultFormat Uses

type ResultFormat string

ResultFormat enumerates the values for result format.

const (
    // ResultFormatObjectArray ...
    ResultFormatObjectArray ResultFormat = "objectArray"
    // ResultFormatTable ...
    ResultFormatTable ResultFormat = "table"
)

func PossibleResultFormatValues Uses

func PossibleResultFormatValues() []ResultFormat

PossibleResultFormatValues returns an array of possible values for the ResultFormat const type.

type ResultTruncated Uses

type ResultTruncated string

ResultTruncated enumerates the values for result truncated.

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

func PossibleResultTruncatedValues Uses

func PossibleResultTruncatedValues() []ResultTruncated

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

type ResultType Uses

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 Uses

func PossibleResultTypeValues() []ResultType

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

type Table Uses

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

PathSynopsis
resourcegraphapi

Package resourcegraph imports 8 packages (graph) and is imported by 4 packages. Updated 2019-07-30. Refresh now. Tools for package owners.