bedrock

package module
v1.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 41 Imported by: 5

Documentation

Overview

Package bedrock provides the API client, operations, and parameter types for Amazon Bedrock.

Describes the API operations for creating, managing, fine-turning, and evaluating Amazon Bedrock models.

Index

Constants

View Source
const ServiceAPIVersion = "2023-04-20"
View Source
const ServiceID = "Bedrock"

Variables

This section is empty.

Functions

func NewDefaultEndpointResolver

func NewDefaultEndpointResolver() *internalendpoints.Resolver

NewDefaultEndpointResolver constructs a new service endpoint resolver

func WithAPIOptions

func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options)

WithAPIOptions returns a functional option for setting the Client's APIOptions option.

func WithEndpointResolver deprecated

func WithEndpointResolver(v EndpointResolver) func(*Options)

Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for this field will likely prevent you from using any endpoint-related service features released after the introduction of EndpointResolverV2 and BaseEndpoint.

To migrate an EndpointResolver implementation that uses a custom endpoint, set the client option BaseEndpoint instead.

func WithEndpointResolverV2

func WithEndpointResolverV2(v EndpointResolverV2) func(*Options)

WithEndpointResolverV2 returns a functional option for setting the Client's EndpointResolverV2 option.

func WithSigV4SigningName added in v1.3.2

func WithSigV4SigningName(name string) func(*Options)

WithSigV4SigningName applies an override to the authentication workflow to use the given signing name for SigV4-authenticated operations.

This is an advanced setting. The value here is FINAL, taking precedence over the resolved signing name from both auth scheme resolution and endpoint resolution.

func WithSigV4SigningRegion added in v1.3.2

func WithSigV4SigningRegion(region string) func(*Options)

WithSigV4SigningRegion applies an override to the authentication workflow to use the given signing region for SigV4-authenticated operations.

This is an advanced setting. The value here is FINAL, taking precedence over the resolved signing region from both auth scheme resolution and endpoint resolution.

Types

type AuthResolverParameters added in v1.3.2

type AuthResolverParameters struct {
	// The name of the operation being invoked.
	Operation string

	// The region in which the operation is being invoked.
	Region string
}

AuthResolverParameters contains the set of inputs necessary for auth scheme resolution.

type AuthSchemeResolver added in v1.3.2

type AuthSchemeResolver interface {
	ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error)
}

AuthSchemeResolver returns a set of possible authentication options for an operation.

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides the API client to make operations call for Amazon Bedrock.

func New

func New(options Options, optFns ...func(*Options)) *Client

New returns an initialized Client based on the functional options. Provide additional functional options to further configure the behavior of the client, such as changing the client's endpoint or adding custom middleware behavior.

func NewFromConfig

func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client

NewFromConfig returns a new client from the provided config.

func (*Client) CreateEvaluationJob added in v1.8.0

func (c *Client) CreateEvaluationJob(ctx context.Context, params *CreateEvaluationJobInput, optFns ...func(*Options)) (*CreateEvaluationJobOutput, error)

API operation for creating and managing Amazon Bedrock automatic model evaluation jobs and model evaluation jobs that use human workers. To learn more about the requirements for creating a model evaluation job see, Model evaluations.

func (*Client) CreateGuardrail added in v1.8.0

func (c *Client) CreateGuardrail(ctx context.Context, params *CreateGuardrailInput, optFns ...func(*Options)) (*CreateGuardrailOutput, error)

Creates a guardrail to block topics and to filter out harmful content.

  • Specify a name and optional description .

  • Specify messages for when the guardrail successfully blocks a prompt or a model response in the blockedInputMessaging and blockedOutputsMessaging fields.

  • Specify topics for the guardrail to deny in the topicPolicyConfig object. Each GuardrailTopicConfigobject in the topicsConfig list pertains to one topic.

  • Give a name and description so that the guardrail can properly identify the topic.

  • Specify DENY in the type field.

  • (Optional) Provide up to five prompts that you would categorize as belonging to the topic in the examples list.

  • Specify filter strengths for the harmful categories defined in Amazon Bedrock in the contentPolicyConfig object. Each GuardrailContentFilterConfigobject in the filtersConfig list pertains to a harmful category. For more information, see Content filters. For more information about the fields in a content filter, see GuardrailContentFilterConfig.

  • Specify the category in the type field.

  • Specify the strength of the filter for prompts in the inputStrength field and for model responses in the strength field of the GuardrailContentFilterConfig.

  • (Optional) For security, include the ARN of a KMS key in the kmsKeyId field.

  • (Optional) Attach any tags to the guardrail in the tags object. For more information, see Tag resources.

func (*Client) CreateGuardrailVersion added in v1.8.0

func (c *Client) CreateGuardrailVersion(ctx context.Context, params *CreateGuardrailVersionInput, optFns ...func(*Options)) (*CreateGuardrailVersionOutput, error)

Creates a version of the guardrail. Use this API to create a snapshot of the guardrail when you are satisfied with a configuration, or to compare the configuration with another version.

func (*Client) CreateModelCustomizationJob

func (c *Client) CreateModelCustomizationJob(ctx context.Context, params *CreateModelCustomizationJobInput, optFns ...func(*Options)) (*CreateModelCustomizationJobOutput, error)

Creates a fine-tuning job to customize a base model.

You specify the base foundation model and the location of the training data. After the model-customization job completes successfully, your custom model resource will be ready to use. Amazon Bedrock returns validation loss metrics and output generations after the job completes.

For information on the format of training and validation data, see Prepare the datasets.

Model-customization jobs are asynchronous and the completion time depends on the base model and the training/validation data size. To monitor a job, use the GetModelCustomizationJob operation to retrieve the job status.

For more information, see Custom models in the Amazon Bedrock User Guide.

func (*Client) CreateProvisionedModelThroughput added in v1.1.0

func (c *Client) CreateProvisionedModelThroughput(ctx context.Context, params *CreateProvisionedModelThroughputInput, optFns ...func(*Options)) (*CreateProvisionedModelThroughputOutput, error)

Creates dedicated throughput for a base or custom model with the model units and for the duration that you specify. For pricing details, see Amazon Bedrock Pricing. For more information, see Provisioned Throughputin the Amazon Bedrock User Guide.

func (*Client) DeleteCustomModel

func (c *Client) DeleteCustomModel(ctx context.Context, params *DeleteCustomModelInput, optFns ...func(*Options)) (*DeleteCustomModelOutput, error)

Deletes a custom model that you created earlier. For more information, see Custom models in the Amazon Bedrock User Guide.

func (*Client) DeleteGuardrail added in v1.8.0

func (c *Client) DeleteGuardrail(ctx context.Context, params *DeleteGuardrailInput, optFns ...func(*Options)) (*DeleteGuardrailOutput, error)

Deletes a guardrail.

  • To delete a guardrail, only specify the ARN of the guardrail in the guardrailIdentifier field. If you delete a guardrail, all of its versions will be deleted.

  • To delete a version of a guardrail, specify the ARN of the guardrail in the guardrailIdentifier field and the version in the guardrailVersion field.

func (*Client) DeleteModelInvocationLoggingConfiguration

func (c *Client) DeleteModelInvocationLoggingConfiguration(ctx context.Context, params *DeleteModelInvocationLoggingConfigurationInput, optFns ...func(*Options)) (*DeleteModelInvocationLoggingConfigurationOutput, error)

Delete the invocation logging.

func (*Client) DeleteProvisionedModelThroughput added in v1.1.0

func (c *Client) DeleteProvisionedModelThroughput(ctx context.Context, params *DeleteProvisionedModelThroughputInput, optFns ...func(*Options)) (*DeleteProvisionedModelThroughputOutput, error)

Deletes a Provisioned Throughput. You can't delete a Provisioned Throughput before the commitment term is over. For more information, see Provisioned Throughputin the Amazon Bedrock User Guide.

func (*Client) GetCustomModel

func (c *Client) GetCustomModel(ctx context.Context, params *GetCustomModelInput, optFns ...func(*Options)) (*GetCustomModelOutput, error)

