security

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResourceAuthorization deprecated

type ResourceAuthorization struct {
	pulumi.CustomResourceState

	// Set to true to allow public access in the project. Type: boolean.
	Authorized pulumi.BoolOutput `pulumi:"authorized"`
	// The ID of the build definition to authorize. Type: string.
	DefinitionId pulumi.IntPtrOutput `pulumi:"definitionId"`
	// The project ID or project name. Type: string.
	ProjectId pulumi.StringOutput `pulumi:"projectId"`
	// The ID of the resource to authorize. Type: string.
	ResourceId pulumi.StringOutput `pulumi:"resourceId"`
	// The type of the resource to authorize. Type: string. Valid values: `endpoint`, `queue`, `variablegroup`. Default value: `endpoint`.
	Type pulumi.StringPtrOutput `pulumi:"type"`
}

Manages authorization of resources, e.g. for access in build pipelines.

Currently supported resources: service endpoint (aka service connection, endpoint).

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-azuredevops/sdk/go/azuredevops"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		project, err := azuredevops.NewProject(ctx, "project", nil)
		if err != nil {
			return err
		}
		bitbucketAccount, err := azuredevops.NewServiceEndpointBitBucket(ctx, "bitbucketAccount", &azuredevops.ServiceEndpointBitBucketArgs{
			ProjectId:           project.ID(),
			Username:            pulumi.String("xxxx"),
			Password:            pulumi.String("xxxx"),
			ServiceEndpointName: pulumi.String("test-bitbucket"),
			Description:         pulumi.String("test"),
		})
		if err != nil {
			return err
		}
		_, err = azuredevops.NewResourceAuthorization(ctx, "auth", &azuredevops.ResourceAuthorizationArgs{
			ProjectId:  project.ID(),
			ResourceId: bitbucketAccount.ID(),
			Authorized: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ## Relevant Links

- [Azure DevOps Service REST API 5.1 - Authorize Definition Resource](https://docs.microsoft.com/en-us/rest/api/azure/devops/build/resources/authorize%20definition%20resources?view=azure-devops-rest-5.1)

Deprecated: azuredevops.security.ResourceAuthorization has been deprecated in favor of azuredevops.ResourceAuthorization

func GetResourceAuthorization

func GetResourceAuthorization(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ResourceAuthorizationState, opts ...pulumi.ResourceOption) (*ResourceAuthorization, error)

GetResourceAuthorization gets an existing ResourceAuthorization resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewResourceAuthorization

func NewResourceAuthorization(ctx *pulumi.Context,
	name string, args *ResourceAuthorizationArgs, opts ...pulumi.ResourceOption) (*ResourceAuthorization, error)

NewResourceAuthorization registers a new resource with the given unique name, arguments, and options.

func (*ResourceAuthorization) ElementType

func (*ResourceAuthorization) ElementType() reflect.Type

func (*ResourceAuthorization) ToResourceAuthorizationOutput

func (i *ResourceAuthorization) ToResourceAuthorizationOutput() ResourceAuthorizationOutput

func (*ResourceAuthorization) ToResourceAuthorizationOutputWithContext

func (i *ResourceAuthorization) ToResourceAuthorizationOutputWithContext(ctx context.Context) ResourceAuthorizationOutput

func (*ResourceAuthorization) ToResourceAuthorizationPtrOutput added in v1.2.2

func (i *ResourceAuthorization) ToResourceAuthorizationPtrOutput() ResourceAuthorizationPtrOutput

func (*ResourceAuthorization) ToResourceAuthorizationPtrOutputWithContext added in v1.2.2

func (i *ResourceAuthorization) ToResourceAuthorizationPtrOutputWithContext(ctx context.Context) ResourceAuthorizationPtrOutput

type ResourceAuthorizationArgs

type ResourceAuthorizationArgs struct {
	// Set to true to allow public access in the project. Type: boolean.
	Authorized pulumi.BoolInput
	// The ID of the build definition to authorize. Type: string.
	DefinitionId pulumi.IntPtrInput
	// The project ID or project name. Type: string.
	ProjectId pulumi.StringInput
	// The ID of the resource to authorize. Type: string.
	ResourceId pulumi.StringInput
	// The type of the resource to authorize. Type: string. Valid values: `endpoint`, `queue`, `variablegroup`. Default value: `endpoint`.
	Type pulumi.StringPtrInput
}

The set of arguments for constructing a ResourceAuthorization resource.

func (ResourceAuthorizationArgs) ElementType

func (ResourceAuthorizationArgs) ElementType() reflect.Type

type ResourceAuthorizationArray added in v1.2.2

type ResourceAuthorizationArray []ResourceAuthorizationInput

func (ResourceAuthorizationArray) ElementType added in v1.2.2

func (ResourceAuthorizationArray) ElementType() reflect.Type

func (ResourceAuthorizationArray) ToResourceAuthorizationArrayOutput added in v1.2.2

func (i ResourceAuthorizationArray) ToResourceAuthorizationArrayOutput() ResourceAuthorizationArrayOutput

func (ResourceAuthorizationArray) ToResourceAuthorizationArrayOutputWithContext added in v1.2.2

func (i ResourceAuthorizationArray) ToResourceAuthorizationArrayOutputWithContext(ctx context.Context) ResourceAuthorizationArrayOutput

type ResourceAuthorizationArrayInput added in v1.2.2

type ResourceAuthorizationArrayInput interface {
	pulumi.Input

	ToResourceAuthorizationArrayOutput() ResourceAuthorizationArrayOutput
	ToResourceAuthorizationArrayOutputWithContext(context.Context) ResourceAuthorizationArrayOutput
}

ResourceAuthorizationArrayInput is an input type that accepts ResourceAuthorizationArray and ResourceAuthorizationArrayOutput values. You can construct a concrete instance of `ResourceAuthorizationArrayInput` via:

ResourceAuthorizationArray{ ResourceAuthorizationArgs{...} }

type ResourceAuthorizationArrayOutput added in v1.2.2

type ResourceAuthorizationArrayOutput struct{ *pulumi.OutputState }

func (ResourceAuthorizationArrayOutput) ElementType added in v1.2.2

func (ResourceAuthorizationArrayOutput) Index added in v1.2.2

func (ResourceAuthorizationArrayOutput) ToResourceAuthorizationArrayOutput added in v1.2.2

func (o ResourceAuthorizationArrayOutput) ToResourceAuthorizationArrayOutput() ResourceAuthorizationArrayOutput

func (ResourceAuthorizationArrayOutput) ToResourceAuthorizationArrayOutputWithContext added in v1.2.2

func (o ResourceAuthorizationArrayOutput) ToResourceAuthorizationArrayOutputWithContext(ctx context.Context) ResourceAuthorizationArrayOutput

type ResourceAuthorizationInput

type ResourceAuthorizationInput interface {
	pulumi.Input

	ToResourceAuthorizationOutput() ResourceAuthorizationOutput
	ToResourceAuthorizationOutputWithContext(ctx context.Context) ResourceAuthorizationOutput
}

type ResourceAuthorizationMap added in v1.2.2

type ResourceAuthorizationMap map[string]ResourceAuthorizationInput

func (ResourceAuthorizationMap) ElementType added in v1.2.2

func (ResourceAuthorizationMap) ElementType() reflect.Type

func (ResourceAuthorizationMap) ToResourceAuthorizationMapOutput added in v1.2.2

func (i ResourceAuthorizationMap) ToResourceAuthorizationMapOutput() ResourceAuthorizationMapOutput

func (ResourceAuthorizationMap) ToResourceAuthorizationMapOutputWithContext added in v1.2.2

func (i ResourceAuthorizationMap) ToResourceAuthorizationMapOutputWithContext(ctx context.Context) ResourceAuthorizationMapOutput

type ResourceAuthorizationMapInput added in v1.2.2

type ResourceAuthorizationMapInput interface {
	pulumi.Input

	ToResourceAuthorizationMapOutput() ResourceAuthorizationMapOutput
	ToResourceAuthorizationMapOutputWithContext(context.Context) ResourceAuthorizationMapOutput
}

ResourceAuthorizationMapInput is an input type that accepts ResourceAuthorizationMap and ResourceAuthorizationMapOutput values. You can construct a concrete instance of `ResourceAuthorizationMapInput` via:

ResourceAuthorizationMap{ "key": ResourceAuthorizationArgs{...} }

type ResourceAuthorizationMapOutput added in v1.2.2

type ResourceAuthorizationMapOutput struct{ *pulumi.OutputState }

func (ResourceAuthorizationMapOutput) ElementType added in v1.2.2

func (ResourceAuthorizationMapOutput) MapIndex added in v1.2.2

func (ResourceAuthorizationMapOutput) ToResourceAuthorizationMapOutput added in v1.2.2

func (o ResourceAuthorizationMapOutput) ToResourceAuthorizationMapOutput() ResourceAuthorizationMapOutput

func (ResourceAuthorizationMapOutput) ToResourceAuthorizationMapOutputWithContext added in v1.2.2

func (o ResourceAuthorizationMapOutput) ToResourceAuthorizationMapOutputWithContext(ctx context.Context) ResourceAuthorizationMapOutput

type ResourceAuthorizationOutput

type ResourceAuthorizationOutput struct {
	*pulumi.OutputState
}

func (ResourceAuthorizationOutput) ElementType

func (ResourceAuthorizationOutput) ToResourceAuthorizationOutput

func (o ResourceAuthorizationOutput) ToResourceAuthorizationOutput() ResourceAuthorizationOutput

func (ResourceAuthorizationOutput) ToResourceAuthorizationOutputWithContext

func (o ResourceAuthorizationOutput) ToResourceAuthorizationOutputWithContext(ctx context.Context) ResourceAuthorizationOutput

func (ResourceAuthorizationOutput) ToResourceAuthorizationPtrOutput added in v1.2.2

func (o ResourceAuthorizationOutput) ToResourceAuthorizationPtrOutput() ResourceAuthorizationPtrOutput

func (ResourceAuthorizationOutput) ToResourceAuthorizationPtrOutputWithContext added in v1.2.2

func (o ResourceAuthorizationOutput) ToResourceAuthorizationPtrOutputWithContext(ctx context.Context) ResourceAuthorizationPtrOutput

type ResourceAuthorizationPtrInput added in v1.2.2

type ResourceAuthorizationPtrInput interface {
	pulumi.Input

	ToResourceAuthorizationPtrOutput() ResourceAuthorizationPtrOutput
	ToResourceAuthorizationPtrOutputWithContext(ctx context.Context) ResourceAuthorizationPtrOutput
}

type ResourceAuthorizationPtrOutput added in v1.2.2

type ResourceAuthorizationPtrOutput struct {
	*pulumi.OutputState
}

func (ResourceAuthorizationPtrOutput) ElementType added in v1.2.2

func (ResourceAuthorizationPtrOutput) ToResourceAuthorizationPtrOutput added in v1.2.2

func (o ResourceAuthorizationPtrOutput) ToResourceAuthorizationPtrOutput() ResourceAuthorizationPtrOutput

func (ResourceAuthorizationPtrOutput) ToResourceAuthorizationPtrOutputWithContext added in v1.2.2

func (o ResourceAuthorizationPtrOutput) ToResourceAuthorizationPtrOutputWithContext(ctx context.Context) ResourceAuthorizationPtrOutput

type ResourceAuthorizationState

type ResourceAuthorizationState struct {
	// Set to true to allow public access in the project. Type: boolean.
	Authorized pulumi.BoolPtrInput
	// The ID of the build definition to authorize. Type: string.
	DefinitionId pulumi.IntPtrInput
	// The project ID or project name. Type: string.
	ProjectId pulumi.StringPtrInput
	// The ID of the resource to authorize. Type: string.
	ResourceId pulumi.StringPtrInput
	// The type of the resource to authorize. Type: string. Valid values: `endpoint`, `queue`, `variablegroup`. Default value: `endpoint`.
	Type pulumi.StringPtrInput
}

func (ResourceAuthorizationState) ElementType

func (ResourceAuthorizationState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

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