projects

package
v0.20240424.1114424 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MPL-2.0 Imports: 13 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-10-01/projects Documentation

The projects SDK allows for interaction with the Azure Resource Manager Service storagemover (API Version 2023-10-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/storagemover/2023-10-01/projects"

Client Initialization

client := projects.NewProjectsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ProjectsClient.CreateOrUpdate

ctx := context.TODO()
id := projects.NewProjectID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageMoverValue", "projectValue")

payload := projects.Project{
	// ...
}


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: ProjectsClient.Delete

ctx := context.TODO()
id := projects.NewProjectID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageMoverValue", "projectValue")

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

Example Usage: ProjectsClient.Get

ctx := context.TODO()
id := projects.NewProjectID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageMoverValue", "projectValue")

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: ProjectsClient.List

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

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

Example Usage: ProjectsClient.Update

ctx := context.TODO()
id := projects.NewProjectID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageMoverValue", "projectValue")

payload := projects.ProjectUpdateParameters{
	// ...
}


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

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateProjectID

func ValidateProjectID(input interface{}, key string) (warnings []string, errors []error)

ValidateProjectID checks that 'input' can be parsed as a Project ID

func ValidateStorageMoverID

func ValidateStorageMoverID(input interface{}, key string) (warnings []string, errors []error)

ValidateStorageMoverID checks that 'input' can be parsed as a Storage Mover ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Project
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Project
}

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Project
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Project
}

type Project

type Project struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *ProjectProperties     `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type ProjectId

type ProjectId struct {
	SubscriptionId    string
	ResourceGroupName string
	StorageMoverName  string
	ProjectName       string
}

ProjectId is a struct representing the Resource ID for a Project

func NewProjectID

func NewProjectID(subscriptionId string, resourceGroupName string, storageMoverName string, projectName string) ProjectId

NewProjectID returns a new ProjectId struct

func ParseProjectID

func ParseProjectID(input string) (*ProjectId, error)

ParseProjectID parses 'input' into a ProjectId

func ParseProjectIDInsensitively

func ParseProjectIDInsensitively(input string) (*ProjectId, error)

ParseProjectIDInsensitively parses 'input' case-insensitively into a ProjectId note: this method should only be used for API response data and not user input

func (*ProjectId) FromParseResult

func (id *ProjectId) FromParseResult(input resourceids.ParseResult) error

func (ProjectId) ID

func (id ProjectId) ID() string

ID returns the formatted Project ID

func (ProjectId) Segments

func (id ProjectId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Project ID

func (ProjectId) String

func (id ProjectId) String() string

String returns a human-readable description of this Project ID

type ProjectOperationPredicate

type ProjectOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (ProjectOperationPredicate) Matches

func (p ProjectOperationPredicate) Matches(input Project) bool

type ProjectProperties

type ProjectProperties struct {
	Description       *string            `json:"description,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
}

type ProjectUpdateParameters

type ProjectUpdateParameters struct {
	Properties *ProjectUpdateProperties `json:"properties,omitempty"`
}

type ProjectUpdateProperties

type ProjectUpdateProperties struct {
	Description *string `json:"description,omitempty"`
}

type ProjectsClient

type ProjectsClient struct {
	Client *resourcemanager.Client
}

func NewProjectsClientWithBaseURI

func NewProjectsClientWithBaseURI(sdkApi sdkEnv.Api) (*ProjectsClient, error)

func (ProjectsClient) CreateOrUpdate

func (c ProjectsClient) CreateOrUpdate(ctx context.Context, id ProjectId, input Project) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (ProjectsClient) Delete

func (c ProjectsClient) Delete(ctx context.Context, id ProjectId) (result DeleteOperationResponse, err error)

Delete ...

func (ProjectsClient) DeleteThenPoll

func (c ProjectsClient) DeleteThenPoll(ctx context.Context, id ProjectId) error

DeleteThenPoll performs Delete then polls until it's completed

func (ProjectsClient) Get

func (c ProjectsClient) Get(ctx context.Context, id ProjectId) (result GetOperationResponse, err error)

Get ...

func (ProjectsClient) List

List ...

func (ProjectsClient) ListComplete

ListComplete retrieves all the results into a single object

func (ProjectsClient) ListCompleteMatchingPredicate

func (c ProjectsClient) ListCompleteMatchingPredicate(ctx context.Context, id StorageMoverId, predicate ProjectOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ProjectsClient) Update

Update ...

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
)

func (*ProvisioningState) UnmarshalJSON

func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error

type StorageMoverId

type StorageMoverId struct {
	SubscriptionId    string
	ResourceGroupName string
	StorageMoverName  string
}

StorageMoverId is a struct representing the Resource ID for a Storage Mover

func NewStorageMoverID

func NewStorageMoverID(subscriptionId string, resourceGroupName string, storageMoverName string) StorageMoverId

NewStorageMoverID returns a new StorageMoverId struct

func ParseStorageMoverID

func ParseStorageMoverID(input string) (*StorageMoverId, error)

ParseStorageMoverID parses 'input' into a StorageMoverId

func ParseStorageMoverIDInsensitively

func ParseStorageMoverIDInsensitively(input string) (*StorageMoverId, error)

ParseStorageMoverIDInsensitively parses 'input' case-insensitively into a StorageMoverId note: this method should only be used for API response data and not user input

func (*StorageMoverId) FromParseResult

func (id *StorageMoverId) FromParseResult(input resourceids.ParseResult) error

func (StorageMoverId) ID

func (id StorageMoverId) ID() string

ID returns the formatted Storage Mover ID

func (StorageMoverId) Segments

func (id StorageMoverId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Storage Mover ID

func (StorageMoverId) String

func (id StorageMoverId) String() string

String returns a human-readable description of this Storage Mover ID

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Project
}

Jump to

Keyboard shortcuts

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