Get the properties associated with a Amazon Bedrock custom model that you have created.For more information, see Custom modelsin the Amazon Bedrock User Guide.

func (*Client) GetEvaluationJob added in v1.8.0

func (c *Client) GetEvaluationJob(ctx context.Context, params *GetEvaluationJobInput, optFns ...func(*Options)) (*GetEvaluationJobOutput, error)

Retrieves the properties associated with a model evaluation job, including the status of the job. For more information, see Model evaluations.

func (*Client) GetFoundationModel

func (c *Client) GetFoundationModel(ctx context.Context, params *GetFoundationModelInput, optFns ...func(*Options)) (*GetFoundationModelOutput, error)

Get details about a Amazon Bedrock foundation model.

func (*Client) GetGuardrail added in v1.8.0

func (c *Client) GetGuardrail(ctx context.Context, params *GetGuardrailInput, optFns ...func(*Options)) (*GetGuardrailOutput, error)

Gets details about a guardrail. If you don't specify a version, the response returns details for the DRAFT version.

func (*Client) GetModelCustomizationJob

func (c *Client) GetModelCustomizationJob(ctx context.Context, params *GetModelCustomizationJobInput, optFns ...func(*Options)) (*GetModelCustomizationJobOutput, error)

Retrieves the properties associated with a model-customization job, including the status of the job. For more information, see Custom modelsin the Amazon Bedrock User Guide.

func (*Client) GetModelInvocationLoggingConfiguration

func (c *Client) GetModelInvocationLoggingConfiguration(ctx context.Context, params *GetModelInvocationLoggingConfigurationInput, optFns ...func(*Options)) (*GetModelInvocationLoggingConfigurationOutput, error)

Get the current configuration values for model invocation logging.

func (*Client) GetProvisionedModelThroughput added in v1.1.0

func (c *Client) GetProvisionedModelThroughput(ctx context.Context, params *GetProvisionedModelThroughputInput, optFns ...func(*Options)) (*GetProvisionedModelThroughputOutput, error)

Returns details for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.

func (*Client) ListCustomModels

func (c *Client) ListCustomModels(ctx context.Context, params *ListCustomModelsInput, optFns ...func(*Options)) (*ListCustomModelsOutput, error)

Returns a list of the custom models that you have created with the CreateModelCustomizationJob operation.

For more information, see Custom models in the Amazon Bedrock User Guide.

func (*Client) ListEvaluationJobs added in v1.8.0

func (c *Client) ListEvaluationJobs(ctx context.Context, params *ListEvaluationJobsInput, optFns ...func(*Options)) (*ListEvaluationJobsOutput, error)

Lists model evaluation jobs.

func (*Client) ListFoundationModels

func (c *Client) ListFoundationModels(ctx context.Context, params *ListFoundationModelsInput, optFns ...func(*Options)) (*ListFoundationModelsOutput, error)

Lists Amazon Bedrock foundation models that you can use. You can filter the results with the request parameters. For more information, see Foundation modelsin the Amazon Bedrock User Guide.

func (*Client) ListGuardrails added in v1.8.0

func (c *Client) ListGuardrails(ctx context.Context, params *ListGuardrailsInput, optFns ...func(*Options)) (*ListGuardrailsOutput, error)

Lists details about all the guardrails in an account. To list the DRAFT version of all your guardrails, don't specify the guardrailIdentifier field. To list all versions of a guardrail, specify the ARN of the guardrail in the guardrailIdentifier field.

You can set the maximum number of results to return in a response in the maxResults field. If there are more results than the number you set, the response returns a nextToken that you can send in another ListGuardrails request to see the next batch of results.

func (*Client) ListModelCustomizationJobs

func (c *Client) ListModelCustomizationJobs(ctx context.Context, params *ListModelCustomizationJobsInput, optFns ...func(*Options)) (*ListModelCustomizationJobsOutput, error)

Returns a list of model customization jobs that you have submitted. You can filter the jobs to return based on one or more criteria.

For more information, see Custom models in the Amazon Bedrock User Guide.

func (*Client) ListProvisionedModelThroughputs added in v1.1.0

func (c *Client) ListProvisionedModelThroughputs(ctx context.Context, params *ListProvisionedModelThroughputsInput, optFns ...func(*Options)) (*ListProvisionedModelThroughputsOutput, error)

Lists the Provisioned Throughputs in the account. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.

func (*Client) ListTagsForResource

func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error)

List the tags associated with the specified resource.

For more information, see Tagging resources in the Amazon Bedrock User Guide.

func (*Client) Options added in v1.5.0

func (c *Client) Options() Options

Options returns a copy of the client configuration.

Callers SHOULD NOT perform mutations on any inner structures within client config. Config overrides should instead be made on a per-operation basis through functional options.

func (*Client) PutModelInvocationLoggingConfiguration

func (c *Client) PutModelInvocationLoggingConfiguration(ctx context.Context, params *PutModelInvocationLoggingConfigurationInput, optFns ...func(*Options)) (*PutModelInvocationLoggingConfigurationOutput, error)

Set the configuration values for model invocation logging.

func (*Client) StopEvaluationJob added in v1.8.0

func (c *Client) StopEvaluationJob(ctx context.Context, params *StopEvaluationJobInput, optFns ...func(*Options)) (*StopEvaluationJobOutput, error)

Stops an in progress model evaluation job.

func (*Client) StopModelCustomizationJob

func (c *Client) StopModelCustomizationJob(ctx context.Context, params *StopModelCustomizationJobInput, optFns ...func(*Options)) (*StopModelCustomizationJobOutput, error)

Stops an active model customization job. For more information, see Custom models in the Amazon Bedrock User Guide.

func (*Client) TagResource

func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error)

Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.

func (*Client) UntagResource

func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error)

Remove one or more tags from a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.

func (*Client) UpdateGuardrail added in v1.8.0

func (c *Client) UpdateGuardrail(ctx context.Context, params *UpdateGuardrailInput, optFns ...func(*Options)) (*UpdateGuardrailOutput, error)

Updates a guardrail with the values you specify.

  • Specify a name and optional description .

  • Specify messages for when the guardrail successfully blocks a prompt or a model response in the blockedInputMessaging and blockedOutputsMessaging fields.

  • Specify topics for the guardrail to deny in the topicPolicyConfig object. Each GuardrailTopicConfigobject in the topicsConfig list pertains to one topic.

  • Give a name and description so that the guardrail can properly identify the topic.

  • Specify DENY in the type field.

  • (Optional) Provide up to five prompts that you would categorize as belonging to the topic in the examples list.

  • Specify filter strengths for the harmful categories defined in Amazon Bedrock in the contentPolicyConfig object. Each GuardrailContentFilterConfigobject in the filtersConfig list pertains to a harmful category. For more information, see Content filters. For more information about the fields in a content filter, see GuardrailContentFilterConfig.

  • Specify the category in the type field.

  • Specify the strength of the filter for prompts in the inputStrength field and for model responses in the strength field of the GuardrailContentFilterConfig.

  • (Optional) For security, include the ARN of a KMS key in the kmsKeyId field.

  • (Optional) Attach any tags to the guardrail in the tags object. For more information, see Tag resources.

func (*Client) UpdateProvisionedModelThroughput added in v1.1.0

func (c *Client) UpdateProvisionedModelThroughput(ctx context.Context, params *UpdateProvisionedModelThroughputInput, optFns ...func(*Options)) (*UpdateProvisionedModelThroughputOutput, error)

Updates the name or associated model for a Provisioned Throughput. For more information, see Provisioned Throughputin the Amazon Bedrock User Guide.

type CreateEvaluationJobInput added in v1.8.0

type CreateEvaluationJobInput struct {

	// Specifies whether the model evaluation job is automatic or uses human worker.
	//
	// This member is required.
	EvaluationConfig types.EvaluationConfig

	// Specify the models you want to use in your model evaluation job. Automatic
	// model evaluation jobs support a single model, and model evaluation job that use
	// human workers support two models.
	//
	// This member is required.
	InferenceConfig types.EvaluationInferenceConfig

	// The name of the model evaluation job. Model evaluation job names must unique
	// with your AWS account, and your account's AWS region.
	//
	// This member is required.
	JobName *string

	// An object that defines where the results of model evaluation job will be saved
	// in Amazon S3.
	//
	// This member is required.
	OutputDataConfig *types.EvaluationOutputDataConfig

	// The Amazon Resource Name (ARN) of an IAM service role that Amazon Bedrock can
	// assume to perform tasks on your behalf. The service role must have Amazon
	// Bedrock as the service principal, and provide access to any Amazon S3 buckets
	// specified in the EvaluationConfig object. To pass this role to Amazon Bedrock,
	// the caller of this API must have the iam:PassRole permission. To learn more
	// about the required permissions, see [Required permissions].
	//
	// [Required permissions]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-evaluation-security.html
	//
	// This member is required.
	RoleArn *string

	// A unique, case-sensitive identifier to ensure that the API request completes no
	// more than one time. If this token matches a previous request, Amazon Bedrock
	// ignores the request, but does not return an error. For more information, see [Ensuring idempotency].
	//
	// [Ensuring idempotency]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html
	ClientRequestToken *string

	// Specify your customer managed key ARN that will be used to encrypt your model
	// evaluation job.
	CustomerEncryptionKeyId *string

	// A description of the model evaluation job.
	JobDescription *string

	// Tags to attach to the model evaluation job.
	JobTags []types.Tag
	// contains filtered or unexported fields
}

type CreateEvaluationJobOutput added in v1.8.0

