iam

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 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 GetPoliciesResult

type GetPoliciesResult struct {
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// List of the policies IDs.
	Policies []string `pulumi:"policies"`
}

A collection of values returned by getPolicies.

func GetPolicies

func GetPolicies(ctx *pulumi.Context, opts ...pulumi.InvokeOption) (*GetPoliciesResult, error)

Use this data source to list the existing IAM policies of an account.

## Important

> Using this resource requires that the account is enrolled in the OVHcloud [IAM beta](https://labs.ovhcloud.com/en/iam/)

## Example Usage

```go package main

import (

"github.com/lbrlabs/pulumi-ovh/sdk/go/ovh/Iam"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Iam.GetPolicies(ctx, nil, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

type GetReferenceActionsAction

type GetReferenceActionsAction struct {
	// Name of the action
	Action string `pulumi:"action"`
	// List of the categories of the action
	Categories []string `pulumi:"categories"`
	// Description of the action
	Description string `pulumi:"description"`
	// Resource type the action is related to
	ResourceType string `pulumi:"resourceType"`
}

type GetReferenceActionsActionArgs

type GetReferenceActionsActionArgs struct {
	// Name of the action
	Action pulumi.StringInput `pulumi:"action"`
	// List of the categories of the action
	Categories pulumi.StringArrayInput `pulumi:"categories"`
	// Description of the action
	Description pulumi.StringInput `pulumi:"description"`
	// Resource type the action is related to
	ResourceType pulumi.StringInput `pulumi:"resourceType"`
}

func (GetReferenceActionsActionArgs) ElementType

func (GetReferenceActionsActionArgs) ToGetReferenceActionsActionOutput

func (i GetReferenceActionsActionArgs) ToGetReferenceActionsActionOutput() GetReferenceActionsActionOutput

func (GetReferenceActionsActionArgs) ToGetReferenceActionsActionOutputWithContext

func (i GetReferenceActionsActionArgs) ToGetReferenceActionsActionOutputWithContext(ctx context.Context) GetReferenceActionsActionOutput

type GetReferenceActionsActionArray

type GetReferenceActionsActionArray []GetReferenceActionsActionInput

func (GetReferenceActionsActionArray) ElementType

func (GetReferenceActionsActionArray) ToGetReferenceActionsActionArrayOutput

func (i GetReferenceActionsActionArray) ToGetReferenceActionsActionArrayOutput() GetReferenceActionsActionArrayOutput

func (GetReferenceActionsActionArray) ToGetReferenceActionsActionArrayOutputWithContext

func (i GetReferenceActionsActionArray) ToGetReferenceActionsActionArrayOutputWithContext(ctx context.Context) GetReferenceActionsActionArrayOutput

type GetReferenceActionsActionArrayInput

type GetReferenceActionsActionArrayInput interface {
	pulumi.Input

	ToGetReferenceActionsActionArrayOutput() GetReferenceActionsActionArrayOutput
	ToGetReferenceActionsActionArrayOutputWithContext(context.Context) GetReferenceActionsActionArrayOutput
}

GetReferenceActionsActionArrayInput is an input type that accepts GetReferenceActionsActionArray and GetReferenceActionsActionArrayOutput values. You can construct a concrete instance of `GetReferenceActionsActionArrayInput` via:

GetReferenceActionsActionArray{ GetReferenceActionsActionArgs{...} }

type GetReferenceActionsActionArrayOutput

type GetReferenceActionsActionArrayOutput struct{ *pulumi.OutputState }

func (GetReferenceActionsActionArrayOutput) ElementType

func (GetReferenceActionsActionArrayOutput) Index

func (GetReferenceActionsActionArrayOutput) ToGetReferenceActionsActionArrayOutput

func (o GetReferenceActionsActionArrayOutput) ToGetReferenceActionsActionArrayOutput() GetReferenceActionsActionArrayOutput

func (GetReferenceActionsActionArrayOutput) ToGetReferenceActionsActionArrayOutputWithContext

func (o GetReferenceActionsActionArrayOutput) ToGetReferenceActionsActionArrayOutputWithContext(ctx context.Context) GetReferenceActionsActionArrayOutput

type GetReferenceActionsActionInput

type GetReferenceActionsActionInput interface {
	pulumi.Input

	ToGetReferenceActionsActionOutput() GetReferenceActionsActionOutput
	ToGetReferenceActionsActionOutputWithContext(context.Context) GetReferenceActionsActionOutput
}

GetReferenceActionsActionInput is an input type that accepts GetReferenceActionsActionArgs and GetReferenceActionsActionOutput values. You can construct a concrete instance of `GetReferenceActionsActionInput` via:

GetReferenceActionsActionArgs{...}

type GetReferenceActionsActionOutput

type GetReferenceActionsActionOutput struct{ *pulumi.OutputState }

func (GetReferenceActionsActionOutput) Action

Name of the action

func (GetReferenceActionsActionOutput) Categories

List of the categories of the action

func (GetReferenceActionsActionOutput) Description

Description of the action

func (GetReferenceActionsActionOutput) ElementType

func (GetReferenceActionsActionOutput) ResourceType

Resource type the action is related to

func (GetReferenceActionsActionOutput) ToGetReferenceActionsActionOutput

func (o GetReferenceActionsActionOutput) ToGetReferenceActionsActionOutput() GetReferenceActionsActionOutput

func (GetReferenceActionsActionOutput) ToGetReferenceActionsActionOutputWithContext

func (o GetReferenceActionsActionOutput) ToGetReferenceActionsActionOutputWithContext(ctx context.Context) GetReferenceActionsActionOutput

type GetReferenceActionsArgs

type GetReferenceActionsArgs struct {
	// Kind of resource we want the actions for
	Type string `pulumi:"type"`
}

A collection of arguments for invoking getReferenceActions.

type GetReferenceActionsOutputArgs

type GetReferenceActionsOutputArgs struct {
	// Kind of resource we want the actions for
	Type pulumi.StringInput `pulumi:"type"`
}

A collection of arguments for invoking getReferenceActions.

func (GetReferenceActionsOutputArgs) ElementType

type GetReferenceActionsResult

type GetReferenceActionsResult struct {
	// List of actions
	Actions []GetReferenceActionsAction `pulumi:"actions"`
	// The provider-assigned unique ID for this managed resource.
	Id   string `pulumi:"id"`
	Type string `pulumi:"type"`
}

A collection of values returned by getReferenceActions.

func GetReferenceActions

func GetReferenceActions(ctx *pulumi.Context, args *GetReferenceActionsArgs, opts ...pulumi.InvokeOption) (*GetReferenceActionsResult, error)

Use this data source to list the IAM action associated with a resource type.

## Important

> Using this resource requires that the account is enrolled in the OVHcloud [IAM beta](https://labs.ovhcloud.com/en/iam/)

type GetReferenceActionsResultOutput

type GetReferenceActionsResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getReferenceActions.

func (GetReferenceActionsResultOutput) Actions

List of actions

func (GetReferenceActionsResultOutput) ElementType

func (GetReferenceActionsResultOutput) Id

The provider-assigned unique ID for this managed resource.

func (GetReferenceActionsResultOutput) ToGetReferenceActionsResultOutput

func (o GetReferenceActionsResultOutput) ToGetReferenceActionsResultOutput() GetReferenceActionsResultOutput

func (GetReferenceActionsResultOutput) ToGetReferenceActionsResultOutputWithContext

func (o GetReferenceActionsResultOutput) ToGetReferenceActionsResultOutputWithContext(ctx context.Context) GetReferenceActionsResultOutput

func (GetReferenceActionsResultOutput) Type

type GetReferenceResourceTypeResult

type GetReferenceResourceTypeResult struct {
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// List of resource types
	Types []string `pulumi:"types"`
}

A collection of values returned by getReferenceResourceType.

func GetReferenceResourceType

func GetReferenceResourceType(ctx *pulumi.Context, opts ...pulumi.InvokeOption) (*GetReferenceResourceTypeResult, error)

Use this data source to list all the IAM resource types.

## Important

> Using this resource requires that the account is enrolled in the OVHcloud [IAM beta](https://labs.ovhcloud.com/en/iam/)

## Example Usage

```go package main

import (

"github.com/lbrlabs/pulumi-ovh/sdk/go/ovh/Iam"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Iam.GetReferenceResourceType(ctx, nil, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

type LookupPolicyArgs

type LookupPolicyArgs struct {
	// List of actions allowed by the policy.
	Allows []string `pulumi:"allows"`
	// Group description.
	Description *string `pulumi:"description"`
	// List of actions.
	Excepts []string `pulumi:"excepts"`
	// UUID of the policy.
	Id string `pulumi:"id"`
}

A collection of arguments for invoking getPolicy.

type LookupPolicyOutputArgs

type LookupPolicyOutputArgs struct {
	// List of actions allowed by the policy.
	Allows pulumi.StringArrayInput `pulumi:"allows"`
	// Group description.
	Description pulumi.StringPtrInput `pulumi:"description"`
	// List of actions.
	Excepts pulumi.StringArrayInput `pulumi:"excepts"`
	// UUID of the policy.
	Id pulumi.StringInput `pulumi:"id"`
}

A collection of arguments for invoking getPolicy.

func (LookupPolicyOutputArgs) ElementType

func (LookupPolicyOutputArgs) ElementType() reflect.Type

type LookupPolicyResult

type LookupPolicyResult struct {
	// List of actions allowed by the policy.
	Allows []string `pulumi:"allows"`
	// Creation date of this group.
	CreatedAt string `pulumi:"createdAt"`
	// Group description.
	Description *string `pulumi:"description"`
	// List of actions.
	Excepts []string `pulumi:"excepts"`
	Id      string   `pulumi:"id"`
	// List of identities affected by the policy.
	Identities []string `pulumi:"identities"`
	// Name of the policy.
	Name string `pulumi:"name"`
	// Owner of the policy.
	Owner string `pulumi:"owner"`
	// Indicates that the policy is a default one.
	ReadOnly bool `pulumi:"readOnly"`
	// List of resources affected by the policy.
	Resources []string `pulumi:"resources"`
	// Date of the last update of this group.
	UpdatedAt string `pulumi:"updatedAt"`
}

A collection of values returned by getPolicy.

func LookupPolicy

func LookupPolicy(ctx *pulumi.Context, args *LookupPolicyArgs, opts ...pulumi.InvokeOption) (*LookupPolicyResult, error)

Use this data source to retrieve am IAM policy.

## Important

> Using this resource requires that the account is enrolled in the OVHcloud [IAM beta](https://labs.ovhcloud.com/en/iam/)

## Example Usage

```go package main

import (

"github.com/lbrlabs/pulumi-ovh/sdk/go/ovh/Iam"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Iam.GetPolicy(ctx, &iam.GetPolicyArgs{
			Id: "my_policy_id",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

type LookupPolicyResultOutput

type LookupPolicyResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getPolicy.

func (LookupPolicyResultOutput) Allows

List of actions allowed by the policy.

func (LookupPolicyResultOutput) CreatedAt

Creation date of this group.

func (LookupPolicyResultOutput) Description

Group description.

func (LookupPolicyResultOutput) ElementType

func (LookupPolicyResultOutput) ElementType() reflect.Type

func (LookupPolicyResultOutput) Excepts

List of actions.

func (LookupPolicyResultOutput) Id

func (LookupPolicyResultOutput) Identities

List of identities affected by the policy.

func (LookupPolicyResultOutput) Name

Name of the policy.

func (LookupPolicyResultOutput) Owner

Owner of the policy.

func (LookupPolicyResultOutput) ReadOnly

Indicates that the policy is a default one.

func (LookupPolicyResultOutput) Resources

List of resources affected by the policy.

func (LookupPolicyResultOutput) ToLookupPolicyResultOutput

func (o LookupPolicyResultOutput) ToLookupPolicyResultOutput() LookupPolicyResultOutput

func (LookupPolicyResultOutput) ToLookupPolicyResultOutputWithContext

func (o LookupPolicyResultOutput) ToLookupPolicyResultOutputWithContext(ctx context.Context) LookupPolicyResultOutput

func (LookupPolicyResultOutput) UpdatedAt

Date of the last update of this group.

type Policy

type Policy struct {
	pulumi.CustomResourceState

	// List of actions allowed on resources by identities
	Allows pulumi.StringArrayOutput `pulumi:"allows"`
	// Creation date of this group.
	CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
	// Description of the policy
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// List of overrides of action that must not be allowed even if they are caught by allow. Only makes sens if allow contains wildcards.
	Excepts pulumi.StringArrayOutput `pulumi:"excepts"`
	// List of identities affected by the policy
	Identities pulumi.StringArrayOutput `pulumi:"identities"`
	// Name of the policy, must be unique
	Name pulumi.StringOutput `pulumi:"name"`
	// Owner of the policy.
	Owner pulumi.StringOutput `pulumi:"owner"`
	// Indicates that the policy is a default one.
	ReadOnly pulumi.BoolOutput `pulumi:"readOnly"`
	// List of resources affected by the policy
	Resources pulumi.StringArrayOutput `pulumi:"resources"`
	// Date of the last update of this group.
	UpdatedAt pulumi.StringOutput `pulumi:"updatedAt"`
}

Creates an IAM policy.

## Important

> Using this resource requires that the account is enrolled in the OVHcloud [IAM beta](https://labs.ovhcloud.com/en/iam/)

## Example Usage

```go package main

import (

"github.com/lbrlabs/pulumi-ovh/sdk/go/ovh/Iam"
"github.com/lbrlabs/pulumi-ovh/sdk/go/ovh/Me"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		account, err := Me.GetMe(ctx, nil, nil)
		if err != nil {
			return err
		}
		myGroup, err := Me.NewIdentityGroup(ctx, "myGroup", &Me.IdentityGroupArgs{
			Description: pulumi.String("my_group created in Terraform"),
		})
		if err != nil {
			return err
		}
		_, err = Iam.NewPolicy(ctx, "manager", &Iam.PolicyArgs{
			Description: pulumi.String("Users are allowed to use the OVH manager"),
			Identities: pulumi.StringArray{
				myGroup.Urn,
			},
			Resources: pulumi.StringArray{
				*pulumi.String(account.Urn),
			},
			Allows: pulumi.StringArray{
				pulumi.String("account:apiovh:me/get"),
				pulumi.String("account:apiovh:me/supportLevel/get"),
				pulumi.String("account:apiovh:me/certificates/get"),
				pulumi.String("account:apiovh:me/tag/get"),
				pulumi.String("account:apiovh:services/get"),
				pulumi.String("account:apiovh:*"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetPolicy

func GetPolicy(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *PolicyState, opts ...pulumi.ResourceOption) (*Policy, error)

GetPolicy gets an existing Policy 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 NewPolicy

func NewPolicy(ctx *pulumi.Context,
	name string, args *PolicyArgs, opts ...pulumi.ResourceOption) (*Policy, error)

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

func (*Policy) ElementType

func (*Policy) ElementType() reflect.Type

func (*Policy) ToPolicyOutput

func (i *Policy) ToPolicyOutput() PolicyOutput

func (*Policy) ToPolicyOutputWithContext

func (i *Policy) ToPolicyOutputWithContext(ctx context.Context) PolicyOutput

type PolicyArgs

type PolicyArgs struct {
	// List of actions allowed on resources by identities
	Allows pulumi.StringArrayInput
	// Description of the policy
	Description pulumi.StringPtrInput
	// List of overrides of action that must not be allowed even if they are caught by allow. Only makes sens if allow contains wildcards.
	Excepts pulumi.StringArrayInput
	// List of identities affected by the policy
	Identities pulumi.StringArrayInput
	// Name of the policy, must be unique
	Name pulumi.StringPtrInput
	// List of resources affected by the policy
	Resources pulumi.StringArrayInput
}

The set of arguments for constructing a Policy resource.

func (PolicyArgs) ElementType

func (PolicyArgs) ElementType() reflect.Type

type PolicyArray

type PolicyArray []PolicyInput

func (PolicyArray) ElementType

func (PolicyArray) ElementType() reflect.Type

func (PolicyArray) ToPolicyArrayOutput

func (i PolicyArray) ToPolicyArrayOutput() PolicyArrayOutput

func (PolicyArray) ToPolicyArrayOutputWithContext

func (i PolicyArray) ToPolicyArrayOutputWithContext(ctx context.Context) PolicyArrayOutput

type PolicyArrayInput

type PolicyArrayInput interface {
	pulumi.Input

	ToPolicyArrayOutput() PolicyArrayOutput
	ToPolicyArrayOutputWithContext(context.Context) PolicyArrayOutput
}

PolicyArrayInput is an input type that accepts PolicyArray and PolicyArrayOutput values. You can construct a concrete instance of `PolicyArrayInput` via:

PolicyArray{ PolicyArgs{...} }

type PolicyArrayOutput

type PolicyArrayOutput struct{ *pulumi.OutputState }

func (PolicyArrayOutput) ElementType

func (PolicyArrayOutput) ElementType() reflect.Type

func (PolicyArrayOutput) Index

func (PolicyArrayOutput) ToPolicyArrayOutput

func (o PolicyArrayOutput) ToPolicyArrayOutput() PolicyArrayOutput

func (PolicyArrayOutput) ToPolicyArrayOutputWithContext

func (o PolicyArrayOutput) ToPolicyArrayOutputWithContext(ctx context.Context) PolicyArrayOutput

type PolicyInput

type PolicyInput interface {
	pulumi.Input

	ToPolicyOutput() PolicyOutput
	ToPolicyOutputWithContext(ctx context.Context) PolicyOutput
}

type PolicyMap

type PolicyMap map[string]PolicyInput

func (PolicyMap) ElementType

func (PolicyMap) ElementType() reflect.Type

func (PolicyMap) ToPolicyMapOutput

func (i PolicyMap) ToPolicyMapOutput() PolicyMapOutput

func (PolicyMap) ToPolicyMapOutputWithContext

func (i PolicyMap) ToPolicyMapOutputWithContext(ctx context.Context) PolicyMapOutput

type PolicyMapInput

type PolicyMapInput interface {
	pulumi.Input

	ToPolicyMapOutput() PolicyMapOutput
	ToPolicyMapOutputWithContext(context.Context) PolicyMapOutput
}

PolicyMapInput is an input type that accepts PolicyMap and PolicyMapOutput values. You can construct a concrete instance of `PolicyMapInput` via:

PolicyMap{ "key": PolicyArgs{...} }

type PolicyMapOutput

type PolicyMapOutput struct{ *pulumi.OutputState }

func (PolicyMapOutput) ElementType

func (PolicyMapOutput) ElementType() reflect.Type

func (PolicyMapOutput) MapIndex

func (PolicyMapOutput) ToPolicyMapOutput

func (o PolicyMapOutput) ToPolicyMapOutput() PolicyMapOutput

func (PolicyMapOutput) ToPolicyMapOutputWithContext

func (o PolicyMapOutput) ToPolicyMapOutputWithContext(ctx context.Context) PolicyMapOutput

type PolicyOutput

type PolicyOutput struct{ *pulumi.OutputState }

func (PolicyOutput) Allows

List of actions allowed on resources by identities

func (PolicyOutput) CreatedAt

func (o PolicyOutput) CreatedAt() pulumi.StringOutput

Creation date of this group.

func (PolicyOutput) Description

func (o PolicyOutput) Description() pulumi.StringPtrOutput

Description of the policy

func (PolicyOutput) ElementType

func (PolicyOutput) ElementType() reflect.Type

func (PolicyOutput) Excepts

List of overrides of action that must not be allowed even if they are caught by allow. Only makes sens if allow contains wildcards.

func (PolicyOutput) Identities

func (o PolicyOutput) Identities() pulumi.StringArrayOutput

List of identities affected by the policy

func (PolicyOutput) Name

func (o PolicyOutput) Name() pulumi.StringOutput

Name of the policy, must be unique

func (PolicyOutput) Owner

func (o PolicyOutput) Owner() pulumi.StringOutput

Owner of the policy.

func (PolicyOutput) ReadOnly

func (o PolicyOutput) ReadOnly() pulumi.BoolOutput

Indicates that the policy is a default one.

func (PolicyOutput) Resources

func (o PolicyOutput) Resources() pulumi.StringArrayOutput

List of resources affected by the policy

func (PolicyOutput) ToPolicyOutput

func (o PolicyOutput) ToPolicyOutput() PolicyOutput

func (PolicyOutput) ToPolicyOutputWithContext

func (o PolicyOutput) ToPolicyOutputWithContext(ctx context.Context) PolicyOutput

func (PolicyOutput) UpdatedAt

func (o PolicyOutput) UpdatedAt() pulumi.StringOutput

Date of the last update of this group.

type PolicyState

type PolicyState struct {
	// List of actions allowed on resources by identities
	Allows pulumi.StringArrayInput
	// Creation date of this group.
	CreatedAt pulumi.StringPtrInput
	// Description of the policy
	Description pulumi.StringPtrInput
	// List of overrides of action that must not be allowed even if they are caught by allow. Only makes sens if allow contains wildcards.
	Excepts pulumi.StringArrayInput
	// List of identities affected by the policy
	Identities pulumi.StringArrayInput
	// Name of the policy, must be unique
	Name pulumi.StringPtrInput
	// Owner of the policy.
	Owner pulumi.StringPtrInput
	// Indicates that the policy is a default one.
	ReadOnly pulumi.BoolPtrInput
	// List of resources affected by the policy
	Resources pulumi.StringArrayInput
	// Date of the last update of this group.
	UpdatedAt pulumi.StringPtrInput
}

func (PolicyState) ElementType

func (PolicyState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

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