artifact

package
v0.20230508.1085248 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: MPL-2.0 Imports: 10 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/artifact Documentation

The artifact SDK allows for interaction with the Azure Resource Manager Service blueprints (API Version 2018-11-01-preview).

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/blueprints/2018-11-01-preview/artifact"

Client Initialization

client := artifact.NewArtifactClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ArtifactClient.CreateOrUpdate

ctx := context.TODO()
id := artifact.NewArtifactScopedID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "blueprintValue", "artifactValue")

payload := artifact.Artifact{
	// ...
}


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

ctx := context.TODO()
id := artifact.NewArtifactScopedID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "blueprintValue", "artifactValue")

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

Example Usage: ArtifactClient.Get

ctx := context.TODO()
id := artifact.NewArtifactScopedID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "blueprintValue", "artifactValue")

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

ctx := context.TODO()
id := artifact.NewScopedBlueprintID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "blueprintValue")

// 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
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForArtifactKind

func PossibleValuesForArtifactKind() []string

func ValidateArtifactScopedID

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

ValidateArtifactScopedID checks that 'input' can be parsed as a Artifact Scoped ID

func ValidateScopedBlueprintID

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

ValidateScopedBlueprintID checks that 'input' can be parsed as a Scoped Blueprint ID

Types

type Artifact

type Artifact interface {
}

type ArtifactClient

type ArtifactClient struct {
	Client *resourcemanager.Client
}

func NewArtifactClientWithBaseURI

func NewArtifactClientWithBaseURI(api environments.Api) (*ArtifactClient, error)

func (ArtifactClient) CreateOrUpdate

func (c ArtifactClient) CreateOrUpdate(ctx context.Context, id ArtifactScopedId, input Artifact) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (ArtifactClient) Delete

Delete ...

func (ArtifactClient) Get

Get ...

func (ArtifactClient) List

List ...

func (ArtifactClient) ListComplete

ListComplete retrieves all the results into a single object

func (ArtifactClient) ListCompleteMatchingPredicate