type CreateEvaluationJobOutput struct {

	// The ARN of the model evaluation job.
	//
	// This member is required.
	JobArn *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type CreateGuardrailInput added in v1.8.0

type CreateGuardrailInput struct {

	// The message to return when the guardrail blocks a prompt.
	//
	// This member is required.
	BlockedInputMessaging *string

	// The message to return when the guardrail blocks a model response.
	//
	// This member is required.
	BlockedOutputsMessaging *string

	// The name to give the guardrail.
	//
	// This member is required.
	Name *string

	// A unique, case-sensitive identifier to ensure that the API request completes no
	// more than once. If this token matches a previous request, Amazon Bedrock ignores
	// the request, but does not return an error. For more information, see [Ensuring idempotency]in the
	// Amazon S3 User Guide.
	//
	// [Ensuring idempotency]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html
	ClientRequestToken *string

	// The content filter policies to configure for the guardrail.
	ContentPolicyConfig *types.GuardrailContentPolicyConfig

	// A description of the guardrail.
	Description *string

	// The ARN of the KMS key that you use to encrypt the guardrail.
	KmsKeyId *string

	// The sensitive information policy to configure for the guardrail.
	SensitiveInformationPolicyConfig *types.GuardrailSensitiveInformationPolicyConfig

	// The tags that you want to attach to the guardrail.
	Tags []types.Tag

	// The topic policies to configure for the guardrail.
	TopicPolicyConfig *types.GuardrailTopicPolicyConfig

	// The word policy you configure for the guardrail.
	WordPolicyConfig *types.GuardrailWordPolicyConfig
	// contains filtered or unexported fields
}

type CreateGuardrailOutput added in v1.8.0

type CreateGuardrailOutput struct {

	// The time at which the guardrail was created.
	//
	// This member is required.
	CreatedAt *time.Time

	// The ARN of the guardrail that was created.
	//
	// This member is required.
	GuardrailArn *string

	// The unique identifier of the guardrail that was created.
	//
	// This member is required.
	GuardrailId *string

	// The version of the guardrail that was created. This value should be 1.
	//
	// This member is required.
	Version *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type CreateGuardrailVersionInput added in v1.8.0

type CreateGuardrailVersionInput struct {

	// The unique identifier of the guardrail.
	//
	// This member is required.
	GuardrailIdentifier *string

	// A unique, case-sensitive identifier to ensure that the API request completes no
	// more than once. If this token matches a previous request, Amazon Bedrock ignores
	// the request, but does not return an error. For more information, see [Ensuring idempotency]in the
	// Amazon S3 User Guide.
	//
	// [Ensuring idempotency]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html
	ClientRequestToken *string

	// A description of the guardrail version.
	Description *string
	// contains filtered or unexported fields
}

type CreateGuardrailVersionOutput added in v1.8.0

type CreateGuardrailVersionOutput struct {

	// The unique identifier of the guardrail.
	//
	// This member is required.
	GuardrailId *string

	// The number of the version of the guardrail.
	//
	// This member is required.
	Version *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type CreateModelCustomizationJobInput

type CreateModelCustomizationJobInput struct {

	// Name of the base model.
	//
	// This member is required.
	BaseModelIdentifier *string

	// A name for the resulting custom model.
	//
	// This member is required.
	CustomModelName *string

	// Parameters related to tuning the model. For details on the format for different
	// models, see [Custom model hyperparameters].
	//
	// [Custom model hyperparameters]: https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models-hp.html
	//
	// This member is required.
	HyperParameters map[string]string

	// A name for the fine-tuning job.
	//
	// This member is required.
	JobName *string

	// S3 location for the output data.
	//
	// This member is required.
	OutputDataConfig *types.OutputDataConfig

	// The Amazon Resource Name (ARN) of an IAM service role that Amazon Bedrock can
	// assume to perform tasks on your behalf. For example, during model training,
	// Amazon Bedrock needs your permission to read input data from an S3 bucket, write
	// model artifacts to an S3 bucket. To pass this role to Amazon Bedrock, the caller
	// of this API must have the iam:PassRole permission.
	//
	// This member is required.
	RoleArn *string

	// Information about the training dataset.
	//
	// This member is required.
	TrainingDataConfig *types.TrainingDataConfig

	// A unique, case-sensitive identifier to ensure that the API request completes no
	// more than one time. If this token matches a previous request, Amazon Bedrock
	// ignores the request, but does not return an error. For more information, see [Ensuring idempotency].
	//
	// [Ensuring idempotency]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html
	ClientRequestToken *string

	// The custom model is encrypted at rest using this key.
	CustomModelKmsKeyId *string

	// Tags to attach to the resulting custom model.
	CustomModelTags []types.Tag

	// The customization type.
	CustomizationType types.CustomizationType

	// Tags to attach to the job.
	JobTags []types.Tag

	// Information about the validation dataset.
	ValidationDataConfig *types.ValidationDataConfig

	// VPC configuration (optional). Configuration parameters for the private Virtual
	// Private Cloud (VPC) that contains the resources you are using for this job.
	VpcConfig *types.VpcConfig
	// contains filtered or unexported fields
}

type CreateModelCustomizationJobOutput

type CreateModelCustomizationJobOutput struct {

	// Amazon Resource Name (ARN) of the fine tuning job
	//
	// This member is required.
	JobArn *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type CreateProvisionedModelThroughputInput added in v1.1.0

type CreateProvisionedModelThroughputInput struct {

	// The Amazon Resource Name (ARN) or name of the model to associate with this
	// Provisioned Throughput. For a list of models for which you can purchase
	// Provisioned Throughput, see [Amazon Bedrock model IDs for purchasing Provisioned Throughput]in the Amazon Bedrock User Guide.
	//
	// [Amazon Bedrock model IDs for purchasing Provisioned Throughput]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#prov-throughput-models
	//
	// This member is required.
	ModelId *string

	// Number of model units to allocate. A model unit delivers a specific throughput
	// level for the specified model. The throughput level of a model unit specifies
	// the total number of input and output tokens that it can process and generate
	// within a span of one minute. By default, your account has no model units for
	// purchasing Provisioned Throughputs with commitment. You must first visit the [Amazon Web Services support center]to
	// request MUs.
	//
	// For model unit quotas, see [Provisioned Throughput quotas] in the Amazon Bedrock User Guide.
	//
	// For more information about what an MU specifies, contact your Amazon Web
	// Services account manager.
	//
	// [Amazon Web Services support center]: https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase
	// [Provisioned Throughput quotas]: https://docs.aws.amazon.com/bedrock/latest/userguide/quotas.html#prov-thru-quotas
	//
	// This member is required.
	ModelUnits *int32

	// The name for this Provisioned Throughput.
	//
	// This member is required.
	ProvisionedModelName *string

	// A unique, case-sensitive identifier to ensure that the API request completes no
	// more than one time. If this token matches a previous request, Amazon Bedrock
	// ignores the request, but does not return an error. For more information, see [Ensuring idempotency]in
	// the Amazon S3 User Guide.
	//
	// [Ensuring idempotency]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html
	ClientRequestToken *string

	// The commitment duration requested for the Provisioned Throughput. Billing
	// occurs hourly and is discounted for longer commitment terms. To request a
	// no-commit Provisioned Throughput, omit this field.
	//
	// Custom models support all levels of commitment. To see which base models
	// support no commitment, see [Supported regions and models for Provisioned Throughput]in the Amazon Bedrock User Guide
	//
	// [Supported regions and models for Provisioned Throughput]: https://docs.aws.amazon.com/bedrock/latest/userguide/pt-supported.html
	CommitmentDuration types.CommitmentDuration

	// Tags to associate with this Provisioned Throughput.
	Tags []types.Tag
	// contains filtered or unexported fields
}

type CreateProvisionedModelThroughputOutput added in v1.1.0

type CreateProvisionedModelThroughputOutput struct {

	// The Amazon Resource Name (ARN) for this Provisioned Throughput.
	//
	// This member is required.
	ProvisionedModelArn *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type DeleteCustomModelInput

type DeleteCustomModelInput struct {

	// Name of the model to delete.
	//
	// This member is required.
	ModelIdentifier *string
	// contains filtered or unexported fields
}

type DeleteCustomModelOutput

type DeleteCustomModelOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type DeleteGuardrailInput added in v1.8.0

type DeleteGuardrailInput struct {

	// The unique identifier of the guardrail.
	//
	// This member is required.
	GuardrailIdentifier *string

	// The version of the guardrail.
	GuardrailVersion *string
	// contains filtered or unexported fields
}

type DeleteGuardrailOutput added in v1.8.0

type DeleteGuardrailOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type DeleteModelInvocationLoggingConfigurationInput

type DeleteModelInvocationLoggingConfigurationInput struct {
	// contains filtered or unexported fields
}

type DeleteModelInvocationLoggingConfigurationOutput

type DeleteModelInvocationLoggingConfigurationOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type DeleteProvisionedModelThroughputInput added in v1.1.0

type DeleteProvisionedModelThroughputInput struct {

	// The Amazon Resource Name (ARN) or name of the Provisioned Throughput.
	//
	// This member is required.
	ProvisionedModelId *string
	// contains filtered or unexported fields
}

type DeleteProvisionedModelThroughputOutput added in v1.1.0

type DeleteProvisionedModelThroughputOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type EndpointParameters

type EndpointParameters struct {
	// The AWS region used to dispatch the request.
	//
	// Parameter is
	// required.
	//
	// AWS::Region
	Region *string

	// When true, use the dual-stack endpoint. If the configured endpoint does not
	// support dual-stack, dispatching the request MAY return an error.
	//
	// Defaults to
	// false if no value is provided.
	//
	// AWS::UseDualStack
	UseDualStack *bool

	// When true, send this request to the FIPS-compliant regional endpoint. If the
	// configured endpoint does not have a FIPS compliant endpoint, dispatching the
	// request will return an error.
	//
	// Defaults to false if no value is
	// provided.
	//
	// AWS::UseFIPS
	UseFIPS *bool

	// Override the endpoint used to send this request
	//
	// Parameter is
	// required.
	//
	// SDK::Endpoint
	Endpoint *string
}

EndpointParameters provides the parameters that influence how endpoints are resolved.

func (EndpointParameters) ValidateRequired

func (p EndpointParameters) ValidateRequired() error

ValidateRequired validates required parameters are set.

func (EndpointParameters) WithDefaults

func (p EndpointParameters) WithDefaults() EndpointParameters

WithDefaults returns a shallow copy of EndpointParameterswith default values applied to members where applicable.

type EndpointResolver

type EndpointResolver interface {
	ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error)
}

EndpointResolver interface for resolving service endpoints.

func EndpointResolverFromURL

func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver

EndpointResolverFromURL returns an EndpointResolver configured using the provided endpoint url. By default, the resolved endpoint resolver uses the client region as signing region, and the endpoint source is set to EndpointSourceCustom.You can provide functional options to configure endpoint values for the resolved endpoint.

type EndpointResolverFunc

type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error)

EndpointResolverFunc is a helper utility that wraps a function so it satisfies the EndpointResolver interface. This is useful when you want to add additional endpoint resolving logic, or stub out specific endpoints with custom values.

func (EndpointResolverFunc) ResolveEndpoint

func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error)

type EndpointResolverOptions

type EndpointResolverOptions = internalendpoints.Options

EndpointResolverOptions is the service endpoint resolver options

type EndpointResolverV2

type EndpointResolverV2 interface {
	// ResolveEndpoint attempts to resolve the endpoint with the provided options,
	// returning the endpoint if found. Otherwise an error is returned.
	ResolveEndpoint(ctx context.Context, params EndpointParameters) (
		smithyendpoints.Endpoint, error,
	)
}

EndpointResolverV2 provides the interface for resolving service endpoints.

func NewDefaultEndpointResolverV2

func NewDefaultEndpointResolverV2() EndpointResolverV2

type GetCustomModelInput

type GetCustomModelInput struct {

	// Name or Amazon Resource Name (ARN) of the custom model.
	//
	// This member is required.
	ModelIdentifier *string
	// contains filtered or unexported fields
}

type GetCustomModelOutput

type GetCustomModelOutput struct {

	// Amazon Resource Name (ARN) of the base model.
	//
	// This member is required.
	BaseModelArn *string

	// Creation time of the model.
	//
	// This member is required.
	CreationTime *time.Time

	// Job Amazon Resource Name (ARN) associated with this model.
	//
	// This member is required.
	JobArn *string

	// Amazon Resource Name (ARN) associated with this model.
	//
	// This member is required.
	ModelArn *string

	// Model name associated with this model.
	//
	// This member is required.
	ModelName *string

	// Output data configuration associated with this custom model.
	//
	// This member is required.
	OutputDataConfig *types.OutputDataConfig

	// Contains information about the training dataset.
	//
	// This member is required.
	TrainingDataConfig *types.TrainingDataConfig

	// The type of model customization.
	CustomizationType types.CustomizationType

	// Hyperparameter values associated with this model. For details on the format for
	// different models, see [Custom model hyperparameters].
	//
	// [Custom model hyperparameters]: https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models-hp.html
	HyperParameters map[string]string

	// Job name associated with this model.
	JobName *string

	// The custom model is encrypted at rest using this key.
	ModelKmsKeyArn *string

	// Contains training metrics from the job creation.
	TrainingMetrics *types.TrainingMetrics

	// Contains information about the validation dataset.
	ValidationDataConfig *types.ValidationDataConfig

	// The validation metrics from the job creation.
	ValidationMetrics []types.ValidatorMetric

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type GetEvaluationJobInput added in v1.8.0

type GetEvaluationJobInput struct {

	// The Amazon Resource Name (ARN) of the model evaluation job.
	//
	// This member is required.
	JobIdentifier *string
	// contains filtered or unexported fields
}

type GetEvaluationJobOutput added in v1.8.0

type GetEvaluationJobOutput struct {

	// When the model evaluation job was created.
	//
	// This member is required.
	CreationTime *time.Time

	// Contains details about the type of model evaluation job, the metrics used, the
	// task type selected, the datasets used, and any custom metrics you defined.
	//
	// This member is required.
	EvaluationConfig types.EvaluationConfig

	// Details about the models you specified in your model evaluation job.
	//
	// This member is required.
	InferenceConfig types.EvaluationInferenceConfig

	// The Amazon Resource Name (ARN) of the model evaluation job.
	//
	// This member is required.
	JobArn *string

	// The name of the model evaluation job.
	//
	// This member is required.
	JobName *string

	// The type of model evaluation job.
	//
	// This member is required.
	JobType types.EvaluationJobType

	// Amazon S3 location for where output data is saved.
	//
	// This member is required.
	OutputDataConfig *types.EvaluationOutputDataConfig

	// The Amazon Resource Name (ARN) of the IAM service role used in the model
	// evaluation job.
	//
	// This member is required.
	RoleArn *string

	// The status of the model evaluation job.
	//
	// This member is required.
	Status types.EvaluationJobStatus

	// The Amazon Resource Name (ARN) of the customer managed key specified when the
	// model evaluation job was created.
	CustomerEncryptionKeyId *string

	// An array of strings the specify why the model evaluation job has failed.
	FailureMessages []string

	// The description of the model evaluation job.
	JobDescription *string

	// When the model evaluation job was last modified.
	LastModifiedTime *time.Time

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type GetFoundationModelInput

type GetFoundationModelInput struct {

	// The model identifier.
	//
	// This member is required.
	ModelIdentifier *string
	// contains filtered or unexported fields
}

type GetFoundationModelOutput

type GetFoundationModelOutput struct {

	// Information about the foundation model.
	ModelDetails *types.FoundationModelDetails

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type GetGuardrailInput added in v1.8.0

type GetGuardrailInput struct {

	// The unique identifier of the guardrail for which to get details.
	//
	// This member is required.
	GuardrailIdentifier *string

	// The version of the guardrail for which to get details. If you don't specify a
	// version, the response returns details for the DRAFT version.
	GuardrailVersion *string
	// contains filtered or unexported fields
}

type GetGuardrailOutput added in v1.8.0

type GetGuardrailOutput struct {

	// The message that the guardrail returns when it blocks a prompt.
	//
	// This member is required.
	BlockedInputMessaging *string

	// The message that the guardrail returns when it blocks a model response.
	//
	// This member is required.
	BlockedOutputsMessaging *string

	// The date and time at which the guardrail was created.
	//
	// This member is required.
	CreatedAt *time.Time

	// The ARN of the guardrail that was created.
	//
	// This member is required.
	GuardrailArn *string

	// The unique identifier of the guardrail.
	//
	// This member is required.
	GuardrailId *string

	// The name of the guardrail.
	//
	// This member is required.
	Name *string

	// The status of the guardrail.
	//
	// This member is required.
	Status types.GuardrailStatus

	// The date and time at which the guardrail was updated.
	//
	// This member is required.
	UpdatedAt *time.Time

	// The version of the guardrail.
	//
	// This member is required.
	Version *string

	// The content policy that was configured for the guardrail.
	ContentPolicy *types.GuardrailContentPolicy

	// The description of the guardrail.
	Description *string

	// Appears if the status of the guardrail is FAILED . A list of recommendations to
	// carry out before retrying the request.
	FailureRecommendations []string

	// The ARN of the KMS key that encrypts the guardrail.
	KmsKeyArn *string

	// The sensitive information policy that was configured for the guardrail.
	SensitiveInformationPolicy *types.GuardrailSensitiveInformationPolicy

	// Appears if the status is FAILED . A list of reasons for why the guardrail failed
	// to be created, updated, versioned, or deleted.
	StatusReasons []string

	// The topic policy that was configured for the guardrail.
	TopicPolicy *types.GuardrailTopicPolicy

	// The word policy that was configured for the guardrail.
	WordPolicy *types.GuardrailWordPolicy

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type GetModelCustomizationJobInput

type GetModelCustomizationJobInput struct {

	// Identifier for the customization job.
	//
	// This member is required.
	JobIdentifier *string
	// contains filtered or unexported fields
}

type GetModelCustomizationJobOutput

type GetModelCustomizationJobOutput struct {

	// Amazon Resource Name (ARN) of the base model.
	//
	// This member is required.
	BaseModelArn *string

	// Time that the resource was created.
	//
	// This member is required.
	CreationTime *time.Time

	// The hyperparameter values for the job. For details on the format for different
	// models, see [Custom model hyperparameters].
	//
	// [Custom model hyperparameters]: https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models-hp.html
	//
	// This member is required.
	HyperParameters map[string]string

	// The Amazon Resource Name (ARN) of the customization job.
	//
	// This member is required.
	JobArn *string

	// The name of the customization job.
	//
	// This member is required.
	JobName *string

	// Output data configuration
	//
	// This member is required.
	OutputDataConfig *types.OutputDataConfig

	// The name of the output model.
	//
	// This member is required.
	OutputModelName *string

	// The Amazon Resource Name (ARN) of the IAM role.
	//
	// This member is required.
	RoleArn *string

	// Contains information about the training dataset.
	//
	// This member is required.
	TrainingDataConfig *types.TrainingDataConfig

	// Contains information about the validation dataset.
	//
	// This member is required.
	ValidationDataConfig *types.ValidationDataConfig

	// The token that you specified in the CreateCustomizationJob request.
	ClientRequestToken *string

	// The type of model customization.
	CustomizationType types.CustomizationType

	// Time that the resource transitioned to terminal state.
	EndTime *time.Time

	// Information about why the job failed.
	FailureMessage *string

	// Time that the resource was last modified.
	LastModifiedTime *time.Time

	// The Amazon Resource Name (ARN) of the output model.
	OutputModelArn *string

	// The custom model is encrypted at rest using this key.
	OutputModelKmsKeyArn *string

	// The status of the job. A successful job transitions from in-progress to
	// completed when the output model is ready to use. If the job failed, the failure
	// message contains information about why the job failed.
	Status types.ModelCustomizationJobStatus

	// Contains training metrics from the job creation.
	TrainingMetrics *types.TrainingMetrics

	// The loss metric for each validator that you provided in the createjob request.
	ValidationMetrics []types.ValidatorMetric

	// VPC configuration for the custom model job.
	VpcConfig *types.VpcConfig

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type GetModelInvocationLoggingConfigurationInput

type GetModelInvocationLoggingConfigurationInput struct {
	// contains filtered or unexported fields
}

type GetModelInvocationLoggingConfigurationOutput

type GetModelInvocationLoggingConfigurationOutput struct {

	// The current configuration values.
	LoggingConfig *types.LoggingConfig

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type GetProvisionedModelThroughputInput added in v1.1.0

type GetProvisionedModelThroughputInput struct {

	// The Amazon Resource Name (ARN) or name of the Provisioned Throughput.
	//
	// This member is required.
	ProvisionedModelId *string
	// contains filtered or unexported fields
}

type GetProvisionedModelThroughputOutput added in v1.1.0

type GetProvisionedModelThroughputOutput struct {

	// The timestamp of the creation time for this Provisioned Throughput.
	//
	// This member is required.
	CreationTime *time.Time

	// The Amazon Resource Name (ARN) of the model requested to be associated to this
	// Provisioned Throughput. This value differs from the modelArn if updating hasn't
	// completed.
	//
	// This member is required.
	DesiredModelArn *string

	// The number of model units that was requested for this Provisioned Throughput.
	//
	// This member is required.
	DesiredModelUnits *int32

	// The Amazon Resource Name (ARN) of the base model for which the Provisioned
	// Throughput was created, or of the base model that the custom model for which the
	// Provisioned Throughput was created was customized.
	//
	// This member is required.
	FoundationModelArn *string

	// The timestamp of the last time that this Provisioned Throughput was modified.
	//
	// This member is required.
	LastModifiedTime *time.Time

	// The Amazon Resource Name (ARN) of the model associated with this Provisioned
	// Throughput.
	//
	// This member is required.
	ModelArn *string

	// The number of model units allocated to this Provisioned Throughput.
	//
	// This member is required.
	ModelUnits *int32

	// The Amazon Resource Name (ARN) of the Provisioned Throughput.
	//
	// This member is required.
	ProvisionedModelArn *string

	// The name of the Provisioned Throughput.
	//
	// This member is required.
	ProvisionedModelName *string

	// The status of the Provisioned Throughput.
	//
	// This member is required.
	Status types.ProvisionedModelStatus

	// Commitment duration of the Provisioned Throughput.
	CommitmentDuration types.CommitmentDuration

	// The timestamp for when the commitment term for the Provisioned Throughput
	// expires.
	CommitmentExpirationTime *time.Time

	// A failure message for any issues that occurred during creation, updating, or
	// deletion of the Provisioned Throughput.
	FailureMessage *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type HTTPClient

type HTTPClient interface {
	Do(*http.Request) (*http.Response, error)
}

type HTTPSignerV4

type HTTPSignerV4 interface {
	SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error
}

type IdempotencyTokenProvider

type IdempotencyTokenProvider interface {
	GetIdempotencyToken() (string, error)
}

IdempotencyTokenProvider interface for providing idempotency token

type ListCustomModelsAPIClient

type ListCustomModelsAPIClient interface {
	ListCustomModels(context.Context, *ListCustomModelsInput, ...func(*Options)) (*ListCustomModelsOutput, error)
}

ListCustomModelsAPIClient is a client that implements the ListCustomModels operation.

type ListCustomModelsInput

type ListCustomModelsInput struct {

	// Return custom models only if the base model Amazon Resource Name (ARN) matches
	// this parameter.
	BaseModelArnEquals *string

	// Return custom models created after the specified time.
	CreationTimeAfter *time.Time

	// Return custom models created before the specified time.
	CreationTimeBefore *time.Time

	// Return custom models only if the foundation model Amazon Resource Name (ARN)
	// matches this parameter.
	FoundationModelArnEquals *string

	// Maximum number of results to return in the response.
	MaxResults *int32

	// Return custom models only if the job name contains these characters.
	NameContains *string

	// Continuation token from the previous response, for Amazon Bedrock to list the
	// next set of results.
	NextToken *string

	// The field to sort by in the returned list of models.
	SortBy types.SortModelsBy

	// The sort order of the results.
	SortOrder types.SortOrder
	// contains filtered or unexported fields
}

type ListCustomModelsOutput

type ListCustomModelsOutput struct {

	// Model summaries.
	ModelSummaries []types.CustomModelSummary

	// Continuation token for the next request to list the next set of results.
	NextToken *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type ListCustomModelsPaginator

type ListCustomModelsPaginator struct {
	// contains filtered or unexported fields
}

ListCustomModelsPaginator is a paginator for ListCustomModels

func NewListCustomModelsPaginator

func NewListCustomModelsPaginator(client ListCustomModelsAPIClient, params *ListCustomModelsInput, optFns ...func(*ListCustomModelsPaginatorOptions)) *ListCustomModelsPaginator

NewListCustomModelsPaginator returns a new ListCustomModelsPaginator

func (*ListCustomModelsPaginator) HasMorePages

func (p *ListCustomModelsPaginator) HasMorePages() bool

HasMorePages returns a boolean indicating whether more pages are available

func (*ListCustomModelsPaginator) NextPage

func (p *ListCustomModelsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCustomModelsOutput, error)

NextPage retrieves the next ListCustomModels page.

type ListCustomModelsPaginatorOptions

type ListCustomModelsPaginatorOptions struct {
	// Maximum number of results to return in the response.
	Limit int32

	// Set to true if pagination should stop if the service returns a pagination token
	// that matches the most recent token provided to the service.
	StopOnDuplicateToken bool
}

ListCustomModelsPaginatorOptions is the paginator options for ListCustomModels

type ListEvaluationJobsAPIClient added in v1.8.0

type ListEvaluationJobsAPIClient interface {
	ListEvaluationJobs(context.Context, *ListEvaluationJobsInput, ...func(*Options)) (*ListEvaluationJobsOutput, error)
}

ListEvaluationJobsAPIClient is a client that implements the ListEvaluationJobs operation.

type ListEvaluationJobsInput added in v1.8.0

type ListEvaluationJobsInput struct {

	// A filter that includes model evaluation jobs created after the time specified.
	CreationTimeAfter *time.Time

	// A filter that includes model evaluation jobs created prior to the time
	// specified.
	CreationTimeBefore *time.Time

	// The maximum number of results to return.
	MaxResults *int32

	// Query parameter string for model evaluation job names.
	NameContains *string

	// Continuation token from the previous response, for Amazon Bedrock to list the
	// next set of results.
	NextToken *string

	// Allows you to sort model evaluation jobs by when they were created.
	SortBy types.SortJobsBy

	// How you want the order of jobs sorted.
	SortOrder types.SortOrder

	// Only return jobs where the status condition is met.
	StatusEquals types.EvaluationJobStatus
	// contains filtered or unexported fields
}

type ListEvaluationJobsOutput added in v1.8.0

type ListEvaluationJobsOutput struct {

	// A summary of the model evaluation jobs.
	JobSummaries []types.EvaluationSummary

	// Continuation token from the previous response, for Amazon Bedrock to list the
	// next set of results.
	NextToken *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type ListEvaluationJobsPaginator added in v1.8.0

type ListEvaluationJobsPaginator struct {
	// contains filtered or unexported fields
}

ListEvaluationJobsPaginator is a paginator for ListEvaluationJobs

func NewListEvaluationJobsPaginator added in v1.8.0

func NewListEvaluationJobsPaginator(client ListEvaluationJobsAPIClient, params *ListEvaluationJobsInput, optFns ...func(*ListEvaluationJobsPaginatorOptions)) *ListEvaluationJobsPaginator

NewListEvaluationJobsPaginator returns a new ListEvaluationJobsPaginator

func (*ListEvaluationJobsPaginator) HasMorePages added in v1.8.0

func (p *ListEvaluationJobsPaginator) HasMorePages() bool

HasMorePages returns a boolean indicating whether more pages are available

func (*ListEvaluationJobsPaginator) NextPage added in v1.8.0

func (p *ListEvaluationJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEvaluationJobsOutput, error)

NextPage retrieves the next ListEvaluationJobs page.

type ListEvaluationJobsPaginatorOptions added in v1.8.0

type ListEvaluationJobsPaginatorOptions struct {
	// The maximum number of results to return.
	Limit int32

	// Set to true if pagination should stop if the service returns a pagination token
	// that matches the most recent token provided to the service.
	StopOnDuplicateToken bool
}

ListEvaluationJobsPaginatorOptions is the paginator options for ListEvaluationJobs

type ListFoundationModelsInput

type ListFoundationModelsInput struct {

	// Return models that support the customization type that you specify. For more
	// information, see [Custom models]in the Amazon Bedrock User Guide.
	//
	// [Custom models]: https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html
	ByCustomizationType types.ModelCustomization

	// Return models that support the inference type that you specify. For more
	// information, see [Provisioned Throughput]in the Amazon Bedrock User Guide.
	//
	// [Provisioned Throughput]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html
	ByInferenceType types.InferenceType

	// Return models that support the output modality that you specify.
	ByOutputModality types.ModelModality

	// Return models belonging to the model provider that you specify.
	ByProvider *string
	// contains filtered or unexported fields
}

type ListFoundationModelsOutput

type ListFoundationModelsOutput struct {

	// A list of Amazon Bedrock foundation models.
	ModelSummaries []types.FoundationModelSummary

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type ListGuardrailsAPIClient added in v1.8.0

type ListGuardrailsAPIClient interface {
	ListGuardrails(context.Context, *ListGuardrailsInput, ...func(*Options)) (*ListGuardrailsOutput, error)
}

ListGuardrailsAPIClient is a client that implements the ListGuardrails operation.

type ListGuardrailsInput added in v1.8.0

type ListGuardrailsInput struct {

	// The unique identifier of the guardrail.
	GuardrailIdentifier *string

	// The maximum number of results to return in the response.
	MaxResults *int32

	// If there are more results than were returned in the response, the response
	// returns a nextToken that you can send in another ListGuardrails request to see
	// the next batch of results.
	NextToken *string
	// contains filtered or unexported fields
}

type ListGuardrailsOutput added in v1.8.0

type ListGuardrailsOutput struct {

	// A list of objects, each of which contains details about a guardrail.
	//
	// This member is required.
	Guardrails []types.GuardrailSummary

	// If there are more results than were returned in the response, the response
	// returns a nextToken that you can send in another ListGuardrails request to see
	// the next batch of results.
	NextToken *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type ListGuardrailsPaginator added in v1.8.0

type ListGuardrailsPaginator struct {
	// contains filtered or unexported fields
}

ListGuardrailsPaginator is a paginator for ListGuardrails

func NewListGuardrailsPaginator added in v1.8.0

func NewListGuardrailsPaginator(client ListGuardrailsAPIClient, params *ListGuardrailsInput, optFns ...func(*ListGuardrailsPaginatorOptions)) *ListGuardrailsPaginator

NewListGuardrailsPaginator returns a new ListGuardrailsPaginator

func (*ListGuardrailsPaginator) HasMorePages added in v1.8.0

func (p *ListGuardrailsPaginator) HasMorePages() bool

HasMorePages returns a boolean indicating whether more pages are available

func (*ListGuardrailsPaginator) NextPage added in v1.8.0

func (p *ListGuardrailsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListGuardrailsOutput, error)

NextPage retrieves the next ListGuardrails page.

type ListGuardrailsPaginatorOptions added in v1.8.0

type ListGuardrailsPaginatorOptions struct {
	// The maximum number of results to return in the response.
	Limit int32

	// Set to true if pagination should stop if the service returns a pagination token
	// that matches the most recent token provided to the service.
	StopOnDuplicateToken bool
}

ListGuardrailsPaginatorOptions is the paginator options for ListGuardrails

type ListModelCustomizationJobsAPIClient

type ListModelCustomizationJobsAPIClient interface {
	ListModelCustomizationJobs(context.Context, *ListModelCustomizationJobsInput, ...func(*Options)) (*ListModelCustomizationJobsOutput, error)
}

ListModelCustomizationJobsAPIClient is a client that implements the ListModelCustomizationJobs operation.

type ListModelCustomizationJobsInput

type ListModelCustomizationJobsInput struct {

	// Return customization jobs created after the specified time.
	CreationTimeAfter *time.Time

	// Return customization jobs created before the specified time.
	CreationTimeBefore *time.Time

	// Maximum number of results to return in the response.
	MaxResults *int32

	// Return customization jobs only if the job name contains these characters.
	NameContains *string

	// Continuation token from the previous response, for Amazon Bedrock to list the
	// next set of results.
	NextToken *string

	// The field to sort by in the returned list of jobs.
	SortBy types.SortJobsBy

	// The sort order of the results.
	SortOrder types.SortOrder

	// Return customization jobs with the specified status.
	StatusEquals types.FineTuningJobStatus
	// contains filtered or unexported fields
}

type ListModelCustomizationJobsOutput

type ListModelCustomizationJobsOutput struct {

	// Job summaries.
	ModelCustomizationJobSummaries []types.ModelCustomizationJobSummary

	// Page continuation token to use in the next request.
	NextToken *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type ListModelCustomizationJobsPaginator

type ListModelCustomizationJobsPaginator struct {
	// contains filtered or unexported fields
}

ListModelCustomizationJobsPaginator is a paginator for ListModelCustomizationJobs

func NewListModelCustomizationJobsPaginator

NewListModelCustomizationJobsPaginator returns a new ListModelCustomizationJobsPaginator

func (*ListModelCustomizationJobsPaginator) HasMorePages

func (p *ListModelCustomizationJobsPaginator) HasMorePages() bool

HasMorePages returns a boolean indicating whether more pages are available

func (*ListModelCustomizationJobsPaginator) NextPage

NextPage retrieves the next ListModelCustomizationJobs page.

type ListModelCustomizationJobsPaginatorOptions

type ListModelCustomizationJobsPaginatorOptions struct {
	// Maximum number of results to return in the response.
	Limit int32

	// Set to true if pagination should stop if the service returns a pagination token
	// that matches the most recent token provided to the service.
	StopOnDuplicateToken bool
}

ListModelCustomizationJobsPaginatorOptions is the paginator options for ListModelCustomizationJobs

type ListProvisionedModelThroughputsAPIClient added in v1.1.0

type ListProvisionedModelThroughputsAPIClient interface {
	ListProvisionedModelThroughputs(context.Context, *ListProvisionedModelThroughputsInput, ...func(*Options)) (*ListProvisionedModelThroughputsOutput, error)
}

ListProvisionedModelThroughputsAPIClient is a client that implements the ListProvisionedModelThroughputs operation.

type ListProvisionedModelThroughputsInput added in v1.1.0

type ListProvisionedModelThroughputsInput struct {

	// A filter that returns Provisioned Throughputs created after the specified time.
	CreationTimeAfter *time.Time

	// A filter that returns Provisioned Throughputs created before the specified
	// time.
	CreationTimeBefore *time.Time

	// THe maximum number of results to return in the response. If there are more
	// results than the number you specified, the response returns a nextToken value.
	// To see the next batch of results, send the nextToken value in another list
	// request.
	MaxResults *int32

	// A filter that returns Provisioned Throughputs whose model Amazon Resource Name
	// (ARN) is equal to the value that you specify.
	ModelArnEquals *string

	// A filter that returns Provisioned Throughputs if their name contains the
	// expression that you specify.
	NameContains *string

	// If there are more results than the number you specified in the maxResults
	// field, the response returns a nextToken value. To see the next batch of
	// results, specify the nextToken value in this field.
	NextToken *string

	// The field by which to sort the returned list of Provisioned Throughputs.
	SortBy types.SortByProvisionedModels

	// The sort order of the results.
	SortOrder types.SortOrder

	// A filter that returns Provisioned Throughputs if their statuses matches the
	// value that you specify.
	StatusEquals types.ProvisionedModelStatus
	// contains filtered or unexported fields
}

type ListProvisionedModelThroughputsOutput added in v1.1.0

type ListProvisionedModelThroughputsOutput struct {

	// If there are more results than the number you specified in the maxResults
	// field, this value is returned. To see the next batch of results, include this
	// value in the nextToken field in another list request.
	NextToken *string

	// A list of summaries, one for each Provisioned Throughput in the response.
	ProvisionedModelSummaries []types.ProvisionedModelSummary

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type ListProvisionedModelThroughputsPaginator added in v1.1.0

type ListProvisionedModelThroughputsPaginator struct {
	// contains filtered or unexported fields
}

ListProvisionedModelThroughputsPaginator is a paginator for ListProvisionedModelThroughputs

func NewListProvisionedModelThroughputsPaginator added in v1.1.0

NewListProvisionedModelThroughputsPaginator returns a new ListProvisionedModelThroughputsPaginator

func (*ListProvisionedModelThroughputsPaginator) HasMorePages added in v1.1.0

HasMorePages returns a boolean indicating whether more pages are available

func (*ListProvisionedModelThroughputsPaginator) NextPage added in v1.1.0

NextPage retrieves the next ListProvisionedModelThroughputs page.

type ListProvisionedModelThroughputsPaginatorOptions added in v1.1.0

type ListProvisionedModelThroughputsPaginatorOptions struct {
	// THe maximum number of results to return in the response. If there are more
	// results than the number you specified, the response returns a nextToken value.
	// To see the next batch of results, send the nextToken value in another list
	// request.
	Limit int32

	// Set to true if pagination should stop if the service returns a pagination token
	// that matches the most recent token provided to the service.
	StopOnDuplicateToken bool
}

ListProvisionedModelThroughputsPaginatorOptions is the paginator options for ListProvisionedModelThroughputs

type ListTagsForResourceInput

type ListTagsForResourceInput struct {

	// The Amazon Resource Name (ARN) of the resource.
	//
	// This member is required.
	ResourceARN *string
	// contains filtered or unexported fields
}

type ListTagsForResourceOutput

type ListTagsForResourceOutput struct {

	// An array of the tags associated with this resource.
	Tags []types.Tag

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type Options

type Options struct {
	// Set of options to modify how an operation is invoked. These apply to all
	// operations invoked for this client. Use functional options on operation call to
	// modify this list for per operation behavior.
	APIOptions []func(*middleware.Stack) error

	// The optional application specific identifier appended to the User-Agent header.
	AppID string

	// This endpoint will be given as input to an EndpointResolverV2. It is used for
	// providing a custom base endpoint that is subject to modifications by the
	// processing EndpointResolverV2.
	BaseEndpoint *string

	// Configures the events that will be sent to the configured logger.
	ClientLogMode aws.ClientLogMode

	// The credentials object to use when signing requests.
	Credentials aws.CredentialsProvider

	// The configuration DefaultsMode that the SDK should use when constructing the
	// clients initial default settings.
	DefaultsMode aws.DefaultsMode

	// The endpoint options to be used when attempting to resolve an endpoint.
	EndpointOptions EndpointResolverOptions

	// The service endpoint resolver.
	//
	// Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a
	// value for this field will likely prevent you from using any endpoint-related
	// service features released after the introduction of EndpointResolverV2 and
	// BaseEndpoint.
	//
	// To migrate an EndpointResolver implementation that uses a custom endpoint, set
	// the client option BaseEndpoint instead.
	EndpointResolver EndpointResolver

	// Resolves the endpoint used for a particular service operation. This should be
	// used over the deprecated EndpointResolver.
	EndpointResolverV2 EndpointResolverV2

	// Signature Version 4 (SigV4) Signer
	HTTPSignerV4 HTTPSignerV4

	// Provides idempotency tokens values that will be automatically populated into
	// idempotent API operations.
	IdempotencyTokenProvider IdempotencyTokenProvider

	// The logger writer interface to write logging messages to.
	Logger logging.Logger

	// The region to send requests to. (Required)
	Region string

	// RetryMaxAttempts specifies the maximum number attempts an API client will call
	// an operation that fails with a retryable error. A value of 0 is ignored, and
	// will not be used to configure the API client created default retryer, or modify
	// per operation call's retry max attempts.
	//
	// If specified in an operation call's functional options with a value that is
	// different than the constructed client's Options, the Client's Retryer will be
	// wrapped to use the operation's specific RetryMaxAttempts value.
	RetryMaxAttempts int

	// RetryMode specifies the retry mode the API client will be created with, if
	// Retryer option is not also specified.
	//
	// When creating a new API Clients this member will only be used if the Retryer
	// Options member is nil. This value will be ignored if Retryer is not nil.
	//
	// Currently does not support per operation call overrides, may in the future.
	RetryMode aws.RetryMode

	// Retryer guides how HTTP requests should be retried in case of recoverable
	// failures. When nil the API client will use a default retryer. The kind of
	// default retry created by the API client can be changed with the RetryMode
	// option.
	Retryer aws.Retryer

	// The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
	// to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You
	// should not populate this structure programmatically, or rely on the values here
	// within your applications.
	RuntimeEnvironment aws.RuntimeEnvironment

	// The HTTP client to invoke API calls with. Defaults to client's default HTTP
	// implementation if nil.
	HTTPClient HTTPClient

	// The auth scheme resolver which determines how to authenticate for each
	// operation.
	AuthSchemeResolver AuthSchemeResolver

	// The list of auth schemes supported by the client.
	AuthSchemes []smithyhttp.AuthScheme
	// contains filtered or unexported fields
}

func (Options) Copy

func (o Options) Copy() Options

Copy creates a clone where the APIOptions list is deep copied.

func (Options) GetIdentityResolver added in v1.3.2

func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver

type PutModelInvocationLoggingConfigurationInput

type PutModelInvocationLoggingConfigurationInput struct {

	// The logging configuration values to set.
	//
	// This member is required.
	LoggingConfig *types.LoggingConfig
	// contains filtered or unexported fields
}

type PutModelInvocationLoggingConfigurationOutput

type PutModelInvocationLoggingConfigurationOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type ResolveEndpoint

type ResolveEndpoint struct {
	Resolver EndpointResolver
	Options  EndpointResolverOptions
}

func (*ResolveEndpoint) HandleSerialize

func (*ResolveEndpoint) ID

func (*ResolveEndpoint) ID() string

type StopEvaluationJobInput added in v1.8.0

type StopEvaluationJobInput struct {

	// The ARN of the model evaluation job you want to stop.
	//
	// This member is required.
	JobIdentifier *string
	// contains filtered or unexported fields
}

type StopEvaluationJobOutput added in v1.8.0

type StopEvaluationJobOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type StopModelCustomizationJobInput

type StopModelCustomizationJobInput struct {

	// Job identifier of the job to stop.
	//
	// This member is required.
	JobIdentifier *string
	// contains filtered or unexported fields
}

type StopModelCustomizationJobOutput

type StopModelCustomizationJobOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type TagResourceInput

type TagResourceInput struct {

	// The Amazon Resource Name (ARN) of the resource to tag.
	//
	// This member is required.
	ResourceARN *string

	// Tags to associate with the resource.
	//
	// This member is required.
	Tags []types.Tag
	// contains filtered or unexported fields
}

type TagResourceOutput

type TagResourceOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type UntagResourceInput

type UntagResourceInput struct {

	// The Amazon Resource Name (ARN) of the resource to untag.
	//
	// This member is required.
	ResourceARN *string

	// Tag keys of the tags to remove from the resource.
	//
	// This member is required.
	TagKeys []string
	// contains filtered or unexported fields
}

type UntagResourceOutput

type UntagResourceOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type UpdateGuardrailInput added in v1.8.0

type UpdateGuardrailInput struct {

	// The message to return when the guardrail blocks a prompt.
	//
	// This member is required.
	BlockedInputMessaging *string

	// The message to return when the guardrail blocks a model response.
	//
	// This member is required.
	BlockedOutputsMessaging *string

	// The unique identifier of the guardrail
	//
	// This member is required.
	GuardrailIdentifier *string

	// A name for the guardrail.
	//
	// This member is required.
	Name *string

	// The content policy to configure for the guardrail.
	ContentPolicyConfig *types.GuardrailContentPolicyConfig

	// A description of the guardrail.
	Description *string

	// The ARN of the KMS key with which to encrypt the guardrail.
	KmsKeyId *string

	// The sensitive information policy to configure for the guardrail.
	SensitiveInformationPolicyConfig *types.GuardrailSensitiveInformationPolicyConfig

	// The topic policy to configure for the guardrail.
	TopicPolicyConfig *types.GuardrailTopicPolicyConfig

	// The word policy to configure for the guardrail.
	WordPolicyConfig *types.GuardrailWordPolicyConfig
	// contains filtered or unexported fields
}

type UpdateGuardrailOutput added in v1.8.0

type UpdateGuardrailOutput struct {

	// The ARN of the guardrail that was created.
	//
	// This member is required.
	GuardrailArn *string

	// The unique identifier of the guardrail
	//
	// This member is required.
	GuardrailId *string

	// The date and time at which the guardrail was updated.
	//
	// This member is required.
	UpdatedAt *time.Time

	// The version of the guardrail.
	//
	// This member is required.
	Version *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type UpdateProvisionedModelThroughputInput added in v1.1.0

type UpdateProvisionedModelThroughputInput struct {

	// The Amazon Resource Name (ARN) or name of the Provisioned Throughput to update.
	//
	// This member is required.
	ProvisionedModelId *string

	// The Amazon Resource Name (ARN) of the new model to associate with this
	// Provisioned Throughput. You can't specify this field if this Provisioned
	// Throughput is associated with a base model.
	//
	// If this Provisioned Throughput is associated with a custom model, you can
	// specify one of the following options:
	//
	//   - The base model from which the custom model was customized.
	//
	//   - Another custom model that was customized from the same base model as the
	//   custom model.
	DesiredModelId *string

	// The new name for this Provisioned Throughput.
	DesiredProvisionedModelName *string
	// contains filtered or unexported fields
}

type UpdateProvisionedModelThroughputOutput added in v1.1.0

type UpdateProvisionedModelThroughputOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL