sdm.ApprovalWorkflow
Explore with Pulumi AI
ApprovalWorkflows are the mechanism by which requests for access can be viewed by authorized approvers and be approved or denied.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as sdm from "@pierskarsenbarg/sdm";
const manualApprovalWorkflow = new sdm.ApprovalWorkflow("manualApprovalWorkflow", {approvalMode: "manual"});
const autoGrantApprovalWorkflow = new sdm.ApprovalWorkflow("autoGrantApprovalWorkflow", {approvalMode: "automatic"});
import pulumi
import pierskarsenbarg_pulumi_sdm as sdm
manual_approval_workflow = sdm.ApprovalWorkflow("manualApprovalWorkflow", approval_mode="manual")
auto_grant_approval_workflow = sdm.ApprovalWorkflow("autoGrantApprovalWorkflow", approval_mode="automatic")
package main
import (
"github.com/pierskarsenbarg/pulumi-sdm/sdk/go/sdm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sdm.NewApprovalWorkflow(ctx, "manualApprovalWorkflow", &sdm.ApprovalWorkflowArgs{
ApprovalMode: pulumi.String("manual"),
})
if err != nil {
return err
}
_, err = sdm.NewApprovalWorkflow(ctx, "autoGrantApprovalWorkflow", &sdm.ApprovalWorkflowArgs{
ApprovalMode: pulumi.String("automatic"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Sdm = PiersKarsenbarg.Sdm;
return await Deployment.RunAsync(() =>
{
var manualApprovalWorkflow = new Sdm.ApprovalWorkflow("manualApprovalWorkflow", new()
{
ApprovalMode = "manual",
});
var autoGrantApprovalWorkflow = new Sdm.ApprovalWorkflow("autoGrantApprovalWorkflow", new()
{
ApprovalMode = "automatic",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sdm.ApprovalWorkflow;
import com.pulumi.sdm.ApprovalWorkflowArgs;
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) {
var manualApprovalWorkflow = new ApprovalWorkflow("manualApprovalWorkflow", ApprovalWorkflowArgs.builder()
.approvalMode("manual")
.build());
var autoGrantApprovalWorkflow = new ApprovalWorkflow("autoGrantApprovalWorkflow", ApprovalWorkflowArgs.builder()
.approvalMode("automatic")
.build());
}
}
resources:
manualApprovalWorkflow:
type: sdm:ApprovalWorkflow
properties:
approvalMode: manual
autoGrantApprovalWorkflow:
type: sdm:ApprovalWorkflow
properties:
approvalMode: automatic
This resource can be imported using the import command.
Create ApprovalWorkflow Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ApprovalWorkflow(name: string, args: ApprovalWorkflowArgs, opts?: CustomResourceOptions);
@overload
def ApprovalWorkflow(resource_name: str,
args: ApprovalWorkflowArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ApprovalWorkflow(resource_name: str,
opts: Optional[ResourceOptions] = None,
approval_mode: Optional[str] = None,
approval_steps: Optional[Sequence[ApprovalWorkflowApprovalStepArgs]] = None,
description: Optional[str] = None,
name: Optional[str] = None)
func NewApprovalWorkflow(ctx *Context, name string, args ApprovalWorkflowArgs, opts ...ResourceOption) (*ApprovalWorkflow, error)
public ApprovalWorkflow(string name, ApprovalWorkflowArgs args, CustomResourceOptions? opts = null)
public ApprovalWorkflow(String name, ApprovalWorkflowArgs args)
public ApprovalWorkflow(String name, ApprovalWorkflowArgs args, CustomResourceOptions options)
type: sdm:ApprovalWorkflow
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ApprovalWorkflowArgs
- 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 ApprovalWorkflowArgs
- 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 ApprovalWorkflowArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApprovalWorkflowArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ApprovalWorkflowArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var approvalWorkflowResource = new Sdm.ApprovalWorkflow("approvalWorkflowResource", new()
{
ApprovalMode = "string",
ApprovalSteps = new[]
{
new Sdm.Inputs.ApprovalWorkflowApprovalStepArgs
{
Approvers = new[]
{
new Sdm.Inputs.ApprovalWorkflowApprovalStepApproverArgs
{
AccountId = "string",
RoleId = "string",
},
},
Quantifier = "string",
SkipAfter = "string",
},
},
Description = "string",
Name = "string",
});
example, err := sdm.NewApprovalWorkflow(ctx, "approvalWorkflowResource", &sdm.ApprovalWorkflowArgs{
ApprovalMode: pulumi.String("string"),
ApprovalSteps: sdm.ApprovalWorkflowApprovalStepArray{
&sdm.ApprovalWorkflowApprovalStepArgs{
Approvers: sdm.ApprovalWorkflowApprovalStepApproverArray{
&sdm.ApprovalWorkflowApprovalStepApproverArgs{
AccountId: pulumi.String("string"),
RoleId: pulumi.String("string"),
},
},
Quantifier: pulumi.String("string"),
SkipAfter: pulumi.String("string"),
},
},
Description: pulumi.String("string"),
Name: pulumi.String("string"),
})
var approvalWorkflowResource = new ApprovalWorkflow("approvalWorkflowResource", ApprovalWorkflowArgs.builder()
.approvalMode("string")
.approvalSteps(ApprovalWorkflowApprovalStepArgs.builder()
.approvers(ApprovalWorkflowApprovalStepApproverArgs.builder()
.accountId("string")
.roleId("string")
.build())
.quantifier("string")
.skipAfter("string")
.build())
.description("string")
.name("string")
.build());
approval_workflow_resource = sdm.ApprovalWorkflow("approvalWorkflowResource",
approval_mode="string",
approval_steps=[{
"approvers": [{
"account_id": "string",
"role_id": "string",
}],
"quantifier": "string",
"skip_after": "string",
}],
description="string",
name="string")
const approvalWorkflowResource = new sdm.ApprovalWorkflow("approvalWorkflowResource", {
approvalMode: "string",
approvalSteps: [{
approvers: [{
accountId: "string",
roleId: "string",
}],
quantifier: "string",
skipAfter: "string",
}],
description: "string",
name: "string",
});
type: sdm:ApprovalWorkflow
properties:
approvalMode: string
approvalSteps:
- approvers:
- accountId: string
roleId: string
quantifier: string
skipAfter: string
description: string
name: string
ApprovalWorkflow Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ApprovalWorkflow resource accepts the following input properties:
- Approval
Mode string - Approval mode of the ApprovalWorkflow
- Approval
Steps List<PiersKarsenbarg. Sdm. Inputs. Approval Workflow Approval Step> - The approval steps of this approval workflow
- Description string
- Optional description of the ApprovalWorkflow.
- Name string
- Unique human-readable name of the ApprovalWorkflow.
- Approval
Mode string - Approval mode of the ApprovalWorkflow
- Approval
Steps []ApprovalWorkflow Approval Step Args - The approval steps of this approval workflow
- Description string
- Optional description of the ApprovalWorkflow.
- Name string
- Unique human-readable name of the ApprovalWorkflow.
- approval
Mode String - Approval mode of the ApprovalWorkflow
- approval
Steps List<ApprovalWorkflow Approval Step> - The approval steps of this approval workflow
- description String
- Optional description of the ApprovalWorkflow.
- name String
- Unique human-readable name of the ApprovalWorkflow.
- approval
Mode string - Approval mode of the ApprovalWorkflow
- approval
Steps ApprovalWorkflow Approval Step[] - The approval steps of this approval workflow
- description string
- Optional description of the ApprovalWorkflow.
- name string
- Unique human-readable name of the ApprovalWorkflow.
- approval_
mode str - Approval mode of the ApprovalWorkflow
- approval_
steps Sequence[ApprovalWorkflow Approval Step Args] - The approval steps of this approval workflow
- description str
- Optional description of the ApprovalWorkflow.
- name str
- Unique human-readable name of the ApprovalWorkflow.
- approval
Mode String - Approval mode of the ApprovalWorkflow
- approval
Steps List<Property Map> - The approval steps of this approval workflow
- description String
- Optional description of the ApprovalWorkflow.
- name String
- Unique human-readable name of the ApprovalWorkflow.
Outputs
All input properties are implicitly available as output properties. Additionally, the ApprovalWorkflow resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ApprovalWorkflow Resource
Get an existing ApprovalWorkflow 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?: ApprovalWorkflowState, opts?: CustomResourceOptions): ApprovalWorkflow
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
approval_mode: Optional[str] = None,
approval_steps: Optional[Sequence[ApprovalWorkflowApprovalStepArgs]] = None,
description: Optional[str] = None,
name: Optional[str] = None) -> ApprovalWorkflow
func GetApprovalWorkflow(ctx *Context, name string, id IDInput, state *ApprovalWorkflowState, opts ...ResourceOption) (*ApprovalWorkflow, error)
public static ApprovalWorkflow Get(string name, Input<string> id, ApprovalWorkflowState? state, CustomResourceOptions? opts = null)
public static ApprovalWorkflow get(String name, Output<String> id, ApprovalWorkflowState state, CustomResourceOptions options)
resources: _: type: sdm:ApprovalWorkflow get: id: ${id}
- 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.
- Approval
Mode string - Approval mode of the ApprovalWorkflow
- Approval
Steps List<PiersKarsenbarg. Sdm. Inputs. Approval Workflow Approval Step> - The approval steps of this approval workflow
- Description string
- Optional description of the ApprovalWorkflow.
- Name string
- Unique human-readable name of the ApprovalWorkflow.
- Approval
Mode string - Approval mode of the ApprovalWorkflow
- Approval
Steps []ApprovalWorkflow Approval Step Args - The approval steps of this approval workflow
- Description string
- Optional description of the ApprovalWorkflow.
- Name string
- Unique human-readable name of the ApprovalWorkflow.
- approval
Mode String - Approval mode of the ApprovalWorkflow
- approval
Steps List<ApprovalWorkflow Approval Step> - The approval steps of this approval workflow
- description String
- Optional description of the ApprovalWorkflow.
- name String
- Unique human-readable name of the ApprovalWorkflow.
- approval
Mode string - Approval mode of the ApprovalWorkflow
- approval
Steps ApprovalWorkflow Approval Step[] - The approval steps of this approval workflow
- description string
- Optional description of the ApprovalWorkflow.
- name string
- Unique human-readable name of the ApprovalWorkflow.
- approval_
mode str - Approval mode of the ApprovalWorkflow
- approval_
steps Sequence[ApprovalWorkflow Approval Step Args] - The approval steps of this approval workflow
- description str
- Optional description of the ApprovalWorkflow.
- name str
- Unique human-readable name of the ApprovalWorkflow.
- approval
Mode String - Approval mode of the ApprovalWorkflow
- approval
Steps List<Property Map> - The approval steps of this approval workflow
- description String
- Optional description of the ApprovalWorkflow.
- name String
- Unique human-readable name of the ApprovalWorkflow.
Supporting Types
ApprovalWorkflowApprovalStep, ApprovalWorkflowApprovalStepArgs
- Approvers
List<Piers
Karsenbarg. Sdm. Inputs. Approval Workflow Approval Step Approver> - The approvers for this approval step
- Quantifier string
- Whether any or all approvers are required to approve for this approval step (optional, defaults to any)
- Skip
After string - Duration after which this approval step will be skipped if no approval is given (optional, if not provided this step must be manually approved)
- Approvers
[]Approval
Workflow Approval Step Approver - The approvers for this approval step
- Quantifier string
- Whether any or all approvers are required to approve for this approval step (optional, defaults to any)
- Skip
After string - Duration after which this approval step will be skipped if no approval is given (optional, if not provided this step must be manually approved)
- approvers
List<Approval
Workflow Approval Step Approver> - The approvers for this approval step
- quantifier String
- Whether any or all approvers are required to approve for this approval step (optional, defaults to any)
- skip
After String - Duration after which this approval step will be skipped if no approval is given (optional, if not provided this step must be manually approved)
- approvers
Approval
Workflow Approval Step Approver[] - The approvers for this approval step
- quantifier string
- Whether any or all approvers are required to approve for this approval step (optional, defaults to any)
- skip
After string - Duration after which this approval step will be skipped if no approval is given (optional, if not provided this step must be manually approved)
- approvers
Sequence[Approval
Workflow Approval Step Approver] - The approvers for this approval step
- quantifier str
- Whether any or all approvers are required to approve for this approval step (optional, defaults to any)
- skip_
after str - Duration after which this approval step will be skipped if no approval is given (optional, if not provided this step must be manually approved)
- approvers List<Property Map>
- The approvers for this approval step
- quantifier String
- Whether any or all approvers are required to approve for this approval step (optional, defaults to any)
- skip
After String - Duration after which this approval step will be skipped if no approval is given (optional, if not provided this step must be manually approved)
ApprovalWorkflowApprovalStepApprover, ApprovalWorkflowApprovalStepApproverArgs
- account_
id str - The account id of the approver (only an account_id OR a role_id may be present for one approver)
- role_
id str - The role id of the approver (only an account_id OR a role_id may be present for one approver)
Import
A ApprovalWorkflow can be imported using the id, e.g.,
$ pulumi import sdm:index/approvalWorkflow:ApprovalWorkflow example af-12345678
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- sdm pierskarsenbarg/pulumi-sdm
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
sdm
Terraform Provider.