func (c ArtifactClient) ListCompleteMatchingPredicate(ctx context.Context, id ScopedBlueprintId, predicate ArtifactOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ArtifactKind

type ArtifactKind string
const (
	ArtifactKindPolicyAssignment ArtifactKind = "policyAssignment"
	ArtifactKindRoleAssignment   ArtifactKind = "roleAssignment"
	ArtifactKindTemplate         ArtifactKind = "template"
)

func (*ArtifactKind) UnmarshalJSON

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

type ArtifactOperationPredicate

type ArtifactOperationPredicate struct {
}

func (ArtifactOperationPredicate) Matches

func (p ArtifactOperationPredicate) Matches(input Artifact) bool

type ArtifactScopedId

type ArtifactScopedId struct {
	ResourceScope string
	BlueprintName string
	ArtifactName  string
}

ArtifactScopedId is a struct representing the Resource ID for a Artifact Scoped

func NewArtifactScopedID

func NewArtifactScopedID(resourceScope string, blueprintName string, artifactName string) ArtifactScopedId

NewArtifactScopedID returns a new ArtifactScopedId struct

func ParseArtifactScopedID

func ParseArtifactScopedID(input string) (*ArtifactScopedId, error)

ParseArtifactScopedID parses 'input' into a ArtifactScopedId

func ParseArtifactScopedIDInsensitively

func ParseArtifactScopedIDInsensitively(input string) (*ArtifactScopedId, error)

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

func (ArtifactScopedId) ID

func (id ArtifactScopedId) ID() string

ID returns the formatted Artifact Scoped ID

func (ArtifactScopedId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Artifact Scoped ID

func (ArtifactScopedId) String

func (id ArtifactScopedId) String() string

String returns a human-readable description of this Artifact Scoped ID

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Artifact
}

type GetOperationResponse

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

type KeyVaultReference

type KeyVaultReference struct {
	Id string `json:"id"`
}

type ListCompleteResult

type ListCompleteResult struct {
	Items []Artifact
}

type ListOperationResponse

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

type ParameterValue

type ParameterValue struct {
	Reference *SecretValueReference `json:"reference,omitempty"`
	Value     *interface{}          `json:"value,omitempty"`
}

type PolicyAssignmentArtifact

type PolicyAssignmentArtifact struct {
	Properties PolicyAssignmentArtifactProperties `json:"properties"`

	// Fields inherited from Artifact
	Id   *string `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
	Type *string `json:"type,omitempty"`
}

func (PolicyAssignmentArtifact) MarshalJSON

func (s PolicyAssignmentArtifact) MarshalJSON() ([]byte, error)

type PolicyAssignmentArtifactProperties

type PolicyAssignmentArtifactProperties struct {
	DependsOn          *[]string                 `json:"dependsOn,omitempty"`
	Description        *string                   `json:"description,omitempty"`
	DisplayName        *string                   `json:"displayName,omitempty"`
	Parameters         map[string]ParameterValue `json:"parameters"`
	PolicyDefinitionId string                    `json:"policyDefinitionId"`
	ResourceGroup      *string                   `json:"resourceGroup,omitempty"`
}

type RoleAssignmentArtifact

type RoleAssignmentArtifact struct {
	Properties RoleAssignmentArtifactProperties `json:"properties"`

	// Fields inherited from Artifact
	Id   *string `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
	Type *string `json:"type,omitempty"`
}

func (RoleAssignmentArtifact) MarshalJSON

func (s RoleAssignmentArtifact) MarshalJSON() ([]byte, error)

type RoleAssignmentArtifactProperties

type RoleAssignmentArtifactProperties struct {
	DependsOn        *[]string   `json:"dependsOn,omitempty"`
	Description      *string     `json:"description,omitempty"`
	DisplayName      *string     `json:"displayName,omitempty"`
	PrincipalIds     interface{} `json:"principalIds"`
	ResourceGroup    *string     `json:"resourceGroup,omitempty"`
	RoleDefinitionId string      `json:"roleDefinitionId"`
}

type ScopedBlueprintId

type ScopedBlueprintId struct {
	ResourceScope string
	BlueprintName string
}

ScopedBlueprintId is a struct representing the Resource ID for a Scoped Blueprint

func NewScopedBlueprintID

func NewScopedBlueprintID(resourceScope string, blueprintName string) ScopedBlueprintId

NewScopedBlueprintID returns a new ScopedBlueprintId struct

func ParseScopedBlueprintID

func ParseScopedBlueprintID(input string) (*ScopedBlueprintId, error)

ParseScopedBlueprintID parses 'input' into a ScopedBlueprintId

func ParseScopedBlueprintIDInsensitively

func ParseScopedBlueprintIDInsensitively(input string) (*ScopedBlueprintId, error)

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

func (ScopedBlueprintId) ID

func (id ScopedBlueprintId) ID() string

ID returns the formatted Scoped Blueprint ID

func (ScopedBlueprintId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Scoped Blueprint ID

func (ScopedBlueprintId) String

func (id ScopedBlueprintId) String() string

String returns a human-readable description of this Scoped Blueprint ID

type SecretValueReference

type SecretValueReference struct {
	KeyVault      KeyVaultReference `json:"keyVault"`
	SecretName    string            `json:"secretName"`
	SecretVersion *string           `json:"secretVersion,omitempty"`
}

type TemplateArtifact

type TemplateArtifact struct {
	Properties TemplateArtifactProperties `json:"properties"`

	// Fields inherited from Artifact
	Id   *string `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
	Type *string `json:"type,omitempty"`
}

func (TemplateArtifact) MarshalJSON

func (s TemplateArtifact) MarshalJSON() ([]byte, error)

type TemplateArtifactProperties

type TemplateArtifactProperties struct {
	DependsOn     *[]string                 `json:"dependsOn,omitempty"`
	Description   *string                   `json:"description,omitempty"`
	DisplayName   *string                   `json:"displayName,omitempty"`
	Parameters    map[string]ParameterValue `json:"parameters"`
	ResourceGroup *string                   `json:"resourceGroup,omitempty"`
	Template      interface{}               `json:"template"`
}

Jump to

Keyboard shortcuts

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