projects

package
v0.20240513.1085605 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/projects Documentation

The projects SDK allows for interaction with the Azure Resource Manager Service devcenter (API Version 2023-04-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-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", "projectValue")

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


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

Example Usage: ProjectsClient.Delete

ctx := context.TODO()
id := projects.NewProjectID("12345678-1234-9876-4563-123456789012", "example-resource-group", "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", "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.ListByResourceGroup

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

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

Example Usage: ProjectsClient.ListBySubscription

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

// alternatively `client.ListBySubscription(ctx, id, projects.DefaultListBySubscriptionOperationOptions())` can be used to do batched pagination
items, err := client.ListBySubscriptionComplete(ctx, id, projects.DefaultListBySubscriptionOperationOptions())
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", "projectValue")

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


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

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

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	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 ListByResourceGroupCompleteResult

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

type ListByResourceGroupOperationOptions

type ListByResourceGroupOperationOptions struct {
	Top *int64
}

func DefaultListByResourceGroupOperationOptions

func DefaultListByResourceGroupOperationOptions() ListByResourceGroupOperationOptions

func (ListByResourceGroupOperationOptions) ToHeaders

func (ListByResourceGroupOperationOptions) ToOData

func (ListByResourceGroupOperationOptions) ToQuery

type ListByResourceGroupOperationResponse

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

type ListBySubscriptionCompleteResult

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

type ListBySubscriptionOperationOptions

type ListBySubscriptionOperationOptions struct {
	Top *int64
}

func DefaultListBySubscriptionOperationOptions

func DefaultListBySubscriptionOperationOptions() ListBySubscriptionOperationOptions

func (ListBySubscriptionOperationOptions) ToHeaders

func (ListBySubscriptionOperationOptions) ToOData

func (ListBySubscriptionOperationOptions) ToQuery

type ListBySubscriptionOperationResponse

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

type Project

type Project struct {
	Id         *string                `json:"id,omitempty"`
	Location   string                 `json:"location"`
	Name       *string                `json:"name,omitempty"`
	Properties *ProjectProperties     `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Tags       *map[string]string     `json:"tags,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type ProjectId

type ProjectId struct {
	SubscriptionId    string
	ResourceGroupName string
	ProjectName       string
}

ProjectId is a struct representing the Resource ID for a Project

func NewProjectID

func NewProjectID(subscriptionId string, resourceGroupName 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
	Location *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"`
	DevCenterId        string             `json:"devCenterId"`
	DevCenterUri       *string            `json:"devCenterUri,omitempty"`
	MaxDevBoxesPerUser *int64             `json:"maxDevBoxesPerUser,omitempty"`
	ProvisioningState  *ProvisioningState `json:"provisioningState,omitempty"`
}

type ProjectUpdate

type ProjectUpdate struct {
	Location   *string                  `json:"location,omitempty"`
	Properties *ProjectUpdateProperties `json:"properties,omitempty"`
	Tags       *map[string]string       `json:"tags,omitempty"`
}

type ProjectUpdateProperties

type ProjectUpdateProperties struct {
	Description        *string `json:"description,omitempty"`
	DevCenterId        *string `json:"devCenterId,omitempty"`
	MaxDevBoxesPerUser *int64  `json:"maxDevBoxesPerUser,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) CreateOrUpdateThenPoll

func (c ProjectsClient) CreateOrUpdateThenPoll(ctx context.Context, id ProjectId, input Project) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

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) ListByResourceGroup

ListByResourceGroup ...

func (ProjectsClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (ProjectsClient) ListByResourceGroupCompleteMatchingPredicate

func (c ProjectsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions, predicate ProjectOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ProjectsClient) ListBySubscription

ListBySubscription ...

func (ProjectsClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (ProjectsClient) ListBySubscriptionCompleteMatchingPredicate

func (c ProjectsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions, predicate ProjectOperationPredicate) (result ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ProjectsClient) Update

func (c ProjectsClient) Update(ctx context.Context, id ProjectId, input ProjectUpdate) (result UpdateOperationResponse, err error)

Update ...

func (ProjectsClient) UpdateThenPoll

func (c ProjectsClient) UpdateThenPoll(ctx context.Context, id ProjectId, input ProjectUpdate) error

UpdateThenPoll performs Update then polls until it's completed

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted                  ProvisioningState = "Accepted"
	ProvisioningStateCanceled                  ProvisioningState = "Canceled"
	ProvisioningStateCreated                   ProvisioningState = "Created"
	ProvisioningStateCreating                  ProvisioningState = "Creating"
	ProvisioningStateDeleted                   ProvisioningState = "Deleted"
	ProvisioningStateDeleting                  ProvisioningState = "Deleting"
	ProvisioningStateFailed                    ProvisioningState = "Failed"
	ProvisioningStateMovingResources           ProvisioningState = "MovingResources"
	ProvisioningStateNotSpecified              ProvisioningState = "NotSpecified"
	ProvisioningStateRolloutInProgress         ProvisioningState = "RolloutInProgress"
	ProvisioningStateRunning                   ProvisioningState = "Running"
	ProvisioningStateStorageProvisioningFailed ProvisioningState = "StorageProvisioningFailed"
	ProvisioningStateSucceeded                 ProvisioningState = "Succeeded"
	ProvisioningStateTransientFailure          ProvisioningState = "TransientFailure"
	ProvisioningStateUpdated                   ProvisioningState = "Updated"
	ProvisioningStateUpdating                  ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	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