harness logo
Harness v0.0.5, Oct 31 22

harness.DelegateApproval

Resource for approving or rejecting delegates.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Harness = Lbrlabs.PulumiPackage.Harness;
using Harness = Pulumi.Harness;

return await Deployment.RunAsync(() => 
{
    var testDelegate = Harness.GetDelegate.Invoke(new()
    {
        Name = "my-delegate",
    });

    var testDelegateApproval = new Harness.DelegateApproval("testDelegateApproval", new()
    {
        DelegateId = testDelegate.Apply(getDelegateResult => getDelegateResult.Id),
        Approve = true,
    });

});
package main

import (
	"github.com/lbrlabs/pulumi-harness/sdk/go/harness"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		testDelegate, err := harness.GetDelegate(ctx, &GetDelegateArgs{
			Name: pulumi.StringRef("my-delegate"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = harness.NewDelegateApproval(ctx, "testDelegateApproval", &harness.DelegateApprovalArgs{
			DelegateId: pulumi.String(testDelegate.Id),
			Approve:    pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.HarnessFunctions;
import com.pulumi.harness.inputs.GetDelegateArgs;
import com.pulumi.harness.DelegateApproval;
import com.pulumi.harness.DelegateApprovalArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var testDelegate = HarnessFunctions.getDelegate(GetDelegateArgs.builder()
            .name("my-delegate")
            .build());

        var testDelegateApproval = new DelegateApproval("testDelegateApproval", DelegateApprovalArgs.builder()        
            .delegateId(testDelegate.applyValue(getDelegateResult -> getDelegateResult.id()))
            .approve(true)
            .build());

    }
}
import pulumi
import lbrlabs_pulumi_harness as harness
import pulumi_harness as harness

test_delegate = harness.get_delegate(name="my-delegate")
test_delegate_approval = harness.DelegateApproval("testDelegateApproval",
    delegate_id=test_delegate.id,
    approve=True)
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@lbrlabs/pulumi-harness";
import * as harness from "@pulumi/harness";

const testDelegate = harness.getDelegate({
    name: "my-delegate",
});
const testDelegateApproval = new harness.DelegateApproval("testDelegateApproval", {
    delegateId: testDelegate.then(testDelegate => testDelegate.id),
    approve: true,
});
resources:
  testDelegateApproval:
    type: harness:DelegateApproval
    properties:
      delegateId: ${testDelegate.id}
      approve: true
variables:
  testDelegate:
    fn::invoke:
      Function: harness:getDelegate
      Arguments:
        name: my-delegate

Create DelegateApproval Resource

new DelegateApproval(name: string, args: DelegateApprovalArgs, opts?: CustomResourceOptions);
@overload
def DelegateApproval(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     approve: Optional[bool] = None,
                     delegate_id: Optional[str] = None)
@overload
def DelegateApproval(resource_name: str,
                     args: DelegateApprovalArgs,
                     opts: Optional[ResourceOptions] = None)
func NewDelegateApproval(ctx *Context, name string, args DelegateApprovalArgs, opts ...ResourceOption) (*DelegateApproval, error)
public DelegateApproval(string name, DelegateApprovalArgs args, CustomResourceOptions? opts = null)
public DelegateApproval(String name, DelegateApprovalArgs args)
public DelegateApproval(String name, DelegateApprovalArgs args, CustomResourceOptions options)
type: harness:DelegateApproval
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args DelegateApprovalArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args DelegateApprovalArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DelegateApprovalArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DelegateApprovalArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DelegateApprovalArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

DelegateApproval Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The DelegateApproval resource accepts the following input properties:

Approve bool

Whether or not to approve the delegate.

DelegateId string

The id of the delegate.

Approve bool

Whether or not to approve the delegate.

DelegateId string

The id of the delegate.

approve Boolean

Whether or not to approve the delegate.

delegateId String

The id of the delegate.

approve boolean

Whether or not to approve the delegate.

delegateId string

The id of the delegate.

approve bool

Whether or not to approve the delegate.

delegate_id str

The id of the delegate.

approve Boolean

Whether or not to approve the delegate.

delegateId String

The id of the delegate.

Outputs

All input properties are implicitly available as output properties. Additionally, the DelegateApproval resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Status string

The status of the delegate.

Id string

The provider-assigned unique ID for this managed resource.

Status string

The status of the delegate.

id String

The provider-assigned unique ID for this managed resource.

status String

The status of the delegate.

id string

The provider-assigned unique ID for this managed resource.

status string

The status of the delegate.

id str

The provider-assigned unique ID for this managed resource.

status str

The status of the delegate.

id String

The provider-assigned unique ID for this managed resource.

status String

The status of the delegate.

Look up Existing DelegateApproval Resource

Get an existing DelegateApproval resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: DelegateApprovalState, opts?: CustomResourceOptions): DelegateApproval
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        approve: Optional[bool] = None,
        delegate_id: Optional[str] = None,
        status: Optional[str] = None) -> DelegateApproval
func GetDelegateApproval(ctx *Context, name string, id IDInput, state *DelegateApprovalState, opts ...ResourceOption) (*DelegateApproval, error)
public static DelegateApproval Get(string name, Input<string> id, DelegateApprovalState? state, CustomResourceOptions? opts = null)
public static DelegateApproval get(String name, Output<String> id, DelegateApprovalState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Approve bool

Whether or not to approve the delegate.

DelegateId string

The id of the delegate.

Status string

The status of the delegate.

Approve bool

Whether or not to approve the delegate.

DelegateId string

The id of the delegate.

Status string

The status of the delegate.

approve Boolean

Whether or not to approve the delegate.

delegateId String

The id of the delegate.

status String

The status of the delegate.

approve boolean

Whether or not to approve the delegate.

delegateId string

The id of the delegate.

status string

The status of the delegate.

approve bool

Whether or not to approve the delegate.

delegate_id str

The id of the delegate.

status str

The status of the delegate.

approve Boolean

Whether or not to approve the delegate.

delegateId String

The id of the delegate.

status String

The status of the delegate.

Import

Import the status of the delegate approval.

 $ pulumi import harness:index/delegateApproval:DelegateApproval example <delegate_id>

Package Details

Repository
harness lbrlabs/pulumi-harness
License
Apache-2.0
Notes

This Pulumi package is based on the harness Terraform Provider.