armsecuritydevops

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 14 Imported by: 1

README

Azure Securitydevops Module for Go

PkgGoDev

The armsecuritydevops module provides operations for working with Azure Securitydevops.

Source code

Getting started

Prerequisites

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Securitydevops module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securitydevops/armsecuritydevops

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Securitydevops. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Client Factory

Azure Securitydevops module consists of one or more clients. We provide a client factory which could be used to create any client in this module.

clientFactory, err := armsecuritydevops.NewClientFactory(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
clientFactory, err := armsecuritydevops.NewClientFactory(<subscription ID>, cred, &options)

Clients

A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.

client := clientFactory.NewAzureDevOpsConnectorStatsClient()

Fakes

The fake package contains types used for constructing in-memory fake servers used in unit tests. This allows writing tests to cover various success/error conditions without the need for connecting to a live service.

Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes.

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Securitydevops label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

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
	Categories          []*RuleCategory
	SeverityLevels      []*string
	State               *ActionableRemediationState
}

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
}

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
	Properties *AzureDevOpsConnectorProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

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/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAzureDevOpsConnectorClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AzureDevOpsConnector = armsecuritydevops.AzureDevOpsConnector{
	// 	Name: to.Ptr("testconnector"),
	// 	Type: to.Ptr("microsoft.securitydevops/azureDevOpsConnectors"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/testconnector"),
	// 	Location: to.Ptr("West US"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Properties: &armsecuritydevops.AzureDevOpsConnectorProperties{
	// 		ProvisioningState: to.Ptr(armsecuritydevops.ProvisioningStateSucceeded),
	// 	},
	// }
}
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/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAzureDevOpsConnectorClient().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/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAzureDevOpsConnectorClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AzureDevOpsConnector = armsecuritydevops.AzureDevOpsConnector{
	// 	Name: to.Ptr("testconnector1"),
	// 	Type: to.Ptr("microsoft.securitydevops/azureDevOpsConnectors"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors"),
	// 	Location: to.Ptr("West US"),
	// 	Tags: map[string]*string{
	// 		"Environment": to.Ptr("Dev"),
	// 	},
	// 	Properties: &armsecuritydevops.AzureDevOpsConnectorProperties{
	// 		ProvisioningState: to.Ptr(armsecuritydevops.ProvisioningStateSucceeded),
	// 	},
	// }
}
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/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAzureDevOpsConnectorClient().Get(ctx, "westusrg", "testconnector", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AzureDevOpsConnector = armsecuritydevops.AzureDevOpsConnector{
	// 	Name: to.Ptr("testconnector"),
	// 	Type: to.Ptr("microsoft.securitydevops/azureDevOpsConnectors"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/testconnector"),
	// 	Location: to.Ptr("West US"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Properties: &armsecuritydevops.AzureDevOpsConnectorProperties{
	// 		ProvisioningState: to.Ptr(armsecuritydevops.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*AzureDevOpsConnectorClient) NewListByResourceGroupPager

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - AzureDevOpsConnectorClientListByResourceGroupOptions contains the optional parameters for the AzureDevOpsConnectorClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAzureDevOpsConnectorClient().NewListByResourceGroupPager("westusrg", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AzureDevOpsConnectorListResponse = armsecuritydevops.AzureDevOpsConnectorListResponse{
		// 	Value: []*armsecuritydevops.AzureDevOpsConnector{
		// 		{
		// 			Name: to.Ptr("testconnector1"),
		// 			Type: to.Ptr("microsoft.securitydevops/azureDevOpsConnectors"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/testconnector"),
		// 			Location: to.Ptr("West US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armsecuritydevops.AzureDevOpsConnectorProperties{
		// 				ProvisioningState: to.Ptr(armsecuritydevops.ProvisioningStateSucceeded),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("testconnector2"),
		// 			Type: to.Ptr("microsoft.securitydevops/azureDevOpsConnectors"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/testconnector"),
		// 			Location: to.Ptr("West US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armsecuritydevops.AzureDevOpsConnectorProperties{
		// 				ProvisioningState: to.Ptr(armsecuritydevops.ProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*AzureDevOpsConnectorClient) NewListBySubscriptionPager

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.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAzureDevOpsConnectorClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AzureDevOpsConnectorListResponse = armsecuritydevops.AzureDevOpsConnectorListResponse{
		// 	Value: []*armsecuritydevops.AzureDevOpsConnector{
		// 		{
		// 			Name: to.Ptr("testconnector1"),
		// 			Type: to.Ptr("microsoft.securitydevops/azureDevOpsConnectors"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors"),
		// 			Location: to.Ptr("West US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armsecuritydevops.AzureDevOpsConnectorProperties{
		// 				ProvisioningState: to.Ptr(armsecuritydevops.ProvisioningStateSucceeded),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("testconnector2"),
		// 			Type: to.Ptr("microsoft.securitydevops/azureDevOpsConnectors"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors"),
		// 			Location: to.Ptr("West US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armsecuritydevops.AzureDevOpsConnectorProperties{
		// 				ProvisioningState: to.Ptr(armsecuritydevops.ProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
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.BeginCreateOrUpdate.

type AzureDevOpsConnectorClientDeleteResponse

type AzureDevOpsConnectorClientDeleteResponse struct {
}

AzureDevOpsConnectorClientDeleteResponse contains the response from method AzureDevOpsConnectorClient.BeginDelete.

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.NewListByResourceGroupPager method.

type AzureDevOpsConnectorClientListByResourceGroupResponse

type AzureDevOpsConnectorClientListByResourceGroupResponse struct {
	AzureDevOpsConnectorListResponse
}

AzureDevOpsConnectorClientListByResourceGroupResponse contains the response from method AzureDevOpsConnectorClient.NewListByResourceGroupPager.

type AzureDevOpsConnectorClientListBySubscriptionOptions

type AzureDevOpsConnectorClientListBySubscriptionOptions struct {
}

AzureDevOpsConnectorClientListBySubscriptionOptions contains the optional parameters for the AzureDevOpsConnectorClient.NewListBySubscriptionPager method.

type AzureDevOpsConnectorClientListBySubscriptionResponse

type AzureDevOpsConnectorClientListBySubscriptionResponse struct {
	AzureDevOpsConnectorListResponse
}

AzureDevOpsConnectorClientListBySubscriptionResponse contains the response from method AzureDevOpsConnectorClient.NewListBySubscriptionPager.

type AzureDevOpsConnectorClientUpdateResponse

type AzureDevOpsConnectorClientUpdateResponse struct {
	AzureDevOpsConnector
}

AzureDevOpsConnectorClientUpdateResponse contains the response from method AzureDevOpsConnectorClient.BeginUpdate.

type AzureDevOpsConnectorListResponse

type AzureDevOpsConnectorListResponse struct {
	// Gets or sets next link to scroll over the results.
	NextLink *string

	// Gets or sets list of resources.
	Value []*AzureDevOpsConnector
}

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

	// Gets or sets org onboarding information.
	Orgs              []*AzureDevOpsOrgMetadata
	ProvisioningState *ProvisioningState
}

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

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

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

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/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAzureDevOpsConnectorStatsClient().Get(ctx, "westusrg", "testconnector", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AzureDevOpsConnectorStatsListResponse = armsecuritydevops.AzureDevOpsConnectorStatsListResponse{
	// 	Value: []*armsecuritydevops.AzureDevOpsConnectorStats{
	// 		{
	// 			Name: to.Ptr("testconnector"),
	// 			Type: to.Ptr("microsoft.securitydevops/azureDevOpsConnectors"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors"),
	// 			Properties: &armsecuritydevops.AzureDevOpsConnectorStatsProperties{
	// 				OrgsCount: to.Ptr[int64](5),
	// 				ProjectsCount: to.Ptr[int64](10),
	// 				ProvisioningState: to.Ptr(armsecuritydevops.ProvisioningStateSucceeded),
	// 				ReposCount: to.Ptr[int64](100),
	// 			},
	// 	}},
	// }
}
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

	// Gets or sets list of resources.
	Value []*AzureDevOpsConnectorStats
}

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

	// Gets or sets projects count.
	ProjectsCount     *int64
	ProvisioningState *ProvisioningState

	// Gets or sets repos count.
	ReposCount *int64
}

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

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

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/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAzureDevOpsOrgClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AzureDevOpsOrg = armsecuritydevops.AzureDevOpsOrg{
	// 	Name: to.Ptr("myOrg"),
	// 	Type: to.Ptr("Microsoft.SecurityDevOps/azureDevOpsConnectos/orgs"),
	// 	ID: to.Ptr("/subscriptions/e7032cc6-7422-4ddd-9022-bfbf23b05332/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/testconnector/orgs/myOrg"),
	// 	Properties: &armsecuritydevops.AzureDevOpsOrgProperties{
	// 		ProvisioningState: to.Ptr(armsecuritydevops.ProvisioningStateSucceeded),
	// 	},
	// }
}
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/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAzureDevOpsOrgClient().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/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAzureDevOpsOrgClient().Get(ctx, "westusrg", "testconnector", "myOrg", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AzureDevOpsOrg = armsecuritydevops.AzureDevOpsOrg{
	// 	Type: to.Ptr("Microsoft.SecurityDevOps/azureDevOpsConnectos/orgs"),
	// 	ID: to.Ptr("/subscriptions/e7032cc6-7422-4ddd-9022-bfbf23b05332/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/testconnector/orgs/myOrg"),
	// 	Properties: &armsecuritydevops.AzureDevOpsOrgProperties{
	// 		AutoDiscovery: to.Ptr(armsecuritydevops.AutoDiscoveryDisabled),
	// 		ProvisioningState: to.Ptr(armsecuritydevops.ProvisioningStateSucceeded),
	// 	},
	// }
}
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.NewListPager method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAzureDevOpsOrgClient().NewListPager("westusrg", "testconnector", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AzureDevOpsOrgListResponse = armsecuritydevops.AzureDevOpsOrgListResponse{
		// 	Value: []*armsecuritydevops.AzureDevOpsOrg{
		// 		{
		// 			Type: to.Ptr("microsoft.securitydevops/azureDevOpsConnectors/orgs"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/testconnector/orgs/myOrg1"),
		// 			Properties: &armsecuritydevops.AzureDevOpsOrgProperties{
		// 				AutoDiscovery: to.Ptr(armsecuritydevops.AutoDiscoveryDisabled),
		// 			},
		// 		},
		// 		{
		// 			Type: to.Ptr("microsoft.securitydevops/azureDevOpsConnectors/orgs"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/testconnector/orgs/myOrg2"),
		// 			Properties: &armsecuritydevops.AzureDevOpsOrgProperties{
		// 				AutoDiscovery: to.Ptr(armsecuritydevops.AutoDiscoveryDisabled),
		// 			},
		// 	}},
		// }
	}
}
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 {
	// Azure DevOps Org Proxy Resource.
	AzureDevOpsOrg
}

AzureDevOpsOrgClientCreateOrUpdateResponse contains the response from method AzureDevOpsOrgClient.BeginCreateOrUpdate.

type AzureDevOpsOrgClientGetOptions

type AzureDevOpsOrgClientGetOptions struct {
}

AzureDevOpsOrgClientGetOptions contains the optional parameters for the AzureDevOpsOrgClient.Get method.

type AzureDevOpsOrgClientGetResponse

type AzureDevOpsOrgClientGetResponse struct {
	// Azure DevOps Org Proxy Resource.
	AzureDevOpsOrg
}

AzureDevOpsOrgClientGetResponse contains the response from method AzureDevOpsOrgClient.Get.

type AzureDevOpsOrgClientListOptions

type AzureDevOpsOrgClientListOptions struct {
}

AzureDevOpsOrgClientListOptions contains the optional parameters for the AzureDevOpsOrgClient.NewListPager method.

type AzureDevOpsOrgClientListResponse

type AzureDevOpsOrgClientListResponse struct {
	AzureDevOpsOrgListResponse
}

AzureDevOpsOrgClientListResponse contains the response from method AzureDevOpsOrgClient.NewListPager.

type AzureDevOpsOrgClientUpdateResponse

type AzureDevOpsOrgClientUpdateResponse struct {
	// Azure DevOps Org Proxy Resource.
	AzureDevOpsOrg
}

AzureDevOpsOrgClientUpdateResponse contains the response from method AzureDevOpsOrgClient.BeginUpdate.

type AzureDevOpsOrgListResponse

type AzureDevOpsOrgListResponse struct {
	// Gets or sets next link to scroll over the results.
	NextLink *string

	// Gets or sets list of resources.
	Value []*AzureDevOpsOrg
}

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

	// Gets or sets name of the AzureDevOps Org.
	Name     *string
	Projects []*AzureDevOpsProjectMetadata
}

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
	ProvisioningState *ProvisioningState
}

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

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

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/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAzureDevOpsProjectClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AzureDevOpsProject = armsecuritydevops.AzureDevOpsProject{
	// 	Name: to.Ptr("myProject"),
	// 	Type: to.Ptr("Microsoft.SecurityDevOps/azureDevOpsConnectos/orgs/projects"),
	// 	ID: to.Ptr("/subscriptions/e7032cc6-7422-4ddd-9022-bfbf23b05332/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/testconnector/orgs/myOrg/projects/myProject"),
	// 	Properties: &armsecuritydevops.AzureDevOpsProjectProperties{
	// 		ProvisioningState: to.Ptr(armsecuritydevops.ProvisioningStateSucceeded),
	// 	},
	// }
}
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/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAzureDevOpsProjectClient().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/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAzureDevOpsProjectClient().Get(ctx, "westusrg", "testconnector", "myOrg", "myProject", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AzureDevOpsProject = armsecuritydevops.AzureDevOpsProject{
	// 	Type: to.Ptr("Microsoft.SecurityDevOps/azureDevOpsConnectos/orgs/projects"),
	// 	ID: to.Ptr("/subscriptions/e7032cc6-7422-4ddd-9022-bfbf23b05332/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/testconnector/orgs/myOrg/projects/myProject"),
	// 	Properties: &armsecuritydevops.AzureDevOpsProjectProperties{
	// 		AutoDiscovery: to.Ptr(armsecuritydevops.AutoDiscoveryDisabled),
	// 		ProvisioningState: to.Ptr(armsecuritydevops.ProvisioningStateSucceeded),
	// 	},
	// }
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAzureDevOpsProjectClient().NewListPager("westusrg", "testconnector", "myOrg", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AzureDevOpsProjectListResponse = armsecuritydevops.AzureDevOpsProjectListResponse{
		// 	Value: []*armsecuritydevops.AzureDevOpsProject{
		// 		{
		// 			Type: to.Ptr("microsoft.securitydevops/azureDevOpsConnectors/orgs/projects"),
		// 			ID: to.Ptr("/subscriptions/e7032cc6-7422-4ddd-9022-bfbf23b05332/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/testconnector/orgs/myOrg/projects/myProject"),
		// 			Properties: &armsecuritydevops.AzureDevOpsProjectProperties{
		// 				AutoDiscovery: to.Ptr(armsecuritydevops.AutoDiscoveryDisabled),
		// 			},
		// 		},
		// 		{
		// 			Type: to.Ptr("microsoft.securitydevops/azureDevOpsConnectors/orgs/projects"),
		// 			ID: to.Ptr("/subscriptions/e7032cc6-7422-4ddd-9022-bfbf23b05332/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/testconnector/orgs/myOrg/projects/myProjectNew"),
		// 			Properties: &armsecuritydevops.AzureDevOpsProjectProperties{
		// 				AutoDiscovery: to.Ptr(armsecuritydevops.AutoDiscoveryDisabled),
		// 			},
		// 	}},
		// }
	}
}
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 {
	// Azure DevOps Project Proxy Resource.
	AzureDevOpsProject
}

AzureDevOpsProjectClientCreateOrUpdateResponse contains the response from method AzureDevOpsProjectClient.BeginCreateOrUpdate.

type AzureDevOpsProjectClientGetOptions

type AzureDevOpsProjectClientGetOptions struct {
}

AzureDevOpsProjectClientGetOptions contains the optional parameters for the AzureDevOpsProjectClient.Get method.

type AzureDevOpsProjectClientGetResponse

type AzureDevOpsProjectClientGetResponse struct {
	// Azure DevOps Project Proxy Resource.
	AzureDevOpsProject
}

AzureDevOpsProjectClientGetResponse contains the response from method AzureDevOpsProjectClient.Get.

type AzureDevOpsProjectClientListOptions

type AzureDevOpsProjectClientListOptions struct {
}

AzureDevOpsProjectClientListOptions contains the optional parameters for the AzureDevOpsProjectClient.NewListPager method.

type AzureDevOpsProjectClientListResponse

type AzureDevOpsProjectClientListResponse struct {
	AzureDevOpsProjectListResponse
}

AzureDevOpsProjectClientListResponse contains the response from method AzureDevOpsProjectClient.NewListPager.

type AzureDevOpsProjectClientUpdateResponse

type AzureDevOpsProjectClientUpdateResponse struct {
	// Azure DevOps Project Proxy Resource.
	AzureDevOpsProject
}

AzureDevOpsProjectClientUpdateResponse contains the response from method AzureDevOpsProjectClient.BeginUpdate.

type AzureDevOpsProjectListResponse

type AzureDevOpsProjectListResponse struct {
	// Gets or sets next link to scroll over the results.
	NextLink *string

	// Gets or sets list of resources.
	Value []*AzureDevOpsProject
}

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

	// Gets or sets name of the AzureDevOps Project.
	Name *string

	// Gets or sets repositories.
	Repos []*string
}

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

	// Gets or sets AzureDevOps Org Name.
	OrgName *string

	// Gets or sets AzureDevOps Project Id.
	ProjectID         *string
	ProvisioningState *ProvisioningState
}

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

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

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/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAzureDevOpsRepoClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AzureDevOpsRepo = armsecuritydevops.AzureDevOpsRepo{
	// 	Name: to.Ptr("myRepo"),
	// 	Type: to.Ptr("Microsoft.SecurityDevOps/azureDevOpsConnectos/orgs/projects/repos"),
	// 	ID: to.Ptr("/subscriptions/e7032cc6-7422-4ddd-9022-bfbf23b05332/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/testconnector/orgs/myOrg/projects/myProject/repos/myRepo"),
	// 	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),
	// 					},
	// 					ProvisioningState: to.Ptr(armsecuritydevops.ProvisioningStateSucceeded),
	// 					RepoID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 					RepoURL: to.Ptr("https://dev.azure.com/myOrg/myProject/_git/myRepo"),
	// 				},
	// 			}
}
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/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAzureDevOpsRepoClient().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/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAzureDevOpsRepoClient().Get(ctx, "westusrg", "testconnector", "myOrg", "myProject", "myRepo", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AzureDevOpsRepo = armsecuritydevops.AzureDevOpsRepo{
	// 	Type: to.Ptr("Microsoft.SecurityDevOps/azureDevOpsConnectos/orgs/projects/repos"),
	// 	ID: to.Ptr("/subscriptions/e7032cc6-7422-4ddd-9022-bfbf23b05332/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/testconnector/orgs/myOrg/projects/myProject/repos/myRepo"),
	// 	Properties: &armsecuritydevops.AzureDevOpsRepoProperties{
	// 		RepoURL: to.Ptr("https://dev.azure.com/myOrg/myProject/myRepo"),
	// 	},
	// }
}
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.NewListByConnectorPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAzureDevOpsRepoClient().NewListByConnectorPager("westusrg", "testconnector", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AzureDevOpsRepoListResponse = armsecuritydevops.AzureDevOpsRepoListResponse{
		// 	Value: []*armsecuritydevops.AzureDevOpsRepo{
		// 		{
		// 			Type: to.Ptr("microsoft.securitydevops/azureDevOpsConnectors/githubrepo"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/testconnector/orgs/myOrg1/projects/myProject/repos/myRepo"),
		// 			Properties: &armsecuritydevops.AzureDevOpsRepoProperties{
		// 				RepoURL: to.Ptr("https://dev.azure.com/myOrg/myProject/myRepo"),
		// 			},
		// 		},
		// 		{
		// 			Type: to.Ptr("microsoft.securitydevops/azureDevOpsConnectors/githubrepo"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/testconnector/orgs/myOrg2/projects/myProject/repos/myRepo"),
		// 			Properties: &armsecuritydevops.AzureDevOpsRepoProperties{
		// 				RepoURL: to.Ptr("https://dev.azure.com/myOrg2/myProject/myRepo"),
		// 			},
		// 	}},
		// }
	}
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAzureDevOpsRepoClient().NewListPager("westusrg", "testconnector", "myOrg", "myProject", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AzureDevOpsRepoListResponse = armsecuritydevops.AzureDevOpsRepoListResponse{
		// 	Value: []*armsecuritydevops.AzureDevOpsRepo{
		// 		{
		// 			Type: to.Ptr("microsoft.securitydevops/azureDevOpsConnectors/githubrepo"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/testconnector/orgs/myOrg1/projects/myProject/repos/myRepo"),
		// 			Properties: &armsecuritydevops.AzureDevOpsRepoProperties{
		// 				RepoURL: to.Ptr("https://dev.azure.com/myOrg/myProject/myRepo"),
		// 			},
		// 		},
		// 		{
		// 			Type: to.Ptr("microsoft.securitydevops/azureDevOpsConnectors/githubrepo"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/azureDevOpsConnectors/testconnector/orgs/myOrg2/projects/myProject/repos/myRepo"),
		// 			Properties: &armsecuritydevops.AzureDevOpsRepoProperties{
		// 				RepoURL: to.Ptr("https://dev.azure.com/myOrg2/myProject/myRepo"),
		// 			},
		// 	}},
		// }
	}
}
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 {
	// Azure DevOps Repo Proxy Resource.
	AzureDevOpsRepo
}

AzureDevOpsRepoClientCreateOrUpdateResponse contains the response from method AzureDevOpsRepoClient.BeginCreateOrUpdate.

type AzureDevOpsRepoClientGetOptions

type AzureDevOpsRepoClientGetOptions struct {
}

AzureDevOpsRepoClientGetOptions contains the optional parameters for the AzureDevOpsRepoClient.Get method.

type AzureDevOpsRepoClientGetResponse

type AzureDevOpsRepoClientGetResponse struct {
	// Azure DevOps Repo Proxy Resource.
	AzureDevOpsRepo
}

AzureDevOpsRepoClientGetResponse contains the response from method AzureDevOpsRepoClient.Get.

type AzureDevOpsRepoClientListByConnectorOptions

type AzureDevOpsRepoClientListByConnectorOptions struct {
}

AzureDevOpsRepoClientListByConnectorOptions contains the optional parameters for the AzureDevOpsRepoClient.NewListByConnectorPager method.

type AzureDevOpsRepoClientListByConnectorResponse

type AzureDevOpsRepoClientListByConnectorResponse struct {
	AzureDevOpsRepoListResponse
}

AzureDevOpsRepoClientListByConnectorResponse contains the response from method AzureDevOpsRepoClient.NewListByConnectorPager.

type AzureDevOpsRepoClientListOptions

type AzureDevOpsRepoClientListOptions struct {
}

AzureDevOpsRepoClientListOptions contains the optional parameters for the AzureDevOpsRepoClient.NewListPager method.

type AzureDevOpsRepoClientListResponse

type AzureDevOpsRepoClientListResponse struct {
	AzureDevOpsRepoListResponse
}

AzureDevOpsRepoClientListResponse contains the response from method AzureDevOpsRepoClient.NewListPager.

type AzureDevOpsRepoClientUpdateResponse

type AzureDevOpsRepoClientUpdateResponse struct {
	// Azure DevOps Repo Proxy Resource.
	AzureDevOpsRepo
}

AzureDevOpsRepoClientUpdateResponse contains the response from method AzureDevOpsRepoClient.BeginUpdate.

type AzureDevOpsRepoListResponse

type AzureDevOpsRepoListResponse struct {
	// Gets or sets next link to scroll over the results.
	NextLink *string

	// Gets or sets list of resources.
	Value []*AzureDevOpsRepo
}

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

	// Gets or sets AzureDevOps Org Name.
	OrgName *string

	// Gets or sets AzureDevOps Project Name.
	ProjectName       *string
	ProvisioningState *ProvisioningState

	// Gets or sets Azure DevOps repo id.
	RepoID *string

	// Gets or sets AzureDevOps repo url.
	RepoURL *string

	// Gets or sets AzureDevOps repo visibility, whether it is public or private etc.
	Visibility *string
}

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 ClientFactory added in v0.2.0

type ClientFactory struct {
	// contains filtered or unexported fields
}

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory added in v0.2.0

func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

  • 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 (*ClientFactory) NewAzureDevOpsConnectorClient added in v0.2.0

func (c *ClientFactory) NewAzureDevOpsConnectorClient() *AzureDevOpsConnectorClient

NewAzureDevOpsConnectorClient creates a new instance of AzureDevOpsConnectorClient.

func (*ClientFactory) NewAzureDevOpsConnectorStatsClient added in v0.2.0

func (c *ClientFactory) NewAzureDevOpsConnectorStatsClient() *AzureDevOpsConnectorStatsClient

NewAzureDevOpsConnectorStatsClient creates a new instance of AzureDevOpsConnectorStatsClient.

func (*ClientFactory) NewAzureDevOpsOrgClient added in v0.2.0

func (c *ClientFactory) NewAzureDevOpsOrgClient() *AzureDevOpsOrgClient

NewAzureDevOpsOrgClient creates a new instance of AzureDevOpsOrgClient.

func (*ClientFactory) NewAzureDevOpsProjectClient added in v0.2.0

func (c *ClientFactory) NewAzureDevOpsProjectClient() *AzureDevOpsProjectClient

NewAzureDevOpsProjectClient creates a new instance of AzureDevOpsProjectClient.

func (*ClientFactory) NewAzureDevOpsRepoClient added in v0.2.0

func (c *ClientFactory) NewAzureDevOpsRepoClient() *AzureDevOpsRepoClient

NewAzureDevOpsRepoClient creates a new instance of AzureDevOpsRepoClient.

func (*ClientFactory) NewGitHubConnectorClient added in v0.2.0

func (c *ClientFactory) NewGitHubConnectorClient() *GitHubConnectorClient

NewGitHubConnectorClient creates a new instance of GitHubConnectorClient.

func (*ClientFactory) NewGitHubConnectorStatsClient added in v0.2.0

func (c *ClientFactory) NewGitHubConnectorStatsClient() *GitHubConnectorStatsClient

NewGitHubConnectorStatsClient creates a new instance of GitHubConnectorStatsClient.

func (*ClientFactory) NewGitHubOwnerClient added in v0.2.0

func (c *ClientFactory) NewGitHubOwnerClient() *GitHubOwnerClient

NewGitHubOwnerClient creates a new instance of GitHubOwnerClient.

func (*ClientFactory) NewGitHubRepoClient added in v0.2.0

func (c *ClientFactory) NewGitHubRepoClient() *GitHubRepoClient

NewGitHubRepoClient creates a new instance of GitHubRepoClient.

func (*ClientFactory) NewOperationsClient added in v0.2.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

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

	// Properties of the ARM resource for /subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.SecurityDevOps/gitHubConnectors.
	Properties *GitHubConnectorProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

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/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewGitHubConnectorClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GitHubConnector = armsecuritydevops.GitHubConnector{
	// 	Name: to.Ptr("testconnector"),
	// 	Type: to.Ptr("microsoft.securitydevops/githubconnectors"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/gitHubConnectors/testconnector"),
	// 	Location: to.Ptr("West US"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Properties: &armsecuritydevops.GitHubConnectorProperties{
	// 		ProvisioningState: to.Ptr(armsecuritydevops.ProvisioningStateSucceeded),
	// 	},
	// }
}
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/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewGitHubConnectorClient().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/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewGitHubConnectorClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GitHubConnector = armsecuritydevops.GitHubConnector{
	// 	Name: to.Ptr("testconnector1"),
	// 	Type: to.Ptr("microsoft.securitydevops/githubconnectors"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SecurityDevOps/gitHubConnectors"),
	// 	Location: to.Ptr("West US"),
	// 	Tags: map[string]*string{
	// 		"Environment": to.Ptr("Dev"),
	// 	},
	// 	Properties: &armsecuritydevops.GitHubConnectorProperties{
	// 		ProvisioningState: to.Ptr(armsecuritydevops.ProvisioningStateSucceeded),
	// 	},
	// }
}
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/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGitHubConnectorClient().Get(ctx, "westusrg", "testconnector", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GitHubConnector = armsecuritydevops.GitHubConnector{
	// 	Name: to.Ptr("testconnector"),
	// 	Type: to.Ptr("microsoft.securitydevops/githubconnectors"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/gitHubConnectors/testconnector"),
	// 	Location: to.Ptr("West US"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Properties: &armsecuritydevops.GitHubConnectorProperties{
	// 		ProvisioningState: to.Ptr(armsecuritydevops.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*GitHubConnectorClient) NewListByResourceGroupPager

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - GitHubConnectorClientListByResourceGroupOptions contains the optional parameters for the GitHubConnectorClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewGitHubConnectorClient().NewListByResourceGroupPager("westusrg", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.GitHubConnectorListResponse = armsecuritydevops.GitHubConnectorListResponse{
		// 	Value: []*armsecuritydevops.GitHubConnector{
		// 		{
		// 			Name: to.Ptr("testconnector1"),
		// 			Type: to.Ptr("microsoft.securitydevops/githubconnectors"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/gitHubConnectors/testconnector"),
		// 			Location: to.Ptr("West US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armsecuritydevops.GitHubConnectorProperties{
		// 				ProvisioningState: to.Ptr(armsecuritydevops.ProvisioningStateSucceeded),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("testconnector2"),
		// 			Type: to.Ptr("microsoft.securitydevops/githubconnectors"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/gitHubConnectors/testconnector"),
		// 			Location: to.Ptr("West US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armsecuritydevops.GitHubConnectorProperties{
		// 				ProvisioningState: to.Ptr(armsecuritydevops.ProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*GitHubConnectorClient) NewListBySubscriptionPager

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.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewGitHubConnectorClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.GitHubConnectorListResponse = armsecuritydevops.GitHubConnectorListResponse{
		// 	Value: []*armsecuritydevops.GitHubConnector{
		// 		{
		// 			Name: to.Ptr("testconnector1"),
		// 			Type: to.Ptr("microsoft.securitydevops/githubconnectors"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SecurityDevOps/gitHubConnectors"),
		// 			Location: to.Ptr("West US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armsecuritydevops.GitHubConnectorProperties{
		// 				ProvisioningState: to.Ptr(armsecuritydevops.ProvisioningStateSucceeded),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("testconnector2"),
		// 			Type: to.Ptr("microsoft.securitydevops/githubconnectors"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SecurityDevOps/gitHubConnectors"),
		// 			Location: to.Ptr("West US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armsecuritydevops.GitHubConnectorProperties{
		// 				ProvisioningState: to.Ptr(armsecuritydevops.ProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
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 {
	// Represents an ARM resource for /subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.SecurityDevOps/gitHubConnectors.
	GitHubConnector
}

GitHubConnectorClientCreateOrUpdateResponse contains the response from method GitHubConnectorClient.BeginCreateOrUpdate.

type GitHubConnectorClientDeleteResponse

type GitHubConnectorClientDeleteResponse struct {
}

GitHubConnectorClientDeleteResponse contains the response from method GitHubConnectorClient.BeginDelete.

type GitHubConnectorClientGetOptions

type GitHubConnectorClientGetOptions struct {
}

GitHubConnectorClientGetOptions contains the optional parameters for the GitHubConnectorClient.Get method.

type GitHubConnectorClientGetResponse

type GitHubConnectorClientGetResponse struct {
	// Represents an ARM resource for /subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.SecurityDevOps/gitHubConnectors.
	GitHubConnector
}

GitHubConnectorClientGetResponse contains the response from method GitHubConnectorClient.Get.

type GitHubConnectorClientListByResourceGroupOptions

type GitHubConnectorClientListByResourceGroupOptions struct {
}

GitHubConnectorClientListByResourceGroupOptions contains the optional parameters for the GitHubConnectorClient.NewListByResourceGroupPager method.

type GitHubConnectorClientListByResourceGroupResponse

type GitHubConnectorClientListByResourceGroupResponse struct {
	GitHubConnectorListResponse
}

GitHubConnectorClientListByResourceGroupResponse contains the response from method GitHubConnectorClient.NewListByResourceGroupPager.

type GitHubConnectorClientListBySubscriptionOptions

type GitHubConnectorClientListBySubscriptionOptions struct {
}

GitHubConnectorClientListBySubscriptionOptions contains the optional parameters for the GitHubConnectorClient.NewListBySubscriptionPager method.

type GitHubConnectorClientListBySubscriptionResponse

type GitHubConnectorClientListBySubscriptionResponse struct {
	GitHubConnectorListResponse
}

GitHubConnectorClientListBySubscriptionResponse contains the response from method GitHubConnectorClient.NewListBySubscriptionPager.

type GitHubConnectorClientUpdateResponse

type GitHubConnectorClientUpdateResponse struct {
	// Represents an ARM resource for /subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.SecurityDevOps/gitHubConnectors.
	GitHubConnector
}

GitHubConnectorClientUpdateResponse contains the response from method GitHubConnectorClient.BeginUpdate.

type GitHubConnectorListResponse

type GitHubConnectorListResponse struct {
	// Gets or sets next link to scroll over the results.
	NextLink *string

	// Gets or sets list of resources.
	Value []*GitHubConnector
}

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
	ProvisioningState *ProvisioningState
}

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

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

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

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/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGitHubConnectorStatsClient().Get(ctx, "westusrg", "testconnector", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GitHubConnectorStatsListResponse = armsecuritydevops.GitHubConnectorStatsListResponse{
	// 	Value: []*armsecuritydevops.GitHubConnectorStats{
	// 		{
	// 			Name: to.Ptr("testconnector1"),
	// 			Type: to.Ptr("microsoft.securitydevops/githubconnectors"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SecurityDevOps/gitHubConnectors"),
	// 			Properties: &armsecuritydevops.GitHubConnectorStatsProperties{
	// 				ProvisioningState: to.Ptr(armsecuritydevops.ProvisioningStateSucceeded),
	// 				ReposCount: to.Ptr[int64](100),
	// 			},
	// 	}},
	// }
}
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

	// Gets or sets list of resources.
	Value []*GitHubConnectorStats
}

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
	ProvisioningState *ProvisioningState

	// Gets or sets repos count.
	ReposCount *int64
}

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

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

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/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewGitHubOwnerClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GitHubOwner = armsecuritydevops.GitHubOwner{
	// 	Name: to.Ptr("Azure"),
	// 	Type: to.Ptr("Microsoft.SecurityDevOps/owners"),
	// 	ID: to.Ptr("/subscriptions/e7032cc6-7422-4ddd-9022-bfbf23b05332/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/gitHubConnectors/testconnector/owners/Azure"),
	// 	Properties: &armsecuritydevops.GitHubOwnerProperties{
	// 		OwnerURL: to.Ptr("https://github.com/Azure"),
	// 		ProvisioningState: to.Ptr(armsecuritydevops.ProvisioningStateSucceeded),
	// 	},
	// }
}
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/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewGitHubOwnerClient().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/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGitHubOwnerClient().Get(ctx, "westusrg", "testconnector", "Azure", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GitHubOwner = armsecuritydevops.GitHubOwner{
	// 	Name: to.Ptr("Azure"),
	// 	Type: to.Ptr("Microsoft.SecurityDevOps/owners/repos"),
	// 	ID: to.Ptr("/subscriptions/e7032cc6-7422-4ddd-9022-bfbf23b05332/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/gitHubConnectors/testconnector/owners/Azure"),
	// 	Properties: &armsecuritydevops.GitHubOwnerProperties{
	// 		OwnerURL: to.Ptr("https://github.com/Azure"),
	// 		ProvisioningState: to.Ptr(armsecuritydevops.ProvisioningStateSucceeded),
	// 	},
	// }
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewGitHubOwnerClient().NewListPager("westusrg", "testconnector", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.GitHubOwnerListResponse = armsecuritydevops.GitHubOwnerListResponse{
		// 	Value: []*armsecuritydevops.GitHubOwner{
		// 		{
		// 			Name: to.Ptr("Azure"),
		// 			Type: to.Ptr("microsoft.securitydevops/githubconnectors/owners"),
		// 			ID: to.Ptr("/subscriptions/e7032cc6-7422-4ddd-9022-bfbf23b05332/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/gitHubConnectors/testconnector/owners/Azure"),
		// 			Properties: &armsecuritydevops.GitHubOwnerProperties{
		// 				OwnerURL: to.Ptr("https://github.com/Azure"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Azure-Samples"),
		// 			Type: to.Ptr("microsoft.securitydevops/githubconnectors/owners"),
		// 			ID: to.Ptr("/subscriptions/e7032cc6-7422-4ddd-9022-bfbf23b05332/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/gitHubConnectors/testconnector/owners/Azure-Samples"),
		// 			Properties: &armsecuritydevops.GitHubOwnerProperties{
		// 				OwnerURL: to.Ptr("https://github.com/Azure-Samples"),
		// 			},
		// 	}},
		// }
	}
}
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 {
	// GitHub repo owner Proxy Resource.
	GitHubOwner
}

GitHubOwnerClientCreateOrUpdateResponse contains the response from method GitHubOwnerClient.BeginCreateOrUpdate.

type GitHubOwnerClientGetOptions

type GitHubOwnerClientGetOptions struct {
}

GitHubOwnerClientGetOptions contains the optional parameters for the GitHubOwnerClient.Get method.

type GitHubOwnerClientGetResponse

type GitHubOwnerClientGetResponse struct {
	// GitHub repo owner Proxy Resource.
	GitHubOwner
}

GitHubOwnerClientGetResponse contains the response from method GitHubOwnerClient.Get.

type GitHubOwnerClientListOptions

type GitHubOwnerClientListOptions struct {
}

GitHubOwnerClientListOptions contains the optional parameters for the GitHubOwnerClient.NewListPager method.

type GitHubOwnerClientListResponse

type GitHubOwnerClientListResponse struct {
	GitHubOwnerListResponse
}

GitHubOwnerClientListResponse contains the response from method GitHubOwnerClient.NewListPager.

type GitHubOwnerClientUpdateResponse

type GitHubOwnerClientUpdateResponse struct {
	// GitHub repo owner Proxy Resource.
	GitHubOwner
}

GitHubOwnerClientUpdateResponse contains the response from method GitHubOwnerClient.BeginUpdate.

type GitHubOwnerListResponse

type GitHubOwnerListResponse struct {
	// Gets or sets next link to scroll over the results.
	NextLink *string

	// Gets or sets list of resources.
	Value []*GitHubOwner
}

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
	ProvisioningState *ProvisioningState
}

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

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

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/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewGitHubRepoClient().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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GitHubRepo = armsecuritydevops.GitHubRepo{
	// 	Name: to.Ptr("azure-rest-api-specs"),
	// 	Type: to.Ptr("Microsoft.SecurityDevOps/owners/repos"),
	// 	ID: to.Ptr("/subscriptions/e7032cc6-7422-4ddd-9022-bfbf23b05332/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/gitHubConnectors/testconnector/owners/myOrg/repos/azure-rest-api-specs"),
	// 	Properties: &armsecuritydevops.GitHubRepoProperties{
	// 		AccountID: to.Ptr[int64](6844498),
	// 		OwnerName: to.Ptr("Azure"),
	// 		ProvisioningState: to.Ptr(armsecuritydevops.ProvisioningStateSucceeded),
	// 		RepoURL: to.Ptr("https://github.com/Azure/azure-rest-api-specs"),
	// 	},
	// }
}
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/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewGitHubRepoClient().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/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGitHubRepoClient().Get(ctx, "westusrg", "testconnector", "Azure", "39093389", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GitHubRepo = armsecuritydevops.GitHubRepo{
	// 	Name: to.Ptr("azure-rest-api-specs"),
	// 	Type: to.Ptr("Microsoft.SecurityDevOps/owners/repos"),
	// 	ID: to.Ptr("/subscriptions/e7032cc6-7422-4ddd-9022-bfbf23b05332/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/gitHubConnectors/testconnector/owners/Azure/repos/azure-rest-api-specs"),
	// 	Properties: &armsecuritydevops.GitHubRepoProperties{
	// 		AccountID: to.Ptr[int64](6844498),
	// 		ProvisioningState: to.Ptr(armsecuritydevops.ProvisioningStateSucceeded),
	// 		RepoURL: to.Ptr("https://github.com/Azure/azure-rest-api-specs"),
	// 	},
	// }
}
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.NewListByConnectorPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewGitHubRepoClient().NewListByConnectorPager("westusrg", "testconnector", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.GitHubRepoListResponse = armsecuritydevops.GitHubRepoListResponse{
		// 	Value: []*armsecuritydevops.GitHubRepo{
		// 		{
		// 			Type: to.Ptr("microsoft.securitydevops/githubconnectors/owners/repos"),
		// 			ID: to.Ptr("/subscriptions/e7032cc6-7422-4ddd-9022-bfbf23b05332/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/gitHubConnectors/testconnector/owners/Azure/repos/azure-rest-api-specs"),
		// 			Properties: &armsecuritydevops.GitHubRepoProperties{
		// 				AccountID: to.Ptr[int64](6844498),
		// 				RepoURL: to.Ptr("https://github.com/Azure/azure-rest-api-specs"),
		// 			},
		// 		},
		// 		{
		// 			Type: to.Ptr("microsoft.securitydevops/githubconnectors/owners/repos"),
		// 			ID: to.Ptr("/subscriptions/e7032cc6-7422-4ddd-9022-bfbf23b05332/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/gitHubConnectors/testconnector/owners/Azure-Samples/repos/another-repo"),
		// 			Properties: &armsecuritydevops.GitHubRepoProperties{
		// 				AccountID: to.Ptr[int64](6844499),
		// 				RepoURL: to.Ptr("https://github.com/Azure-Samples/another-repo"),
		// 			},
		// 	}},
		// }
	}
}
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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewGitHubRepoClient().NewListPager("westusrg", "testconnector", "Azure", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.GitHubRepoListResponse = armsecuritydevops.GitHubRepoListResponse{
		// 	Value: []*armsecuritydevops.GitHubRepo{
		// 		{
		// 			Name: to.Ptr("azure-rest-api-specs"),
		// 			Type: to.Ptr("microsoft.securitydevops/githubconnectors/owners/repos"),
		// 			ID: to.Ptr("/subscriptions/e7032cc6-7422-4ddd-9022-bfbf23b05332/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/gitHubConnectors/testconnector/owners/Azure/repos/azure-rest-api-specs"),
		// 			Properties: &armsecuritydevops.GitHubRepoProperties{
		// 				AccountID: to.Ptr[int64](6844498),
		// 				RepoURL: to.Ptr("https://github.com/Azure/azure-rest-api-specs"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("azure-rest-api-specs"),
		// 			Type: to.Ptr("microsoft.securitydevops/githubconnectors/owners/repos"),
		// 			ID: to.Ptr("/subscriptions/e7032cc6-7422-4ddd-9022-bfbf23b05332/resourceGroups/westusrg/providers/Microsoft.SecurityDevOps/gitHubConnectors/testconnector/owners/Azure/repos/another-repo"),
		// 			Properties: &armsecuritydevops.GitHubRepoProperties{
		// 				AccountID: to.Ptr[int64](6844499),
		// 				RepoURL: to.Ptr("https://github.com/Azure/another-repo"),
		// 			},
		// 	}},
		// }
	}
}
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 {
	// GitHub repo Proxy Resource.
	GitHubRepo
}

GitHubRepoClientCreateOrUpdateResponse contains the response from method GitHubRepoClient.BeginCreateOrUpdate.

type GitHubRepoClientGetOptions

type GitHubRepoClientGetOptions struct {
}

GitHubRepoClientGetOptions contains the optional parameters for the GitHubRepoClient.Get method.

type GitHubRepoClientGetResponse

type GitHubRepoClientGetResponse struct {
	// GitHub repo Proxy Resource.
	GitHubRepo
}

GitHubRepoClientGetResponse contains the response from method GitHubRepoClient.Get.

type GitHubRepoClientListByConnectorOptions

type GitHubRepoClientListByConnectorOptions struct {
}

GitHubRepoClientListByConnectorOptions contains the optional parameters for the GitHubRepoClient.NewListByConnectorPager method.

type GitHubRepoClientListByConnectorResponse

type GitHubRepoClientListByConnectorResponse struct {
	GitHubRepoListResponse
}

GitHubRepoClientListByConnectorResponse contains the response from method GitHubRepoClient.NewListByConnectorPager.

type GitHubRepoClientListOptions

type GitHubRepoClientListOptions struct {
}

GitHubRepoClientListOptions contains the optional parameters for the GitHubRepoClient.NewListPager method.

type GitHubRepoClientListResponse

type GitHubRepoClientListResponse struct {
	GitHubRepoListResponse
}

GitHubRepoClientListResponse contains the response from method GitHubRepoClient.NewListPager.

type GitHubRepoClientUpdateResponse

type GitHubRepoClientUpdateResponse struct {
	// GitHub repo Proxy Resource.
	GitHubRepo
}

GitHubRepoClientUpdateResponse contains the response from method GitHubRepoClient.BeginUpdate.

type GitHubRepoListResponse

type GitHubRepoListResponse struct {
	// Gets or sets next link to scroll over the results.
	NextLink *string

	// Gets or sets list of resources.
	Value []*GitHubRepo
}

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

	// Gets or sets GitHub Owner Name.
	OwnerName         *string
	ProvisioningState *ProvisioningState

	// Gets or sets gitHub repo url.
	RepoURL *string
}

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

	// READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
	ActionType *ActionType

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

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

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

Operation - Details of a REST API operation, returned from the Resource Provider Operations API

func (Operation) MarshalJSON

func (o Operation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON

func (o *Operation) UnmarshalJSON(data []byte) error

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

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

	// READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft
	// Compute".
	Provider *string

	// READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job
	// Schedule Collections".
	Resource *string
}

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

	// READ-ONLY; List of operations supported by the resource provider
	Value []*Operation
}

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

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.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c71a66dab813061f1d09982c2748a09317fe0860/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()
	clientFactory, err := armsecuritydevops.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OperationListResult = armsecuritydevops.OperationListResult{
		// 	Value: []*armsecuritydevops.Operation{
		// 		{
		// 			Name: to.Ptr("Microsoft.SecurityDevOps/gitHubConnectors/Read"),
		// 			Display: &armsecuritydevops.OperationDisplay{
		// 				Description: to.Ptr("Read gitHubConnector"),
		// 				Operation: to.Ptr("Get/List gitHubConnector resources"),
		// 				Provider: to.Ptr("Microsoft.SecurityDevOps"),
		// 				Resource: to.Ptr("gitHubConnectors"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.SecurityDevOps/gitHubConnectors/Write"),
		// 			Display: &armsecuritydevops.OperationDisplay{
		// 				Description: to.Ptr("Write gitHubConnector"),
		// 				Operation: to.Ptr("Create/Update gitHubConnector resources"),
		// 				Provider: to.Ptr("Microsoft.SecurityDevOps"),
		// 				Resource: to.Ptr("gitHubConnectors"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.SecurityDevOps/gitHubConnectors/Delete"),
		// 			Display: &armsecuritydevops.OperationDisplay{
		// 				Description: to.Ptr("Delete gitHubConnector"),
		// 				Operation: to.Ptr("Delete gitHubConnector resources"),
		// 				Provider: to.Ptr("Microsoft.SecurityDevOps"),
		// 				Resource: to.Ptr("gitHubConnectors"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 	}},
		// }
	}
}
Output:

type OperationsClientListOptions

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.

type OperationsClientListResponse

type OperationsClientListResponse struct {
	// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

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"

const (
	OriginSystem     Origin = "system"
	OriginUser       Origin = "user"
	OriginUserSystem Origin = "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

	// The identity that created the resource.
	CreatedBy *string

	// The type of identity that created the resource.
	CreatedByType *CreatedByType

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time

	// The identity that last modified the resource.
	LastModifiedBy *string

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType
}

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
}

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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