Documentation ¶
Index ¶
- type ACR
- type ActionType
- type CreatedByType
- type DeleteWorkflowResponse
- type DeploymentProperties
- type DeveloperHubServiceClient
- func (client *DeveloperHubServiceClient) GitHubOAuth(ctx context.Context, location string, ...) (DeveloperHubServiceClientGitHubOAuthResponse, error)
- func (client *DeveloperHubServiceClient) GitHubOAuthCallback(ctx context.Context, location string, ...) (DeveloperHubServiceClientGitHubOAuthCallbackResponse, error)
- func (client *DeveloperHubServiceClient) ListGitHubOAuth(ctx context.Context, location string, ...) (DeveloperHubServiceClientListGitHubOAuthResponse, error)
- type DeveloperHubServiceClientGitHubOAuthCallbackOptions
- type DeveloperHubServiceClientGitHubOAuthCallbackResponse
- type DeveloperHubServiceClientGitHubOAuthOptions
- type DeveloperHubServiceClientGitHubOAuthResponse
- type DeveloperHubServiceClientListGitHubOAuthOptions
- type DeveloperHubServiceClientListGitHubOAuthResponse
- type GitHubOAuthCallRequest
- type GitHubOAuthInfoResponse
- type GitHubOAuthListResponse
- type GitHubOAuthProperties
- type GitHubOAuthResponse
- type GitHubWorkflowProfile
- type GitHubWorkflowProfileOidcCredentials
- type ManifestType
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type Origin
- type PullRequestStatus
- type SystemData
- type TagsObject
- type Workflow
- type WorkflowClient
- func (client *WorkflowClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workflowName string, ...) (WorkflowClientCreateOrUpdateResponse, error)
- func (client *WorkflowClient) Delete(ctx context.Context, resourceGroupName string, workflowName string, ...) (WorkflowClientDeleteResponse, error)
- func (client *WorkflowClient) Get(ctx context.Context, resourceGroupName string, workflowName string, ...) (WorkflowClientGetResponse, error)
- func (client *WorkflowClient) NewListByResourceGroupPager(resourceGroupName string, options *WorkflowClientListByResourceGroupOptions) *runtime.Pager[WorkflowClientListByResourceGroupResponse]
- func (client *WorkflowClient) NewListPager(options *WorkflowClientListOptions) *runtime.Pager[WorkflowClientListResponse]
- func (client *WorkflowClient) UpdateTags(ctx context.Context, resourceGroupName string, workflowName string, ...) (WorkflowClientUpdateTagsResponse, error)
- type WorkflowClientCreateOrUpdateOptions
- type WorkflowClientCreateOrUpdateResponse
- type WorkflowClientDeleteOptions
- type WorkflowClientDeleteResponse
- type WorkflowClientGetOptions
- type WorkflowClientGetResponse
- type WorkflowClientListByResourceGroupOptions
- type WorkflowClientListByResourceGroupResponse
- type WorkflowClientListOptions
- type WorkflowClientListResponse
- type WorkflowClientUpdateTagsOptions
- type WorkflowClientUpdateTagsResponse
- type WorkflowListResult
- type WorkflowProperties
- type WorkflowRun
Examples ¶
- DeveloperHubServiceClient.GitHubOAuth
- DeveloperHubServiceClient.GitHubOAuthCallback
- DeveloperHubServiceClient.ListGitHubOAuth
- OperationsClient.List
- WorkflowClient.CreateOrUpdate
- WorkflowClient.Delete
- WorkflowClient.Get
- WorkflowClient.NewListByResourceGroupPager
- WorkflowClient.NewListPager
- WorkflowClient.UpdateTags
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACR ¶
type ACR struct { // ACR registry AcrRegistryName *string `json:"acrRegistryName,omitempty"` // ACR repository AcrRepositoryName *string `json:"acrRepositoryName,omitempty"` // ACR resource group AcrResourceGroup *string `json:"acrResourceGroup,omitempty"` // ACR subscription id AcrSubscriptionID *string `json:"acrSubscriptionId,omitempty"` }
ACR - Information on the azure container registry
func (ACR) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type ACR.
func (*ACR) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type ACR.
type ActionType ¶
type ActionType string
ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
const (
ActionTypeInternal ActionType = "Internal"
)
func PossibleActionTypeValues ¶
func PossibleActionTypeValues() []ActionType
PossibleActionTypeValues returns the possible values for the ActionType const type.
type CreatedByType ¶
type CreatedByType string
CreatedByType - The type of identity that created the resource.
const ( CreatedByTypeApplication CreatedByType = "Application" CreatedByTypeKey CreatedByType = "Key" CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" CreatedByTypeUser CreatedByType = "User" )
func PossibleCreatedByTypeValues ¶
func PossibleCreatedByTypeValues() []CreatedByType
PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
type DeleteWorkflowResponse ¶
type DeleteWorkflowResponse struct { // delete status message Status *string `json:"status,omitempty"` }
DeleteWorkflowResponse - delete response if content must be provided on delete operation
func (DeleteWorkflowResponse) MarshalJSON ¶
func (d DeleteWorkflowResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeleteWorkflowResponse.
func (*DeleteWorkflowResponse) UnmarshalJSON ¶
func (d *DeleteWorkflowResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeleteWorkflowResponse.
type DeploymentProperties ¶
type DeploymentProperties struct { // Helm chart directory path in repository. HelmChartPath *string `json:"helmChartPath,omitempty"` // Helm Values.yaml file location in repository. HelmValues *string `json:"helmValues,omitempty"` KubeManifestLocations []*string `json:"kubeManifestLocations,omitempty"` // Determines the type of manifests within the repository. ManifestType *ManifestType `json:"manifestType,omitempty"` // Manifest override values. Overrides map[string]*string `json:"overrides,omitempty"` }
func (DeploymentProperties) MarshalJSON ¶
func (d DeploymentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeploymentProperties.
func (*DeploymentProperties) UnmarshalJSON ¶
func (d *DeploymentProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentProperties.
type DeveloperHubServiceClient ¶
type DeveloperHubServiceClient struct {
// contains filtered or unexported fields
}
DeveloperHubServiceClient contains the methods for the DeveloperHubServiceClient group. Don't use this type directly, use NewDeveloperHubServiceClient() instead.
func NewDeveloperHubServiceClient ¶
func NewDeveloperHubServiceClient(subscriptionID string, code string, state string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DeveloperHubServiceClient, error)
NewDeveloperHubServiceClient creates a new instance of DeveloperHubServiceClient with the specified values. subscriptionID - The ID of the target subscription. code - The code response from authenticating the GitHub App. state - The state response from authenticating the GitHub App. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*DeveloperHubServiceClient) GitHubOAuth ¶
func (client *DeveloperHubServiceClient) GitHubOAuth(ctx context.Context, location string, options *DeveloperHubServiceClientGitHubOAuthOptions) (DeveloperHubServiceClientGitHubOAuthResponse, error)
GitHubOAuth - Gets GitHubOAuth info used to authenticate users with the Developer Hub GitHub App. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01-preview location - The name of Azure region. options - DeveloperHubServiceClientGitHubOAuthOptions contains the optional parameters for the DeveloperHubServiceClient.GitHubOAuth method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/developerhub/resource-manager/Microsoft.DevHub/preview/2022-04-01-preview/examples/GitHubOAuth.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/devhub/armdevhub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdevhub.NewDeveloperHubServiceClient("subscriptionId1", "<code>", "<state>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GitHubOAuth(ctx, "eastus2euap", &armdevhub.DeveloperHubServiceClientGitHubOAuthOptions{Parameters: &armdevhub.GitHubOAuthCallRequest{ RedirectURL: to.Ptr("https://ms.portal.azure.com/aks"), }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*DeveloperHubServiceClient) GitHubOAuthCallback ¶
func (client *DeveloperHubServiceClient) GitHubOAuthCallback(ctx context.Context, location string, options *DeveloperHubServiceClientGitHubOAuthCallbackOptions) (DeveloperHubServiceClientGitHubOAuthCallbackResponse, error)
GitHubOAuthCallback - Callback URL to hit once authenticated with GitHub App to have the service store the OAuth token. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01-preview location - The name of Azure region. options - DeveloperHubServiceClientGitHubOAuthCallbackOptions contains the optional parameters for the DeveloperHubServiceClient.GitHubOAuthCallback method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/developerhub/resource-manager/Microsoft.DevHub/preview/2022-04-01-preview/examples/GitHubOAuthCallback.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devhub/armdevhub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdevhub.NewDeveloperHubServiceClient("subscriptionId1", "3584d83530557fdd1f46af8289938c8ef79f9dc5", "12345678-3456-7890-5678-012345678901", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.GitHubOAuthCallback(ctx, "eastus2euap", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*DeveloperHubServiceClient) ListGitHubOAuth ¶
func (client *DeveloperHubServiceClient) ListGitHubOAuth(ctx context.Context, location string, options *DeveloperHubServiceClientListGitHubOAuthOptions) (DeveloperHubServiceClientListGitHubOAuthResponse, error)
ListGitHubOAuth - Callback URL to hit once authenticated with GitHub App to have the service store the OAuth token. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01-preview location - The name of Azure region. options - DeveloperHubServiceClientListGitHubOAuthOptions contains the optional parameters for the DeveloperHubServiceClient.ListGitHubOAuth method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/developerhub/resource-manager/Microsoft.DevHub/preview/2022-04-01-preview/examples/GitHubOAuth_List.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devhub/armdevhub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdevhub.NewDeveloperHubServiceClient("subscriptionId1", "<code>", "<state>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.ListGitHubOAuth(ctx, "eastus2euap", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type DeveloperHubServiceClientGitHubOAuthCallbackOptions ¶
type DeveloperHubServiceClientGitHubOAuthCallbackOptions struct { }
DeveloperHubServiceClientGitHubOAuthCallbackOptions contains the optional parameters for the DeveloperHubServiceClient.GitHubOAuthCallback method.
type DeveloperHubServiceClientGitHubOAuthCallbackResponse ¶
type DeveloperHubServiceClientGitHubOAuthCallbackResponse struct {
GitHubOAuthResponse
}
DeveloperHubServiceClientGitHubOAuthCallbackResponse contains the response from method DeveloperHubServiceClient.GitHubOAuthCallback.
type DeveloperHubServiceClientGitHubOAuthOptions ¶
type DeveloperHubServiceClientGitHubOAuthOptions struct {
Parameters *GitHubOAuthCallRequest
}
DeveloperHubServiceClientGitHubOAuthOptions contains the optional parameters for the DeveloperHubServiceClient.GitHubOAuth method.
type DeveloperHubServiceClientGitHubOAuthResponse ¶
type DeveloperHubServiceClientGitHubOAuthResponse struct {
GitHubOAuthInfoResponse
}
DeveloperHubServiceClientGitHubOAuthResponse contains the response from method DeveloperHubServiceClient.GitHubOAuth.
type DeveloperHubServiceClientListGitHubOAuthOptions ¶
type DeveloperHubServiceClientListGitHubOAuthOptions struct { }
DeveloperHubServiceClientListGitHubOAuthOptions contains the optional parameters for the DeveloperHubServiceClient.ListGitHubOAuth method.
type DeveloperHubServiceClientListGitHubOAuthResponse ¶
type DeveloperHubServiceClientListGitHubOAuthResponse struct {
GitHubOAuthListResponse
}
DeveloperHubServiceClientListGitHubOAuthResponse contains the response from method DeveloperHubServiceClient.ListGitHubOAuth.
type GitHubOAuthCallRequest ¶
type GitHubOAuthCallRequest struct { // The URL the client will redirect to on successful authentication. If empty, no redirect will occur. RedirectURL *string `json:"redirectUrl,omitempty"` }
GitHubOAuthCallRequest - GitHubOAuth request object
func (GitHubOAuthCallRequest) MarshalJSON ¶
func (g GitHubOAuthCallRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GitHubOAuthCallRequest.
func (*GitHubOAuthCallRequest) UnmarshalJSON ¶
func (g *GitHubOAuthCallRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GitHubOAuthCallRequest.
type GitHubOAuthInfoResponse ¶
type GitHubOAuthInfoResponse struct { // URL for authorizing the Developer Hub GitHub App AuthURL *string `json:"authURL,omitempty"` // OAuth token used to make calls to GitHub Token *string `json:"token,omitempty"` }
GitHubOAuthInfoResponse - URL used to authorize the Developer Hub GitHub App
func (GitHubOAuthInfoResponse) MarshalJSON ¶
func (g GitHubOAuthInfoResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GitHubOAuthInfoResponse.
func (*GitHubOAuthInfoResponse) UnmarshalJSON ¶
func (g *GitHubOAuthInfoResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GitHubOAuthInfoResponse.
type GitHubOAuthListResponse ¶
type GitHubOAuthListResponse struct { // Singleton list response containing one GitHubOAuthResponse response Value []*GitHubOAuthResponse `json:"value,omitempty"` }
GitHubOAuthListResponse - The response from List GitHubOAuth operation.
func (GitHubOAuthListResponse) MarshalJSON ¶
func (g GitHubOAuthListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GitHubOAuthListResponse.
func (*GitHubOAuthListResponse) UnmarshalJSON ¶
func (g *GitHubOAuthListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GitHubOAuthListResponse.
type GitHubOAuthProperties ¶
type GitHubOAuthProperties struct { // user making request Username *string `json:"username,omitempty"` }
GitHubOAuthProperties - The response from List GitHubOAuth operation.
func (GitHubOAuthProperties) MarshalJSON ¶
func (g GitHubOAuthProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GitHubOAuthProperties.
func (*GitHubOAuthProperties) UnmarshalJSON ¶
func (g *GitHubOAuthProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GitHubOAuthProperties.
type GitHubOAuthResponse ¶
type GitHubOAuthResponse struct { // Properties of a workflow. Properties *GitHubOAuthProperties `json:"properties,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
GitHubOAuthResponse - Singleton response of GitHubOAuth containing
func (GitHubOAuthResponse) MarshalJSON ¶
func (g GitHubOAuthResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GitHubOAuthResponse.
func (*GitHubOAuthResponse) UnmarshalJSON ¶
func (g *GitHubOAuthResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GitHubOAuthResponse.
type GitHubWorkflowProfile ¶
type GitHubWorkflowProfile struct { // Information on the azure container registry Acr *ACR `json:"acr,omitempty"` // The Azure Kubernetes Cluster Resource the application will be deployed to. AksResourceID *string `json:"aksResourceId,omitempty"` // Determines the type of manifests within the repository. AuthStatus *ManifestType `json:"authStatus,omitempty"` // Repository Branch Name BranchName *string `json:"branchName,omitempty"` DeploymentProperties *DeploymentProperties `json:"deploymentProperties,omitempty"` // Path to Dockerfile Build Context within the repository. DockerBuildContext *string `json:"dockerBuildContext,omitempty"` // Path to the Dockerfile within the repository. Dockerfile *string `json:"dockerfile,omitempty"` LastWorkflowRun *WorkflowRun `json:"lastWorkflowRun,omitempty"` // Kubernetes namespace the application is deployed to. Namespace *string `json:"namespace,omitempty"` // The fields needed for OIDC with GitHub. OidcCredentials *GitHubWorkflowProfileOidcCredentials `json:"oidcCredentials,omitempty"` // Repository Name RepositoryName *string `json:"repositoryName,omitempty"` // Repository Owner RepositoryOwner *string `json:"repositoryOwner,omitempty"` // READ-ONLY; The status of the Pull Request submitted against the users repository. PrStatus *PullRequestStatus `json:"prStatus,omitempty" azure:"ro"` // READ-ONLY; The URL to the Pull Request submitted against the users repository. PrURL *string `json:"prURL,omitempty" azure:"ro"` // READ-ONLY; The number associated with the submitted pull request. PullNumber *int32 `json:"pullNumber,omitempty" azure:"ro"` }
GitHubWorkflowProfile - GitHub Workflow Profile
func (GitHubWorkflowProfile) MarshalJSON ¶
func (g GitHubWorkflowProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GitHubWorkflowProfile.
func (*GitHubWorkflowProfile) UnmarshalJSON ¶
func (g *GitHubWorkflowProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GitHubWorkflowProfile.
type GitHubWorkflowProfileOidcCredentials ¶
type GitHubWorkflowProfileOidcCredentials struct { // Azure Application Client ID AzureClientID *string `json:"azureClientId,omitempty"` // Azure Directory (tenant) ID AzureTenantID *string `json:"azureTenantId,omitempty"` }
GitHubWorkflowProfileOidcCredentials - The fields needed for OIDC with GitHub.
func (GitHubWorkflowProfileOidcCredentials) MarshalJSON ¶
func (g GitHubWorkflowProfileOidcCredentials) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GitHubWorkflowProfileOidcCredentials.
func (*GitHubWorkflowProfileOidcCredentials) UnmarshalJSON ¶
func (g *GitHubWorkflowProfileOidcCredentials) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GitHubWorkflowProfileOidcCredentials.
type ManifestType ¶
type ManifestType string
ManifestType - Determines the type of manifests within the repository.
const ( // ManifestTypeHelm - Repositories using helm ManifestTypeHelm ManifestType = "helm" // ManifestTypeKube - Repositories using kubernetes manifests ManifestTypeKube ManifestType = "kube" )
func PossibleManifestTypeValues ¶
func PossibleManifestTypeValues() []ManifestType
PossibleManifestTypeValues returns the possible values for the ManifestType const type.
type Operation ¶
type Operation struct { // Localized display information for this particular operation. Display *OperationDisplay `json:"display,omitempty"` // READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. ActionType *ActionType `json:"actionType,omitempty" azure:"ro"` // READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane // operations. IsDataAction *bool `json:"isDataAction,omitempty" azure:"ro"` // READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", // "Microsoft.Compute/virtualMachines/capture/action" Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default // value is "user,system" Origin *Origin `json:"origin,omitempty" azure:"ro"` }
Operation - Details of a REST API operation, returned from the Resource Provider Operations API
func (Operation) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Operation.
type OperationDisplay ¶
type OperationDisplay struct { // READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views. Description *string `json:"description,omitempty" azure:"ro"` // READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual // Machine", "Restart Virtual Machine". Operation *string `json:"operation,omitempty" azure:"ro"` // READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft // Compute". Provider *string `json:"provider,omitempty" azure:"ro"` // READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job // Schedule Collections". Resource *string `json:"resource,omitempty" azure:"ro"` }
OperationDisplay - Localized display information for this particular operation.
func (OperationDisplay) MarshalJSON ¶
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶
func (o *OperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.
type OperationListResult ¶
type OperationListResult struct { // READ-ONLY; URL to get the next set of operation list results (if there are any). NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; List of operations supported by the resource provider Value []*Operation `json:"value,omitempty" azure:"ro"` }
OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
func (OperationListResult) MarshalJSON ¶
func (o OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationListResult.
func (*OperationListResult) UnmarshalJSON ¶
func (o *OperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.
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) List ¶
func (client *OperationsClient) List(ctx context.Context, options *OperationsClientListOptions) (OperationsClientListResponse, error)
List - Returns list of operations. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-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/developerhub/resource-manager/Microsoft.DevHub/preview/2022-04-01-preview/examples/Operation_List.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devhub/armdevhub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdevhub.NewOperationsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.List(ctx, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type OperationsClientListOptions ¶
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
type OperationsClientListResponse ¶
type OperationsClientListResponse struct {
OperationListResult
}
OperationsClientListResponse contains the response from method OperationsClient.List.
type Origin ¶
type Origin string
Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"
func PossibleOriginValues ¶
func PossibleOriginValues() []Origin
PossibleOriginValues returns the possible values for the Origin const type.
type PullRequestStatus ¶
type PullRequestStatus string
PullRequestStatus - The status of the Pull Request submitted against the users repository.
const ( // PullRequestStatusMerged - Pull Request merged into repository. PullRequestStatusMerged PullRequestStatus = "merged" // PullRequestStatusRemoved - Workflow no longer found within repository. PullRequestStatusRemoved PullRequestStatus = "removed" // PullRequestStatusSubmitted - Pull Request submitted to repository. PullRequestStatusSubmitted PullRequestStatus = "submitted" // PullRequestStatusUnknown - Pull Request state unknown. PullRequestStatusUnknown PullRequestStatus = "unknown" )
func PossiblePullRequestStatusValues ¶
func PossiblePullRequestStatusValues() []PullRequestStatus
PossiblePullRequestStatusValues returns the possible values for the PullRequestStatus const type.
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time `json:"createdAt,omitempty"` // The identity that created the resource. CreatedBy *string `json:"createdBy,omitempty"` // The type of identity that created the resource. CreatedByType *CreatedByType `json:"createdByType,omitempty"` // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` // The identity that last modified the resource. LastModifiedBy *string `json:"lastModifiedBy,omitempty"` // The type of identity that last modified the resource. LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` }
SystemData - Metadata pertaining to creation and last modification of the resource.
func (SystemData) MarshalJSON ¶
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.
type TagsObject ¶
TagsObject - Resource tags.
func (TagsObject) MarshalJSON ¶
func (t TagsObject) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TagsObject.
func (*TagsObject) UnmarshalJSON ¶
func (t *TagsObject) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TagsObject.
type Workflow ¶
type Workflow struct { // REQUIRED; The geo-location where the resource lives Location *string `json:"location,omitempty"` // Properties of a workflow. Properties *WorkflowProperties `json:"properties,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
Workflow - Resource representation of a workflow
func (Workflow) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Workflow.
func (*Workflow) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Workflow.
type WorkflowClient ¶
type WorkflowClient struct {
// contains filtered or unexported fields
}
WorkflowClient contains the methods for the Workflow group. Don't use this type directly, use NewWorkflowClient() instead.
func NewWorkflowClient ¶
func NewWorkflowClient(subscriptionID string, managedClusterResource *string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowClient, error)
NewWorkflowClient creates a new instance of WorkflowClient with the specified values. subscriptionID - The ID of the target subscription. managedClusterResource - The ManagedCluster resource associated with the workflows. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*WorkflowClient) CreateOrUpdate ¶
func (client *WorkflowClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workflowName string, parameters Workflow, options *WorkflowClientCreateOrUpdateOptions) (WorkflowClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates a workflow If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. workflowName - The name of the workflow resource. options - WorkflowClientCreateOrUpdateOptions contains the optional parameters for the WorkflowClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/developerhub/resource-manager/Microsoft.DevHub/preview/2022-04-01-preview/examples/Workflow_CreateOrUpdate.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/devhub/armdevhub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdevhub.NewWorkflowClient("subscriptionId1", nil, cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.CreateOrUpdate(ctx, "resourceGroup1", "workflow1", armdevhub.Workflow{ Location: to.Ptr("location1"), Tags: map[string]*string{ "appname": to.Ptr("testApp"), }, Properties: &armdevhub.WorkflowProperties{ GithubWorkflowProfile: &armdevhub.GitHubWorkflowProfile{ Acr: &armdevhub.ACR{ AcrRegistryName: to.Ptr("registry1"), AcrRepositoryName: to.Ptr("repo1"), AcrResourceGroup: to.Ptr("resourceGroup1"), AcrSubscriptionID: to.Ptr("subscriptionId1"), }, AksResourceID: to.Ptr("/subscriptions/subscriptionId1/resourcegroups/resourceGroup1/providers/Microsoft.ContainerService/managedClusters/cluster1"), BranchName: to.Ptr("branch1"), DeploymentProperties: &armdevhub.DeploymentProperties{ KubeManifestLocations: []*string{ to.Ptr("/src/manifests/")}, ManifestType: to.Ptr(armdevhub.ManifestTypeKube), Overrides: map[string]*string{ "key1": to.Ptr("value1"), }, }, DockerBuildContext: to.Ptr("repo1/src/"), Dockerfile: to.Ptr("repo1/images/Dockerfile"), OidcCredentials: &armdevhub.GitHubWorkflowProfileOidcCredentials{ AzureClientID: to.Ptr("12345678-3456-7890-5678-012345678901"), AzureTenantID: to.Ptr("66666666-3456-7890-5678-012345678901"), }, RepositoryName: to.Ptr("repo1"), RepositoryOwner: to.Ptr("owner1"), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*WorkflowClient) Delete ¶
func (client *WorkflowClient) Delete(ctx context.Context, resourceGroupName string, workflowName string, options *WorkflowClientDeleteOptions) (WorkflowClientDeleteResponse, error)
Delete - Deletes a workflow If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. workflowName - The name of the workflow resource. options - WorkflowClientDeleteOptions contains the optional parameters for the WorkflowClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/developerhub/resource-manager/Microsoft.DevHub/preview/2022-04-01-preview/examples/Workflow_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devhub/armdevhub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdevhub.NewWorkflowClient("subscriptionId1", nil, cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Delete(ctx, "resourceGroup1", "workflow1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*WorkflowClient) Get ¶
func (client *WorkflowClient) Get(ctx context.Context, resourceGroupName string, workflowName string, options *WorkflowClientGetOptions) (WorkflowClientGetResponse, error)
Get - Gets a workflow. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. workflowName - The name of the workflow resource. options - WorkflowClientGetOptions contains the optional parameters for the WorkflowClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/developerhub/resource-manager/Microsoft.DevHub/preview/2022-04-01-preview/examples/Workflow_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devhub/armdevhub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdevhub.NewWorkflowClient("subscriptionId1", nil, cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "resourceGroup1", "workflow1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*WorkflowClient) NewListByResourceGroupPager ¶
func (client *WorkflowClient) NewListByResourceGroupPager(resourceGroupName string, options *WorkflowClientListByResourceGroupOptions) *runtime.Pager[WorkflowClientListByResourceGroupResponse]
NewListByResourceGroupPager - Gets a list of workflows within a resource group. Generated from API version 2022-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. options - WorkflowClientListByResourceGroupOptions contains the optional parameters for the WorkflowClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/developerhub/resource-manager/Microsoft.DevHub/preview/2022-04-01-preview/examples/Workflow_ListByResourceGroup.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/devhub/armdevhub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdevhub.NewWorkflowClient("subscriptionId1", to.Ptr("/subscriptions/subscriptionId1/resourcegroups/resourceGroup1/providers/Microsoft.ContainerService/managedClusters/cluster1"), cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("resourceGroup1", 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 (*WorkflowClient) NewListPager ¶
func (client *WorkflowClient) NewListPager(options *WorkflowClientListOptions) *runtime.Pager[WorkflowClientListResponse]
NewListPager - Gets a list of workflows associated with the specified subscription. Generated from API version 2022-04-01-preview options - WorkflowClientListOptions contains the optional parameters for the WorkflowClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/developerhub/resource-manager/Microsoft.DevHub/preview/2022-04-01-preview/examples/Workflow_List.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devhub/armdevhub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdevhub.NewWorkflowClient("subscriptionId1", nil, 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:
func (*WorkflowClient) UpdateTags ¶
func (client *WorkflowClient) UpdateTags(ctx context.Context, resourceGroupName string, workflowName string, parameters TagsObject, options *WorkflowClientUpdateTagsOptions) (WorkflowClientUpdateTagsResponse, error)
UpdateTags - Updates tags on a workflow. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. workflowName - The name of the workflow resource. parameters - Parameters supplied to the Update Workflow Tags operation. options - WorkflowClientUpdateTagsOptions contains the optional parameters for the WorkflowClient.UpdateTags method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/developerhub/resource-manager/Microsoft.DevHub/preview/2022-04-01-preview/examples/Workflow_UpdateTags.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/devhub/armdevhub" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdevhub.NewWorkflowClient("subscriptionId1", nil, cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.UpdateTags(ctx, "resourceGroup1", "workflow1", armdevhub.TagsObject{ Tags: map[string]*string{ "promote": to.Ptr("false"), "resourceEnv": to.Ptr("testing"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type WorkflowClientCreateOrUpdateOptions ¶
type WorkflowClientCreateOrUpdateOptions struct { }
WorkflowClientCreateOrUpdateOptions contains the optional parameters for the WorkflowClient.CreateOrUpdate method.
type WorkflowClientCreateOrUpdateResponse ¶
type WorkflowClientCreateOrUpdateResponse struct {
Workflow
}
WorkflowClientCreateOrUpdateResponse contains the response from method WorkflowClient.CreateOrUpdate.
type WorkflowClientDeleteOptions ¶
type WorkflowClientDeleteOptions struct { }
WorkflowClientDeleteOptions contains the optional parameters for the WorkflowClient.Delete method.
type WorkflowClientDeleteResponse ¶
type WorkflowClientDeleteResponse struct {
DeleteWorkflowResponse
}
WorkflowClientDeleteResponse contains the response from method WorkflowClient.Delete.
type WorkflowClientGetOptions ¶
type WorkflowClientGetOptions struct { }
WorkflowClientGetOptions contains the optional parameters for the WorkflowClient.Get method.
type WorkflowClientGetResponse ¶
type WorkflowClientGetResponse struct {
Workflow
}
WorkflowClientGetResponse contains the response from method WorkflowClient.Get.
type WorkflowClientListByResourceGroupOptions ¶
type WorkflowClientListByResourceGroupOptions struct { }
WorkflowClientListByResourceGroupOptions contains the optional parameters for the WorkflowClient.ListByResourceGroup method.
type WorkflowClientListByResourceGroupResponse ¶
type WorkflowClientListByResourceGroupResponse struct {
WorkflowListResult
}
WorkflowClientListByResourceGroupResponse contains the response from method WorkflowClient.ListByResourceGroup.
type WorkflowClientListOptions ¶
type WorkflowClientListOptions struct { }
WorkflowClientListOptions contains the optional parameters for the WorkflowClient.List method.
type WorkflowClientListResponse ¶
type WorkflowClientListResponse struct {
WorkflowListResult
}
WorkflowClientListResponse contains the response from method WorkflowClient.List.
type WorkflowClientUpdateTagsOptions ¶
type WorkflowClientUpdateTagsOptions struct { }
WorkflowClientUpdateTagsOptions contains the optional parameters for the WorkflowClient.UpdateTags method.
type WorkflowClientUpdateTagsResponse ¶
type WorkflowClientUpdateTagsResponse struct {
Workflow
}
WorkflowClientUpdateTagsResponse contains the response from method WorkflowClient.UpdateTags.
type WorkflowListResult ¶
type WorkflowListResult struct { // The list of workflows. Value []*Workflow `json:"value,omitempty"` // READ-ONLY; The URL to the next set of workflow results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` }
WorkflowListResult - The response from List Workflows operation.
func (WorkflowListResult) MarshalJSON ¶
func (w WorkflowListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WorkflowListResult.
func (*WorkflowListResult) UnmarshalJSON ¶
func (w *WorkflowListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowListResult.
type WorkflowProperties ¶
type WorkflowProperties struct { // Profile of a github workflow. GithubWorkflowProfile *GitHubWorkflowProfile `json:"githubWorkflowProfile,omitempty"` }
WorkflowProperties - Workflow properties
func (WorkflowProperties) MarshalJSON ¶
func (w WorkflowProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WorkflowProperties.
func (*WorkflowProperties) UnmarshalJSON ¶
func (w *WorkflowProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowProperties.
type WorkflowRun ¶
type WorkflowRun struct { // READ-ONLY; The timestamp of the last workflow run. LastRunAt *time.Time `json:"lastRunAt,omitempty" azure:"ro"` // READ-ONLY; Describes if the workflow run succeeded. Succeeded *bool `json:"succeeded,omitempty" azure:"ro"` // READ-ONLY; URL to the run of the workflow. WorkflowRunURL *string `json:"workflowRunURL,omitempty" azure:"ro"` }
func (WorkflowRun) MarshalJSON ¶
func (w WorkflowRun) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WorkflowRun.
func (*WorkflowRun) UnmarshalJSON ¶
func (w *WorkflowRun) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowRun.