aws.bedrockmodel.InvocationLoggingConfiguration
Explore with Pulumi AI
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)
                .videoDataDeliveryEnabled(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
          videoDataDeliveryEnabled: 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
    {
        CloudwatchConfig = new Aws.BedrockModel.Inputs.InvocationLoggingConfigurationLoggingConfigCloudwatchConfigArgs
        {
            LargeDataDeliveryS3Config = new Aws.BedrockModel.Inputs.InvocationLoggingConfigurationLoggingConfigCloudwatchConfigLargeDataDeliveryS3ConfigArgs
            {
                BucketName = "string",
                KeyPrefix = "string",
            },
            LogGroupName = "string",
            RoleArn = "string",
        },
        EmbeddingDataDeliveryEnabled = false,
        ImageDataDeliveryEnabled = false,
        S3Config = new Aws.BedrockModel.Inputs.InvocationLoggingConfigurationLoggingConfigS3ConfigArgs
        {
            BucketName = "string",
            KeyPrefix = "string",
        },
        TextDataDeliveryEnabled = false,
        VideoDataDeliveryEnabled = false,
    },
});
example, err := bedrockmodel.NewInvocationLoggingConfiguration(ctx, "invocationLoggingConfigurationResource", &bedrockmodel.InvocationLoggingConfigurationArgs{
	LoggingConfig: &bedrockmodel.InvocationLoggingConfigurationLoggingConfigArgs{
		CloudwatchConfig: &bedrockmodel.InvocationLoggingConfigurationLoggingConfigCloudwatchConfigArgs{
			LargeDataDeliveryS3Config: &bedrockmodel.InvocationLoggingConfigurationLoggingConfigCloudwatchConfigLargeDataDeliveryS3ConfigArgs{
				BucketName: pulumi.String("string"),
				KeyPrefix:  pulumi.String("string"),
			},
			LogGroupName: pulumi.String("string"),
			RoleArn:      pulumi.String("string"),
		},
		EmbeddingDataDeliveryEnabled: pulumi.Bool(false),
		ImageDataDeliveryEnabled:     pulumi.Bool(false),
		S3Config: &bedrockmodel.InvocationLoggingConfigurationLoggingConfigS3ConfigArgs{
			BucketName: pulumi.String("string"),
			KeyPrefix:  pulumi.String("string"),
		},
		TextDataDeliveryEnabled:  pulumi.Bool(false),
		VideoDataDeliveryEnabled: pulumi.Bool(false),
	},
})
var invocationLoggingConfigurationResource = new InvocationLoggingConfiguration("invocationLoggingConfigurationResource", InvocationLoggingConfigurationArgs.builder()
    .loggingConfig(InvocationLoggingConfigurationLoggingConfigArgs.builder()
        .cloudwatchConfig(InvocationLoggingConfigurationLoggingConfigCloudwatchConfigArgs.builder()
            .largeDataDeliveryS3Config(InvocationLoggingConfigurationLoggingConfigCloudwatchConfigLargeDataDeliveryS3ConfigArgs.builder()
                .bucketName("string")
                .keyPrefix("string")
                .build())
            .logGroupName("string")
            .roleArn("string")
            .build())
        .embeddingDataDeliveryEnabled(false)
        .imageDataDeliveryEnabled(false)
        .s3Config(InvocationLoggingConfigurationLoggingConfigS3ConfigArgs.builder()
            .bucketName("string")
            .keyPrefix("string")
            .build())
        .textDataDeliveryEnabled(false)
        .videoDataDeliveryEnabled(false)
        .build())
    .build());
invocation_logging_configuration_resource = aws.bedrockmodel.InvocationLoggingConfiguration("invocationLoggingConfigurationResource", logging_config={
    "cloudwatch_config": {
        "large_data_delivery_s3_config": {
            "bucket_name": "string",
            "key_prefix": "string",
        },
        "log_group_name": "string",
        "role_arn": "string",
    },
    "embedding_data_delivery_enabled": False,
    "image_data_delivery_enabled": False,
    "s3_config": {
        "bucket_name": "string",
        "key_prefix": "string",
    },
    "text_data_delivery_enabled": False,
    "video_data_delivery_enabled": False,
})
const invocationLoggingConfigurationResource = new aws.bedrockmodel.InvocationLoggingConfiguration("invocationLoggingConfigurationResource", {loggingConfig: {
    cloudwatchConfig: {
        largeDataDeliveryS3Config: {
            bucketName: "string",
            keyPrefix: "string",
        },
        logGroupName: "string",
        roleArn: "string",
    },
    embeddingDataDeliveryEnabled: false,
    imageDataDeliveryEnabled: false,
    s3Config: {
        bucketName: "string",
        keyPrefix: "string",
    },
    textDataDeliveryEnabled: false,
    videoDataDeliveryEnabled: false,
}});
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
        videoDataDeliveryEnabled: 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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The InvocationLoggingConfiguration resource accepts the following input properties:
- LoggingConfig InvocationLogging Configuration Logging Config 
- The logging configuration values to set. See logging_configBlock for details.
- LoggingConfig InvocationLogging Configuration Logging Config Args 
- The logging configuration values to set. See logging_configBlock for details.
- loggingConfig InvocationLogging Configuration Logging Config 
- The logging configuration values to set. See logging_configBlock for details.
- loggingConfig InvocationLogging Configuration Logging Config 
- The logging configuration values to set. See logging_configBlock for details.
- logging_config InvocationLogging Configuration Logging Config Args 
- The logging configuration values to set. See logging_configBlock for details.
- loggingConfig Property Map
- The logging configuration values to set. See logging_configBlock for details.
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) -> InvocationLoggingConfigurationfunc 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)resources:  _:    type: aws:bedrockmodel:InvocationLoggingConfiguration    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.
- LoggingConfig InvocationLogging Configuration Logging Config 
- The logging configuration values to set. See logging_configBlock for details.
- LoggingConfig InvocationLogging Configuration Logging Config Args 
- The logging configuration values to set. See logging_configBlock for details.
- loggingConfig InvocationLogging Configuration Logging Config 
- The logging configuration values to set. See logging_configBlock for details.
- loggingConfig InvocationLogging Configuration Logging Config 
- The logging configuration values to set. See logging_configBlock for details.
- logging_config InvocationLogging Configuration Logging Config Args 
- The logging configuration values to set. See logging_configBlock for details.
- loggingConfig Property Map
- The logging configuration values to set. See logging_configBlock for details.
Supporting Types
InvocationLoggingConfigurationLoggingConfig, InvocationLoggingConfigurationLoggingConfigArgs          
- CloudwatchConfig InvocationLogging Configuration Logging Config Cloudwatch Config 
- CloudWatch logging configuration. See cloudwatch_configBlock for details.
- EmbeddingData boolDelivery Enabled 
- Set to include embeddings data in the log delivery. Defaults to true.
- ImageData boolDelivery Enabled 
- Set to include image data in the log delivery. Defaults to true.
- S3Config
InvocationLogging Configuration Logging Config S3Config 
- S3 configuration for storing log data. See s3_configBlock for details.
- TextData boolDelivery Enabled 
- Set to include text data in the log delivery. Defaults to true.
- VideoData boolDelivery Enabled 
- Set to include text data in the log delivery. Defaults to true.
- CloudwatchConfig InvocationLogging Configuration Logging Config Cloudwatch Config 
- CloudWatch logging configuration. See cloudwatch_configBlock for details.
- EmbeddingData boolDelivery Enabled 
- Set to include embeddings data in the log delivery. Defaults to true.
- ImageData boolDelivery Enabled 
- Set to include image data in the log delivery. Defaults to true.
- S3Config
InvocationLogging Configuration Logging Config S3Config 
- S3 configuration for storing log data. See s3_configBlock for details.
- TextData boolDelivery Enabled 
- Set to include text data in the log delivery. Defaults to true.
- VideoData boolDelivery Enabled 
- Set to include text data in the log delivery. Defaults to true.
- cloudwatchConfig InvocationLogging Configuration Logging Config Cloudwatch Config 
- CloudWatch logging configuration. See cloudwatch_configBlock for details.
- embeddingData BooleanDelivery Enabled 
- Set to include embeddings data in the log delivery. Defaults to true.
- imageData BooleanDelivery Enabled 
- Set to include image data in the log delivery. Defaults to true.
- s3Config
InvocationLogging Configuration Logging Config S3Config 
- S3 configuration for storing log data. See s3_configBlock for details.
- textData BooleanDelivery Enabled 
- Set to include text data in the log delivery. Defaults to true.
- videoData BooleanDelivery Enabled 
- Set to include text data in the log delivery. Defaults to true.
- cloudwatchConfig InvocationLogging Configuration Logging Config Cloudwatch Config 
- CloudWatch logging configuration. See cloudwatch_configBlock for details.
- embeddingData booleanDelivery Enabled 
- Set to include embeddings data in the log delivery. Defaults to true.
- imageData booleanDelivery Enabled 
- Set to include image data in the log delivery. Defaults to true.
- s3Config
InvocationLogging Configuration Logging Config S3Config 
- S3 configuration for storing log data. See s3_configBlock for details.
- textData booleanDelivery Enabled 
- Set to include text data in the log delivery. Defaults to true.
- videoData booleanDelivery Enabled 
- Set to include text data in the log delivery. Defaults to true.
- cloudwatch_config InvocationLogging Configuration Logging Config Cloudwatch Config 
- CloudWatch logging configuration. See cloudwatch_configBlock for details.
- embedding_data_ booldelivery_ enabled 
- Set to include embeddings data in the log delivery. Defaults to true.
- image_data_ booldelivery_ enabled 
- Set to include image data in the log delivery. Defaults to true.
- s3_config InvocationLogging Configuration Logging Config S3Config 
- S3 configuration for storing log data. See s3_configBlock for details.
- text_data_ booldelivery_ enabled 
- Set to include text data in the log delivery. Defaults to true.
- video_data_ booldelivery_ enabled 
- Set to include text data in the log delivery. Defaults to true.
- cloudwatchConfig Property Map
- CloudWatch logging configuration. See cloudwatch_configBlock for details.
- embeddingData BooleanDelivery Enabled 
- Set to include embeddings data in the log delivery. Defaults to true.
- imageData BooleanDelivery Enabled 
- Set to include image data in the log delivery. Defaults to true.
- s3Config Property Map
- S3 configuration for storing log data. See s3_configBlock for details.
- textData BooleanDelivery Enabled 
- Set to include text data in the log delivery. Defaults to true.
- videoData BooleanDelivery Enabled 
- Set to include text data in the log delivery. Defaults to true.
InvocationLoggingConfigurationLoggingConfigCloudwatchConfig, InvocationLoggingConfigurationLoggingConfigCloudwatchConfigArgs              
- LargeData InvocationDelivery S3Config Logging Configuration Logging Config Cloudwatch Config Large Data Delivery S3Config 
- S3 configuration for delivering a large amount of data. See large_data_delivery_s3_configBlock for details.
- LogGroup stringName 
- Log group name.
- RoleArn string
- The role ARN.
- LargeData InvocationDelivery S3Config Logging Configuration Logging Config Cloudwatch Config Large Data Delivery S3Config 
- S3 configuration for delivering a large amount of data. See large_data_delivery_s3_configBlock for details.
- LogGroup stringName 
- Log group name.
- RoleArn string
- The role ARN.
- largeData InvocationDelivery S3Config Logging Configuration Logging Config Cloudwatch Config Large Data Delivery S3Config 
- S3 configuration for delivering a large amount of data. See large_data_delivery_s3_configBlock for details.
- logGroup StringName 
- Log group name.
- roleArn String
- The role ARN.
- largeData InvocationDelivery S3Config Logging Configuration Logging Config Cloudwatch Config Large Data Delivery S3Config 
- S3 configuration for delivering a large amount of data. See large_data_delivery_s3_configBlock for details.
- logGroup stringName 
- Log group name.
- roleArn 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. See large_data_delivery_s3_configBlock for details.
- log_group_ strname 
- Log group name.
- role_arn str
- The role ARN.
- largeData Property MapDelivery S3Config 
- S3 configuration for delivering a large amount of data. See large_data_delivery_s3_configBlock for details.
- logGroup StringName 
- Log group name.
- roleArn String
- The role ARN.
InvocationLoggingConfigurationLoggingConfigCloudwatchConfigLargeDataDeliveryS3Config, InvocationLoggingConfigurationLoggingConfigCloudwatchConfigLargeDataDeliveryS3ConfigArgs                      
- BucketName string
- S3 bucket name.
- KeyPrefix string
- S3 prefix.
- BucketName string
- S3 bucket name.
- KeyPrefix string
- S3 prefix.
- bucketName String
- S3 bucket name.
- keyPrefix String
- S3 prefix.
- bucketName string
- S3 bucket name.
- keyPrefix string
- S3 prefix.
- bucket_name str
- S3 bucket name.
- key_prefix str
- S3 prefix.
- bucketName String
- S3 bucket name.
- keyPrefix String
- S3 prefix.
InvocationLoggingConfigurationLoggingConfigS3Config, InvocationLoggingConfigurationLoggingConfigS3ConfigArgs            
- BucketName string
- S3 bucket name.
- KeyPrefix string
- S3 prefix.
- BucketName string
- S3 bucket name.
- KeyPrefix string
- S3 prefix.
- bucketName String
- S3 bucket name.
- keyPrefix String
- S3 prefix.
- bucketName string
- S3 bucket name.
- keyPrefix string
- S3 prefix.
- bucket_name str
- S3 bucket name.
- key_prefix str
- S3 prefix.
- bucketName String
- S3 bucket name.
- keyPrefix 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 awsTerraform Provider.