Try AWS Native preview for resources not in the classic version.
aws.bedrockmodel.InvocationLoggingConfiguration
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Manages Bedrock model invocation logging configuration.
Model invocation logging is configured per AWS region. To avoid overwriting settings, this resource should not be defined in multiple configurations.
Example Usage
Basic Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
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.s3.BucketV2;
import com.pulumi.aws.s3.BucketV2Args;
import com.pulumi.aws.s3.BucketPolicy;
import com.pulumi.aws.s3.BucketPolicyArgs;
import com.pulumi.aws.bedrockmodel.InvocationLoggingConfiguration;
import com.pulumi.aws.bedrockmodel.InvocationLoggingConfigurationArgs;
import com.pulumi.resources.CustomResourceOptions;
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();
var example = new BucketV2("example", BucketV2Args.builder()
.bucket("example")
.forceDestroy(true)
.build());
var exampleBucketPolicy = new BucketPolicy("exampleBucketPolicy", BucketPolicyArgs.builder()
.bucket(example.bucket())
.policy(example.arn().applyValue(arn -> """
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "bedrock.amazonaws.com"
},
"Action": [
"s3:*"
],
"Resource": [
"%s/*"
],
"Condition": {
"StringEquals": {
"aws:SourceAccount": "%s"
},
"ArnLike": {
"aws:SourceArn": "arn:aws:bedrock:us-east-1:%s:*"
}
}
}
]
}
", arn,current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.accountId()),current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.accountId()))))
.build());
var exampleInvocationLoggingConfiguration = new InvocationLoggingConfiguration("exampleInvocationLoggingConfiguration", InvocationLoggingConfigurationArgs.builder()
.loggingConfig(InvocationLoggingConfigurationLoggingConfigArgs.builder()
.embeddingDataDeliveryEnabled(true)
.imageDataDeliveryEnabled(true)
.textDataDeliveryEnabled(true)
.s3Config(InvocationLoggingConfigurationLoggingConfigS3ConfigArgs.builder()
.bucketName(example.id())
.keyPrefix("bedrock")
.build())
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(exampleBucketPolicy)
.build());
}
}
resources:
example:
type: aws:s3:BucketV2
properties:
bucket: example
forceDestroy: true
exampleBucketPolicy:
type: aws:s3:BucketPolicy
name: example
properties:
bucket: ${example.bucket}
policy: |
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "bedrock.amazonaws.com"
},
"Action": [
"s3:*"
],
"Resource": [
"${example.arn}/*"
],
"Condition": {
"StringEquals": {
"aws:SourceAccount": "${current.accountId}"
},
"ArnLike": {
"aws:SourceArn": "arn:aws:bedrock:us-east-1:${current.accountId}:*"
}
}
}
]
}
exampleInvocationLoggingConfiguration:
type: aws:bedrockmodel:InvocationLoggingConfiguration
name: example
properties:
loggingConfig:
- embeddingDataDeliveryEnabled: true
imageDataDeliveryEnabled: true
textDataDeliveryEnabled: true
s3Config:
- bucketName: ${example.id}
keyPrefix: bedrock
options:
dependson:
- ${exampleBucketPolicy}
variables:
current:
fn::invoke:
Function: aws:getCallerIdentity
Arguments: {}
Create InvocationLoggingConfiguration Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new InvocationLoggingConfiguration(name: string, args?: InvocationLoggingConfigurationArgs, opts?: CustomResourceOptions);
@overload
def InvocationLoggingConfiguration(resource_name: str,
args: Optional[InvocationLoggingConfigurationArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def InvocationLoggingConfiguration(resource_name: str,
opts: Optional[ResourceOptions] = None,
logging_config: Optional[InvocationLoggingConfigurationLoggingConfigArgs] = None)
func NewInvocationLoggingConfiguration(ctx *Context, name string, args *InvocationLoggingConfigurationArgs, opts ...ResourceOption) (*InvocationLoggingConfiguration, error)
public InvocationLoggingConfiguration(string name, InvocationLoggingConfigurationArgs? args = null, CustomResourceOptions? opts = null)
public InvocationLoggingConfiguration(String name, InvocationLoggingConfigurationArgs args)
public InvocationLoggingConfiguration(String name, InvocationLoggingConfigurationArgs args, CustomResourceOptions options)
type: aws:bedrockmodel:InvocationLoggingConfiguration
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 InvocationLoggingConfigurationArgs
- 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 InvocationLoggingConfigurationArgs
- 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 InvocationLoggingConfigurationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InvocationLoggingConfigurationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InvocationLoggingConfigurationArgs
- 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 invocationLoggingConfigurationResource = new Aws.BedrockModel.InvocationLoggingConfiguration("invocationLoggingConfigurationResource", new()
{
LoggingConfig = new Aws.BedrockModel.Inputs.InvocationLoggingConfigurationLoggingConfigArgs
{
EmbeddingDataDeliveryEnabled = false,
ImageDataDeliveryEnabled = false,
TextDataDeliveryEnabled = false,
CloudwatchConfig = new Aws.BedrockModel.Inputs.InvocationLoggingConfigurationLoggingConfigCloudwatchConfigArgs
{
LargeDataDeliveryS3Config = new Aws.BedrockModel.Inputs.InvocationLoggingConfigurationLoggingConfigCloudwatchConfigLargeDataDeliveryS3ConfigArgs
{
BucketName = "string",
KeyPrefix = "string",
},
LogGroupName = "string",
RoleArn = "string",
},
S3Config = new Aws.BedrockModel.Inputs.InvocationLoggingConfigurationLoggingConfigS3ConfigArgs
{
BucketName = "string",
KeyPrefix = "string",
},
},
});
example, err := bedrockmodel.NewInvocationLoggingConfiguration(ctx, "invocationLoggingConfigurationResource", &bedrockmodel.InvocationLoggingConfigurationArgs{
LoggingConfig: &bedrockmodel.InvocationLoggingConfigurationLoggingConfigArgs{
EmbeddingDataDeliveryEnabled: pulumi.Bool(false),
ImageDataDeliveryEnabled: pulumi.Bool(false),
TextDataDeliveryEnabled: pulumi.Bool(false),
CloudwatchConfig: &bedrockmodel.InvocationLoggingConfigurationLoggingConfigCloudwatchConfigArgs{
LargeDataDeliveryS3Config: &bedrockmodel.InvocationLoggingConfigurationLoggingConfigCloudwatchConfigLargeDataDeliveryS3ConfigArgs{
BucketName: pulumi.String("string"),
KeyPrefix: pulumi.String("string"),
},
LogGroupName: pulumi.String("string"),
RoleArn: pulumi.String("string"),
},
S3Config: &bedrockmodel.InvocationLoggingConfigurationLoggingConfigS3ConfigArgs{
BucketName: pulumi.String("string"),
KeyPrefix: pulumi.String("string"),
},
},
})
var invocationLoggingConfigurationResource = new InvocationLoggingConfiguration("invocationLoggingConfigurationResource", InvocationLoggingConfigurationArgs.builder()
.loggingConfig(InvocationLoggingConfigurationLoggingConfigArgs.builder()
.embeddingDataDeliveryEnabled(false)
.imageDataDeliveryEnabled(false)
.textDataDeliveryEnabled(false)
.cloudwatchConfig(InvocationLoggingConfigurationLoggingConfigCloudwatchConfigArgs.builder()
.largeDataDeliveryS3Config(InvocationLoggingConfigurationLoggingConfigCloudwatchConfigLargeDataDeliveryS3ConfigArgs.builder()
.bucketName("string")
.keyPrefix("string")
.build())
.logGroupName("string")
.roleArn("string")
.build())
.s3Config(InvocationLoggingConfigurationLoggingConfigS3ConfigArgs.builder()
.bucketName("string")
.keyPrefix("string")
.build())
.build())
.build());
invocation_logging_configuration_resource = aws.bedrockmodel.InvocationLoggingConfiguration("invocationLoggingConfigurationResource", logging_config={
"embeddingDataDeliveryEnabled": False,
"imageDataDeliveryEnabled": False,
"textDataDeliveryEnabled": False,
"cloudwatchConfig": {
"largeDataDeliveryS3Config": {
"bucketName": "string",
"keyPrefix": "string",
},
"logGroupName": "string",
"roleArn": "string",
},
"s3Config": {
"bucketName": "string",
"keyPrefix": "string",
},
})
const invocationLoggingConfigurationResource = new aws.bedrockmodel.InvocationLoggingConfiguration("invocationLoggingConfigurationResource", {loggingConfig: {
embeddingDataDeliveryEnabled: false,
imageDataDeliveryEnabled: false,
textDataDeliveryEnabled: false,
cloudwatchConfig: {
largeDataDeliveryS3Config: {
bucketName: "string",
keyPrefix: "string",
},
logGroupName: "string",
roleArn: "string",
},
s3Config: {
bucketName: "string",
keyPrefix: "string",
},
}});
type: aws:bedrockmodel:InvocationLoggingConfiguration
properties:
loggingConfig:
cloudwatchConfig:
largeDataDeliveryS3Config:
bucketName: string
keyPrefix: string
logGroupName: string
roleArn: string
embeddingDataDeliveryEnabled: false
imageDataDeliveryEnabled: false
s3Config:
bucketName: string
keyPrefix: string
textDataDeliveryEnabled: false
InvocationLoggingConfiguration 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 InvocationLoggingConfiguration resource accepts the following input properties:
- Logging
Config InvocationLogging Configuration Logging Config - The logging configuration values to set.
- Logging
Config InvocationLogging Configuration Logging Config Args - The logging configuration values to set.
- logging
Config InvocationLogging Configuration Logging Config - The logging configuration values to set.
- logging
Config InvocationLogging Configuration Logging Config - The logging configuration values to set.
- logging_
config InvocationLogging Configuration Logging Config Args - The logging configuration values to set.
- logging
Config Property Map - The logging configuration values to set.
Outputs
All input properties are implicitly available as output properties. Additionally, the InvocationLoggingConfiguration 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 InvocationLoggingConfiguration Resource
Get an existing InvocationLoggingConfiguration 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?: InvocationLoggingConfigurationState, opts?: CustomResourceOptions): InvocationLoggingConfiguration
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
logging_config: Optional[InvocationLoggingConfigurationLoggingConfigArgs] = None) -> InvocationLoggingConfiguration
func GetInvocationLoggingConfiguration(ctx *Context, name string, id IDInput, state *InvocationLoggingConfigurationState, opts ...ResourceOption) (*InvocationLoggingConfiguration, error)
public static InvocationLoggingConfiguration Get(string name, Input<string> id, InvocationLoggingConfigurationState? state, CustomResourceOptions? opts = null)
public static InvocationLoggingConfiguration get(String name, Output<String> id, InvocationLoggingConfigurationState 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.
- Logging
Config InvocationLogging Configuration Logging Config - The logging configuration values to set.
- Logging
Config InvocationLogging Configuration Logging Config Args - The logging configuration values to set.
- logging
Config InvocationLogging Configuration Logging Config - The logging configuration values to set.
- logging
Config InvocationLogging Configuration Logging Config - The logging configuration values to set.
- logging_
config InvocationLogging Configuration Logging Config Args - The logging configuration values to set.
- logging
Config Property Map - The logging configuration values to set.
Supporting Types
InvocationLoggingConfigurationLoggingConfig, InvocationLoggingConfigurationLoggingConfigArgs
- Embedding
Data boolDelivery Enabled - Set to include embeddings data in the log delivery.
- Image
Data boolDelivery Enabled - Set to include image data in the log delivery.
- Text
Data boolDelivery Enabled - Set to include text data in the log delivery.
- Cloudwatch
Config InvocationLogging Configuration Logging Config Cloudwatch Config - CloudWatch logging configuration.
- S3Config
Invocation
Logging Configuration Logging Config S3Config - S3 configuration for storing log data.
- Embedding
Data boolDelivery Enabled - Set to include embeddings data in the log delivery.
- Image
Data boolDelivery Enabled - Set to include image data in the log delivery.
- Text
Data boolDelivery Enabled - Set to include text data in the log delivery.
- Cloudwatch
Config InvocationLogging Configuration Logging Config Cloudwatch Config - CloudWatch logging configuration.
- S3Config
Invocation
Logging Configuration Logging Config S3Config - S3 configuration for storing log data.
- embedding
Data BooleanDelivery Enabled - Set to include embeddings data in the log delivery.
- image
Data BooleanDelivery Enabled - Set to include image data in the log delivery.
- text
Data BooleanDelivery Enabled - Set to include text data in the log delivery.
- cloudwatch
Config InvocationLogging Configuration Logging Config Cloudwatch Config - CloudWatch logging configuration.
- s3Config
Invocation
Logging Configuration Logging Config S3Config - S3 configuration for storing log data.
- embedding
Data booleanDelivery Enabled - Set to include embeddings data in the log delivery.
- image
Data booleanDelivery Enabled - Set to include image data in the log delivery.
- text
Data booleanDelivery Enabled - Set to include text data in the log delivery.
- cloudwatch
Config InvocationLogging Configuration Logging Config Cloudwatch Config - CloudWatch logging configuration.
- s3Config
Invocation
Logging Configuration Logging Config S3Config - S3 configuration for storing log data.
- embedding_
data_ booldelivery_ enabled - Set to include embeddings data in the log delivery.
- image_
data_ booldelivery_ enabled - Set to include image data in the log delivery.
- text_
data_ booldelivery_ enabled - Set to include text data in the log delivery.
- cloudwatch_
config InvocationLogging Configuration Logging Config Cloudwatch Config - CloudWatch logging configuration.
- s3_
config InvocationLogging Configuration Logging Config S3Config - S3 configuration for storing log data.
- embedding
Data BooleanDelivery Enabled - Set to include embeddings data in the log delivery.
- image
Data BooleanDelivery Enabled - Set to include image data in the log delivery.
- text
Data BooleanDelivery Enabled - Set to include text data in the log delivery.
- cloudwatch
Config Property Map - CloudWatch logging configuration.
- s3Config Property Map
- S3 configuration for storing log data.
InvocationLoggingConfigurationLoggingConfigCloudwatchConfig, InvocationLoggingConfigurationLoggingConfigCloudwatchConfigArgs
- Large
Data InvocationDelivery S3Config Logging Configuration Logging Config Cloudwatch Config Large Data Delivery S3Config - S3 configuration for delivering a large amount of data.
- Log
Group stringName - Log group name.
- Role
Arn string - The role ARN.
- Large
Data InvocationDelivery S3Config Logging Configuration Logging Config Cloudwatch Config Large Data Delivery S3Config - S3 configuration for delivering a large amount of data.
- Log
Group stringName - Log group name.
- Role
Arn string - The role ARN.
- large
Data InvocationDelivery S3Config Logging Configuration Logging Config Cloudwatch Config Large Data Delivery S3Config - S3 configuration for delivering a large amount of data.
- log
Group StringName - Log group name.
- role
Arn String - The role ARN.
- large
Data InvocationDelivery S3Config Logging Configuration Logging Config Cloudwatch Config Large Data Delivery S3Config - S3 configuration for delivering a large amount of data.
- log
Group stringName - Log group name.
- role
Arn string - The role ARN.
- large_
data_ Invocationdelivery_ s3_ config Logging Configuration Logging Config Cloudwatch Config Large Data Delivery S3Config - S3 configuration for delivering a large amount of data.
- log_
group_ strname - Log group name.
- role_
arn str - The role ARN.
- large
Data Property MapDelivery S3Config - S3 configuration for delivering a large amount of data.
- log
Group StringName - Log group name.
- role
Arn String - The role ARN.
InvocationLoggingConfigurationLoggingConfigCloudwatchConfigLargeDataDeliveryS3Config, InvocationLoggingConfigurationLoggingConfigCloudwatchConfigLargeDataDeliveryS3ConfigArgs
- Bucket
Name string - S3 bucket name.
- Key
Prefix string - S3 prefix.
- Bucket
Name string - S3 bucket name.
- Key
Prefix string - S3 prefix.
- bucket
Name String - S3 bucket name.
- key
Prefix String - S3 prefix.
- bucket
Name string - S3 bucket name.
- key
Prefix string - S3 prefix.
- bucket_
name str - S3 bucket name.
- key_
prefix str - S3 prefix.
- bucket
Name String - S3 bucket name.
- key
Prefix String - S3 prefix.
InvocationLoggingConfigurationLoggingConfigS3Config, InvocationLoggingConfigurationLoggingConfigS3ConfigArgs
- Bucket
Name string - S3 bucket name.
- Key
Prefix string - S3 prefix.
- Bucket
Name string - S3 bucket name.
- Key
Prefix string - S3 prefix.
- bucket
Name String - S3 bucket name.
- key
Prefix String - S3 prefix.
- bucket
Name string - S3 bucket name.
- key
Prefix string - S3 prefix.
- bucket_
name str - S3 bucket name.
- key_
prefix str - S3 prefix.
- bucket
Name String - S3 bucket name.
- key
Prefix String - S3 prefix.
Import
Using pulumi import
, import Bedrock custom model using the id
set to the AWS Region. For example:
$ pulumi import aws:bedrockmodel/invocationLoggingConfiguration:InvocationLoggingConfiguration my_config us-east-1
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.
Try AWS Native preview for resources not in the classic version.