Documentation
¶
Index ¶
- Constants
- func DecodeError(statusCode int, body []byte) error
- func IsAuthFailure(err error) bool
- func IsNotFound(err error) bool
- func NewHTTPClient() *http.Client
- type APIError
- type ActivityLogEvent
- type ActivityLogResponse
- type BlobContainer
- type BlobContainerPatchRequest
- type BlobContainerProperties
- type BlobService
- type Client
- type CostManagementAggregation
- type CostManagementColumn
- type CostManagementQueryDataset
- type CostManagementQueryProperties
- type CostManagementQueryRequest
- type CostManagementQueryResponse
- type CostManagementQueryTimePeriod
- type CreateRoleAssignmentRequest
- type DNSAAAARecord
- type DNSARecord
- type DNSCNAMERecord
- type DNSMXRecord
- type DNSNSRecord
- type DNSRecordSet
- type DNSRecordSetProps
- type DNSSOARecord
- type DNSTXTRecord
- type DNSZone
- type DNSZoneProps
- type IPConfiguration
- type IPConfigurationProps
- type ListBlobContainersResponse
- type ListBlobServicesResponse
- type ListResourceGroupsResponse
- type ListRoleAssignmentsResponse
- type ListRoleDefinitionsResponse
- type ListStorageAccountsResponse
- type ListSubscriptionsResponse
- type ListVirtualMachinesResponse
- type NetworkInterface
- type NetworkInterfaceProps
- type Option
- type Pager
- type PublicIPAddress
- type PublicIPAddressProps
- type Request
- type ResourceGroup
- type ResourceID
- type ResourceRef
- type ResponseMetadata
- type RetryPolicy
- type RoleAssignment
- type RoleAssignmentProperties
- type RoleDefinition
- type RoleDefinitionProperties
- type RunCommandInput
- type RunCommandInstanceView
- type RunCommandResult
- type SQLServer
- type SQLServerPatch
- type SQLServerProperties
- type StorageAccount
- type Subscription
- type VMNetworkInterfaceRef
- type VMNetworkProfile
- type VirtualMachine
- type VirtualMachineProps
- type Workspace
- type WorkspaceProps
Constants ¶
const AuthorizationAPIVersion = "2022-04-01"
const ComputeAPIVersion = "2022-08-01"
const CostManagementAPIVersion = "2023-11-01"
const DNSAPIVersion = "2018-05-01"
const InsightsAPIVersion = "2015-04-01"
const NetworkAPIVersion = "2022-07-01"
const OperationalInsightsAPIVersion = "2022-10-01"
const ResourcesAPIVersion = "2021-04-01"
const SQLAPIVersion = "2022-05-01-preview"
const StorageAPIVersion = "2022-05-01"
const SubscriptionsAPIVersion = "2021-01-01"
Variables ¶
This section is empty.
Functions ¶
func DecodeError ¶
func IsAuthFailure ¶
func IsNotFound ¶
func NewHTTPClient ¶
Types ¶
type ActivityLogEvent ¶ added in v0.3.1
type ActivityLogEvent struct {
EventDataID string `json:"eventDataId"`
OperationName struct {
Value string `json:"value"`
LocalizedValue string `json:"localizedValue"`
} `json:"operationName"`
EventTimestamp string `json:"eventTimestamp"`
Caller string `json:"caller"`
HTTPRequest struct {
ClientIPAddress string `json:"clientIpAddress"`
} `json:"httpRequest"`
ResourceID string `json:"resourceId"`
Status struct {
Value string `json:"value"`
LocalizedValue string `json:"localizedValue"`
} `json:"status"`
SubmissionTimestamp string `json:"submissionTimestamp"`
Authorization struct {
Action string `json:"action"`
Scope string `json:"scope"`
} `json:"authorization"`
ResourceType struct {
Value string `json:"value"`
LocalizedValue string `json:"localizedValue"`
} `json:"resourceType"`
}
ActivityLogEvent maps a single record from the `Microsoft.Insights/eventtypes/management/values` listing. Only fields useful for the validation flow are projected.
type ActivityLogResponse ¶ added in v0.3.1
type ActivityLogResponse struct {
Value []ActivityLogEvent `json:"value"`
NextLink string `json:"nextLink"`
}
type BlobContainer ¶
type BlobContainer struct {
ID string `json:"id"`
Name string `json:"name"`
Properties *BlobContainerProperties `json:"properties,omitempty"`
}
type BlobContainerPatchRequest ¶ added in v0.3.1
type BlobContainerPatchRequest struct {
Properties BlobContainerProperties `json:"properties"`
}
BlobContainerPatchRequest is the body of PATCH on the container resource. It is also valid for PUT (update). PublicAccess values: "None", "Blob", "Container".
type BlobContainerProperties ¶ added in v0.3.1
type BlobContainerProperties struct {
PublicAccess string `json:"publicAccess,omitempty"`
}
type BlobService ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) DoWithResponse ¶ added in v0.3.1
type CostManagementAggregation ¶ added in v0.3.1
type CostManagementColumn ¶ added in v0.3.1
type CostManagementQueryDataset ¶ added in v0.3.1
type CostManagementQueryDataset struct {
Granularity string `json:"granularity"`
Aggregation map[string]CostManagementAggregation `json:"aggregation"`
}
type CostManagementQueryProperties ¶ added in v0.3.1
type CostManagementQueryProperties struct {
NextLink string `json:"nextLink"`
Columns []CostManagementColumn `json:"columns"`
Rows [][]any `json:"rows"`
}
type CostManagementQueryRequest ¶ added in v0.3.1
type CostManagementQueryRequest struct {
Type string `json:"type"`
Timeframe string `json:"timeframe"`
Dataset CostManagementQueryDataset `json:"dataset"`
TimePeriod *CostManagementQueryTimePeriod `json:"timePeriod,omitempty"`
}
CostManagementQueryRequest is the body of the Cost Management `query` POST. The Azure API supports a wide range of grouping/filter options; we keep the minimum that yields the current-month total for an account.
type CostManagementQueryResponse ¶ added in v0.3.1
type CostManagementQueryResponse struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Properties CostManagementQueryProperties `json:"properties"`
}
CostManagementQueryResponse mirrors the shape returned by `Microsoft.CostManagement /query`. Rows are interleaved Cost+Currency values with column descriptors.
type CostManagementQueryTimePeriod ¶ added in v0.3.1
type CreateRoleAssignmentRequest ¶ added in v0.3.1
type CreateRoleAssignmentRequest struct {
Properties RoleAssignmentProperties `json:"properties"`
}
CreateRoleAssignmentRequest is the body of PUT /{scope}/providers/Microsoft.Authorization/roleAssignments/{name}.
type DNSAAAARecord ¶ added in v0.3.1
type DNSAAAARecord struct {
IPv6Address string `json:"ipv6Address"`
}
type DNSARecord ¶ added in v0.3.1
type DNSARecord struct {
IPv4Address string `json:"ipv4Address"`
}
type DNSCNAMERecord ¶ added in v0.3.1
type DNSCNAMERecord struct {
CNAME string `json:"cname"`
}
type DNSMXRecord ¶ added in v0.3.1
type DNSNSRecord ¶ added in v0.3.1
type DNSNSRecord struct {
NSDName string `json:"nsdname"`
}
type DNSRecordSet ¶ added in v0.3.1
type DNSRecordSet struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Etag string `json:"etag"`
Properties DNSRecordSetProps `json:"properties"`
}
DNSRecordSet covers the union of record-set property shapes Azure returns in the `recordSets` list for a DNS zone. Only one of the typed slices is populated per record set, keyed by the trailing segment of `Type` (e.g. `Microsoft.Network/dnszones/A` → ARecords).
type DNSRecordSetProps ¶ added in v0.3.1
type DNSRecordSetProps struct {
TTL int64 `json:"TTL"`
FQDN string `json:"fqdn"`
ARecords []DNSARecord `json:"ARecords,omitempty"`
AAAARecords []DNSAAAARecord `json:"AAAARecords,omitempty"`
CNAMERecord *DNSCNAMERecord `json:"CNAMERecord,omitempty"`
MXRecords []DNSMXRecord `json:"MXRecords,omitempty"`
TXTRecords []DNSTXTRecord `json:"TXTRecords,omitempty"`
NSRecords []DNSNSRecord `json:"NSRecords,omitempty"`
SOARecord *DNSSOARecord `json:"SOARecord,omitempty"`
}
type DNSSOARecord ¶ added in v0.3.1
type DNSTXTRecord ¶ added in v0.3.1
type DNSTXTRecord struct {
Value []string `json:"value"`
}
type DNSZone ¶ added in v0.3.1
type DNSZone struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Location string `json:"location"`
Properties DNSZoneProps `json:"properties"`
}
DNSZone is the management-plane representation of a public Azure DNS zone (`Microsoft.Network/dnsZones`). Private DNS lives under `Microsoft.Network/privateDnsZones` with a separate API version; the demo surface only models public zones for now (CSPM signal value is highest on internet-facing zones).
type DNSZoneProps ¶ added in v0.3.1
type IPConfiguration ¶
type IPConfiguration struct {
Name string `json:"name"`
Properties IPConfigurationProps `json:"properties"`
}
type IPConfigurationProps ¶
type IPConfigurationProps struct {
PrivateIPAddress string `json:"privateIPAddress"`
PublicIPAddress *ResourceRef `json:"publicIPAddress,omitempty"`
}
type ListBlobContainersResponse ¶
type ListBlobContainersResponse struct {
Value []BlobContainer `json:"value"`
NextLink string `json:"nextLink"`
}
type ListBlobServicesResponse ¶
type ListBlobServicesResponse struct {
Value []BlobService `json:"value"`
}
type ListResourceGroupsResponse ¶
type ListResourceGroupsResponse struct {
Value []ResourceGroup `json:"value"`
NextLink string `json:"nextLink"`
}
type ListRoleAssignmentsResponse ¶ added in v0.3.1
type ListRoleAssignmentsResponse struct {
Value []RoleAssignment `json:"value"`
NextLink string `json:"nextLink"`
}
type ListRoleDefinitionsResponse ¶ added in v0.3.1
type ListRoleDefinitionsResponse struct {
Value []RoleDefinition `json:"value"`
NextLink string `json:"nextLink"`
}
type ListStorageAccountsResponse ¶
type ListStorageAccountsResponse struct {
Value []StorageAccount `json:"value"`
NextLink string `json:"nextLink"`
}
type ListSubscriptionsResponse ¶
type ListSubscriptionsResponse struct {
Value []Subscription `json:"value"`
NextLink string `json:"nextLink"`
}
type ListVirtualMachinesResponse ¶
type ListVirtualMachinesResponse struct {
Value []VirtualMachine `json:"value"`
NextLink string `json:"nextLink"`
}
type NetworkInterface ¶
type NetworkInterface struct {
ID string `json:"id"`
Name string `json:"name"`
Properties NetworkInterfaceProps `json:"properties"`
}
type NetworkInterfaceProps ¶
type NetworkInterfaceProps struct {
IPConfigurations []IPConfiguration `json:"ipConfigurations"`
}
type Option ¶
type Option func(*Client)
func WithBaseURL ¶
func WithHTTPClient ¶
func WithRetryPolicy ¶
func WithRetryPolicy(p RetryPolicy) Option
type Pager ¶
type Pager[T any] struct { // contains filtered or unexported fields }
Pager walks Azure ARM list responses that use nextLink.
type PublicIPAddress ¶
type PublicIPAddress struct {
ID string `json:"id"`
Name string `json:"name"`
Properties PublicIPAddressProps `json:"properties"`
}
type PublicIPAddressProps ¶
type PublicIPAddressProps struct {
IPAddress string `json:"ipAddress"`
}
type ResourceGroup ¶
type ResourceID ¶
type ResourceID struct {
SubscriptionID string
ResourceGroup string
Provider string
ResourceType string
ResourceName string
}
func ParseResourceID ¶
func ParseResourceID(id string) (ResourceID, error)
type ResourceRef ¶
type ResourceRef struct {
ID string `json:"id"`
}
type ResponseMetadata ¶ added in v0.3.1
type RetryPolicy ¶
type RetryPolicy = httpclient.RetryPolicy
func DefaultRetryPolicy ¶
func DefaultRetryPolicy() RetryPolicy
type RoleAssignment ¶ added in v0.3.1
type RoleAssignment struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Properties RoleAssignmentProperties `json:"properties"`
}
RoleAssignment represents a Microsoft.Authorization/roleAssignments resource in Azure Resource Manager.
type RoleAssignmentProperties ¶ added in v0.3.1
type RoleDefinition ¶ added in v0.3.1
type RoleDefinition struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Properties RoleDefinitionProperties `json:"properties"`
}
RoleDefinition represents a Microsoft.Authorization/roleDefinitions resource.
type RoleDefinitionProperties ¶ added in v0.3.1
type RunCommandInput ¶ added in v0.3.1
RunCommandInput models the request body for `virtualMachines/runCommand`. `commandId` selects a built-in script: `RunShellScript` (Linux) or `RunPowerShellScript` (Windows). `script` holds the command lines.
type RunCommandInstanceView ¶ added in v0.3.1
type RunCommandResult ¶ added in v0.3.1
type RunCommandResult struct {
Value []RunCommandInstanceView `json:"value"`
}
RunCommandResult is the synchronous response payload. ARM may return 202 with a Location header for long-running ops; the simple cases return the inline result.
type SQLServer ¶ added in v0.3.1
type SQLServer struct {
ID string `json:"id"`
Name string `json:"name"`
Location string `json:"location"`
Properties SQLServerProperties `json:"properties"`
}
type SQLServerPatch ¶ added in v0.3.1
type SQLServerPatch struct {
Properties SQLServerProperties `json:"properties"`
}
type SQLServerProperties ¶ added in v0.3.1
type SQLServerProperties struct {
AdministratorLogin string `json:"administratorLogin,omitempty"`
AdministratorLoginPassword string `json:"administratorLoginPassword,omitempty"`
Version string `json:"version,omitempty"`
State string `json:"state,omitempty"`
FullyQualifiedDomainName string `json:"fullyQualifiedDomainName,omitempty"`
}
type StorageAccount ¶
type Subscription ¶
type VMNetworkInterfaceRef ¶
type VMNetworkInterfaceRef struct {
ID string `json:"id"`
}
type VMNetworkProfile ¶
type VMNetworkProfile struct {
NetworkInterfaces []VMNetworkInterfaceRef `json:"networkInterfaces"`
}
type VirtualMachine ¶
type VirtualMachine struct {
ID string `json:"id"`
Name string `json:"name"`
Location string `json:"location"`
Status string `json:"status"`
Properties VirtualMachineProps `json:"properties"`
}
type VirtualMachineProps ¶
type VirtualMachineProps struct {
ProvisioningState string `json:"provisioningState"`
NetworkProfile *VMNetworkProfile `json:"networkProfile,omitempty"`
}
type Workspace ¶ added in v0.3.1
type Workspace struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Location string `json:"location"`
Properties WorkspaceProps `json:"properties"`
}
Workspace is the management-plane representation of a Log Analytics workspace (`Microsoft.OperationalInsights/workspaces`). It is the closest equivalent to the cloudlist `log` asset on Azure: a workspace is the container that aggregates logs from connected resources.
type WorkspaceProps ¶ added in v0.3.1
type WorkspaceProps struct {
CustomerID string `json:"customerId"`
ProvisioningState string `json:"provisioningState"`
CreatedDate string `json:"createdDate"`
ModifiedDate string `json:"modifiedDate"`
RetentionInDays int64 `json:"retentionInDays"`
Sku *struct {
Name string `json:"name"`
} `json:"sku,omitempty"`
}