Documentation
¶
Index ¶
- type Authorization
- type AuthorizationType
- type BootstrapConfiguration
- type CloudError
- type CloudErrorBody
- type CodeRepository
- type CodeRepositoryType
- type InputDataType
- type InputDescriptor
- type InputValue
- type Operation
- type OperationDisplayValue
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type OrganizationReference
- type Pipeline
- type PipelineListResult
- type PipelineProperties
- type PipelineTemplate
- type PipelineTemplateDefinition
- type PipelineTemplateDefinitionListResult
- type PipelineTemplateDefinitionsClient
- type PipelineTemplateDefinitionsClientListOptions
- type PipelineTemplateDefinitionsClientListResponse
- type PipelineUpdateParameters
- type PipelinesClient
- func (client *PipelinesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, pipelineName string, ...) (*runtime.Poller[PipelinesClientCreateOrUpdateResponse], error)
- func (client *PipelinesClient) Delete(ctx context.Context, resourceGroupName string, pipelineName string, ...) (PipelinesClientDeleteResponse, error)
- func (client *PipelinesClient) Get(ctx context.Context, resourceGroupName string, pipelineName string, ...) (PipelinesClientGetResponse, error)
- func (client *PipelinesClient) NewListByResourceGroupPager(resourceGroupName string, options *PipelinesClientListByResourceGroupOptions) *runtime.Pager[PipelinesClientListByResourceGroupResponse]
- func (client *PipelinesClient) NewListBySubscriptionPager(options *PipelinesClientListBySubscriptionOptions) *runtime.Pager[PipelinesClientListBySubscriptionResponse]
- func (client *PipelinesClient) Update(ctx context.Context, resourceGroupName string, pipelineName string, ...) (PipelinesClientUpdateResponse, error)
- type PipelinesClientBeginCreateOrUpdateOptions
- type PipelinesClientCreateOrUpdateResponse
- type PipelinesClientDeleteOptions
- type PipelinesClientDeleteResponse
- type PipelinesClientGetOptions
- type PipelinesClientGetResponse
- type PipelinesClientListByResourceGroupOptions
- type PipelinesClientListByResourceGroupResponse
- type PipelinesClientListBySubscriptionOptions
- type PipelinesClientListBySubscriptionResponse
- type PipelinesClientUpdateOptions
- type PipelinesClientUpdateResponse
- type ProjectReference
- type Resource
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authorization ¶
type Authorization struct { // REQUIRED; Type of authorization. AuthorizationType *AuthorizationType `json:"authorizationType,omitempty"` // Authorization parameters corresponding to the authorization type. Parameters map[string]*string `json:"parameters,omitempty"` }
Authorization info used to access a resource (like code repository).
func (Authorization) MarshalJSON ¶
func (a Authorization) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Authorization.
type AuthorizationType ¶
type AuthorizationType string
AuthorizationType - Type of authorization.
const (
AuthorizationTypePersonalAccessToken AuthorizationType = "personalAccessToken"
)
func PossibleAuthorizationTypeValues ¶
func PossibleAuthorizationTypeValues() []AuthorizationType
PossibleAuthorizationTypeValues returns the possible values for the AuthorizationType const type.
type BootstrapConfiguration ¶
type BootstrapConfiguration struct { // REQUIRED; Template used to bootstrap the pipeline. Template *PipelineTemplate `json:"template,omitempty"` // Repository containing the source code for the pipeline. Repository *CodeRepository `json:"repository,omitempty"` }
BootstrapConfiguration - Configuration used to bootstrap a Pipeline.
type CloudError ¶
type CloudError struct { // Details of the error from the Pipelines Resource Provider. Error *CloudErrorBody `json:"error,omitempty"` }
CloudError - An error response from the Pipelines Resource Provider.
type CloudErrorBody ¶
type CloudErrorBody struct { // An identifier for the error. Codes are invariant and are intended to be consumed programmatically. Code *string `json:"code,omitempty"` // A list of additional details about the error. Details []*CloudErrorBody `json:"details,omitempty"` // A message describing the error, intended to be suitable for display in a user interface. Message *string `json:"message,omitempty"` // The target of the particular error. For example, the name of the property in error or the method where the error occurred. Target *string `json:"target,omitempty"` }
CloudErrorBody - An error response from the Pipelines Resource Provider.
type CodeRepository ¶
type CodeRepository struct { // REQUIRED; Default branch used to configure Continuous Integration (CI) in the pipeline. DefaultBranch *string `json:"defaultBranch,omitempty"` // REQUIRED; Unique immutable identifier of the code repository. ID *string `json:"id,omitempty"` // REQUIRED; Type of code repository. RepositoryType *CodeRepositoryType `json:"repositoryType,omitempty"` // Authorization info to access the code repository. Authorization *Authorization `json:"authorization,omitempty"` // Repository-specific properties. Properties map[string]*string `json:"properties,omitempty"` }
CodeRepository - Repository containing the source code for a pipeline.
func (CodeRepository) MarshalJSON ¶
func (c CodeRepository) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CodeRepository.
type CodeRepositoryType ¶
type CodeRepositoryType string
CodeRepositoryType - Type of code repository.
const ( CodeRepositoryTypeGitHub CodeRepositoryType = "gitHub" CodeRepositoryTypeVstsGit CodeRepositoryType = "vstsGit" )
func PossibleCodeRepositoryTypeValues ¶
func PossibleCodeRepositoryTypeValues() []CodeRepositoryType
PossibleCodeRepositoryTypeValues returns the possible values for the CodeRepositoryType const type.
type InputDataType ¶
type InputDataType string
InputDataType - Data type of the value of the input parameter.
const ( InputDataTypeAuthorization InputDataType = "Authorization" InputDataTypeBool InputDataType = "Bool" InputDataTypeInt InputDataType = "Int" InputDataTypeSecureString InputDataType = "SecureString" InputDataTypeString InputDataType = "String" )
func PossibleInputDataTypeValues ¶
func PossibleInputDataTypeValues() []InputDataType
PossibleInputDataTypeValues returns the possible values for the InputDataType const type.
type InputDescriptor ¶
type InputDescriptor struct { // REQUIRED; Identifier of the input parameter. ID *string `json:"id,omitempty"` // REQUIRED; Data type of the value of the input parameter. Type *InputDataType `json:"type,omitempty"` // Description of the input parameter. Description *string `json:"description,omitempty"` // List of possible values for the input parameter. PossibleValues []*InputValue `json:"possibleValues,omitempty"` }
InputDescriptor - Representation of a pipeline template input parameter.
type InputValue ¶
type InputValue struct { // Description of the input parameter value. DisplayValue *string `json:"displayValue,omitempty"` // Value of an input parameter. Value *string `json:"value,omitempty"` }
InputValue - Representation of a pipeline template input parameter value.
type Operation ¶
type Operation struct { // Display information of the operation. Display *OperationDisplayValue `json:"display,omitempty"` // Indicates whether the operation applies to data-plane. IsDataAction *string `json:"isDataAction,omitempty"` // READ-ONLY; Name of the operation. Name *string `json:"name,omitempty" azure:"ro"` }
Operation - Properties of an Operation.
type OperationDisplayValue ¶
type OperationDisplayValue struct { // READ-ONLY; Friendly description of the operation. Description *string `json:"description,omitempty" azure:"ro"` // READ-ONLY; Friendly name of the operation. Operation *string `json:"operation,omitempty" azure:"ro"` // READ-ONLY; Friendly name of the resource provider. Provider *string `json:"provider,omitempty" azure:"ro"` // READ-ONLY; Friendly name of the resource type the operation applies to. Resource *string `json:"resource,omitempty" azure:"ro"` }
OperationDisplayValue - Display information of an operation.
type OperationListResult ¶
type OperationListResult struct { // The URL to get the next set of operations, if there are any. NextLink *string `json:"nextLink,omitempty"` // READ-ONLY; List of operations supported by Microsoft.DevOps resource provider. Value []*Operation `json:"value,omitempty" azure:"ro"` }
OperationListResult - Result of a request to list all operations supported by Microsoft.DevOps resource provider.
type OperationsClient ¶
type OperationsClient struct {
// contains filtered or unexported fields
}
OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.
func NewOperationsClient ¶
func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)
NewOperationsClient creates a new instance of OperationsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*OperationsClient) NewListPager ¶ added in v0.4.0
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Lists all the operations supported by Microsoft.DevOps resource provider. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-07-01-preview options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/devops/resource-manager/Microsoft.DevOps/preview/2019-07-01-preview/examples/ListOperations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devops/armdevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdevops.NewOperationsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type OperationsClientListOptions ¶ added in v0.2.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
type OperationsClientListResponse ¶ added in v0.2.0
type OperationsClientListResponse struct {
OperationListResult
}
OperationsClientListResponse contains the response from method OperationsClient.List.
type OrganizationReference ¶
type OrganizationReference struct { // REQUIRED; Name of the Azure DevOps Organization. Name *string `json:"name,omitempty"` // READ-ONLY; Unique immutable identifier for the Azure DevOps Organization. ID *string `json:"id,omitempty" azure:"ro"` }
OrganizationReference - Reference to an Azure DevOps Organization.
type Pipeline ¶
type Pipeline struct { // REQUIRED; Custom properties of the Pipeline. Properties *PipelineProperties `json:"properties,omitempty"` // Resource Location Location *string `json:"location,omitempty"` // Resource Tags Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Resource Id ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource Name Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource Type Type *string `json:"type,omitempty" azure:"ro"` }
Pipeline - Azure DevOps Pipeline used to configure Continuous Integration (CI) & Continuous Delivery (CD) for Azure resources.
func (Pipeline) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Pipeline.
type PipelineListResult ¶
type PipelineListResult struct { // URL to get the next set of Pipelines, if there are any. NextLink *string `json:"nextLink,omitempty"` // List of pipelines. Value []*Pipeline `json:"value,omitempty"` }
PipelineListResult - Result of a request to list all Azure Pipelines under a given scope.
type PipelineProperties ¶
type PipelineProperties struct { // REQUIRED; Configuration used to bootstrap the Pipeline. BootstrapConfiguration *BootstrapConfiguration `json:"bootstrapConfiguration,omitempty"` // REQUIRED; Reference to the Azure DevOps Organization containing the Pipeline. Organization *OrganizationReference `json:"organization,omitempty"` // REQUIRED; Reference to the Azure DevOps Project containing the Pipeline. Project *ProjectReference `json:"project,omitempty"` // READ-ONLY; Unique identifier of the Azure Pipeline within the Azure DevOps Project. PipelineID *int32 `json:"pipelineId,omitempty" azure:"ro"` }
PipelineProperties - Custom properties of a Pipeline.
type PipelineTemplate ¶
type PipelineTemplate struct { // REQUIRED; Unique identifier of the pipeline template. ID *string `json:"id,omitempty"` // Dictionary of input parameters used in the pipeline template. Parameters map[string]*string `json:"parameters,omitempty"` }
PipelineTemplate - Template used to bootstrap the pipeline.
func (PipelineTemplate) MarshalJSON ¶
func (p PipelineTemplate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PipelineTemplate.
type PipelineTemplateDefinition ¶
type PipelineTemplateDefinition struct { // REQUIRED; Unique identifier of the pipeline template. ID *string `json:"id,omitempty"` // Description of the pipeline enabled by the template. Description *string `json:"description,omitempty"` // List of input parameters required by the template to create a pipeline. Inputs []*InputDescriptor `json:"inputs,omitempty"` }
PipelineTemplateDefinition - Definition of a pipeline template.
type PipelineTemplateDefinitionListResult ¶
type PipelineTemplateDefinitionListResult struct { // The URL to get the next set of pipeline template definitions, if there are any. NextLink *string `json:"nextLink,omitempty"` // List of pipeline template definitions. Value []*PipelineTemplateDefinition `json:"value,omitempty"` }
PipelineTemplateDefinitionListResult - Result of a request to list all pipeline template definitions.
type PipelineTemplateDefinitionsClient ¶
type PipelineTemplateDefinitionsClient struct {
// contains filtered or unexported fields
}
PipelineTemplateDefinitionsClient contains the methods for the PipelineTemplateDefinitions group. Don't use this type directly, use NewPipelineTemplateDefinitionsClient() instead.
func NewPipelineTemplateDefinitionsClient ¶
func NewPipelineTemplateDefinitionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*PipelineTemplateDefinitionsClient, error)
NewPipelineTemplateDefinitionsClient creates a new instance of PipelineTemplateDefinitionsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*PipelineTemplateDefinitionsClient) NewListPager ¶ added in v0.4.0
func (client *PipelineTemplateDefinitionsClient) NewListPager(options *PipelineTemplateDefinitionsClientListOptions) *runtime.Pager[PipelineTemplateDefinitionsClientListResponse]
NewListPager - Lists all pipeline templates which can be used to configure an Azure Pipeline. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-07-01-preview options - PipelineTemplateDefinitionsClientListOptions contains the optional parameters for the PipelineTemplateDefinitionsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/devops/resource-manager/Microsoft.DevOps/preview/2019-07-01-preview/examples/ListPipelineTemplateDefinitions.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devops/armdevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdevops.NewPipelineTemplateDefinitionsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type PipelineTemplateDefinitionsClientListOptions ¶ added in v0.2.0
type PipelineTemplateDefinitionsClientListOptions struct { }
PipelineTemplateDefinitionsClientListOptions contains the optional parameters for the PipelineTemplateDefinitionsClient.List method.
type PipelineTemplateDefinitionsClientListResponse ¶ added in v0.2.0
type PipelineTemplateDefinitionsClientListResponse struct {
PipelineTemplateDefinitionListResult
}
PipelineTemplateDefinitionsClientListResponse contains the response from method PipelineTemplateDefinitionsClient.List.
type PipelineUpdateParameters ¶
type PipelineUpdateParameters struct { // Dictionary of key-value pairs to be set as tags on the Azure Pipeline. This will overwrite any existing tags. Tags map[string]*string `json:"tags,omitempty"` }
PipelineUpdateParameters - Request payload used to update an existing Azure Pipeline.
func (PipelineUpdateParameters) MarshalJSON ¶
func (p PipelineUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PipelineUpdateParameters.
type PipelinesClient ¶
type PipelinesClient struct {
// contains filtered or unexported fields
}
PipelinesClient contains the methods for the Pipelines group. Don't use this type directly, use NewPipelinesClient() instead.
func NewPipelinesClient ¶
func NewPipelinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PipelinesClient, error)
NewPipelinesClient creates a new instance of PipelinesClient with the specified values. subscriptionID - Unique identifier of the Azure subscription. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*PipelinesClient) BeginCreateOrUpdate ¶
func (client *PipelinesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, pipelineName string, createOperationParameters Pipeline, options *PipelinesClientBeginCreateOrUpdateOptions) (*runtime.Poller[PipelinesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates an Azure Pipeline. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-07-01-preview resourceGroupName - Name of the resource group within the Azure subscription. pipelineName - The name of the Azure Pipeline resource in ARM. createOperationParameters - The request payload to create the Azure Pipeline. options - PipelinesClientBeginCreateOrUpdateOptions contains the optional parameters for the PipelinesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/devops/resource-manager/Microsoft.DevOps/preview/2019-07-01-preview/examples/CreateAzurePipeline-Sample-AspNet-WindowsWebApp.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devops/armdevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdevops.NewPipelinesClient("{subscriptionId}", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, "myAspNetWebAppPipeline-rg", "myAspNetWebAppPipeline", armdevops.Pipeline{ Location: to.Ptr("South India"), Tags: map[string]*string{}, Properties: &armdevops.PipelineProperties{ BootstrapConfiguration: &armdevops.BootstrapConfiguration{ Template: &armdevops.PipelineTemplate{ ID: to.Ptr("ms.vss-continuous-delivery-pipeline-templates.aspnet-windowswebapp"), Parameters: map[string]*string{ "appInsightLocation": to.Ptr("South India"), "appServicePlan": to.Ptr("S1 Standard"), "azureAuth": to.Ptr("{\"scheme\":\"ServicePrincipal\",\"parameters\":{\"tenantid\":\"{subscriptionTenantId}\",\"objectid\":\"{appObjectId}\",\"serviceprincipalid\":\"{appId}\",\"serviceprincipalkey\":\"{appSecret}\"}}"), "location": to.Ptr("South India"), "resourceGroup": to.Ptr("myAspNetWebAppPipeline-rg"), "subscriptionId": to.Ptr("{subscriptionId}"), "webAppName": to.Ptr("myAspNetWebApp"), }, }, }, Organization: &armdevops.OrganizationReference{ Name: to.Ptr("myAspNetWebAppPipeline-org"), }, Project: &armdevops.ProjectReference{ Name: to.Ptr("myAspNetWebAppPipeline-project"), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*PipelinesClient) Delete ¶
func (client *PipelinesClient) Delete(ctx context.Context, resourceGroupName string, pipelineName string, options *PipelinesClientDeleteOptions) (PipelinesClientDeleteResponse, error)
Delete - Deletes an Azure Pipeline. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-07-01-preview resourceGroupName - Name of the resource group within the Azure subscription. pipelineName - The name of the Azure Pipeline resource. options - PipelinesClientDeleteOptions contains the optional parameters for the PipelinesClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/devops/resource-manager/Microsoft.DevOps/preview/2019-07-01-preview/examples/DeleteAzurePipeline.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devops/armdevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdevops.NewPipelinesClient("{subscriptionId}", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = client.Delete(ctx, "myAspNetWebAppPipeline-rg", "myAspNetWebAppPipeline", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*PipelinesClient) Get ¶
func (client *PipelinesClient) Get(ctx context.Context, resourceGroupName string, pipelineName string, options *PipelinesClientGetOptions) (PipelinesClientGetResponse, error)
Get - Gets an existing Azure Pipeline. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-07-01-preview resourceGroupName - Name of the resource group within the Azure subscription. pipelineName - The name of the Azure Pipeline resource in ARM. options - PipelinesClientGetOptions contains the optional parameters for the PipelinesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/devops/resource-manager/Microsoft.DevOps/preview/2019-07-01-preview/examples/GetAzurePipeline.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devops/armdevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdevops.NewPipelinesClient("{subscriptionId}", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "myAspNetWebAppPipeline-rg", "myAspNetWebAppPipeline", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*PipelinesClient) NewListByResourceGroupPager ¶ added in v0.4.0
func (client *PipelinesClient) NewListByResourceGroupPager(resourceGroupName string, options *PipelinesClientListByResourceGroupOptions) *runtime.Pager[PipelinesClientListByResourceGroupResponse]
NewListByResourceGroupPager - Lists all Azure Pipelines under the specified resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-07-01-preview resourceGroupName - Name of the resource group within the Azure subscription. options - PipelinesClientListByResourceGroupOptions contains the optional parameters for the PipelinesClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/devops/resource-manager/Microsoft.DevOps/preview/2019-07-01-preview/examples/ListAzurePipelinesByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devops/armdevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdevops.NewPipelinesClient("{subscriptionId}", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("myAspNetWebAppPipeline-rg", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*PipelinesClient) NewListBySubscriptionPager ¶ added in v0.4.0
func (client *PipelinesClient) NewListBySubscriptionPager(options *PipelinesClientListBySubscriptionOptions) *runtime.Pager[PipelinesClientListBySubscriptionResponse]
NewListBySubscriptionPager - Lists all Azure Pipelines under the specified subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-07-01-preview options - PipelinesClientListBySubscriptionOptions contains the optional parameters for the PipelinesClient.ListBySubscription method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/devops/resource-manager/Microsoft.DevOps/preview/2019-07-01-preview/examples/ListAzurePipelinesBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devops/armdevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdevops.NewPipelinesClient("{subscriptionId}", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListBySubscriptionPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*PipelinesClient) Update ¶
func (client *PipelinesClient) Update(ctx context.Context, resourceGroupName string, pipelineName string, updateOperationParameters PipelineUpdateParameters, options *PipelinesClientUpdateOptions) (PipelinesClientUpdateResponse, error)
Update - Updates the properties of an Azure Pipeline. Currently, only tags can be updated. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2019-07-01-preview resourceGroupName - Name of the resource group within the Azure subscription. pipelineName - The name of the Azure Pipeline resource. updateOperationParameters - The request payload containing the properties to update in the Azure Pipeline. options - PipelinesClientUpdateOptions contains the optional parameters for the PipelinesClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/devops/resource-manager/Microsoft.DevOps/preview/2019-07-01-preview/examples/UpdateAzurePipeline.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devops/armdevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdevops.NewPipelinesClient("{subscriptionId}", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Update(ctx, "myAspNetWebAppPipeline-rg", "myAspNetWebAppPipeline", armdevops.PipelineUpdateParameters{ Tags: map[string]*string{ "tagKey": to.Ptr("tagvalue"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type PipelinesClientBeginCreateOrUpdateOptions ¶ added in v0.2.0
type PipelinesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PipelinesClientBeginCreateOrUpdateOptions contains the optional parameters for the PipelinesClient.BeginCreateOrUpdate method.
type PipelinesClientCreateOrUpdateResponse ¶ added in v0.2.0
type PipelinesClientCreateOrUpdateResponse struct {
Pipeline
}
PipelinesClientCreateOrUpdateResponse contains the response from method PipelinesClient.CreateOrUpdate.
type PipelinesClientDeleteOptions ¶ added in v0.2.0
type PipelinesClientDeleteOptions struct { }
PipelinesClientDeleteOptions contains the optional parameters for the PipelinesClient.Delete method.
type PipelinesClientDeleteResponse ¶ added in v0.2.0
type PipelinesClientDeleteResponse struct { }
PipelinesClientDeleteResponse contains the response from method PipelinesClient.Delete.
type PipelinesClientGetOptions ¶ added in v0.2.0
type PipelinesClientGetOptions struct { }
PipelinesClientGetOptions contains the optional parameters for the PipelinesClient.Get method.
type PipelinesClientGetResponse ¶ added in v0.2.0
type PipelinesClientGetResponse struct {
Pipeline
}
PipelinesClientGetResponse contains the response from method PipelinesClient.Get.
type PipelinesClientListByResourceGroupOptions ¶ added in v0.2.0
type PipelinesClientListByResourceGroupOptions struct { }
PipelinesClientListByResourceGroupOptions contains the optional parameters for the PipelinesClient.ListByResourceGroup method.
type PipelinesClientListByResourceGroupResponse ¶ added in v0.2.0
type PipelinesClientListByResourceGroupResponse struct {
PipelineListResult
}
PipelinesClientListByResourceGroupResponse contains the response from method PipelinesClient.ListByResourceGroup.
type PipelinesClientListBySubscriptionOptions ¶ added in v0.2.0
type PipelinesClientListBySubscriptionOptions struct { }
PipelinesClientListBySubscriptionOptions contains the optional parameters for the PipelinesClient.ListBySubscription method.
type PipelinesClientListBySubscriptionResponse ¶ added in v0.2.0
type PipelinesClientListBySubscriptionResponse struct {
PipelineListResult
}
PipelinesClientListBySubscriptionResponse contains the response from method PipelinesClient.ListBySubscription.
type PipelinesClientUpdateOptions ¶ added in v0.2.0
type PipelinesClientUpdateOptions struct { }
PipelinesClientUpdateOptions contains the optional parameters for the PipelinesClient.Update method.
type PipelinesClientUpdateResponse ¶ added in v0.2.0
type PipelinesClientUpdateResponse struct {
Pipeline
}
PipelinesClientUpdateResponse contains the response from method PipelinesClient.Update.
type ProjectReference ¶
type ProjectReference struct { // REQUIRED; Name of the Azure DevOps Project. Name *string `json:"name,omitempty"` // READ-ONLY; Unique immutable identifier of the Azure DevOps Project. ID *string `json:"id,omitempty" azure:"ro"` }
ProjectReference - Reference to an Azure DevOps Project.
type Resource ¶
type Resource struct { // Resource Location Location *string `json:"location,omitempty"` // Resource Tags Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Resource Id ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource Name Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource Type Type *string `json:"type,omitempty" azure:"ro"` }
Resource - An Azure Resource Manager (ARM) resource.
func (Resource) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Resource.