resourcegroups

package
v0.20221013.1073451 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: MPL-2.0 Imports: 11 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/resources/2020-06-01/resourcegroups Documentation

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

Client Initialization

client := resourcegroups.NewResourceGroupsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ResourceGroupsClient.CheckExistence

ctx := context.TODO()
id := resourcegroups.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")

read, err := client.CheckExistence(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ResourceGroupsClient.CreateOrUpdate

ctx := context.TODO()
id := resourcegroups.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")

payload := resourcegroups.ResourceGroup{
	// ...
}


read, err := client.CreateOrUpdate(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ResourceGroupsClient.Delete

ctx := context.TODO()
id := resourcegroups.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")

if err := client.DeleteThenPoll(ctx, id, resourcegroups.DefaultDeleteOperationOptions()); err != nil {
	// handle the error
}

Example Usage: ResourceGroupsClient.ExportTemplate

ctx := context.TODO()
id := resourcegroups.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")

payload := resourcegroups.ExportTemplateRequest{
	// ...
}


if err := client.ExportTemplateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: ResourceGroupsClient.Get

ctx := context.TODO()
id := resourcegroups.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")

read, err := client.Get(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ResourceGroupsClient.List

ctx := context.TODO()
id := resourcegroups.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

// alternatively `client.List(ctx, id, resourcegroups.DefaultListOperationOptions())` can be used to do batched pagination
items, err := client.ListComplete(ctx, id, resourcegroups.DefaultListOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: ResourceGroupsClient.ResourcesListByResourceGroup

ctx := context.TODO()
id := resourcegroups.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")

// alternatively `client.ResourcesListByResourceGroup(ctx, id, resourcegroups.DefaultResourcesListByResourceGroupOperationOptions())` can be used to do batched pagination
items, err := client.ResourcesListByResourceGroupComplete(ctx, id, resourcegroups.DefaultResourcesListByResourceGroupOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: ResourceGroupsClient.Update

ctx := context.TODO()
id := resourcegroups.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")

payload := resourcegroups.ResourceGroupPatchable{
	// ...
}


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

This section is empty.

Types

type CheckExistenceOperationResponse

type CheckExistenceOperationResponse struct {
	HttpResponse *http.Response
}

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *ResourceGroup
}

type DeleteOperationOptions

type DeleteOperationOptions struct {
	ForceDeletionTypes *string
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type ErrorAdditionalInfo

type ErrorAdditionalInfo struct {
	Info *interface{} `json:"info,omitempty"`
	Type *string      `json:"type,omitempty"`
}

type ErrorResponse

type ErrorResponse struct {
	AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"`
	Code           *string                `json:"code,omitempty"`
	Details        *[]ErrorResponse       `json:"details,omitempty"`
	Message        *string                `json:"message,omitempty"`
	Target         *string                `json:"target,omitempty"`
}

type ExportTemplateOperationResponse

type ExportTemplateOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type ExportTemplateRequest

type ExportTemplateRequest struct {
	Options   *string   `json:"options,omitempty"`
	Resources *[]string `json:"resources,omitempty"`
}

type GenericResourceExpanded

type GenericResourceExpanded struct {
	ChangedTime       *string                            `json:"changedTime,omitempty"`
	CreatedTime       *string                            `json:"createdTime,omitempty"`
	Id                *string                            `json:"id,omitempty"`
	Identity          *identity.SystemAndUserAssignedMap `json:"identity,omitempty"`
	Kind              *string                            `json:"kind,omitempty"`
	Location          *string                            `json:"location,omitempty"`
	ManagedBy         *string                            `json:"managedBy,omitempty"`
	Name              *string                            `json:"name,omitempty"`
	Plan              *Plan                              `json:"plan,omitempty"`
	Properties        *interface{}                       `json:"properties,omitempty"`
	ProvisioningState *string                            `json:"provisioningState,omitempty"`
	Sku               *Sku                               `json:"sku,omitempty"`
	Tags              *map[string]string                 `json:"tags,omitempty"`
	Type              *string                            `json:"type,omitempty"`
}

func (*GenericResourceExpanded) GetChangedTimeAsTime

func (o *GenericResourceExpanded) GetChangedTimeAsTime() (*time.Time, error)

func (*GenericResourceExpanded) GetCreatedTimeAsTime

func (o *GenericResourceExpanded) GetCreatedTimeAsTime() (*time.Time, error)

func (*GenericResourceExpanded) SetChangedTimeAsTime

func (o *GenericResourceExpanded) SetChangedTimeAsTime(input time.Time)

func (*GenericResourceExpanded) SetCreatedTimeAsTime

func (o *GenericResourceExpanded) SetCreatedTimeAsTime(input time.Time)

type GenericResourceExpandedOperationPredicate

type GenericResourceExpandedOperationPredicate struct {
	ChangedTime       *string
	CreatedTime       *string
	Id                *string
	Kind              *string
	Location          *string
	ManagedBy         *string
	Name              *string
	Properties        *interface{}
	ProvisioningState *string
	Type              *string
}

func (GenericResourceExpandedOperationPredicate) Matches

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *ResourceGroup
}

type ListCompleteResult

type ListCompleteResult struct {
	Items []ResourceGroup
}

type ListOperationOptions

type ListOperationOptions struct {
	Filter *string
	Top    *int64
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]ResourceGroup
	// contains filtered or unexported fields
}

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

type Plan

type Plan struct {
	Name          *string `json:"name,omitempty"`
	Product       *string `json:"product,omitempty"`
	PromotionCode *string `json:"promotionCode,omitempty"`
	Publisher     *string `json:"publisher,omitempty"`
	Version       *string `json:"version,omitempty"`
}

type ResourceGroup

type ResourceGroup struct {
	Id         *string                  `json:"id,omitempty"`
	Location   string                   `json:"location"`
	ManagedBy  *string                  `json:"managedBy,omitempty"`
	Name       *string                  `json:"name,omitempty"`
	Properties *ResourceGroupProperties `json:"properties,omitempty"`
	Tags       *map[string]string       `json:"tags,omitempty"`
	Type       *string                  `json:"type,omitempty"`
}

type ResourceGroupExportResult

type ResourceGroupExportResult struct {
	Error    *ErrorResponse `json:"error,omitempty"`
	Template *interface{}   `json:"template,omitempty"`
}

type ResourceGroupOperationPredicate

type ResourceGroupOperationPredicate struct {
	Id        *string
	Location  *string
	ManagedBy *string
	Name      *string
	Type      *string
}

func (ResourceGroupOperationPredicate) Matches

type ResourceGroupPatchable

type ResourceGroupPatchable struct {
	ManagedBy  *string                  `json:"managedBy,omitempty"`
	Name       *string                  `json:"name,omitempty"`
	Properties *ResourceGroupProperties `json:"properties,omitempty"`
	Tags       *map[string]string       `json:"tags,omitempty"`
}

type ResourceGroupProperties

type ResourceGroupProperties struct {
	ProvisioningState *string `json:"provisioningState,omitempty"`
}

type ResourceGroupsClient

type ResourceGroupsClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewResourceGroupsClientWithBaseURI

func NewResourceGroupsClientWithBaseURI(endpoint string) ResourceGroupsClient

func (ResourceGroupsClient) CheckExistence

CheckExistence ...

func (ResourceGroupsClient) CreateOrUpdate

CreateOrUpdate ...

func (ResourceGroupsClient) Delete

Delete ...

func (ResourceGroupsClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (ResourceGroupsClient) ExportTemplate

ExportTemplate ...

func (ResourceGroupsClient) ExportTemplateThenPoll

func (c ResourceGroupsClient) ExportTemplateThenPoll(ctx context.Context, id commonids.ResourceGroupId, input ExportTemplateRequest) error

ExportTemplateThenPoll performs ExportTemplate then polls until it's completed

func (ResourceGroupsClient) Get

Get ...

func (ResourceGroupsClient) List

List ...

func (ResourceGroupsClient) ListComplete

ListComplete retrieves all of the results into a single object

func (ResourceGroupsClient) ListCompleteMatchingPredicate

func (c ResourceGroupsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions, predicate ResourceGroupOperationPredicate) (resp ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (ResourceGroupsClient) ResourcesListByResourceGroup

ResourcesListByResourceGroup ...

func (ResourceGroupsClient) ResourcesListByResourceGroupComplete

ResourcesListByResourceGroupComplete retrieves all of the results into a single object

func (ResourceGroupsClient) ResourcesListByResourceGroupCompleteMatchingPredicate

ResourcesListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (ResourceGroupsClient) Update

Update ...

type ResourcesListByResourceGroupCompleteResult

type ResourcesListByResourceGroupCompleteResult struct {
	Items []GenericResourceExpanded
}

type ResourcesListByResourceGroupOperationOptions

type ResourcesListByResourceGroupOperationOptions struct {
	Expand *string
	Filter *string
	Top    *int64
}

func DefaultResourcesListByResourceGroupOperationOptions

func DefaultResourcesListByResourceGroupOperationOptions() ResourcesListByResourceGroupOperationOptions

type ResourcesListByResourceGroupOperationResponse

type ResourcesListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]GenericResourceExpanded
	// contains filtered or unexported fields
}

func (ResourcesListByResourceGroupOperationResponse) HasMore

func (ResourcesListByResourceGroupOperationResponse) LoadMore

type Sku

type Sku struct {
	Capacity *int64  `json:"capacity,omitempty"`
	Family   *string `json:"family,omitempty"`
	Model    *string `json:"model,omitempty"`
	Name     *string `json:"name,omitempty"`
	Size     *string `json:"size,omitempty"`
	Tier     *string `json:"tier,omitempty"`
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *ResourceGroup
}

Jump to

Keyboard shortcuts

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