1. Packages
  2. AWS Classic
  3. API Docs
  4. bedrock
  5. AgentAgent

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.36.0 published on Wednesday, May 15, 2024 by Pulumi

aws.bedrock.AgentAgent

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.36.0 published on Wednesday, May 15, 2024 by Pulumi

    Resource for managing an AWS Agents for Amazon Bedrock Agent.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const current = aws.getCallerIdentity({});
    const currentGetRegion = aws.getRegion({});
    const exampleAgentTrust = Promise.all([current, currentGetRegion, current]).then(([current, currentGetRegion, current1]) => aws.iam.getPolicyDocument({
        statements: [{
            actions: ["sts:AssumeRole"],
            principals: [{
                identifiers: ["bedrock.amazonaws.com"],
                type: "Service",
            }],
            conditions: [
                {
                    test: "StringEquals",
                    values: [current.accountId],
                    variable: "aws:SourceAccount",
                },
                {
                    test: "ArnLike",
                    values: [`arn:aws:bedrock:${currentGetRegion.name}:${current1.accountId}:agent/*`],
                    variable: "AWS:SourceArn",
                },
            ],
        }],
    }));
    const example = new aws.iam.Role("example", {
        assumeRolePolicy: exampleAgentTrust.then(exampleAgentTrust => exampleAgentTrust.json),
        namePrefix: "AmazonBedrockExecutionRoleForAgents_",
    });
    const exampleAgentPermissions = currentGetRegion.then(currentGetRegion => aws.iam.getPolicyDocument({
        statements: [{
            actions: ["bedrock:InvokeModel"],
            resources: [`arn:aws:bedrock:${currentGetRegion.name}::foundation-model/anthropic.claude-v2`],
        }],
    }));
    const exampleRolePolicy = new aws.iam.RolePolicy("example", {
        policy: exampleAgentPermissions.then(exampleAgentPermissions => exampleAgentPermissions.json),
        role: example.id,
    });
    const test = new aws.bedrock.AgentAgent("test", {
        agentName: "my-agent-name",
        agentResourceRoleArn: example.arn,
        idleSessionTtlInSeconds: 500,
        foundationModel: "anthropic.claude-v2",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    current = aws.get_caller_identity()
    current_get_region = aws.get_region()
    example_agent_trust = aws.iam.get_policy_document(statements=[aws.iam.GetPolicyDocumentStatementArgs(
        actions=["sts:AssumeRole"],
        principals=[aws.iam.GetPolicyDocumentStatementPrincipalArgs(
            identifiers=["bedrock.amazonaws.com"],
            type="Service",
        )],
        conditions=[
            aws.iam.GetPolicyDocumentStatementConditionArgs(
                test="StringEquals",
                values=[current.account_id],
                variable="aws:SourceAccount",
            ),
            aws.iam.GetPolicyDocumentStatementConditionArgs(
                test="ArnLike",
                values=[f"arn:aws:bedrock:{current_get_region.name}:{current.account_id}:agent/*"],
                variable="AWS:SourceArn",
            ),
        ],
    )])
    example = aws.iam.Role("example",
        assume_role_policy=example_agent_trust.json,
        name_prefix="AmazonBedrockExecutionRoleForAgents_")
    example_agent_permissions = aws.iam.get_policy_document(statements=[aws.iam.GetPolicyDocumentStatementArgs(
        actions=["bedrock:InvokeModel"],
        resources=[f"arn:aws:bedrock:{current_get_region.name}::foundation-model/anthropic.claude-v2"],
    )])
    example_role_policy = aws.iam.RolePolicy("example",
        policy=example_agent_permissions.json,
        role=example.id)
    test = aws.bedrock.AgentAgent("test",
        agent_name="my-agent-name",
        agent_resource_role_arn=example.arn,
        idle_session_ttl_in_seconds=500,
        foundation_model="anthropic.claude-v2")
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/bedrock"
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    current, err := aws.GetCallerIdentity(ctx, nil, nil);
    if err != nil {
    return err
    }
    currentGetRegion, err := aws.GetRegion(ctx, nil, nil);
    if err != nil {
    return err
    }
    exampleAgentTrust, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
    Statements: []iam.GetPolicyDocumentStatement{
    {
    Actions: []string{
    "sts:AssumeRole",
    },
    Principals: []iam.GetPolicyDocumentStatementPrincipal{
    {
    Identifiers: []string{
    "bedrock.amazonaws.com",
    },
    Type: "Service",
    },
    },
    Conditions: []iam.GetPolicyDocumentStatementCondition{
    {
    Test: "StringEquals",
    Values: interface{}{
    current.AccountId,
    },
    Variable: "aws:SourceAccount",
    },
    {
    Test: "ArnLike",
    Values: []string{
    fmt.Sprintf("arn:aws:bedrock:%v:%v:agent/*", currentGetRegion.Name, current.AccountId),
    },
    Variable: "AWS:SourceArn",
    },
    },
    },
    },
    }, nil);
    if err != nil {
    return err
    }
    example, err := iam.NewRole(ctx, "example", &iam.RoleArgs{
    AssumeRolePolicy: pulumi.String(exampleAgentTrust.Json),
    NamePrefix: pulumi.String("AmazonBedrockExecutionRoleForAgents_"),
    })
    if err != nil {
    return err
    }
    exampleAgentPermissions, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
    Statements: []iam.GetPolicyDocumentStatement{
    {
    Actions: []string{
    "bedrock:InvokeModel",
    },
    Resources: []string{
    fmt.Sprintf("arn:aws:bedrock:%v::foundation-model/anthropic.claude-v2", currentGetRegion.Name),
    },
    },
    },
    }, nil);
    if err != nil {
    return err
    }
    _, err = iam.NewRolePolicy(ctx, "example", &iam.RolePolicyArgs{
    Policy: pulumi.String(exampleAgentPermissions.Json),
    Role: example.ID(),
    })
    if err != nil {
    return err
    }
    _, err = bedrock.NewAgentAgent(ctx, "test", &bedrock.AgentAgentArgs{
    AgentName: pulumi.String("my-agent-name"),
    AgentResourceRoleArn: example.Arn,
    IdleSessionTtlInSeconds: pulumi.Int(500),
    FoundationModel: pulumi.String("anthropic.claude-v2"),
    })
    if err != nil {
    return err
    }
    return nil
    })
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var current = Aws.GetCallerIdentity.Invoke();
    
        var currentGetRegion = Aws.GetRegion.Invoke();
    
        var exampleAgentTrust = Aws.Iam.GetPolicyDocument.Invoke(new()
        {
            Statements = new[]
            {
                new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs
                {
                    Actions = new[]
                    {
                        "sts:AssumeRole",
                    },
                    Principals = new[]
                    {
                        new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs
                        {
                            Identifiers = new[]
                            {
                                "bedrock.amazonaws.com",
                            },
                            Type = "Service",
                        },
                    },
                    Conditions = new[]
                    {
                        new Aws.Iam.Inputs.GetPolicyDocumentStatementConditionInputArgs
                        {
                            Test = "StringEquals",
                            Values = new[]
                            {
                                current.Apply(getCallerIdentityResult => getCallerIdentityResult.AccountId),
                            },
                            Variable = "aws:SourceAccount",
                        },
                        new Aws.Iam.Inputs.GetPolicyDocumentStatementConditionInputArgs
                        {
                            Test = "ArnLike",
                            Values = new[]
                            {
                                $"arn:aws:bedrock:{currentGetRegion.Apply(getRegionResult => getRegionResult.Name)}:{current.Apply(getCallerIdentityResult => getCallerIdentityResult.AccountId)}:agent/*",
                            },
                            Variable = "AWS:SourceArn",
                        },
                    },
                },
            },
        });
    
        var example = new Aws.Iam.Role("example", new()
        {
            AssumeRolePolicy = exampleAgentTrust.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Json),
            NamePrefix = "AmazonBedrockExecutionRoleForAgents_",
        });
    
        var exampleAgentPermissions = Aws.Iam.GetPolicyDocument.Invoke(new()
        {
            Statements = new[]
            {
                new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs
                {
                    Actions = new[]
                    {
                        "bedrock:InvokeModel",
                    },
                    Resources = new[]
                    {
                        $"arn:aws:bedrock:{currentGetRegion.Apply(getRegionResult => getRegionResult.Name)}::foundation-model/anthropic.claude-v2",
                    },
                },
            },
        });
    
        var exampleRolePolicy = new Aws.Iam.RolePolicy("example", new()
        {
            Policy = exampleAgentPermissions.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Json),
            Role = example.Id,
        });
    
        var test = new Aws.Bedrock.AgentAgent("test", new()
        {
            AgentName = "my-agent-name",
            AgentResourceRoleArn = example.Arn,
            IdleSessionTtlInSeconds = 500,
            FoundationModel = "anthropic.claude-v2",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.AwsFunctions;
    import com.pulumi.aws.inputs.GetCallerIdentityArgs;
    import com.pulumi.aws.inputs.GetRegionArgs;
    import com.pulumi.aws.iam.IamFunctions;
    import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
    import com.pulumi.aws.iam.Role;
    import com.pulumi.aws.iam.RoleArgs;
    import com.pulumi.aws.iam.RolePolicy;
    import com.pulumi.aws.iam.RolePolicyArgs;
    import com.pulumi.aws.bedrock.AgentAgent;
    import com.pulumi.aws.bedrock.AgentAgentArgs;
    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 current = AwsFunctions.getCallerIdentity();
    
            final var currentGetRegion = AwsFunctions.getRegion();
    
            final var exampleAgentTrust = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
                .statements(GetPolicyDocumentStatementArgs.builder()
                    .actions("sts:AssumeRole")
                    .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
                        .identifiers("bedrock.amazonaws.com")
                        .type("Service")
                        .build())
                    .conditions(                
                        GetPolicyDocumentStatementConditionArgs.builder()
                            .test("StringEquals")
                            .values(current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.accountId()))
                            .variable("aws:SourceAccount")
                            .build(),
                        GetPolicyDocumentStatementConditionArgs.builder()
                            .test("ArnLike")
                            .values(String.format("arn:aws:bedrock:%s:%s:agent/*", currentGetRegion.applyValue(getRegionResult -> getRegionResult.name()),current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.accountId())))
                            .variable("AWS:SourceArn")
                            .build())
                    .build())
                .build());
    
            var example = new Role("example", RoleArgs.builder()        
                .assumeRolePolicy(exampleAgentTrust.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
                .namePrefix("AmazonBedrockExecutionRoleForAgents_")
                .build());
    
            final var exampleAgentPermissions = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
                .statements(GetPolicyDocumentStatementArgs.builder()
                    .actions("bedrock:InvokeModel")
                    .resources(String.format("arn:aws:bedrock:%s::foundation-model/anthropic.claude-v2", currentGetRegion.applyValue(getRegionResult -> getRegionResult.name())))
                    .build())
                .build());
    
            var exampleRolePolicy = new RolePolicy("exampleRolePolicy", RolePolicyArgs.builder()        
                .policy(exampleAgentPermissions.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
                .role(example.id())
                .build());
    
            var test = new AgentAgent("test", AgentAgentArgs.builder()        
                .agentName("my-agent-name")
                .agentResourceRoleArn(example.arn())
                .idleSessionTtlInSeconds(500)
                .foundationModel("anthropic.claude-v2")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:iam:Role
        properties:
          assumeRolePolicy: ${exampleAgentTrust.json}
          namePrefix: AmazonBedrockExecutionRoleForAgents_
      exampleRolePolicy:
        type: aws:iam:RolePolicy
        name: example
        properties:
          policy: ${exampleAgentPermissions.json}
          role: ${example.id}
      test:
        type: aws:bedrock:AgentAgent
        properties:
          agentName: my-agent-name
          agentResourceRoleArn: ${example.arn}
          idleSessionTtlInSeconds: 500
          foundationModel: anthropic.claude-v2
    variables:
      exampleAgentTrust:
        fn::invoke:
          Function: aws:iam:getPolicyDocument
          Arguments:
            statements:
              - actions:
                  - sts:AssumeRole
                principals:
                  - identifiers:
                      - bedrock.amazonaws.com
                    type: Service
                conditions:
                  - test: StringEquals
                    values:
                      - ${current.accountId}
                    variable: aws:SourceAccount
                  - test: ArnLike
                    values:
                      - arn:aws:bedrock:${currentGetRegion.name}:${current.accountId}:agent/*
                    variable: AWS:SourceArn
      exampleAgentPermissions:
        fn::invoke:
          Function: aws:iam:getPolicyDocument
          Arguments:
            statements:
              - actions:
                  - bedrock:InvokeModel
                resources:
                  - arn:aws:bedrock:${currentGetRegion.name}::foundation-model/anthropic.claude-v2
      current:
        fn::invoke:
          Function: aws:getCallerIdentity
          Arguments: {}
      currentGetRegion:
        fn::invoke:
          Function: aws:getRegion
          Arguments: {}
    

    Create AgentAgent Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new AgentAgent(name: string, args: AgentAgentArgs, opts?: CustomResourceOptions);
    @overload
    def AgentAgent(resource_name: str,
                   args: AgentAgentArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def AgentAgent(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   agent_name: Optional[str] = None,
                   agent_resource_role_arn: Optional[str] = None,
                   foundation_model: Optional[str] = None,
                   customer_encryption_key_arn: Optional[str] = None,
                   description: Optional[str] = None,
                   idle_session_ttl_in_seconds: Optional[int] = None,
                   instruction: Optional[str] = None,
                   prepare_agent: Optional[bool] = None,
                   prompt_override_configurations: Optional[Sequence[AgentAgentPromptOverrideConfigurationArgs]] = None,
                   tags: Optional[Mapping[str, str]] = None,
                   timeouts: Optional[AgentAgentTimeoutsArgs] = None)
    func NewAgentAgent(ctx *Context, name string, args AgentAgentArgs, opts ...ResourceOption) (*AgentAgent, error)
    public AgentAgent(string name, AgentAgentArgs args, CustomResourceOptions? opts = null)
    public AgentAgent(String name, AgentAgentArgs args)
    public AgentAgent(String name, AgentAgentArgs args, CustomResourceOptions options)
    
    type: aws:bedrock:AgentAgent
    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 AgentAgentArgs
    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 AgentAgentArgs
    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 AgentAgentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AgentAgentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AgentAgentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var agentAgentResource = new Aws.Bedrock.AgentAgent("agentAgentResource", new()
    {
        AgentName = "string",
        AgentResourceRoleArn = "string",
        FoundationModel = "string",
        CustomerEncryptionKeyArn = "string",
        Description = "string",
        IdleSessionTtlInSeconds = 0,
        Instruction = "string",
        PrepareAgent = false,
        PromptOverrideConfigurations = new[]
        {
            new Aws.Bedrock.Inputs.AgentAgentPromptOverrideConfigurationArgs
            {
                OverrideLambda = "string",
                PromptConfigurations = new[]
                {
                    "any",
                },
            },
        },
        Tags = 
        {
            { "string", "string" },
        },
        Timeouts = new Aws.Bedrock.Inputs.AgentAgentTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
    });
    
    example, err := bedrock.NewAgentAgent(ctx, "agentAgentResource", &bedrock.AgentAgentArgs{
    	AgentName:                pulumi.String("string"),
    	AgentResourceRoleArn:     pulumi.String("string"),
    	FoundationModel:          pulumi.String("string"),
    	CustomerEncryptionKeyArn: pulumi.String("string"),
    	Description:              pulumi.String("string"),
    	IdleSessionTtlInSeconds:  pulumi.Int(0),
    	Instruction:              pulumi.String("string"),
    	PrepareAgent:             pulumi.Bool(false),
    	PromptOverrideConfigurations: bedrock.AgentAgentPromptOverrideConfigurationArray{
    		&bedrock.AgentAgentPromptOverrideConfigurationArgs{
    			OverrideLambda: pulumi.String("string"),
    			PromptConfigurations: pulumi.Array{
    				pulumi.Any("any"),
    			},
    		},
    	},
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Timeouts: &bedrock.AgentAgentTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    var agentAgentResource = new AgentAgent("agentAgentResource", AgentAgentArgs.builder()        
        .agentName("string")
        .agentResourceRoleArn("string")
        .foundationModel("string")
        .customerEncryptionKeyArn("string")
        .description("string")
        .idleSessionTtlInSeconds(0)
        .instruction("string")
        .prepareAgent(false)
        .promptOverrideConfigurations(AgentAgentPromptOverrideConfigurationArgs.builder()
            .overrideLambda("string")
            .promptConfigurations("any")
            .build())
        .tags(Map.of("string", "string"))
        .timeouts(AgentAgentTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .build());
    
    agent_agent_resource = aws.bedrock.AgentAgent("agentAgentResource",
        agent_name="string",
        agent_resource_role_arn="string",
        foundation_model="string",
        customer_encryption_key_arn="string",
        description="string",
        idle_session_ttl_in_seconds=0,
        instruction="string",
        prepare_agent=False,
        prompt_override_configurations=[aws.bedrock.AgentAgentPromptOverrideConfigurationArgs(
            override_lambda="string",
            prompt_configurations=["any"],
        )],
        tags={
            "string": "string",
        },
        timeouts=aws.bedrock.AgentAgentTimeoutsArgs(
            create="string",
            delete="string",
            update="string",
        ))
    
    const agentAgentResource = new aws.bedrock.AgentAgent("agentAgentResource", {
        agentName: "string",
        agentResourceRoleArn: "string",
        foundationModel: "string",
        customerEncryptionKeyArn: "string",
        description: "string",
        idleSessionTtlInSeconds: 0,
        instruction: "string",
        prepareAgent: false,
        promptOverrideConfigurations: [{
            overrideLambda: "string",
            promptConfigurations: ["any"],
        }],
        tags: {
            string: "string",
        },
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
    });
    
    type: aws:bedrock:AgentAgent
    properties:
        agentName: string
        agentResourceRoleArn: string
        customerEncryptionKeyArn: string
        description: string
        foundationModel: string
        idleSessionTtlInSeconds: 0
        instruction: string
        prepareAgent: false
        promptOverrideConfigurations:
            - overrideLambda: string
              promptConfigurations:
                - any
        tags:
            string: string
        timeouts:
            create: string
            delete: string
            update: string
    

    AgentAgent 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 AgentAgent resource accepts the following input properties:

    AgentName string
    Name for the agent.
    AgentResourceRoleArn string
    ARN of the Role for the agent.
    FoundationModel string

    Foundation model for the agent to use.

    The following arguments are optional:

    CustomerEncryptionKeyArn string
    ARN of customer manager key to use for encryption.
    Description string
    Description of the agent.
    IdleSessionTtlInSeconds int
    TTL in seconds for the agent to idle.
    Instruction string
    Instructions to tell agent what it should do.
    PrepareAgent bool
    Whether or not to prepare the agent after creation or modification. Defaults to true.
    PromptOverrideConfigurations List<AgentAgentPromptOverrideConfiguration>
    Prompt override configuration.
    Tags Dictionary<string, string>
    Key-value tags for the place index. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Timeouts AgentAgentTimeouts
    AgentName string
    Name for the agent.
    AgentResourceRoleArn string
    ARN of the Role for the agent.
    FoundationModel string

    Foundation model for the agent to use.

    The following arguments are optional:

    CustomerEncryptionKeyArn string
    ARN of customer manager key to use for encryption.
    Description string
    Description of the agent.
    IdleSessionTtlInSeconds int
    TTL in seconds for the agent to idle.
    Instruction string
    Instructions to tell agent what it should do.
    PrepareAgent bool
    Whether or not to prepare the agent after creation or modification. Defaults to true.
    PromptOverrideConfigurations []AgentAgentPromptOverrideConfigurationArgs
    Prompt override configuration.
    Tags map[string]string
    Key-value tags for the place index. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Timeouts AgentAgentTimeoutsArgs
    agentName String
    Name for the agent.
    agentResourceRoleArn String
    ARN of the Role for the agent.
    foundationModel String

    Foundation model for the agent to use.

    The following arguments are optional:

    customerEncryptionKeyArn String
    ARN of customer manager key to use for encryption.
    description String
    Description of the agent.
    idleSessionTtlInSeconds Integer
    TTL in seconds for the agent to idle.
    instruction String
    Instructions to tell agent what it should do.
    prepareAgent Boolean
    Whether or not to prepare the agent after creation or modification. Defaults to true.
    promptOverrideConfigurations List<AgentAgentPromptOverrideConfiguration>
    Prompt override configuration.
    tags Map<String,String>
    Key-value tags for the place index. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts AgentAgentTimeouts
    agentName string
    Name for the agent.
    agentResourceRoleArn string
    ARN of the Role for the agent.
    foundationModel string

    Foundation model for the agent to use.

    The following arguments are optional:

    customerEncryptionKeyArn string
    ARN of customer manager key to use for encryption.
    description string
    Description of the agent.
    idleSessionTtlInSeconds number
    TTL in seconds for the agent to idle.
    instruction string
    Instructions to tell agent what it should do.
    prepareAgent boolean
    Whether or not to prepare the agent after creation or modification. Defaults to true.
    promptOverrideConfigurations AgentAgentPromptOverrideConfiguration[]
    Prompt override configuration.
    tags {[key: string]: string}
    Key-value tags for the place index. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts AgentAgentTimeouts
    agent_name str
    Name for the agent.
    agent_resource_role_arn str
    ARN of the Role for the agent.
    foundation_model str

    Foundation model for the agent to use.

    The following arguments are optional:

    customer_encryption_key_arn str
    ARN of customer manager key to use for encryption.
    description str
    Description of the agent.
    idle_session_ttl_in_seconds int
    TTL in seconds for the agent to idle.
    instruction str
    Instructions to tell agent what it should do.
    prepare_agent bool
    Whether or not to prepare the agent after creation or modification. Defaults to true.
    prompt_override_configurations Sequence[AgentAgentPromptOverrideConfigurationArgs]
    Prompt override configuration.
    tags Mapping[str, str]
    Key-value tags for the place index. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts AgentAgentTimeoutsArgs
    agentName String
    Name for the agent.
    agentResourceRoleArn String
    ARN of the Role for the agent.
    foundationModel String

    Foundation model for the agent to use.

    The following arguments are optional:

    customerEncryptionKeyArn String
    ARN of customer manager key to use for encryption.
    description String
    Description of the agent.
    idleSessionTtlInSeconds Number
    TTL in seconds for the agent to idle.
    instruction String
    Instructions to tell agent what it should do.
    prepareAgent Boolean
    Whether or not to prepare the agent after creation or modification. Defaults to true.
    promptOverrideConfigurations List<Property Map>
    Prompt override configuration.
    tags Map<String>
    Key-value tags for the place index. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts Property Map

    Outputs

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

    AgentArn string
    ARN of the Agent.
    AgentId string
    ID of the Agent.
    AgentVersion string
    Version of the Agent.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll Dictionary<string, string>

    Deprecated: Please use tags instead.

    AgentArn string
    ARN of the Agent.
    AgentId string
    ID of the Agent.
    AgentVersion string
    Version of the Agent.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll map[string]string

    Deprecated: Please use tags instead.

    agentArn String
    ARN of the Agent.
    agentId String
    ID of the Agent.
    agentVersion String
    Version of the Agent.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String,String>

    Deprecated: Please use tags instead.

    agentArn string
    ARN of the Agent.
    agentId string
    ID of the Agent.
    agentVersion string
    Version of the Agent.
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAll {[key: string]: string}

    Deprecated: Please use tags instead.

    agent_arn str
    ARN of the Agent.
    agent_id str
    ID of the Agent.
    agent_version str
    Version of the Agent.
    id str
    The provider-assigned unique ID for this managed resource.
    tags_all Mapping[str, str]

    Deprecated: Please use tags instead.

    agentArn String
    ARN of the Agent.
    agentId String
    ID of the Agent.
    agentVersion String
    Version of the Agent.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String>

    Deprecated: Please use tags instead.

    Look up Existing AgentAgent Resource

    Get an existing AgentAgent 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?: AgentAgentState, opts?: CustomResourceOptions): AgentAgent
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            agent_arn: Optional[str] = None,
            agent_id: Optional[str] = None,
            agent_name: Optional[str] = None,
            agent_resource_role_arn: Optional[str] = None,
            agent_version: Optional[str] = None,
            customer_encryption_key_arn: Optional[str] = None,
            description: Optional[str] = None,
            foundation_model: Optional[str] = None,
            idle_session_ttl_in_seconds: Optional[int] = None,
            instruction: Optional[str] = None,
            prepare_agent: Optional[bool] = None,
            prompt_override_configurations: Optional[Sequence[AgentAgentPromptOverrideConfigurationArgs]] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            timeouts: Optional[AgentAgentTimeoutsArgs] = None) -> AgentAgent
    func GetAgentAgent(ctx *Context, name string, id IDInput, state *AgentAgentState, opts ...ResourceOption) (*AgentAgent, error)
    public static AgentAgent Get(string name, Input<string> id, AgentAgentState? state, CustomResourceOptions? opts = null)
    public static AgentAgent get(String name, Output<String> id, AgentAgentState 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:
    AgentArn string
    ARN of the Agent.
    AgentId string
    ID of the Agent.
    AgentName string
    Name for the agent.
    AgentResourceRoleArn string
    ARN of the Role for the agent.
    AgentVersion string
    Version of the Agent.
    CustomerEncryptionKeyArn string
    ARN of customer manager key to use for encryption.
    Description string
    Description of the agent.
    FoundationModel string

    Foundation model for the agent to use.

    The following arguments are optional:

    IdleSessionTtlInSeconds int
    TTL in seconds for the agent to idle.
    Instruction string
    Instructions to tell agent what it should do.
    PrepareAgent bool
    Whether or not to prepare the agent after creation or modification. Defaults to true.
    PromptOverrideConfigurations List<AgentAgentPromptOverrideConfiguration>
    Prompt override configuration.
    Tags Dictionary<string, string>
    Key-value tags for the place index. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>

    Deprecated: Please use tags instead.

    Timeouts AgentAgentTimeouts
    AgentArn string
    ARN of the Agent.
    AgentId string
    ID of the Agent.
    AgentName string
    Name for the agent.
    AgentResourceRoleArn string
    ARN of the Role for the agent.
    AgentVersion string
    Version of the Agent.
    CustomerEncryptionKeyArn string
    ARN of customer manager key to use for encryption.
    Description string
    Description of the agent.
    FoundationModel string

    Foundation model for the agent to use.

    The following arguments are optional:

    IdleSessionTtlInSeconds int
    TTL in seconds for the agent to idle.
    Instruction string
    Instructions to tell agent what it should do.
    PrepareAgent bool
    Whether or not to prepare the agent after creation or modification. Defaults to true.
    PromptOverrideConfigurations []AgentAgentPromptOverrideConfigurationArgs
    Prompt override configuration.
    Tags map[string]string
    Key-value tags for the place index. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string

    Deprecated: Please use tags instead.

    Timeouts AgentAgentTimeoutsArgs
    agentArn String
    ARN of the Agent.
    agentId String
    ID of the Agent.
    agentName String
    Name for the agent.
    agentResourceRoleArn String
    ARN of the Role for the agent.
    agentVersion String
    Version of the Agent.
    customerEncryptionKeyArn String
    ARN of customer manager key to use for encryption.
    description String
    Description of the agent.
    foundationModel String

    Foundation model for the agent to use.

    The following arguments are optional:

    idleSessionTtlInSeconds Integer
    TTL in seconds for the agent to idle.
    instruction String
    Instructions to tell agent what it should do.
    prepareAgent Boolean
    Whether or not to prepare the agent after creation or modification. Defaults to true.
    promptOverrideConfigurations List<AgentAgentPromptOverrideConfiguration>
    Prompt override configuration.
    tags Map<String,String>
    Key-value tags for the place index. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>

    Deprecated: Please use tags instead.

    timeouts AgentAgentTimeouts
    agentArn string
    ARN of the Agent.
    agentId string
    ID of the Agent.
    agentName string
    Name for the agent.
    agentResourceRoleArn string
    ARN of the Role for the agent.
    agentVersion string
    Version of the Agent.
    customerEncryptionKeyArn string
    ARN of customer manager key to use for encryption.
    description string
    Description of the agent.
    foundationModel string

    Foundation model for the agent to use.

    The following arguments are optional:

    idleSessionTtlInSeconds number
    TTL in seconds for the agent to idle.
    instruction string
    Instructions to tell agent what it should do.
    prepareAgent boolean
    Whether or not to prepare the agent after creation or modification. Defaults to true.
    promptOverrideConfigurations AgentAgentPromptOverrideConfiguration[]
    Prompt override configuration.
    tags {[key: string]: string}
    Key-value tags for the place index. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}

    Deprecated: Please use tags instead.

    timeouts AgentAgentTimeouts
    agent_arn str
    ARN of the Agent.
    agent_id str
    ID of the Agent.
    agent_name str
    Name for the agent.
    agent_resource_role_arn str
    ARN of the Role for the agent.
    agent_version str
    Version of the Agent.
    customer_encryption_key_arn str
    ARN of customer manager key to use for encryption.
    description str
    Description of the agent.
    foundation_model str

    Foundation model for the agent to use.

    The following arguments are optional:

    idle_session_ttl_in_seconds int
    TTL in seconds for the agent to idle.
    instruction str
    Instructions to tell agent what it should do.
    prepare_agent bool
    Whether or not to prepare the agent after creation or modification. Defaults to true.
    prompt_override_configurations Sequence[AgentAgentPromptOverrideConfigurationArgs]
    Prompt override configuration.
    tags Mapping[str, str]
    Key-value tags for the place index. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]

    Deprecated: Please use tags instead.

    timeouts AgentAgentTimeoutsArgs
    agentArn String
    ARN of the Agent.
    agentId String
    ID of the Agent.
    agentName String
    Name for the agent.
    agentResourceRoleArn String
    ARN of the Role for the agent.
    agentVersion String
    Version of the Agent.
    customerEncryptionKeyArn String
    ARN of customer manager key to use for encryption.
    description String
    Description of the agent.
    foundationModel String

    Foundation model for the agent to use.

    The following arguments are optional:

    idleSessionTtlInSeconds Number
    TTL in seconds for the agent to idle.
    instruction String
    Instructions to tell agent what it should do.
    prepareAgent Boolean
    Whether or not to prepare the agent after creation or modification. Defaults to true.
    promptOverrideConfigurations List<Property Map>
    Prompt override configuration.
    tags Map<String>
    Key-value tags for the place index. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>

    Deprecated: Please use tags instead.

    timeouts Property Map

    Supporting Types

    AgentAgentPromptOverrideConfiguration, AgentAgentPromptOverrideConfigurationArgs

    OverrideLambda string
    ARN of Lambda to use when parsing the raw foundation model output.
    PromptConfigurations List<object>

    List of prompt configurations.

    The following arguments are optional:

    OverrideLambda string
    ARN of Lambda to use when parsing the raw foundation model output.
    PromptConfigurations []interface{}

    List of prompt configurations.

    The following arguments are optional:

    overrideLambda String
    ARN of Lambda to use when parsing the raw foundation model output.
    promptConfigurations List<Object>

    List of prompt configurations.

    The following arguments are optional:

    overrideLambda string
    ARN of Lambda to use when parsing the raw foundation model output.
    promptConfigurations any[]

    List of prompt configurations.

    The following arguments are optional:

    override_lambda str
    ARN of Lambda to use when parsing the raw foundation model output.
    prompt_configurations Sequence[Any]

    List of prompt configurations.

    The following arguments are optional:

    overrideLambda String
    ARN of Lambda to use when parsing the raw foundation model output.
    promptConfigurations List<Any>

    List of prompt configurations.

    The following arguments are optional:

    AgentAgentTimeouts, AgentAgentTimeoutsArgs

    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

    Import

    Using pulumi import, import Agents for Amazon Bedrock Agent using the id. For example:

    $ pulumi import aws:bedrock/agentAgent:AgentAgent example agent-abcd1234
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.36.0 published on Wednesday, May 15, 2024 by Pulumi