artifact

package
v0.20240920.1135249 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: MPL-2.0 Imports: 11 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 Azure Resource Manager 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", "blueprintName", "artifactName")

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", "blueprintName", "artifactName")

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", "blueprintName", "artifactName")

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", "blueprintName")

// 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 {
	Artifact() BaseArtifactImpl
}

func UnmarshalArtifactImplementation added in v0.20240920.1135249

func UnmarshalArtifactImplementation(input []byte) (Artifact, error)

type ArtifactClient

type ArtifactClient struct {
	Client *resourcemanager.Client
}

func NewArtifactClientWithBaseURI

func NewArtifactClientWithBaseURI(sdkApi sdkEnv.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) FromParseResult

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

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 BaseArtifactImpl added in v0.20240920.1135249

type BaseArtifactImpl struct {
	Id   *string      `json:"id,omitempty"`
	Kind ArtifactKind `json:"kind"`
	Name *string      `json:"name,omitempty"`
	Type *string      `json:"type,omitempty"`
}

func (BaseArtifactImpl) Artifact added in v0.20240920.1135249

func (s BaseArtifactImpl) Artifact() BaseArtifactImpl

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 {
	LatestHttpResponse *http.Response
	Items              []Artifact
}

type ListCustomPager added in v0.20240628.1153531

type ListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListCustomPager) NextPageLink() *odata.Link

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"`

	Id   *string      `json:"id,omitempty"`
	Kind ArtifactKind `json:"kind"`
	Name *string      `json:"name,omitempty"`
	Type *string      `json:"type,omitempty"`
}

func (PolicyAssignmentArtifact) Artifact added in v0.20240920.1135249

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 RawArtifactImpl

type RawArtifactImpl struct {
	Type   string
	Values map[string]interface{}
	// contains filtered or unexported fields
}

RawArtifactImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g. this cannot be used as a Request Payload).

func (RawArtifactImpl) Artifact added in v0.20240920.1135249

func (s RawArtifactImpl) Artifact() BaseArtifactImpl

type RoleAssignmentArtifact

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

	Id   *string      `json:"id,omitempty"`
	Kind ArtifactKind `json:"kind"`
	Name *string      `json:"name,omitempty"`
	Type *string      `json:"type,omitempty"`
}

func (RoleAssignmentArtifact) Artifact added in v0.20240920.1135249

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

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

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"`

	Id   *string      `json:"id,omitempty"`
	Kind ArtifactKind `json:"kind"`
	Name *string      `json:"name,omitempty"`
	Type *string      `json:"type,omitempty"`
}

func (TemplateArtifact) Artifact added in v0.20240920.1135249

func (s TemplateArtifact) Artifact() BaseArtifactImpl

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