Documentation ¶
Index ¶
- type ActionType
- type ActionableRemediation
- type ActionableRemediationState
- type AuthorizationInfo
- type AutoDiscovery
- type AzureDevOpsConnector
- type AzureDevOpsConnectorClient
- func (client *AzureDevOpsConnectorClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, azureDevOpsConnectorName string, ...) (*runtime.Poller[AzureDevOpsConnectorClientCreateOrUpdateResponse], error)
- func (client *AzureDevOpsConnectorClient) BeginDelete(ctx context.Context, resourceGroupName string, azureDevOpsConnectorName string, ...) (*runtime.Poller[AzureDevOpsConnectorClientDeleteResponse], error)
- func (client *AzureDevOpsConnectorClient) BeginUpdate(ctx context.Context, resourceGroupName string, azureDevOpsConnectorName string, ...) (*runtime.Poller[AzureDevOpsConnectorClientUpdateResponse], error)
- func (client *AzureDevOpsConnectorClient) Get(ctx context.Context, resourceGroupName string, azureDevOpsConnectorName string, ...) (AzureDevOpsConnectorClientGetResponse, error)
- func (client *AzureDevOpsConnectorClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[AzureDevOpsConnectorClientListByResourceGroupResponse]
- func (client *AzureDevOpsConnectorClient) NewListBySubscriptionPager(options *AzureDevOpsConnectorClientListBySubscriptionOptions) *runtime.Pager[AzureDevOpsConnectorClientListBySubscriptionResponse]
- type AzureDevOpsConnectorClientBeginCreateOrUpdateOptions
- type AzureDevOpsConnectorClientBeginDeleteOptions
- type AzureDevOpsConnectorClientBeginUpdateOptions
- type AzureDevOpsConnectorClientCreateOrUpdateResponse
- type AzureDevOpsConnectorClientDeleteResponse
- type AzureDevOpsConnectorClientGetOptions
- type AzureDevOpsConnectorClientGetResponse
- type AzureDevOpsConnectorClientListByResourceGroupOptions
- type AzureDevOpsConnectorClientListByResourceGroupResponse
- type AzureDevOpsConnectorClientListBySubscriptionOptions
- type AzureDevOpsConnectorClientListBySubscriptionResponse
- type AzureDevOpsConnectorClientUpdateResponse
- type AzureDevOpsConnectorListResponse
- type AzureDevOpsConnectorProperties
- type AzureDevOpsConnectorStats
- type AzureDevOpsConnectorStatsClient
- type AzureDevOpsConnectorStatsClientGetOptions
- type AzureDevOpsConnectorStatsClientGetResponse
- type AzureDevOpsConnectorStatsListResponse
- type AzureDevOpsConnectorStatsProperties
- type AzureDevOpsOrg
- type AzureDevOpsOrgClient
- func (client *AzureDevOpsOrgClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, azureDevOpsConnectorName string, ...) (*runtime.Poller[AzureDevOpsOrgClientCreateOrUpdateResponse], error)
- func (client *AzureDevOpsOrgClient) BeginUpdate(ctx context.Context, resourceGroupName string, azureDevOpsConnectorName string, ...) (*runtime.Poller[AzureDevOpsOrgClientUpdateResponse], error)
- func (client *AzureDevOpsOrgClient) Get(ctx context.Context, resourceGroupName string, azureDevOpsConnectorName string, ...) (AzureDevOpsOrgClientGetResponse, error)
- func (client *AzureDevOpsOrgClient) NewListPager(resourceGroupName string, azureDevOpsConnectorName string, ...) *runtime.Pager[AzureDevOpsOrgClientListResponse]
- type AzureDevOpsOrgClientBeginCreateOrUpdateOptions
- type AzureDevOpsOrgClientBeginUpdateOptions
- type AzureDevOpsOrgClientCreateOrUpdateResponse
- type AzureDevOpsOrgClientGetOptions
- type AzureDevOpsOrgClientGetResponse
- type AzureDevOpsOrgClientListOptions
- type AzureDevOpsOrgClientListResponse
- type AzureDevOpsOrgClientUpdateResponse
- type AzureDevOpsOrgListResponse
- type AzureDevOpsOrgMetadata
- type AzureDevOpsOrgProperties
- type AzureDevOpsProject
- type AzureDevOpsProjectClient
- func (client *AzureDevOpsProjectClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, azureDevOpsConnectorName string, ...) (*runtime.Poller[AzureDevOpsProjectClientCreateOrUpdateResponse], error)
- func (client *AzureDevOpsProjectClient) BeginUpdate(ctx context.Context, resourceGroupName string, azureDevOpsConnectorName string, ...) (*runtime.Poller[AzureDevOpsProjectClientUpdateResponse], error)
- func (client *AzureDevOpsProjectClient) Get(ctx context.Context, resourceGroupName string, azureDevOpsConnectorName string, ...) (AzureDevOpsProjectClientGetResponse, error)
- func (client *AzureDevOpsProjectClient) NewListPager(resourceGroupName string, azureDevOpsConnectorName string, ...) *runtime.Pager[AzureDevOpsProjectClientListResponse]
- type AzureDevOpsProjectClientBeginCreateOrUpdateOptions
- type AzureDevOpsProjectClientBeginUpdateOptions
- type AzureDevOpsProjectClientCreateOrUpdateResponse
- type AzureDevOpsProjectClientGetOptions
- type AzureDevOpsProjectClientGetResponse
- type AzureDevOpsProjectClientListOptions
- type AzureDevOpsProjectClientListResponse
- type AzureDevOpsProjectClientUpdateResponse
- type AzureDevOpsProjectListResponse
- type AzureDevOpsProjectMetadata
- type AzureDevOpsProjectProperties
- type AzureDevOpsRepo
- type AzureDevOpsRepoClient
- func (client *AzureDevOpsRepoClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, azureDevOpsConnectorName string, ...) (*runtime.Poller[AzureDevOpsRepoClientCreateOrUpdateResponse], error)
- func (client *AzureDevOpsRepoClient) BeginUpdate(ctx context.Context, resourceGroupName string, azureDevOpsConnectorName string, ...) (*runtime.Poller[AzureDevOpsRepoClientUpdateResponse], error)
- func (client *AzureDevOpsRepoClient) Get(ctx context.Context, resourceGroupName string, azureDevOpsConnectorName string, ...) (AzureDevOpsRepoClientGetResponse, error)
- func (client *AzureDevOpsRepoClient) NewListByConnectorPager(resourceGroupName string, azureDevOpsConnectorName string, ...) *runtime.Pager[AzureDevOpsRepoClientListByConnectorResponse]
- func (client *AzureDevOpsRepoClient) NewListPager(resourceGroupName string, azureDevOpsConnectorName string, ...) *runtime.Pager[AzureDevOpsRepoClientListResponse]
- type AzureDevOpsRepoClientBeginCreateOrUpdateOptions
- type AzureDevOpsRepoClientBeginUpdateOptions
- type AzureDevOpsRepoClientCreateOrUpdateResponse
- type AzureDevOpsRepoClientGetOptions
- type AzureDevOpsRepoClientGetResponse
- type AzureDevOpsRepoClientListByConnectorOptions
- type AzureDevOpsRepoClientListByConnectorResponse
- type AzureDevOpsRepoClientListOptions
- type AzureDevOpsRepoClientListResponse
- type AzureDevOpsRepoClientUpdateResponse
- type AzureDevOpsRepoListResponse
- type AzureDevOpsRepoProperties
- type CreatedByType
- type GitHubConnector
- type GitHubConnectorClient
- func (client *GitHubConnectorClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, gitHubConnectorName string, ...) (*runtime.Poller[GitHubConnectorClientCreateOrUpdateResponse], error)
- func (client *GitHubConnectorClient) BeginDelete(ctx context.Context, resourceGroupName string, gitHubConnectorName string, ...) (*runtime.Poller[GitHubConnectorClientDeleteResponse], error)
- func (client *GitHubConnectorClient) BeginUpdate(ctx context.Context, resourceGroupName string, gitHubConnectorName string, ...) (*runtime.Poller[GitHubConnectorClientUpdateResponse], error)
- func (client *GitHubConnectorClient) Get(ctx context.Context, resourceGroupName string, gitHubConnectorName string, ...) (GitHubConnectorClientGetResponse, error)
- func (client *GitHubConnectorClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[GitHubConnectorClientListByResourceGroupResponse]
- func (client *GitHubConnectorClient) NewListBySubscriptionPager(options *GitHubConnectorClientListBySubscriptionOptions) *runtime.Pager[GitHubConnectorClientListBySubscriptionResponse]
- type GitHubConnectorClientBeginCreateOrUpdateOptions
- type GitHubConnectorClientBeginDeleteOptions
- type GitHubConnectorClientBeginUpdateOptions
- type GitHubConnectorClientCreateOrUpdateResponse
- type GitHubConnectorClientDeleteResponse
- type GitHubConnectorClientGetOptions
- type GitHubConnectorClientGetResponse
- type GitHubConnectorClientListByResourceGroupOptions
- type GitHubConnectorClientListByResourceGroupResponse
- type GitHubConnectorClientListBySubscriptionOptions
- type GitHubConnectorClientListBySubscriptionResponse
- type GitHubConnectorClientUpdateResponse
- type GitHubConnectorListResponse
- type GitHubConnectorProperties
- type GitHubConnectorStats
- type GitHubConnectorStatsClient
- type GitHubConnectorStatsClientGetOptions
- type GitHubConnectorStatsClientGetResponse
- type GitHubConnectorStatsListResponse
- type GitHubConnectorStatsProperties
- type GitHubOwner
- type GitHubOwnerClient
- func (client *GitHubOwnerClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, gitHubConnectorName string, ...) (*runtime.Poller[GitHubOwnerClientCreateOrUpdateResponse], error)
- func (client *GitHubOwnerClient) BeginUpdate(ctx context.Context, resourceGroupName string, gitHubConnectorName string, ...) (*runtime.Poller[GitHubOwnerClientUpdateResponse], error)
- func (client *GitHubOwnerClient) Get(ctx context.Context, resourceGroupName string, gitHubConnectorName string, ...) (GitHubOwnerClientGetResponse, error)
- func (client *GitHubOwnerClient) NewListPager(resourceGroupName string, gitHubConnectorName string, ...) *runtime.Pager[GitHubOwnerClientListResponse]
- type GitHubOwnerClientBeginCreateOrUpdateOptions
- type GitHubOwnerClientBeginUpdateOptions
- type GitHubOwnerClientCreateOrUpdateResponse
- type GitHubOwnerClientGetOptions
- type GitHubOwnerClientGetResponse
- type GitHubOwnerClientListOptions
- type GitHubOwnerClientListResponse
- type GitHubOwnerClientUpdateResponse
- type GitHubOwnerListResponse
- type GitHubOwnerProperties
- type GitHubRepo
- type GitHubRepoClient
- func (client *GitHubRepoClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, gitHubConnectorName string, ...) (*runtime.Poller[GitHubRepoClientCreateOrUpdateResponse], error)
- func (client *GitHubRepoClient) BeginUpdate(ctx context.Context, resourceGroupName string, gitHubConnectorName string, ...) (*runtime.Poller[GitHubRepoClientUpdateResponse], error)
- func (client *GitHubRepoClient) Get(ctx context.Context, resourceGroupName string, gitHubConnectorName string, ...) (GitHubRepoClientGetResponse, error)
- func (client *GitHubRepoClient) NewListByConnectorPager(resourceGroupName string, gitHubConnectorName string, ...) *runtime.Pager[GitHubRepoClientListByConnectorResponse]
- func (client *GitHubRepoClient) NewListPager(resourceGroupName string, gitHubConnectorName string, gitHubOwnerName string, ...) *runtime.Pager[GitHubRepoClientListResponse]
- type GitHubRepoClientBeginCreateOrUpdateOptions
- type GitHubRepoClientBeginUpdateOptions
- type GitHubRepoClientCreateOrUpdateResponse
- type GitHubRepoClientGetOptions
- type GitHubRepoClientGetResponse
- type GitHubRepoClientListByConnectorOptions
- type GitHubRepoClientListByConnectorResponse
- type GitHubRepoClientListOptions
- type GitHubRepoClientListResponse
- type GitHubRepoClientUpdateResponse
- type GitHubRepoListResponse
- type GitHubRepoProperties
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type Origin
- type ProvisioningState
- type RuleCategory
- type SystemData
- type TargetBranchConfiguration
Examples ¶
- AzureDevOpsConnectorClient.BeginCreateOrUpdate
- AzureDevOpsConnectorClient.BeginDelete
- AzureDevOpsConnectorClient.BeginUpdate
- AzureDevOpsConnectorClient.Get
- AzureDevOpsConnectorClient.NewListByResourceGroupPager
- AzureDevOpsConnectorClient.NewListBySubscriptionPager
- AzureDevOpsConnectorStatsClient.Get
- AzureDevOpsOrgClient.BeginCreateOrUpdate
- AzureDevOpsOrgClient.BeginUpdate
- AzureDevOpsOrgClient.Get
- AzureDevOpsOrgClient.NewListPager
- AzureDevOpsProjectClient.BeginCreateOrUpdate
- AzureDevOpsProjectClient.BeginUpdate
- AzureDevOpsProjectClient.Get
- AzureDevOpsProjectClient.NewListPager
- AzureDevOpsRepoClient.BeginCreateOrUpdate
- AzureDevOpsRepoClient.BeginUpdate
- AzureDevOpsRepoClient.Get
- AzureDevOpsRepoClient.NewListByConnectorPager
- AzureDevOpsRepoClient.NewListPager
- GitHubConnectorClient.BeginCreateOrUpdate
- GitHubConnectorClient.BeginDelete
- GitHubConnectorClient.BeginUpdate
- GitHubConnectorClient.Get
- GitHubConnectorClient.NewListByResourceGroupPager
- GitHubConnectorClient.NewListBySubscriptionPager
- GitHubConnectorStatsClient.Get
- GitHubOwnerClient.BeginCreateOrUpdate
- GitHubOwnerClient.BeginUpdate
- GitHubOwnerClient.Get
- GitHubOwnerClient.NewListPager
- GitHubRepoClient.BeginCreateOrUpdate
- GitHubRepoClient.BeginUpdate
- GitHubRepoClient.Get
- GitHubRepoClient.NewListByConnectorPager
- GitHubRepoClient.NewListPager
- OperationsClient.NewListPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 ActionableRemediation ¶
type ActionableRemediation struct { // Branch onboarding info. BranchConfiguration *TargetBranchConfiguration `json:"branchConfiguration,omitempty"` Categories []*RuleCategory `json:"categories,omitempty"` SeverityLevels []*string `json:"severityLevels,omitempty"` State *ActionableRemediationState `json:"state,omitempty"` }
func (ActionableRemediation) MarshalJSON ¶
func (a ActionableRemediation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ActionableRemediation.
func (*ActionableRemediation) UnmarshalJSON ¶
func (a *ActionableRemediation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ActionableRemediation.
type ActionableRemediationState ¶
type ActionableRemediationState string
const ( ActionableRemediationStateDisabled ActionableRemediationState = "Disabled" ActionableRemediationStateEnabled ActionableRemediationState = "Enabled" ActionableRemediationStateNone ActionableRemediationState = "None" )
func PossibleActionableRemediationStateValues ¶
func PossibleActionableRemediationStateValues() []ActionableRemediationState
PossibleActionableRemediationStateValues returns the possible values for the ActionableRemediationState const type.
type AuthorizationInfo ¶
type AuthorizationInfo struct { // Gets or sets one-time OAuth code to exchange for refresh and access tokens. Code *string `json:"code,omitempty"` }
func (AuthorizationInfo) MarshalJSON ¶
func (a AuthorizationInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AuthorizationInfo.
func (*AuthorizationInfo) UnmarshalJSON ¶
func (a *AuthorizationInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationInfo.
type AutoDiscovery ¶
type AutoDiscovery string
const ( AutoDiscoveryDisabled AutoDiscovery = "Disabled" AutoDiscoveryEnabled AutoDiscovery = "Enabled" )
func PossibleAutoDiscoveryValues ¶
func PossibleAutoDiscoveryValues() []AutoDiscovery
PossibleAutoDiscoveryValues returns the possible values for the AutoDiscovery const type.
type AzureDevOpsConnector ¶
type AzureDevOpsConnector struct { // REQUIRED; The geo-location where the resource lives Location *string `json:"location,omitempty"` Properties *AzureDevOpsConnectorProperties `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"` }
func (AzureDevOpsConnector) MarshalJSON ¶
func (a AzureDevOpsConnector) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureDevOpsConnector.
func (*AzureDevOpsConnector) UnmarshalJSON ¶
func (a *AzureDevOpsConnector) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsConnector.
type AzureDevOpsConnectorClient ¶
type AzureDevOpsConnectorClient struct {
// contains filtered or unexported fields
}
AzureDevOpsConnectorClient contains the methods for the AzureDevOpsConnector group. Don't use this type directly, use NewAzureDevOpsConnectorClient() instead.
func NewAzureDevOpsConnectorClient ¶
func NewAzureDevOpsConnectorClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AzureDevOpsConnectorClient, error)
NewAzureDevOpsConnectorClient creates a new instance of AzureDevOpsConnectorClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*AzureDevOpsConnectorClient) BeginCreateOrUpdate ¶
func (client *AzureDevOpsConnectorClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, azureDevOpsConnectorName string, azureDevOpsConnector AzureDevOpsConnector, options *AzureDevOpsConnectorClientBeginCreateOrUpdateOptions) (*runtime.Poller[AzureDevOpsConnectorClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates an Azure DevOps Connector. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. azureDevOpsConnectorName - Name of the AzureDevOps Connector. azureDevOpsConnector - Connector resource payload. options - AzureDevOpsConnectorClientBeginCreateOrUpdateOptions contains the optional parameters for the AzureDevOpsConnectorClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/AzureDevOpsConnectorCreateOrUpdate.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/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewAzureDevOpsConnectorClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, "westusrg", "testconnector", armsecuritydevops.AzureDevOpsConnector{ Location: to.Ptr("West US"), Properties: &armsecuritydevops.AzureDevOpsConnectorProperties{ Authorization: &armsecuritydevops.AuthorizationInfo{ Code: to.Ptr("00000000000000000000"), }, Orgs: []*armsecuritydevops.AzureDevOpsOrgMetadata{ { Name: to.Ptr("testOrg"), Projects: []*armsecuritydevops.AzureDevOpsProjectMetadata{ { Name: to.Ptr("testProject"), Repos: []*string{ to.Ptr("testRepo")}, }}, }}, }, }, 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 (*AzureDevOpsConnectorClient) BeginDelete ¶
func (client *AzureDevOpsConnectorClient) BeginDelete(ctx context.Context, resourceGroupName string, azureDevOpsConnectorName string, options *AzureDevOpsConnectorClientBeginDeleteOptions) (*runtime.Poller[AzureDevOpsConnectorClientDeleteResponse], error)
BeginDelete - Delete monitored AzureDevOps Connector details. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. azureDevOpsConnectorName - Name of the AzureDevOps Connector. options - AzureDevOpsConnectorClientBeginDeleteOptions contains the optional parameters for the AzureDevOpsConnectorClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/AzureDevOpsConnectorDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewAzureDevOpsConnectorClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "westusrg", "testconnector", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*AzureDevOpsConnectorClient) BeginUpdate ¶
func (client *AzureDevOpsConnectorClient) BeginUpdate(ctx context.Context, resourceGroupName string, azureDevOpsConnectorName string, azureDevOpsConnector AzureDevOpsConnector, options *AzureDevOpsConnectorClientBeginUpdateOptions) (*runtime.Poller[AzureDevOpsConnectorClientUpdateResponse], error)
BeginUpdate - Update monitored AzureDevOps Connector details. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. azureDevOpsConnectorName - Name of the AzureDevOps Connector. azureDevOpsConnector - Connector resource payload. options - AzureDevOpsConnectorClientBeginUpdateOptions contains the optional parameters for the AzureDevOpsConnectorClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/AzureDevOpsConnectorUpdate.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/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewAzureDevOpsConnectorClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdate(ctx, "westusrg", "testconnector", armsecuritydevops.AzureDevOpsConnector{ Location: to.Ptr("West US"), Tags: map[string]*string{ "client": to.Ptr("dev-client"), "env": to.Ptr("dev"), }, }, 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 (*AzureDevOpsConnectorClient) Get ¶
func (client *AzureDevOpsConnectorClient) Get(ctx context.Context, resourceGroupName string, azureDevOpsConnectorName string, options *AzureDevOpsConnectorClientGetOptions) (AzureDevOpsConnectorClientGetResponse, error)
Get - Returns a monitored AzureDevOps Connector resource for a given ID. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. azureDevOpsConnectorName - Name of the AzureDevOps Connector. options - AzureDevOpsConnectorClientGetOptions contains the optional parameters for the AzureDevOpsConnectorClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/AzureDevOpsConnectorGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewAzureDevOpsConnectorClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "westusrg", "testconnector", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*AzureDevOpsConnectorClient) NewListByResourceGroupPager ¶
func (client *AzureDevOpsConnectorClient) NewListByResourceGroupPager(resourceGroupName string, options *AzureDevOpsConnectorClientListByResourceGroupOptions) *runtime.Pager[AzureDevOpsConnectorClientListByResourceGroupResponse]
resourceGroupName - The name of the resource group. The name is case insensitive. options - AzureDevOpsConnectorClientListByResourceGroupOptions contains the optional parameters for the AzureDevOpsConnectorClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/AzureDevOpsConnectorListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewAzureDevOpsConnectorClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("westusrg", 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 (*AzureDevOpsConnectorClient) NewListBySubscriptionPager ¶
func (client *AzureDevOpsConnectorClient) NewListBySubscriptionPager(options *AzureDevOpsConnectorClientListBySubscriptionOptions) *runtime.Pager[AzureDevOpsConnectorClientListBySubscriptionResponse]
NewListBySubscriptionPager - Returns a list of monitored AzureDevOps Connectors. Generated from API version 2022-09-01-preview options - AzureDevOpsConnectorClientListBySubscriptionOptions contains the optional parameters for the AzureDevOpsConnectorClient.ListBySubscription method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/AzureDevOpsConnectorListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewAzureDevOpsConnectorClient("00000000-0000-0000-0000-000000000000", 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:
type AzureDevOpsConnectorClientBeginCreateOrUpdateOptions ¶
type AzureDevOpsConnectorClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AzureDevOpsConnectorClientBeginCreateOrUpdateOptions contains the optional parameters for the AzureDevOpsConnectorClient.BeginCreateOrUpdate method.
type AzureDevOpsConnectorClientBeginDeleteOptions ¶
type AzureDevOpsConnectorClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AzureDevOpsConnectorClientBeginDeleteOptions contains the optional parameters for the AzureDevOpsConnectorClient.BeginDelete method.
type AzureDevOpsConnectorClientBeginUpdateOptions ¶
type AzureDevOpsConnectorClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AzureDevOpsConnectorClientBeginUpdateOptions contains the optional parameters for the AzureDevOpsConnectorClient.BeginUpdate method.
type AzureDevOpsConnectorClientCreateOrUpdateResponse ¶
type AzureDevOpsConnectorClientCreateOrUpdateResponse struct {
AzureDevOpsConnector
}
AzureDevOpsConnectorClientCreateOrUpdateResponse contains the response from method AzureDevOpsConnectorClient.CreateOrUpdate.
type AzureDevOpsConnectorClientDeleteResponse ¶
type AzureDevOpsConnectorClientDeleteResponse struct { }
AzureDevOpsConnectorClientDeleteResponse contains the response from method AzureDevOpsConnectorClient.Delete.
type AzureDevOpsConnectorClientGetOptions ¶
type AzureDevOpsConnectorClientGetOptions struct { }
AzureDevOpsConnectorClientGetOptions contains the optional parameters for the AzureDevOpsConnectorClient.Get method.
type AzureDevOpsConnectorClientGetResponse ¶
type AzureDevOpsConnectorClientGetResponse struct {
AzureDevOpsConnector
}
AzureDevOpsConnectorClientGetResponse contains the response from method AzureDevOpsConnectorClient.Get.
type AzureDevOpsConnectorClientListByResourceGroupOptions ¶
type AzureDevOpsConnectorClientListByResourceGroupOptions struct { }
AzureDevOpsConnectorClientListByResourceGroupOptions contains the optional parameters for the AzureDevOpsConnectorClient.ListByResourceGroup method.
type AzureDevOpsConnectorClientListByResourceGroupResponse ¶
type AzureDevOpsConnectorClientListByResourceGroupResponse struct {
AzureDevOpsConnectorListResponse
}
AzureDevOpsConnectorClientListByResourceGroupResponse contains the response from method AzureDevOpsConnectorClient.ListByResourceGroup.
type AzureDevOpsConnectorClientListBySubscriptionOptions ¶
type AzureDevOpsConnectorClientListBySubscriptionOptions struct { }
AzureDevOpsConnectorClientListBySubscriptionOptions contains the optional parameters for the AzureDevOpsConnectorClient.ListBySubscription method.
type AzureDevOpsConnectorClientListBySubscriptionResponse ¶
type AzureDevOpsConnectorClientListBySubscriptionResponse struct {
AzureDevOpsConnectorListResponse
}
AzureDevOpsConnectorClientListBySubscriptionResponse contains the response from method AzureDevOpsConnectorClient.ListBySubscription.
type AzureDevOpsConnectorClientUpdateResponse ¶
type AzureDevOpsConnectorClientUpdateResponse struct {
AzureDevOpsConnector
}
AzureDevOpsConnectorClientUpdateResponse contains the response from method AzureDevOpsConnectorClient.Update.
type AzureDevOpsConnectorListResponse ¶
type AzureDevOpsConnectorListResponse struct { // Gets or sets next link to scroll over the results. NextLink *string `json:"nextLink,omitempty"` // Gets or sets list of resources. Value []*AzureDevOpsConnector `json:"value,omitempty"` }
func (AzureDevOpsConnectorListResponse) MarshalJSON ¶
func (a AzureDevOpsConnectorListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureDevOpsConnectorListResponse.
func (*AzureDevOpsConnectorListResponse) UnmarshalJSON ¶
func (a *AzureDevOpsConnectorListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsConnectorListResponse.
type AzureDevOpsConnectorProperties ¶
type AzureDevOpsConnectorProperties struct { Authorization *AuthorizationInfo `json:"authorization,omitempty"` // Gets or sets org onboarding information. Orgs []*AzureDevOpsOrgMetadata `json:"orgs,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` }
func (AzureDevOpsConnectorProperties) MarshalJSON ¶
func (a AzureDevOpsConnectorProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureDevOpsConnectorProperties.
func (*AzureDevOpsConnectorProperties) UnmarshalJSON ¶
func (a *AzureDevOpsConnectorProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsConnectorProperties.
type AzureDevOpsConnectorStats ¶
type AzureDevOpsConnectorStats struct { Properties *AzureDevOpsConnectorStatsProperties `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"` }
func (AzureDevOpsConnectorStats) MarshalJSON ¶
func (a AzureDevOpsConnectorStats) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureDevOpsConnectorStats.
func (*AzureDevOpsConnectorStats) UnmarshalJSON ¶
func (a *AzureDevOpsConnectorStats) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsConnectorStats.
type AzureDevOpsConnectorStatsClient ¶
type AzureDevOpsConnectorStatsClient struct {
// contains filtered or unexported fields
}
AzureDevOpsConnectorStatsClient contains the methods for the AzureDevOpsConnectorStats group. Don't use this type directly, use NewAzureDevOpsConnectorStatsClient() instead.
func NewAzureDevOpsConnectorStatsClient ¶
func NewAzureDevOpsConnectorStatsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AzureDevOpsConnectorStatsClient, error)
NewAzureDevOpsConnectorStatsClient creates a new instance of AzureDevOpsConnectorStatsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*AzureDevOpsConnectorStatsClient) Get ¶
func (client *AzureDevOpsConnectorStatsClient) Get(ctx context.Context, resourceGroupName string, azureDevOpsConnectorName string, options *AzureDevOpsConnectorStatsClientGetOptions) (AzureDevOpsConnectorStatsClientGetResponse, error)
Get - Returns the summary of the AzureDevOps Connector Stats. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. azureDevOpsConnectorName - Name of the AzureDevOps Connector. options - AzureDevOpsConnectorStatsClientGetOptions contains the optional parameters for the AzureDevOpsConnectorStatsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/AzureDevOpsConnectorStatsGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewAzureDevOpsConnectorStatsClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "westusrg", "testconnector", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type AzureDevOpsConnectorStatsClientGetOptions ¶
type AzureDevOpsConnectorStatsClientGetOptions struct { }
AzureDevOpsConnectorStatsClientGetOptions contains the optional parameters for the AzureDevOpsConnectorStatsClient.Get method.
type AzureDevOpsConnectorStatsClientGetResponse ¶
type AzureDevOpsConnectorStatsClientGetResponse struct {
AzureDevOpsConnectorStatsListResponse
}
AzureDevOpsConnectorStatsClientGetResponse contains the response from method AzureDevOpsConnectorStatsClient.Get.
type AzureDevOpsConnectorStatsListResponse ¶
type AzureDevOpsConnectorStatsListResponse struct { // Gets or sets next link to scroll over the results. NextLink *string `json:"nextLink,omitempty"` // Gets or sets list of resources. Value []*AzureDevOpsConnectorStats `json:"value,omitempty"` }
func (AzureDevOpsConnectorStatsListResponse) MarshalJSON ¶
func (a AzureDevOpsConnectorStatsListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureDevOpsConnectorStatsListResponse.
func (*AzureDevOpsConnectorStatsListResponse) UnmarshalJSON ¶
func (a *AzureDevOpsConnectorStatsListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsConnectorStatsListResponse.
type AzureDevOpsConnectorStatsProperties ¶
type AzureDevOpsConnectorStatsProperties struct { // Gets or sets orgs count. OrgsCount *int64 `json:"orgsCount,omitempty"` // Gets or sets projects count. ProjectsCount *int64 `json:"projectsCount,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` // Gets or sets repos count. ReposCount *int64 `json:"reposCount,omitempty"` }
func (AzureDevOpsConnectorStatsProperties) MarshalJSON ¶
func (a AzureDevOpsConnectorStatsProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureDevOpsConnectorStatsProperties.
func (*AzureDevOpsConnectorStatsProperties) UnmarshalJSON ¶
func (a *AzureDevOpsConnectorStatsProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsConnectorStatsProperties.
type AzureDevOpsOrg ¶
type AzureDevOpsOrg struct { // AzureDevOps Org properties. Properties *AzureDevOpsOrgProperties `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"` }
AzureDevOpsOrg - Azure DevOps Org Proxy Resource.
func (AzureDevOpsOrg) MarshalJSON ¶
func (a AzureDevOpsOrg) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureDevOpsOrg.
func (*AzureDevOpsOrg) UnmarshalJSON ¶
func (a *AzureDevOpsOrg) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsOrg.
type AzureDevOpsOrgClient ¶
type AzureDevOpsOrgClient struct {
// contains filtered or unexported fields
}
AzureDevOpsOrgClient contains the methods for the AzureDevOpsOrg group. Don't use this type directly, use NewAzureDevOpsOrgClient() instead.
func NewAzureDevOpsOrgClient ¶
func NewAzureDevOpsOrgClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AzureDevOpsOrgClient, error)
NewAzureDevOpsOrgClient creates a new instance of AzureDevOpsOrgClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*AzureDevOpsOrgClient) BeginCreateOrUpdate ¶
func (client *AzureDevOpsOrgClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, azureDevOpsConnectorName string, azureDevOpsOrgName string, azureDevOpsOrg AzureDevOpsOrg, options *AzureDevOpsOrgClientBeginCreateOrUpdateOptions) (*runtime.Poller[AzureDevOpsOrgClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates an Azure DevOps Org. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. azureDevOpsConnectorName - Name of the AzureDevOps Connector. azureDevOpsOrgName - Name of the AzureDevOps Org. azureDevOpsOrg - Azure DevOps Org resource payload. options - AzureDevOpsOrgClientBeginCreateOrUpdateOptions contains the optional parameters for the AzureDevOpsOrgClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/AzureDevOpsOrgCreateOrUpdate.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/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewAzureDevOpsOrgClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, "westusrg", "testconnector", "myOrg", armsecuritydevops.AzureDevOpsOrg{ Properties: &armsecuritydevops.AzureDevOpsOrgProperties{ AutoDiscovery: to.Ptr(armsecuritydevops.AutoDiscoveryDisabled), }, }, 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 (*AzureDevOpsOrgClient) BeginUpdate ¶
func (client *AzureDevOpsOrgClient) BeginUpdate(ctx context.Context, resourceGroupName string, azureDevOpsConnectorName string, azureDevOpsOrgName string, azureDevOpsOrg AzureDevOpsOrg, options *AzureDevOpsOrgClientBeginUpdateOptions) (*runtime.Poller[AzureDevOpsOrgClientUpdateResponse], error)
BeginUpdate - Update monitored AzureDevOps Org details. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. azureDevOpsConnectorName - Name of the AzureDevOps Connector. azureDevOpsOrgName - Name of the AzureDevOps Org. azureDevOpsOrg - Azure DevOps Org resource payload. options - AzureDevOpsOrgClientBeginUpdateOptions contains the optional parameters for the AzureDevOpsOrgClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/AzureDevOpsOrgUpdate.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/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewAzureDevOpsOrgClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdate(ctx, "westusrg", "testconnector", "myOrg", armsecuritydevops.AzureDevOpsOrg{ Properties: &armsecuritydevops.AzureDevOpsOrgProperties{ AutoDiscovery: to.Ptr(armsecuritydevops.AutoDiscoveryDisabled), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*AzureDevOpsOrgClient) Get ¶
func (client *AzureDevOpsOrgClient) Get(ctx context.Context, resourceGroupName string, azureDevOpsConnectorName string, azureDevOpsOrgName string, options *AzureDevOpsOrgClientGetOptions) (AzureDevOpsOrgClientGetResponse, error)
Get - Returns a monitored AzureDevOps Org resource for a given ID. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. azureDevOpsConnectorName - Name of the AzureDevOps Connector. azureDevOpsOrgName - Name of the AzureDevOps Org. options - AzureDevOpsOrgClientGetOptions contains the optional parameters for the AzureDevOpsOrgClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/AzureDevOpsOrgGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewAzureDevOpsOrgClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "westusrg", "testconnector", "myOrg", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*AzureDevOpsOrgClient) NewListPager ¶
func (client *AzureDevOpsOrgClient) NewListPager(resourceGroupName string, azureDevOpsConnectorName string, options *AzureDevOpsOrgClientListOptions) *runtime.Pager[AzureDevOpsOrgClientListResponse]
resourceGroupName - The name of the resource group. The name is case insensitive. azureDevOpsConnectorName - Name of the AzureDevOps Connector. options - AzureDevOpsOrgClientListOptions contains the optional parameters for the AzureDevOpsOrgClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/AzureDevOpsOrgList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewAzureDevOpsOrgClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager("westusrg", "testconnector", 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 AzureDevOpsOrgClientBeginCreateOrUpdateOptions ¶
type AzureDevOpsOrgClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AzureDevOpsOrgClientBeginCreateOrUpdateOptions contains the optional parameters for the AzureDevOpsOrgClient.BeginCreateOrUpdate method.
type AzureDevOpsOrgClientBeginUpdateOptions ¶
type AzureDevOpsOrgClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AzureDevOpsOrgClientBeginUpdateOptions contains the optional parameters for the AzureDevOpsOrgClient.BeginUpdate method.
type AzureDevOpsOrgClientCreateOrUpdateResponse ¶
type AzureDevOpsOrgClientCreateOrUpdateResponse struct {
AzureDevOpsOrg
}
AzureDevOpsOrgClientCreateOrUpdateResponse contains the response from method AzureDevOpsOrgClient.CreateOrUpdate.
type AzureDevOpsOrgClientGetOptions ¶
type AzureDevOpsOrgClientGetOptions struct { }
AzureDevOpsOrgClientGetOptions contains the optional parameters for the AzureDevOpsOrgClient.Get method.
type AzureDevOpsOrgClientGetResponse ¶
type AzureDevOpsOrgClientGetResponse struct {
AzureDevOpsOrg
}
AzureDevOpsOrgClientGetResponse contains the response from method AzureDevOpsOrgClient.Get.
type AzureDevOpsOrgClientListOptions ¶
type AzureDevOpsOrgClientListOptions struct { }
AzureDevOpsOrgClientListOptions contains the optional parameters for the AzureDevOpsOrgClient.List method.
type AzureDevOpsOrgClientListResponse ¶
type AzureDevOpsOrgClientListResponse struct {
AzureDevOpsOrgListResponse
}
AzureDevOpsOrgClientListResponse contains the response from method AzureDevOpsOrgClient.List.
type AzureDevOpsOrgClientUpdateResponse ¶
type AzureDevOpsOrgClientUpdateResponse struct {
AzureDevOpsOrg
}
AzureDevOpsOrgClientUpdateResponse contains the response from method AzureDevOpsOrgClient.Update.
type AzureDevOpsOrgListResponse ¶
type AzureDevOpsOrgListResponse struct { // Gets or sets next link to scroll over the results. NextLink *string `json:"nextLink,omitempty"` // Gets or sets list of resources. Value []*AzureDevOpsOrg `json:"value,omitempty"` }
func (AzureDevOpsOrgListResponse) MarshalJSON ¶
func (a AzureDevOpsOrgListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureDevOpsOrgListResponse.
func (*AzureDevOpsOrgListResponse) UnmarshalJSON ¶
func (a *AzureDevOpsOrgListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsOrgListResponse.
type AzureDevOpsOrgMetadata ¶
type AzureDevOpsOrgMetadata struct { AutoDiscovery *AutoDiscovery `json:"autoDiscovery,omitempty"` // Gets or sets name of the AzureDevOps Org. Name *string `json:"name,omitempty"` Projects []*AzureDevOpsProjectMetadata `json:"projects,omitempty"` }
AzureDevOpsOrgMetadata - Org onboarding info.
func (AzureDevOpsOrgMetadata) MarshalJSON ¶
func (a AzureDevOpsOrgMetadata) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureDevOpsOrgMetadata.
func (*AzureDevOpsOrgMetadata) UnmarshalJSON ¶
func (a *AzureDevOpsOrgMetadata) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsOrgMetadata.
type AzureDevOpsOrgProperties ¶
type AzureDevOpsOrgProperties struct { AutoDiscovery *AutoDiscovery `json:"autoDiscovery,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` }
AzureDevOpsOrgProperties - AzureDevOps Org properties.
func (AzureDevOpsOrgProperties) MarshalJSON ¶
func (a AzureDevOpsOrgProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureDevOpsOrgProperties.
func (*AzureDevOpsOrgProperties) UnmarshalJSON ¶
func (a *AzureDevOpsOrgProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsOrgProperties.
type AzureDevOpsProject ¶
type AzureDevOpsProject struct { // AzureDevOps Project properties. Properties *AzureDevOpsProjectProperties `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"` }
AzureDevOpsProject - Azure DevOps Project Proxy Resource.
func (AzureDevOpsProject) MarshalJSON ¶
func (a AzureDevOpsProject) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureDevOpsProject.
func (*AzureDevOpsProject) UnmarshalJSON ¶
func (a *AzureDevOpsProject) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsProject.
type AzureDevOpsProjectClient ¶
type AzureDevOpsProjectClient struct {
// contains filtered or unexported fields
}
AzureDevOpsProjectClient contains the methods for the AzureDevOpsProject group. Don't use this type directly, use NewAzureDevOpsProjectClient() instead.
func NewAzureDevOpsProjectClient ¶
func NewAzureDevOpsProjectClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AzureDevOpsProjectClient, error)
NewAzureDevOpsProjectClient creates a new instance of AzureDevOpsProjectClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*AzureDevOpsProjectClient) BeginCreateOrUpdate ¶
func (client *AzureDevOpsProjectClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, azureDevOpsConnectorName string, azureDevOpsOrgName string, azureDevOpsProjectName string, azureDevOpsProject AzureDevOpsProject, options *AzureDevOpsProjectClientBeginCreateOrUpdateOptions) (*runtime.Poller[AzureDevOpsProjectClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates an Azure DevOps Project. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. azureDevOpsConnectorName - Name of the AzureDevOps Connector. azureDevOpsOrgName - Name of the AzureDevOps Org. azureDevOpsProjectName - Name of the AzureDevOps Project. azureDevOpsProject - Azure DevOps Org resource payload. options - AzureDevOpsProjectClientBeginCreateOrUpdateOptions contains the optional parameters for the AzureDevOpsProjectClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/AzureDevOpsProjectCreateOrUpdate.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/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewAzureDevOpsProjectClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, "westusrg", "testconnector", "myOrg", "myProject", armsecuritydevops.AzureDevOpsProject{ Properties: &armsecuritydevops.AzureDevOpsProjectProperties{ AutoDiscovery: to.Ptr(armsecuritydevops.AutoDiscoveryDisabled), }, }, 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 (*AzureDevOpsProjectClient) BeginUpdate ¶
func (client *AzureDevOpsProjectClient) BeginUpdate(ctx context.Context, resourceGroupName string, azureDevOpsConnectorName string, azureDevOpsOrgName string, azureDevOpsProjectName string, azureDevOpsProject AzureDevOpsProject, options *AzureDevOpsProjectClientBeginUpdateOptions) (*runtime.Poller[AzureDevOpsProjectClientUpdateResponse], error)
BeginUpdate - Update monitored AzureDevOps Project details. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. azureDevOpsConnectorName - Name of the AzureDevOps Connector. azureDevOpsOrgName - Name of the AzureDevOps Org. azureDevOpsProjectName - Name of the AzureDevOps Project. azureDevOpsProject - Azure DevOps Org resource payload. options - AzureDevOpsProjectClientBeginUpdateOptions contains the optional parameters for the AzureDevOpsProjectClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/AzureDevOpsProjectUpdate.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/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewAzureDevOpsProjectClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdate(ctx, "westusrg", "testconnector", "myOrg", "myProject", armsecuritydevops.AzureDevOpsProject{ Properties: &armsecuritydevops.AzureDevOpsProjectProperties{ AutoDiscovery: to.Ptr(armsecuritydevops.AutoDiscoveryDisabled), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*AzureDevOpsProjectClient) Get ¶
func (client *AzureDevOpsProjectClient) Get(ctx context.Context, resourceGroupName string, azureDevOpsConnectorName string, azureDevOpsOrgName string, azureDevOpsProjectName string, options *AzureDevOpsProjectClientGetOptions) (AzureDevOpsProjectClientGetResponse, error)
Get - Returns a monitored AzureDevOps Project resource for a given ID. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. azureDevOpsConnectorName - Name of the AzureDevOps Connector. azureDevOpsOrgName - Name of the AzureDevOps Org. azureDevOpsProjectName - Name of the AzureDevOps Project. options - AzureDevOpsProjectClientGetOptions contains the optional parameters for the AzureDevOpsProjectClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/AzureDevOpsProjectGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewAzureDevOpsProjectClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "westusrg", "testconnector", "myOrg", "myProject", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*AzureDevOpsProjectClient) NewListPager ¶
func (client *AzureDevOpsProjectClient) NewListPager(resourceGroupName string, azureDevOpsConnectorName string, azureDevOpsOrgName string, options *AzureDevOpsProjectClientListOptions) *runtime.Pager[AzureDevOpsProjectClientListResponse]
resourceGroupName - The name of the resource group. The name is case insensitive. azureDevOpsConnectorName - Name of the AzureDevOps Connector. azureDevOpsOrgName - Name of the AzureDevOps Org. options - AzureDevOpsProjectClientListOptions contains the optional parameters for the AzureDevOpsProjectClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/AzureDevOpsProjectList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewAzureDevOpsProjectClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager("westusrg", "testconnector", "myOrg", 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 AzureDevOpsProjectClientBeginCreateOrUpdateOptions ¶
type AzureDevOpsProjectClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AzureDevOpsProjectClientBeginCreateOrUpdateOptions contains the optional parameters for the AzureDevOpsProjectClient.BeginCreateOrUpdate method.
type AzureDevOpsProjectClientBeginUpdateOptions ¶
type AzureDevOpsProjectClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AzureDevOpsProjectClientBeginUpdateOptions contains the optional parameters for the AzureDevOpsProjectClient.BeginUpdate method.
type AzureDevOpsProjectClientCreateOrUpdateResponse ¶
type AzureDevOpsProjectClientCreateOrUpdateResponse struct {
AzureDevOpsProject
}
AzureDevOpsProjectClientCreateOrUpdateResponse contains the response from method AzureDevOpsProjectClient.CreateOrUpdate.
type AzureDevOpsProjectClientGetOptions ¶
type AzureDevOpsProjectClientGetOptions struct { }
AzureDevOpsProjectClientGetOptions contains the optional parameters for the AzureDevOpsProjectClient.Get method.
type AzureDevOpsProjectClientGetResponse ¶
type AzureDevOpsProjectClientGetResponse struct {
AzureDevOpsProject
}
AzureDevOpsProjectClientGetResponse contains the response from method AzureDevOpsProjectClient.Get.
type AzureDevOpsProjectClientListOptions ¶
type AzureDevOpsProjectClientListOptions struct { }
AzureDevOpsProjectClientListOptions contains the optional parameters for the AzureDevOpsProjectClient.List method.
type AzureDevOpsProjectClientListResponse ¶
type AzureDevOpsProjectClientListResponse struct {
AzureDevOpsProjectListResponse
}
AzureDevOpsProjectClientListResponse contains the response from method AzureDevOpsProjectClient.List.
type AzureDevOpsProjectClientUpdateResponse ¶
type AzureDevOpsProjectClientUpdateResponse struct {
AzureDevOpsProject
}
AzureDevOpsProjectClientUpdateResponse contains the response from method AzureDevOpsProjectClient.Update.
type AzureDevOpsProjectListResponse ¶
type AzureDevOpsProjectListResponse struct { // Gets or sets next link to scroll over the results. NextLink *string `json:"nextLink,omitempty"` // Gets or sets list of resources. Value []*AzureDevOpsProject `json:"value,omitempty"` }
func (AzureDevOpsProjectListResponse) MarshalJSON ¶
func (a AzureDevOpsProjectListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureDevOpsProjectListResponse.
func (*AzureDevOpsProjectListResponse) UnmarshalJSON ¶
func (a *AzureDevOpsProjectListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsProjectListResponse.
type AzureDevOpsProjectMetadata ¶
type AzureDevOpsProjectMetadata struct { AutoDiscovery *AutoDiscovery `json:"autoDiscovery,omitempty"` // Gets or sets name of the AzureDevOps Project. Name *string `json:"name,omitempty"` // Gets or sets repositories. Repos []*string `json:"repos,omitempty"` }
AzureDevOpsProjectMetadata - Project onboarding info.
func (AzureDevOpsProjectMetadata) MarshalJSON ¶
func (a AzureDevOpsProjectMetadata) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureDevOpsProjectMetadata.
func (*AzureDevOpsProjectMetadata) UnmarshalJSON ¶
func (a *AzureDevOpsProjectMetadata) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsProjectMetadata.
type AzureDevOpsProjectProperties ¶
type AzureDevOpsProjectProperties struct { AutoDiscovery *AutoDiscovery `json:"autoDiscovery,omitempty"` // Gets or sets AzureDevOps Org Name. OrgName *string `json:"orgName,omitempty"` // Gets or sets AzureDevOps Project Id. ProjectID *string `json:"projectId,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` }
AzureDevOpsProjectProperties - AzureDevOps Project properties.
func (AzureDevOpsProjectProperties) MarshalJSON ¶
func (a AzureDevOpsProjectProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureDevOpsProjectProperties.
func (*AzureDevOpsProjectProperties) UnmarshalJSON ¶
func (a *AzureDevOpsProjectProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsProjectProperties.
type AzureDevOpsRepo ¶
type AzureDevOpsRepo struct { // AzureDevOps Repo properties. Properties *AzureDevOpsRepoProperties `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"` }
AzureDevOpsRepo - Azure DevOps Repo Proxy Resource.
func (AzureDevOpsRepo) MarshalJSON ¶
func (a AzureDevOpsRepo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureDevOpsRepo.
func (*AzureDevOpsRepo) UnmarshalJSON ¶
func (a *AzureDevOpsRepo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsRepo.
type AzureDevOpsRepoClient ¶
type AzureDevOpsRepoClient struct {
// contains filtered or unexported fields
}
AzureDevOpsRepoClient contains the methods for the AzureDevOpsRepo group. Don't use this type directly, use NewAzureDevOpsRepoClient() instead.
func NewAzureDevOpsRepoClient ¶
func NewAzureDevOpsRepoClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AzureDevOpsRepoClient, error)
NewAzureDevOpsRepoClient creates a new instance of AzureDevOpsRepoClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*AzureDevOpsRepoClient) BeginCreateOrUpdate ¶
func (client *AzureDevOpsRepoClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, azureDevOpsConnectorName string, azureDevOpsOrgName string, azureDevOpsProjectName string, azureDevOpsRepoName string, azureDevOpsRepo AzureDevOpsRepo, options *AzureDevOpsRepoClientBeginCreateOrUpdateOptions) (*runtime.Poller[AzureDevOpsRepoClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Updates an Azure DevOps Repo. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. azureDevOpsConnectorName - Name of the AzureDevOps Connector. azureDevOpsOrgName - Name of the AzureDevOps Org. azureDevOpsProjectName - Name of the AzureDevOps Project. azureDevOpsRepoName - Name of the AzureDevOps Repo. azureDevOpsRepo - Azure DevOps Repo resource payload. options - AzureDevOpsRepoClientBeginCreateOrUpdateOptions contains the optional parameters for the AzureDevOpsRepoClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/AzureDevOpsRepoCreateOrUpdate.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/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewAzureDevOpsRepoClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, "westusrg", "testconnector", "myOrg", "myProject", "myRepo", armsecuritydevops.AzureDevOpsRepo{ Properties: &armsecuritydevops.AzureDevOpsRepoProperties{ ActionableRemediation: &armsecuritydevops.ActionableRemediation{ BranchConfiguration: &armsecuritydevops.TargetBranchConfiguration{ Names: []*string{ to.Ptr("main")}, }, Categories: []*armsecuritydevops.RuleCategory{ to.Ptr(armsecuritydevops.RuleCategorySecrets)}, SeverityLevels: []*string{ to.Ptr("High")}, State: to.Ptr(armsecuritydevops.ActionableRemediationStateEnabled), }, RepoID: to.Ptr("00000000-0000-0000-0000-000000000000"), RepoURL: to.Ptr("https://dev.azure.com/myOrg/myProject/_git/myRepo"), }, }, 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 (*AzureDevOpsRepoClient) BeginUpdate ¶
func (client *AzureDevOpsRepoClient) BeginUpdate(ctx context.Context, resourceGroupName string, azureDevOpsConnectorName string, azureDevOpsOrgName string, azureDevOpsProjectName string, azureDevOpsRepoName string, azureDevOpsRepo AzureDevOpsRepo, options *AzureDevOpsRepoClientBeginUpdateOptions) (*runtime.Poller[AzureDevOpsRepoClientUpdateResponse], error)
BeginUpdate - Update monitored AzureDevOps Project details. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. azureDevOpsConnectorName - Name of the AzureDevOps Connector. azureDevOpsOrgName - Name of the AzureDevOps Org. azureDevOpsProjectName - Name of the AzureDevOps Project. azureDevOpsRepoName - Name of the AzureDevOps Repo. azureDevOpsRepo - Azure DevOps Org resource payload. options - AzureDevOpsRepoClientBeginUpdateOptions contains the optional parameters for the AzureDevOpsRepoClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/AzureDevOpsRepoUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewAzureDevOpsRepoClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdate(ctx, "westusrg", "testconnector", "myOrg", "myProject", "myRepo", armsecuritydevops.AzureDevOpsRepo{}, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*AzureDevOpsRepoClient) Get ¶
func (client *AzureDevOpsRepoClient) Get(ctx context.Context, resourceGroupName string, azureDevOpsConnectorName string, azureDevOpsOrgName string, azureDevOpsProjectName string, azureDevOpsRepoName string, options *AzureDevOpsRepoClientGetOptions) (AzureDevOpsRepoClientGetResponse, error)
Get - Returns a monitored AzureDevOps Project resource for a given ID. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. azureDevOpsConnectorName - Name of the AzureDevOps Connector. azureDevOpsOrgName - Name of the AzureDevOps Org. azureDevOpsProjectName - Name of the AzureDevOps Project. azureDevOpsRepoName - Name of the AzureDevOps Repo. options - AzureDevOpsRepoClientGetOptions contains the optional parameters for the AzureDevOpsRepoClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/AzureDevOpsRepoGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewAzureDevOpsRepoClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "westusrg", "testconnector", "myOrg", "myProject", "myRepo", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*AzureDevOpsRepoClient) NewListByConnectorPager ¶
func (client *AzureDevOpsRepoClient) NewListByConnectorPager(resourceGroupName string, azureDevOpsConnectorName string, options *AzureDevOpsRepoClientListByConnectorOptions) *runtime.Pager[AzureDevOpsRepoClientListByConnectorResponse]
resourceGroupName - The name of the resource group. The name is case insensitive. azureDevOpsConnectorName - Name of the AzureDevOps Connector. options - AzureDevOpsRepoClientListByConnectorOptions contains the optional parameters for the AzureDevOpsRepoClient.ListByConnector method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/AzureDevOpsRepoListByConnector.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewAzureDevOpsRepoClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByConnectorPager("westusrg", "testconnector", 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 (*AzureDevOpsRepoClient) NewListPager ¶
func (client *AzureDevOpsRepoClient) NewListPager(resourceGroupName string, azureDevOpsConnectorName string, azureDevOpsOrgName string, azureDevOpsProjectName string, options *AzureDevOpsRepoClientListOptions) *runtime.Pager[AzureDevOpsRepoClientListResponse]
resourceGroupName - The name of the resource group. The name is case insensitive. azureDevOpsConnectorName - Name of the AzureDevOps Connector. azureDevOpsOrgName - Name of the AzureDevOps Org. azureDevOpsProjectName - Name of the AzureDevOps Project. options - AzureDevOpsRepoClientListOptions contains the optional parameters for the AzureDevOpsRepoClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/AzureDevOpsRepoList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewAzureDevOpsRepoClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager("westusrg", "testconnector", "myOrg", "myProject", 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 AzureDevOpsRepoClientBeginCreateOrUpdateOptions ¶
type AzureDevOpsRepoClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AzureDevOpsRepoClientBeginCreateOrUpdateOptions contains the optional parameters for the AzureDevOpsRepoClient.BeginCreateOrUpdate method.
type AzureDevOpsRepoClientBeginUpdateOptions ¶
type AzureDevOpsRepoClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AzureDevOpsRepoClientBeginUpdateOptions contains the optional parameters for the AzureDevOpsRepoClient.BeginUpdate method.
type AzureDevOpsRepoClientCreateOrUpdateResponse ¶
type AzureDevOpsRepoClientCreateOrUpdateResponse struct {
AzureDevOpsRepo
}
AzureDevOpsRepoClientCreateOrUpdateResponse contains the response from method AzureDevOpsRepoClient.CreateOrUpdate.
type AzureDevOpsRepoClientGetOptions ¶
type AzureDevOpsRepoClientGetOptions struct { }
AzureDevOpsRepoClientGetOptions contains the optional parameters for the AzureDevOpsRepoClient.Get method.
type AzureDevOpsRepoClientGetResponse ¶
type AzureDevOpsRepoClientGetResponse struct {
AzureDevOpsRepo
}
AzureDevOpsRepoClientGetResponse contains the response from method AzureDevOpsRepoClient.Get.
type AzureDevOpsRepoClientListByConnectorOptions ¶
type AzureDevOpsRepoClientListByConnectorOptions struct { }
AzureDevOpsRepoClientListByConnectorOptions contains the optional parameters for the AzureDevOpsRepoClient.ListByConnector method.
type AzureDevOpsRepoClientListByConnectorResponse ¶
type AzureDevOpsRepoClientListByConnectorResponse struct {
AzureDevOpsRepoListResponse
}
AzureDevOpsRepoClientListByConnectorResponse contains the response from method AzureDevOpsRepoClient.ListByConnector.
type AzureDevOpsRepoClientListOptions ¶
type AzureDevOpsRepoClientListOptions struct { }
AzureDevOpsRepoClientListOptions contains the optional parameters for the AzureDevOpsRepoClient.List method.
type AzureDevOpsRepoClientListResponse ¶
type AzureDevOpsRepoClientListResponse struct {
AzureDevOpsRepoListResponse
}
AzureDevOpsRepoClientListResponse contains the response from method AzureDevOpsRepoClient.List.
type AzureDevOpsRepoClientUpdateResponse ¶
type AzureDevOpsRepoClientUpdateResponse struct {
AzureDevOpsRepo
}
AzureDevOpsRepoClientUpdateResponse contains the response from method AzureDevOpsRepoClient.Update.
type AzureDevOpsRepoListResponse ¶
type AzureDevOpsRepoListResponse struct { // Gets or sets next link to scroll over the results. NextLink *string `json:"nextLink,omitempty"` // Gets or sets list of resources. Value []*AzureDevOpsRepo `json:"value,omitempty"` }
func (AzureDevOpsRepoListResponse) MarshalJSON ¶
func (a AzureDevOpsRepoListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureDevOpsRepoListResponse.
func (*AzureDevOpsRepoListResponse) UnmarshalJSON ¶
func (a *AzureDevOpsRepoListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsRepoListResponse.
type AzureDevOpsRepoProperties ¶
type AzureDevOpsRepoProperties struct { ActionableRemediation *ActionableRemediation `json:"actionableRemediation,omitempty"` // Gets or sets AzureDevOps Org Name. OrgName *string `json:"orgName,omitempty"` // Gets or sets AzureDevOps Project Name. ProjectName *string `json:"projectName,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` // Gets or sets Azure DevOps repo id. RepoID *string `json:"repoId,omitempty"` // Gets or sets AzureDevOps repo url. RepoURL *string `json:"repoUrl,omitempty"` // Gets or sets AzureDevOps repo visibility, whether it is public or private etc. Visibility *string `json:"visibility,omitempty"` }
AzureDevOpsRepoProperties - AzureDevOps Repo properties.
func (AzureDevOpsRepoProperties) MarshalJSON ¶
func (a AzureDevOpsRepoProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureDevOpsRepoProperties.
func (*AzureDevOpsRepoProperties) UnmarshalJSON ¶
func (a *AzureDevOpsRepoProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsRepoProperties.
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 GitHubConnector ¶
type GitHubConnector struct { // REQUIRED; The geo-location where the resource lives Location *string `json:"location,omitempty"` // Properties of the ARM resource for /subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.SecurityDevOps/gitHubConnectors. Properties *GitHubConnectorProperties `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"` }
GitHubConnector - Represents an ARM resource for /subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.SecurityDevOps/gitHubConnectors.
func (GitHubConnector) MarshalJSON ¶
func (g GitHubConnector) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GitHubConnector.
func (*GitHubConnector) UnmarshalJSON ¶
func (g *GitHubConnector) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GitHubConnector.
type GitHubConnectorClient ¶
type GitHubConnectorClient struct {
// contains filtered or unexported fields
}
GitHubConnectorClient contains the methods for the GitHubConnector group. Don't use this type directly, use NewGitHubConnectorClient() instead.
func NewGitHubConnectorClient ¶
func NewGitHubConnectorClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GitHubConnectorClient, error)
NewGitHubConnectorClient creates a new instance of GitHubConnectorClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*GitHubConnectorClient) BeginCreateOrUpdate ¶
func (client *GitHubConnectorClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, gitHubConnectorName string, gitHubConnector GitHubConnector, options *GitHubConnectorClientBeginCreateOrUpdateOptions) (*runtime.Poller[GitHubConnectorClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create or update a monitored GitHub Connector resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. gitHubConnectorName - Name of the GitHub Connector. gitHubConnector - Connector resource payload. options - GitHubConnectorClientBeginCreateOrUpdateOptions contains the optional parameters for the GitHubConnectorClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/GitHubConnectorCreateOrUpdate.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/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewGitHubConnectorClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, "westusrg", "testconnector", armsecuritydevops.GitHubConnector{ Location: to.Ptr("West US"), Properties: &armsecuritydevops.GitHubConnectorProperties{ Code: to.Ptr("00000000000000000000"), }, }, 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 (*GitHubConnectorClient) BeginDelete ¶
func (client *GitHubConnectorClient) BeginDelete(ctx context.Context, resourceGroupName string, gitHubConnectorName string, options *GitHubConnectorClientBeginDeleteOptions) (*runtime.Poller[GitHubConnectorClientDeleteResponse], error)
BeginDelete - Delete monitored GitHub Connector details. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. gitHubConnectorName - Name of the GitHub Connector. options - GitHubConnectorClientBeginDeleteOptions contains the optional parameters for the GitHubConnectorClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/GitHubConnectorDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewGitHubConnectorClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "westusrg", "testconnector", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*GitHubConnectorClient) BeginUpdate ¶
func (client *GitHubConnectorClient) BeginUpdate(ctx context.Context, resourceGroupName string, gitHubConnectorName string, gitHubConnector GitHubConnector, options *GitHubConnectorClientBeginUpdateOptions) (*runtime.Poller[GitHubConnectorClientUpdateResponse], error)
BeginUpdate - Update monitored GitHub Connector details. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. gitHubConnectorName - Name of the GitHub Connector. gitHubConnector - Connector resource payload. options - GitHubConnectorClientBeginUpdateOptions contains the optional parameters for the GitHubConnectorClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/GitHubConnectorUpdate.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/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewGitHubConnectorClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdate(ctx, "westusrg", "testconnector", armsecuritydevops.GitHubConnector{ Location: to.Ptr("West US"), Tags: map[string]*string{ "client": to.Ptr("dev-client"), "env": to.Ptr("dev"), }, }, 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 (*GitHubConnectorClient) Get ¶
func (client *GitHubConnectorClient) Get(ctx context.Context, resourceGroupName string, gitHubConnectorName string, options *GitHubConnectorClientGetOptions) (GitHubConnectorClientGetResponse, error)
Get - Returns a monitored GitHub Connector resource for a given ID. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. gitHubConnectorName - Name of the GitHub Connector. options - GitHubConnectorClientGetOptions contains the optional parameters for the GitHubConnectorClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/GitHubConnectorGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewGitHubConnectorClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "westusrg", "testconnector", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*GitHubConnectorClient) NewListByResourceGroupPager ¶
func (client *GitHubConnectorClient) NewListByResourceGroupPager(resourceGroupName string, options *GitHubConnectorClientListByResourceGroupOptions) *runtime.Pager[GitHubConnectorClientListByResourceGroupResponse]
resourceGroupName - The name of the resource group. The name is case insensitive. options - GitHubConnectorClientListByResourceGroupOptions contains the optional parameters for the GitHubConnectorClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/GitHubConnectorListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewGitHubConnectorClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("westusrg", 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 (*GitHubConnectorClient) NewListBySubscriptionPager ¶
func (client *GitHubConnectorClient) NewListBySubscriptionPager(options *GitHubConnectorClientListBySubscriptionOptions) *runtime.Pager[GitHubConnectorClientListBySubscriptionResponse]
NewListBySubscriptionPager - Returns a list of monitored GitHub Connectors. Generated from API version 2022-09-01-preview options - GitHubConnectorClientListBySubscriptionOptions contains the optional parameters for the GitHubConnectorClient.ListBySubscription method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/GitHubConnectorListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewGitHubConnectorClient("00000000-0000-0000-0000-000000000000", 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:
type GitHubConnectorClientBeginCreateOrUpdateOptions ¶
type GitHubConnectorClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GitHubConnectorClientBeginCreateOrUpdateOptions contains the optional parameters for the GitHubConnectorClient.BeginCreateOrUpdate method.
type GitHubConnectorClientBeginDeleteOptions ¶
type GitHubConnectorClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GitHubConnectorClientBeginDeleteOptions contains the optional parameters for the GitHubConnectorClient.BeginDelete method.
type GitHubConnectorClientBeginUpdateOptions ¶
type GitHubConnectorClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GitHubConnectorClientBeginUpdateOptions contains the optional parameters for the GitHubConnectorClient.BeginUpdate method.
type GitHubConnectorClientCreateOrUpdateResponse ¶
type GitHubConnectorClientCreateOrUpdateResponse struct {
GitHubConnector
}
GitHubConnectorClientCreateOrUpdateResponse contains the response from method GitHubConnectorClient.CreateOrUpdate.
type GitHubConnectorClientDeleteResponse ¶
type GitHubConnectorClientDeleteResponse struct { }
GitHubConnectorClientDeleteResponse contains the response from method GitHubConnectorClient.Delete.
type GitHubConnectorClientGetOptions ¶
type GitHubConnectorClientGetOptions struct { }
GitHubConnectorClientGetOptions contains the optional parameters for the GitHubConnectorClient.Get method.
type GitHubConnectorClientGetResponse ¶
type GitHubConnectorClientGetResponse struct {
GitHubConnector
}
GitHubConnectorClientGetResponse contains the response from method GitHubConnectorClient.Get.
type GitHubConnectorClientListByResourceGroupOptions ¶
type GitHubConnectorClientListByResourceGroupOptions struct { }
GitHubConnectorClientListByResourceGroupOptions contains the optional parameters for the GitHubConnectorClient.ListByResourceGroup method.
type GitHubConnectorClientListByResourceGroupResponse ¶
type GitHubConnectorClientListByResourceGroupResponse struct {
GitHubConnectorListResponse
}
GitHubConnectorClientListByResourceGroupResponse contains the response from method GitHubConnectorClient.ListByResourceGroup.
type GitHubConnectorClientListBySubscriptionOptions ¶
type GitHubConnectorClientListBySubscriptionOptions struct { }
GitHubConnectorClientListBySubscriptionOptions contains the optional parameters for the GitHubConnectorClient.ListBySubscription method.
type GitHubConnectorClientListBySubscriptionResponse ¶
type GitHubConnectorClientListBySubscriptionResponse struct {
GitHubConnectorListResponse
}
GitHubConnectorClientListBySubscriptionResponse contains the response from method GitHubConnectorClient.ListBySubscription.
type GitHubConnectorClientUpdateResponse ¶
type GitHubConnectorClientUpdateResponse struct {
GitHubConnector
}
GitHubConnectorClientUpdateResponse contains the response from method GitHubConnectorClient.Update.
type GitHubConnectorListResponse ¶
type GitHubConnectorListResponse struct { // Gets or sets next link to scroll over the results. NextLink *string `json:"nextLink,omitempty"` // Gets or sets list of resources. Value []*GitHubConnector `json:"value,omitempty"` }
func (GitHubConnectorListResponse) MarshalJSON ¶
func (g GitHubConnectorListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GitHubConnectorListResponse.
func (*GitHubConnectorListResponse) UnmarshalJSON ¶
func (g *GitHubConnectorListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GitHubConnectorListResponse.
type GitHubConnectorProperties ¶
type GitHubConnectorProperties struct { // Gets or sets one-time OAuth code to exchange for refresh and access tokens. Code *string `json:"code,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` }
GitHubConnectorProperties - Properties of the ARM resource for /subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.SecurityDevOps/gitHubConnectors.
func (GitHubConnectorProperties) MarshalJSON ¶
func (g GitHubConnectorProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GitHubConnectorProperties.
func (*GitHubConnectorProperties) UnmarshalJSON ¶
func (g *GitHubConnectorProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GitHubConnectorProperties.
type GitHubConnectorStats ¶
type GitHubConnectorStats struct { Properties *GitHubConnectorStatsProperties `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"` }
func (GitHubConnectorStats) MarshalJSON ¶
func (g GitHubConnectorStats) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GitHubConnectorStats.
func (*GitHubConnectorStats) UnmarshalJSON ¶
func (g *GitHubConnectorStats) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GitHubConnectorStats.
type GitHubConnectorStatsClient ¶
type GitHubConnectorStatsClient struct {
// contains filtered or unexported fields
}
GitHubConnectorStatsClient contains the methods for the GitHubConnectorStats group. Don't use this type directly, use NewGitHubConnectorStatsClient() instead.
func NewGitHubConnectorStatsClient ¶
func NewGitHubConnectorStatsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GitHubConnectorStatsClient, error)
NewGitHubConnectorStatsClient creates a new instance of GitHubConnectorStatsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*GitHubConnectorStatsClient) Get ¶
func (client *GitHubConnectorStatsClient) Get(ctx context.Context, resourceGroupName string, gitHubConnectorName string, options *GitHubConnectorStatsClientGetOptions) (GitHubConnectorStatsClientGetResponse, error)
Get - Returns the summary of the GitHub Connector Stats. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. gitHubConnectorName - Name of the GitHub Connector. options - GitHubConnectorStatsClientGetOptions contains the optional parameters for the GitHubConnectorStatsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/GitHubConnectorStatsGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewGitHubConnectorStatsClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "westusrg", "testconnector", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type GitHubConnectorStatsClientGetOptions ¶
type GitHubConnectorStatsClientGetOptions struct { }
GitHubConnectorStatsClientGetOptions contains the optional parameters for the GitHubConnectorStatsClient.Get method.
type GitHubConnectorStatsClientGetResponse ¶
type GitHubConnectorStatsClientGetResponse struct {
GitHubConnectorStatsListResponse
}
GitHubConnectorStatsClientGetResponse contains the response from method GitHubConnectorStatsClient.Get.
type GitHubConnectorStatsListResponse ¶
type GitHubConnectorStatsListResponse struct { // Gets or sets next link to scroll over the results. NextLink *string `json:"nextLink,omitempty"` // Gets or sets list of resources. Value []*GitHubConnectorStats `json:"value,omitempty"` }
func (GitHubConnectorStatsListResponse) MarshalJSON ¶
func (g GitHubConnectorStatsListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GitHubConnectorStatsListResponse.
func (*GitHubConnectorStatsListResponse) UnmarshalJSON ¶
func (g *GitHubConnectorStatsListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GitHubConnectorStatsListResponse.
type GitHubConnectorStatsProperties ¶
type GitHubConnectorStatsProperties struct { // Gets or sets owners count. OwnersCount *int64 `json:"ownersCount,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` // Gets or sets repos count. ReposCount *int64 `json:"reposCount,omitempty"` }
func (GitHubConnectorStatsProperties) MarshalJSON ¶
func (g GitHubConnectorStatsProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GitHubConnectorStatsProperties.
func (*GitHubConnectorStatsProperties) UnmarshalJSON ¶
func (g *GitHubConnectorStatsProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GitHubConnectorStatsProperties.
type GitHubOwner ¶
type GitHubOwner struct { // GitHub Repo Owner properties. Properties *GitHubOwnerProperties `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"` }
GitHubOwner - GitHub repo owner Proxy Resource.
func (GitHubOwner) MarshalJSON ¶
func (g GitHubOwner) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GitHubOwner.
func (*GitHubOwner) UnmarshalJSON ¶
func (g *GitHubOwner) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GitHubOwner.
type GitHubOwnerClient ¶
type GitHubOwnerClient struct {
// contains filtered or unexported fields
}
GitHubOwnerClient contains the methods for the GitHubOwner group. Don't use this type directly, use NewGitHubOwnerClient() instead.
func NewGitHubOwnerClient ¶
func NewGitHubOwnerClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GitHubOwnerClient, error)
NewGitHubOwnerClient creates a new instance of GitHubOwnerClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*GitHubOwnerClient) BeginCreateOrUpdate ¶
func (client *GitHubOwnerClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, gitHubConnectorName string, gitHubOwnerName string, gitHubOwner GitHubOwner, options *GitHubOwnerClientBeginCreateOrUpdateOptions) (*runtime.Poller[GitHubOwnerClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create or update a monitored GitHub owner. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. gitHubConnectorName - Name of the GitHub Connector. gitHubOwnerName - Name of the GitHub Owner. gitHubOwner - Github owner. options - GitHubOwnerClientBeginCreateOrUpdateOptions contains the optional parameters for the GitHubOwnerClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/GitHubOwnerCreateOrUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewGitHubOwnerClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, "westusrg", "testconnector", "Azure", armsecuritydevops.GitHubOwner{}, 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 (*GitHubOwnerClient) BeginUpdate ¶
func (client *GitHubOwnerClient) BeginUpdate(ctx context.Context, resourceGroupName string, gitHubConnectorName string, gitHubOwnerName string, gitHubOwner GitHubOwner, options *GitHubOwnerClientBeginUpdateOptions) (*runtime.Poller[GitHubOwnerClientUpdateResponse], error)
BeginUpdate - Patch a monitored GitHub repository. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. gitHubConnectorName - Name of the GitHub Connector. gitHubOwnerName - Name of the GitHub Owner. gitHubOwner - Github owner. options - GitHubOwnerClientBeginUpdateOptions contains the optional parameters for the GitHubOwnerClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/GitHubOwnerUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewGitHubOwnerClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdate(ctx, "westusrg", "testconnector", "Azure", armsecuritydevops.GitHubOwner{}, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*GitHubOwnerClient) Get ¶
func (client *GitHubOwnerClient) Get(ctx context.Context, resourceGroupName string, gitHubConnectorName string, gitHubOwnerName string, options *GitHubOwnerClientGetOptions) (GitHubOwnerClientGetResponse, error)
Get - Returns a monitored GitHub repository. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. gitHubConnectorName - Name of the GitHub Connector. gitHubOwnerName - Name of the GitHub Owner. options - GitHubOwnerClientGetOptions contains the optional parameters for the GitHubOwnerClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/GitHubOwnerGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewGitHubOwnerClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "westusrg", "testconnector", "Azure", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*GitHubOwnerClient) NewListPager ¶
func (client *GitHubOwnerClient) NewListPager(resourceGroupName string, gitHubConnectorName string, options *GitHubOwnerClientListOptions) *runtime.Pager[GitHubOwnerClientListResponse]
NewListPager - Returns a list of monitored GitHub owners. Generated from API version 2022-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. gitHubConnectorName - Name of the GitHub Connector. options - GitHubOwnerClientListOptions contains the optional parameters for the GitHubOwnerClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/GitHubOwnerList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewGitHubOwnerClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager("westusrg", "testconnector", 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 GitHubOwnerClientBeginCreateOrUpdateOptions ¶
type GitHubOwnerClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GitHubOwnerClientBeginCreateOrUpdateOptions contains the optional parameters for the GitHubOwnerClient.BeginCreateOrUpdate method.
type GitHubOwnerClientBeginUpdateOptions ¶
type GitHubOwnerClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GitHubOwnerClientBeginUpdateOptions contains the optional parameters for the GitHubOwnerClient.BeginUpdate method.
type GitHubOwnerClientCreateOrUpdateResponse ¶
type GitHubOwnerClientCreateOrUpdateResponse struct {
GitHubOwner
}
GitHubOwnerClientCreateOrUpdateResponse contains the response from method GitHubOwnerClient.CreateOrUpdate.
type GitHubOwnerClientGetOptions ¶
type GitHubOwnerClientGetOptions struct { }
GitHubOwnerClientGetOptions contains the optional parameters for the GitHubOwnerClient.Get method.
type GitHubOwnerClientGetResponse ¶
type GitHubOwnerClientGetResponse struct {
GitHubOwner
}
GitHubOwnerClientGetResponse contains the response from method GitHubOwnerClient.Get.
type GitHubOwnerClientListOptions ¶
type GitHubOwnerClientListOptions struct { }
GitHubOwnerClientListOptions contains the optional parameters for the GitHubOwnerClient.List method.
type GitHubOwnerClientListResponse ¶
type GitHubOwnerClientListResponse struct {
GitHubOwnerListResponse
}
GitHubOwnerClientListResponse contains the response from method GitHubOwnerClient.List.
type GitHubOwnerClientUpdateResponse ¶
type GitHubOwnerClientUpdateResponse struct {
GitHubOwner
}
GitHubOwnerClientUpdateResponse contains the response from method GitHubOwnerClient.Update.
type GitHubOwnerListResponse ¶
type GitHubOwnerListResponse struct { // Gets or sets next link to scroll over the results. NextLink *string `json:"nextLink,omitempty"` // Gets or sets list of resources. Value []*GitHubOwner `json:"value,omitempty"` }
func (GitHubOwnerListResponse) MarshalJSON ¶
func (g GitHubOwnerListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GitHubOwnerListResponse.
func (*GitHubOwnerListResponse) UnmarshalJSON ¶
func (g *GitHubOwnerListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GitHubOwnerListResponse.
type GitHubOwnerProperties ¶
type GitHubOwnerProperties struct { // Gets or sets gitHub owner url. OwnerURL *string `json:"ownerUrl,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` }
GitHubOwnerProperties - GitHub Repo Owner properties.
func (GitHubOwnerProperties) MarshalJSON ¶
func (g GitHubOwnerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GitHubOwnerProperties.
func (*GitHubOwnerProperties) UnmarshalJSON ¶
func (g *GitHubOwnerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GitHubOwnerProperties.
type GitHubRepo ¶
type GitHubRepo struct { // GitHub Repo properties. Properties *GitHubRepoProperties `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"` }
GitHubRepo - GitHub repo Proxy Resource.
func (GitHubRepo) MarshalJSON ¶
func (g GitHubRepo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GitHubRepo.
func (*GitHubRepo) UnmarshalJSON ¶
func (g *GitHubRepo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GitHubRepo.
type GitHubRepoClient ¶
type GitHubRepoClient struct {
// contains filtered or unexported fields
}
GitHubRepoClient contains the methods for the GitHubRepo group. Don't use this type directly, use NewGitHubRepoClient() instead.
func NewGitHubRepoClient ¶
func NewGitHubRepoClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GitHubRepoClient, error)
NewGitHubRepoClient creates a new instance of GitHubRepoClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*GitHubRepoClient) BeginCreateOrUpdate ¶
func (client *GitHubRepoClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, gitHubConnectorName string, gitHubOwnerName string, gitHubRepoName string, gitHubRepo GitHubRepo, options *GitHubRepoClientBeginCreateOrUpdateOptions) (*runtime.Poller[GitHubRepoClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create or update a monitored GitHub repository. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. gitHubConnectorName - Name of the GitHub Connector. gitHubOwnerName - Name of the GitHub Owner. gitHubRepoName - Name of the GitHub Repo. gitHubRepo - Github repo. options - GitHubRepoClientBeginCreateOrUpdateOptions contains the optional parameters for the GitHubRepoClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/GitHubRepoCreateOrUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewGitHubRepoClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, "westusrg", "testconnector", "Azure", "azure-rest-api-specs", armsecuritydevops.GitHubRepo{}, 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 (*GitHubRepoClient) BeginUpdate ¶
func (client *GitHubRepoClient) BeginUpdate(ctx context.Context, resourceGroupName string, gitHubConnectorName string, gitHubOwnerName string, gitHubRepoName string, gitHubRepo GitHubRepo, options *GitHubRepoClientBeginUpdateOptions) (*runtime.Poller[GitHubRepoClientUpdateResponse], error)
BeginUpdate - Patch a monitored GitHub repository. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. gitHubConnectorName - Name of the GitHub Connector. gitHubOwnerName - Name of the GitHub Owner. gitHubRepoName - Name of the GitHub Repo. gitHubRepo - Github repo. options - GitHubRepoClientBeginUpdateOptions contains the optional parameters for the GitHubRepoClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/GitHubRepoUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewGitHubRepoClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdate(ctx, "westusrg", "testconnector", "Azure", "azure-rest-api-specs", armsecuritydevops.GitHubRepo{}, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*GitHubRepoClient) Get ¶
func (client *GitHubRepoClient) Get(ctx context.Context, resourceGroupName string, gitHubConnectorName string, gitHubOwnerName string, gitHubRepoName string, options *GitHubRepoClientGetOptions) (GitHubRepoClientGetResponse, error)
Get - Returns a monitored GitHub repository. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. gitHubConnectorName - Name of the GitHub Connector. gitHubOwnerName - Name of the GitHub Owner. gitHubRepoName - Name of the GitHub Repo. options - GitHubRepoClientGetOptions contains the optional parameters for the GitHubRepoClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/GitHubRepoGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewGitHubRepoClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "westusrg", "testconnector", "Azure", "39093389", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*GitHubRepoClient) NewListByConnectorPager ¶
func (client *GitHubRepoClient) NewListByConnectorPager(resourceGroupName string, gitHubConnectorName string, options *GitHubRepoClientListByConnectorOptions) *runtime.Pager[GitHubRepoClientListByConnectorResponse]
NewListByConnectorPager - Returns a list of monitored GitHub repositories. Generated from API version 2022-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. gitHubConnectorName - Name of the GitHub Connector. options - GitHubRepoClientListByConnectorOptions contains the optional parameters for the GitHubRepoClient.ListByConnector method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/GitHubRepoListByConnector.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewGitHubRepoClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByConnectorPager("westusrg", "testconnector", 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 (*GitHubRepoClient) NewListPager ¶
func (client *GitHubRepoClient) NewListPager(resourceGroupName string, gitHubConnectorName string, gitHubOwnerName string, options *GitHubRepoClientListOptions) *runtime.Pager[GitHubRepoClientListResponse]
NewListPager - Returns a list of monitored GitHub repositories. Generated from API version 2022-09-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. gitHubConnectorName - Name of the GitHub Connector. gitHubOwnerName - Name of the GitHub Owner. options - GitHubRepoClientListOptions contains the optional parameters for the GitHubRepoClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/GitHubRepoList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.NewGitHubRepoClient("00000000-0000-0000-0000-000000000000", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager("westusrg", "testconnector", "Azure", 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 GitHubRepoClientBeginCreateOrUpdateOptions ¶
type GitHubRepoClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GitHubRepoClientBeginCreateOrUpdateOptions contains the optional parameters for the GitHubRepoClient.BeginCreateOrUpdate method.
type GitHubRepoClientBeginUpdateOptions ¶
type GitHubRepoClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GitHubRepoClientBeginUpdateOptions contains the optional parameters for the GitHubRepoClient.BeginUpdate method.
type GitHubRepoClientCreateOrUpdateResponse ¶
type GitHubRepoClientCreateOrUpdateResponse struct {
GitHubRepo
}
GitHubRepoClientCreateOrUpdateResponse contains the response from method GitHubRepoClient.CreateOrUpdate.
type GitHubRepoClientGetOptions ¶
type GitHubRepoClientGetOptions struct { }
GitHubRepoClientGetOptions contains the optional parameters for the GitHubRepoClient.Get method.
type GitHubRepoClientGetResponse ¶
type GitHubRepoClientGetResponse struct {
GitHubRepo
}
GitHubRepoClientGetResponse contains the response from method GitHubRepoClient.Get.
type GitHubRepoClientListByConnectorOptions ¶
type GitHubRepoClientListByConnectorOptions struct { }
GitHubRepoClientListByConnectorOptions contains the optional parameters for the GitHubRepoClient.ListByConnector method.
type GitHubRepoClientListByConnectorResponse ¶
type GitHubRepoClientListByConnectorResponse struct {
GitHubRepoListResponse
}
GitHubRepoClientListByConnectorResponse contains the response from method GitHubRepoClient.ListByConnector.
type GitHubRepoClientListOptions ¶
type GitHubRepoClientListOptions struct { }
GitHubRepoClientListOptions contains the optional parameters for the GitHubRepoClient.List method.
type GitHubRepoClientListResponse ¶
type GitHubRepoClientListResponse struct {
GitHubRepoListResponse
}
GitHubRepoClientListResponse contains the response from method GitHubRepoClient.List.
type GitHubRepoClientUpdateResponse ¶
type GitHubRepoClientUpdateResponse struct {
GitHubRepo
}
GitHubRepoClientUpdateResponse contains the response from method GitHubRepoClient.Update.
type GitHubRepoListResponse ¶
type GitHubRepoListResponse struct { // Gets or sets next link to scroll over the results. NextLink *string `json:"nextLink,omitempty"` // Gets or sets list of resources. Value []*GitHubRepo `json:"value,omitempty"` }
func (GitHubRepoListResponse) MarshalJSON ¶
func (g GitHubRepoListResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GitHubRepoListResponse.
func (*GitHubRepoListResponse) UnmarshalJSON ¶
func (g *GitHubRepoListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GitHubRepoListResponse.
type GitHubRepoProperties ¶
type GitHubRepoProperties struct { // Gets or sets gitHub repo account id. AccountID *int64 `json:"accountId,omitempty"` // Gets or sets GitHub Owner Name. OwnerName *string `json:"ownerName,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` // Gets or sets gitHub repo url. RepoURL *string `json:"repoUrl,omitempty"` }
GitHubRepoProperties - GitHub Repo properties.
func (GitHubRepoProperties) MarshalJSON ¶
func (g GitHubRepoProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GitHubRepoProperties.
func (*GitHubRepoProperties) UnmarshalJSON ¶
func (g *GitHubRepoProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GitHubRepoProperties.
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) NewListPager ¶
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Returns list of operations supported by the Microsoft.SecurityDevOps provider. Generated from API version 2022-09-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/securitydevops/resource-manager/Microsoft.SecurityDevOps/preview/2022-09-01-preview/examples/OperationsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armsecuritydevops.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 ¶
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 ProvisioningState ¶
type ProvisioningState string
const ( ProvisioningStateCanceled ProvisioningState = "Canceled" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateSucceeded ProvisioningState = "Succeeded" )
func PossibleProvisioningStateValues ¶
func PossibleProvisioningStateValues() []ProvisioningState
PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.
type RuleCategory ¶
type RuleCategory string
const ( RuleCategoryArtifacts RuleCategory = "Artifacts" RuleCategoryCode RuleCategory = "Code" RuleCategoryContainers RuleCategory = "Containers" RuleCategoryDependencies RuleCategory = "Dependencies" RuleCategoryIaC RuleCategory = "IaC" RuleCategorySecrets RuleCategory = "Secrets" )
func PossibleRuleCategoryValues ¶
func PossibleRuleCategoryValues() []RuleCategory
PossibleRuleCategoryValues returns the possible values for the RuleCategory 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 TargetBranchConfiguration ¶
type TargetBranchConfiguration struct { // Gets or sets branches that should have annotations. // For Ignite, we will be supporting a single default branch configuration in the UX. Names []*string `json:"names,omitempty"` }
TargetBranchConfiguration - Branch onboarding info.
func (TargetBranchConfiguration) MarshalJSON ¶
func (t TargetBranchConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TargetBranchConfiguration.
func (*TargetBranchConfiguration) UnmarshalJSON ¶
func (t *TargetBranchConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TargetBranchConfiguration.
Source Files ¶
- azuredevopsconnector_client.go
- azuredevopsconnectorstats_client.go
- azuredevopsorg_client.go
- azuredevopsproject_client.go
- azuredevopsrepo_client.go
- build.go
- constants.go
- githubconnector_client.go
- githubconnectorstats_client.go
- githubowner_client.go
- githubrepo_client.go
- models.go
- models_serde.go
- operations_client.go
- response_types.go
- time_rfc3339.go