From a448051e8f8285f24f78d575c49699f1e01386c3 Mon Sep 17 00:00:00 2001 From: Marvin <41086007+marvin-robot@users.noreply.github.com> Date: Wed, 6 Mar 2024 06:01:45 -0500 Subject: [PATCH 1/5] Add `prefect-aws` `v0.4.10` to flow records --- collections/prefect-aws/flows/v0.4.10.json | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 collections/prefect-aws/flows/v0.4.10.json diff --git a/collections/prefect-aws/flows/v0.4.10.json b/collections/prefect-aws/flows/v0.4.10.json new file mode 100644 index 00000000..f2d2404e --- /dev/null +++ b/collections/prefect-aws/flows/v0.4.10.json @@ -0,0 +1,3 @@ +{ + "prefect-aws": {} +} \ No newline at end of file From 979ad89d588fdb523122d24c9e070fef9046e80f Mon Sep 17 00:00:00 2001 From: Marvin <41086007+marvin-robot@users.noreply.github.com> Date: Wed, 6 Mar 2024 06:01:49 -0500 Subject: [PATCH 2/5] Add `prefect-aws` `v0.4.10` to block records --- collections/prefect-aws/blocks/v0.4.10.json | 1007 +++++++++++++++++++ 1 file changed, 1007 insertions(+) create mode 100644 collections/prefect-aws/blocks/v0.4.10.json diff --git a/collections/prefect-aws/blocks/v0.4.10.json b/collections/prefect-aws/blocks/v0.4.10.json new file mode 100644 index 00000000..3ffe78cb --- /dev/null +++ b/collections/prefect-aws/blocks/v0.4.10.json @@ -0,0 +1,1007 @@ +{ + "prefect-aws": { + "block_types": { + "aws-credentials": { + "name": "AWS Credentials", + "slug": "aws-credentials", + "logo_url": "https://cdn.sanity.io/images/3ugk85nk/production/d74b16fe84ce626345adf235a47008fea2869a60-225x225.png", + "documentation_url": "https://prefecthq.github.io/prefect-aws/credentials/#prefect_aws.credentials.AwsCredentials", + "description": "Block used to manage authentication with AWS. AWS authentication is\nhandled via the `boto3` module. Refer to the\n[boto3 docs](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html)\nfor more info about the possible credential configurations. This block is part of the prefect-aws collection. Install prefect-aws with `pip install prefect-aws` to use this block.", + "code_example": "Load stored AWS credentials:\n```python\nfrom prefect_aws import AwsCredentials\n\naws_credentials_block = AwsCredentials.load(\"BLOCK_NAME\")\n```", + "block_schema": { + "checksum": "sha256:17b73297ed60f080fb235b3a5a145a6d9b28a09b3ff2d9d17810b5e2c2075ebe", + "fields": { + "title": "AwsCredentials", + "description": "Block used to manage authentication with AWS. AWS authentication is\nhandled via the `boto3` module. Refer to the\n[boto3 docs](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html)\nfor more info about the possible credential configurations.", + "type": "object", + "properties": { + "aws_access_key_id": { + "title": "AWS Access Key ID", + "description": "A specific AWS access key ID.", + "type": "string" + }, + "aws_secret_access_key": { + "title": "AWS Access Key Secret", + "description": "A specific AWS secret access key.", + "type": "string", + "writeOnly": true, + "format": "password" + }, + "aws_session_token": { + "title": "AWS Session Token", + "description": "The session key for your AWS account. This is only needed when you are using temporary credentials.", + "type": "string" + }, + "profile_name": { + "title": "Profile Name", + "description": "The profile to use when creating your session.", + "type": "string" + }, + "region_name": { + "title": "Region Name", + "description": "The AWS Region where you want to create new connections.", + "type": "string" + }, + "aws_client_parameters": { + "title": "AWS Client Parameters", + "description": "Extra parameters to initialize the Client.", + "allOf": [ + { + "$ref": "#/definitions/AwsClientParameters" + } + ] + } + }, + "block_type_slug": "aws-credentials", + "secret_fields": [ + "aws_secret_access_key" + ], + "block_schema_references": {}, + "definitions": { + "AwsClientParameters": { + "title": "AwsClientParameters", + "description": "Model used to manage extra parameters that you can pass when you initialize\nthe Client. If you want to find more information, see\n[boto3 docs](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html)\nfor more info about the possible client configurations.\n\nAttributes:\n api_version: The API version to use. By default, botocore will\n use the latest API version when creating a client. You only need\n to specify this parameter if you want to use a previous API version\n of the client.\n use_ssl: Whether or not to use SSL. By default, SSL is used.\n Note that not all services support non-ssl connections.\n verify: Whether or not to verify SSL certificates. By default\n SSL certificates are verified. If False, SSL will still be used\n (unless use_ssl is False), but SSL certificates\n will not be verified. Passing a file path to this is deprecated.\n verify_cert_path: A filename of the CA cert bundle to\n use. You can specify this argument if you want to use a\n different CA cert bundle than the one used by botocore.\n endpoint_url: The complete URL to use for the constructed\n client. Normally, botocore will automatically construct the\n appropriate URL to use when communicating with a service. You\n can specify a complete URL (including the \"http/https\" scheme)\n to override this behavior. If this value is provided,\n then ``use_ssl`` is ignored.\n config: Advanced configuration for Botocore clients. See\n [botocore docs](https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html)\n for more details.", + "type": "object", + "properties": { + "api_version": { + "title": "API Version", + "description": "The API version to use.", + "type": "string" + }, + "use_ssl": { + "title": "Use SSL", + "description": "Whether or not to use SSL.", + "default": true, + "type": "boolean" + }, + "verify": { + "title": "Verify", + "description": "Whether or not to verify SSL certificates.", + "default": true, + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "format": "file-path" + } + ] + }, + "verify_cert_path": { + "title": "Certificate Authority Bundle File Path", + "description": "Path to the CA cert bundle to use.", + "format": "file-path", + "type": "string" + }, + "endpoint_url": { + "title": "Endpoint URL", + "description": "The complete URL to use for the constructed client.", + "type": "string" + }, + "config": { + "title": "Botocore Config", + "description": "Advanced configuration for Botocore clients.", + "type": "object" + } + } + } + } + }, + "capabilities": [], + "version": "0.4.10" + } + }, + "aws-secret": { + "name": "AWS Secret", + "slug": "aws-secret", + "logo_url": "https://cdn.sanity.io/images/3ugk85nk/production/d74b16fe84ce626345adf235a47008fea2869a60-225x225.png", + "documentation_url": "https://prefecthq.github.io/prefect-aws/secrets_manager/#prefect_aws.secrets_manager.AwsSecret", + "description": "Manages a secret in AWS's Secrets Manager. This block is part of the prefect-aws collection. Install prefect-aws with `pip install prefect-aws` to use this block.", + "code_example": "```python\nfrom prefect_aws.secrets_manager import AwsSecret\n\naws_secret_block = AwsSecret.load(\"BLOCK_NAME\")\n```", + "block_schema": { + "checksum": "sha256:d10fde5ac25b10edca4859c4d0bf61b4a9106215cd79ab80997f29859b190b7d", + "fields": { + "title": "AwsSecret", + "description": "Manages a secret in AWS's Secrets Manager.", + "type": "object", + "properties": { + "aws_credentials": { + "$ref": "#/definitions/AwsCredentials" + }, + "secret_name": { + "title": "Secret Name", + "description": "The name of the secret.", + "type": "string" + } + }, + "required": [ + "aws_credentials", + "secret_name" + ], + "block_type_slug": "aws-secret", + "secret_fields": [ + "aws_credentials.aws_secret_access_key" + ], + "block_schema_references": { + "aws_credentials": { + "block_type_slug": "aws-credentials", + "block_schema_checksum": "sha256:17b73297ed60f080fb235b3a5a145a6d9b28a09b3ff2d9d17810b5e2c2075ebe" + } + }, + "definitions": { + "AwsClientParameters": { + "title": "AwsClientParameters", + "description": "Model used to manage extra parameters that you can pass when you initialize\nthe Client. If you want to find more information, see\n[boto3 docs](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html)\nfor more info about the possible client configurations.\n\nAttributes:\n api_version: The API version to use. By default, botocore will\n use the latest API version when creating a client. You only need\n to specify this parameter if you want to use a previous API version\n of the client.\n use_ssl: Whether or not to use SSL. By default, SSL is used.\n Note that not all services support non-ssl connections.\n verify: Whether or not to verify SSL certificates. By default\n SSL certificates are verified. If False, SSL will still be used\n (unless use_ssl is False), but SSL certificates\n will not be verified. Passing a file path to this is deprecated.\n verify_cert_path: A filename of the CA cert bundle to\n use. You can specify this argument if you want to use a\n different CA cert bundle than the one used by botocore.\n endpoint_url: The complete URL to use for the constructed\n client. Normally, botocore will automatically construct the\n appropriate URL to use when communicating with a service. You\n can specify a complete URL (including the \"http/https\" scheme)\n to override this behavior. If this value is provided,\n then ``use_ssl`` is ignored.\n config: Advanced configuration for Botocore clients. See\n [botocore docs](https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html)\n for more details.", + "type": "object", + "properties": { + "api_version": { + "title": "API Version", + "description": "The API version to use.", + "type": "string" + }, + "use_ssl": { + "title": "Use SSL", + "description": "Whether or not to use SSL.", + "default": true, + "type": "boolean" + }, + "verify": { + "title": "Verify", + "description": "Whether or not to verify SSL certificates.", + "default": true, + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "format": "file-path" + } + ] + }, + "verify_cert_path": { + "title": "Certificate Authority Bundle File Path", + "description": "Path to the CA cert bundle to use.", + "format": "file-path", + "type": "string" + }, + "endpoint_url": { + "title": "Endpoint URL", + "description": "The complete URL to use for the constructed client.", + "type": "string" + }, + "config": { + "title": "Botocore Config", + "description": "Advanced configuration for Botocore clients.", + "type": "object" + } + } + }, + "AwsCredentials": { + "title": "AwsCredentials", + "description": "Block used to manage authentication with AWS. AWS authentication is\nhandled via the `boto3` module. Refer to the\n[boto3 docs](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html)\nfor more info about the possible credential configurations.", + "type": "object", + "properties": { + "aws_access_key_id": { + "title": "AWS Access Key ID", + "description": "A specific AWS access key ID.", + "type": "string" + }, + "aws_secret_access_key": { + "title": "AWS Access Key Secret", + "description": "A specific AWS secret access key.", + "type": "string", + "writeOnly": true, + "format": "password" + }, + "aws_session_token": { + "title": "AWS Session Token", + "description": "The session key for your AWS account. This is only needed when you are using temporary credentials.", + "type": "string" + }, + "profile_name": { + "title": "Profile Name", + "description": "The profile to use when creating your session.", + "type": "string" + }, + "region_name": { + "title": "Region Name", + "description": "The AWS Region where you want to create new connections.", + "type": "string" + }, + "aws_client_parameters": { + "title": "AWS Client Parameters", + "description": "Extra parameters to initialize the Client.", + "allOf": [ + { + "$ref": "#/definitions/AwsClientParameters" + } + ] + } + }, + "block_type_slug": "aws-credentials", + "secret_fields": [ + "aws_secret_access_key" + ], + "block_schema_references": {} + } + } + }, + "capabilities": [], + "version": "0.4.10" + } + }, + "ecs-task": { + "name": "ECS Task", + "slug": "ecs-task", + "logo_url": "https://cdn.sanity.io/images/3ugk85nk/production/d74b16fe84ce626345adf235a47008fea2869a60-225x225.png", + "documentation_url": "https://prefecthq.github.io/prefect-aws/ecs/#prefect_aws.ecs.ECSTask", + "description": "Run a command as an ECS task. This block is part of the prefect-aws collection. Install prefect-aws with `pip install prefect-aws` to use this block.", + "code_example": "```python\nfrom prefect_aws.ecs import ECSTask\n\necs_task_block = ECSTask.load(\"BLOCK_NAME\")\n```", + "block_schema": { + "checksum": "sha256:d72b495859da39536d3e1119ddabd42a10866867b97c4834956ae231120858ca", + "fields": { + "title": "ECSTask", + "description": "Run a command as an ECS task.", + "type": "object", + "properties": { + "type": { + "title": "Type", + "description": "The slug for this task type.", + "default": "ecs-task", + "enum": [ + "ecs-task" + ], + "type": "string" + }, + "env": { + "title": "Environment Variables", + "description": "Environment variables to provide to the task run. These variables are set on the Prefect container at task runtime. These will not be set on the task definition.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "labels": { + "title": "Labels", + "description": "Labels applied to the infrastructure for metadata purposes.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "title": "Name", + "description": "Name applied to the infrastructure for identification.", + "type": "string" + }, + "command": { + "title": "Command", + "description": "The command to run in the infrastructure.", + "type": "array", + "items": { + "type": "string" + } + }, + "aws_credentials": { + "title": "AWS Credentials", + "description": "The AWS credentials to use to connect to ECS.", + "allOf": [ + { + "$ref": "#/definitions/AwsCredentials" + } + ] + }, + "task_definition_arn": { + "title": "Task Definition Arn", + "description": "An identifier for an existing task definition to use. If fields are set on the `ECSTask` that conflict with the task definition, a new copy will be registered with the required values. Cannot be used with `task_definition`. If not provided, Prefect will generate and register a minimal task definition.", + "type": "string" + }, + "task_definition": { + "title": "Task Definition", + "description": "An ECS task definition to use. Prefect may set defaults or override fields on this task definition to match other `ECSTask` fields. Cannot be used with `task_definition_arn`. If not provided, Prefect will generate and register a minimal task definition.", + "type": "object" + }, + "family": { + "title": "Family", + "description": "A family for the task definition. If not provided, it will be inferred from the task definition. If the task definition does not have a family, the name will be generated. When flow and deployment metadata is available, the generated name will include their names. Values for this field will be slugified to match AWS character requirements.", + "type": "string" + }, + "image": { + "title": "Image", + "description": "The image to use for the Prefect container in the task. If this value is not null, it will override the value in the task definition. This value defaults to a Prefect base image matching your local versions.", + "type": "string" + }, + "auto_deregister_task_definition": { + "title": "Auto Deregister Task Definition", + "description": "If set, any task definitions that are created by this block will be deregistered. Existing task definitions linked by ARN will never be deregistered. Deregistering a task definition does not remove it from your AWS account, instead it will be marked as INACTIVE.", + "default": true, + "type": "boolean" + }, + "cpu": { + "title": "CPU", + "description": "The amount of CPU to provide to the ECS task. Valid amounts are specified in the AWS documentation. If not provided, a default value of 1024 will be used unless present on the task definition.", + "type": "integer" + }, + "memory": { + "title": "Memory", + "description": "The amount of memory to provide to the ECS task. Valid amounts are specified in the AWS documentation. If not provided, a default value of 2048 will be used unless present on the task definition.", + "type": "integer" + }, + "execution_role_arn": { + "title": "Execution Role ARN", + "description": "An execution role to use for the task. This controls the permissions of the task when it is launching. If this value is not null, it will override the value in the task definition. An execution role must be provided to capture logs from the container.", + "type": "string" + }, + "configure_cloudwatch_logs": { + "title": "Configure Cloudwatch Logs", + "description": "If `True`, the Prefect container will be configured to send its output to the AWS CloudWatch logs service. This functionality requires an execution role with logs:CreateLogStream, logs:CreateLogGroup, and logs:PutLogEvents permissions. The default for this field is `False` unless `stream_output` is set.", + "type": "boolean" + }, + "cloudwatch_logs_options": { + "title": "Cloudwatch Logs Options", + "description": "When `configure_cloudwatch_logs` is enabled, this setting may be used to pass additional options to the CloudWatch logs configuration or override the default options. See the AWS documentation for available options. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html#create_awslogs_logdriver_options.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "stream_output": { + "title": "Stream Output", + "description": "If `True`, logs will be streamed from the Prefect container to the local console. Unless you have configured AWS CloudWatch logs manually on your task definition, this requires the same prerequisites outlined in `configure_cloudwatch_logs`.", + "type": "boolean" + }, + "launch_type": { + "title": "Launch Type", + "description": "The type of ECS task run infrastructure that should be used. Note that 'FARGATE_SPOT' is not a formal ECS launch type, but we will configure the proper capacity provider strategy if set here.", + "default": "FARGATE", + "enum": [ + "FARGATE", + "EC2", + "EXTERNAL", + "FARGATE_SPOT" + ], + "type": "string" + }, + "vpc_id": { + "title": "VPC ID", + "description": "The AWS VPC to link the task run to. This is only applicable when using the 'awsvpc' network mode for your task. FARGATE tasks require this network mode, but for EC2 tasks the default network mode is 'bridge'. If using the 'awsvpc' network mode and this field is null, your default VPC will be used. If no default VPC can be found, the task run will fail.", + "type": "string" + }, + "cluster": { + "title": "Cluster", + "description": "The ECS cluster to run the task in. The ARN or name may be provided. If not provided, the default cluster will be used.", + "type": "string" + }, + "task_role_arn": { + "title": "Task Role ARN", + "description": "A role to attach to the task run. This controls the permissions of the task while it is running.", + "type": "string" + }, + "task_customizations": { + "title": "Task Customizations", + "description": "A list of JSON 6902 patches to apply to the task run request. If a string is given, it will parsed as a JSON expression.", + "type": "array", + "format": "rfc6902", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "task_start_timeout_seconds": { + "title": "Task Start Timeout Seconds", + "description": "The amount of time to watch for the start of the ECS task before marking it as failed. The task must enter a RUNNING state to be considered started.", + "default": 120, + "type": "integer" + }, + "task_watch_poll_interval": { + "title": "Task Watch Poll Interval", + "description": "The amount of time to wait between AWS API calls while monitoring the state of an ECS task.", + "default": 5.0, + "type": "number" + } + }, + "block_type_slug": "ecs-task", + "secret_fields": [ + "aws_credentials.aws_secret_access_key" + ], + "block_schema_references": { + "aws_credentials": { + "block_type_slug": "aws-credentials", + "block_schema_checksum": "sha256:17b73297ed60f080fb235b3a5a145a6d9b28a09b3ff2d9d17810b5e2c2075ebe" + } + }, + "definitions": { + "AwsClientParameters": { + "title": "AwsClientParameters", + "description": "Model used to manage extra parameters that you can pass when you initialize\nthe Client. If you want to find more information, see\n[boto3 docs](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html)\nfor more info about the possible client configurations.\n\nAttributes:\n api_version: The API version to use. By default, botocore will\n use the latest API version when creating a client. You only need\n to specify this parameter if you want to use a previous API version\n of the client.\n use_ssl: Whether or not to use SSL. By default, SSL is used.\n Note that not all services support non-ssl connections.\n verify: Whether or not to verify SSL certificates. By default\n SSL certificates are verified. If False, SSL will still be used\n (unless use_ssl is False), but SSL certificates\n will not be verified. Passing a file path to this is deprecated.\n verify_cert_path: A filename of the CA cert bundle to\n use. You can specify this argument if you want to use a\n different CA cert bundle than the one used by botocore.\n endpoint_url: The complete URL to use for the constructed\n client. Normally, botocore will automatically construct the\n appropriate URL to use when communicating with a service. You\n can specify a complete URL (including the \"http/https\" scheme)\n to override this behavior. If this value is provided,\n then ``use_ssl`` is ignored.\n config: Advanced configuration for Botocore clients. See\n [botocore docs](https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html)\n for more details.", + "type": "object", + "properties": { + "api_version": { + "title": "API Version", + "description": "The API version to use.", + "type": "string" + }, + "use_ssl": { + "title": "Use SSL", + "description": "Whether or not to use SSL.", + "default": true, + "type": "boolean" + }, + "verify": { + "title": "Verify", + "description": "Whether or not to verify SSL certificates.", + "default": true, + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "format": "file-path" + } + ] + }, + "verify_cert_path": { + "title": "Certificate Authority Bundle File Path", + "description": "Path to the CA cert bundle to use.", + "format": "file-path", + "type": "string" + }, + "endpoint_url": { + "title": "Endpoint URL", + "description": "The complete URL to use for the constructed client.", + "type": "string" + }, + "config": { + "title": "Botocore Config", + "description": "Advanced configuration for Botocore clients.", + "type": "object" + } + } + }, + "AwsCredentials": { + "title": "AwsCredentials", + "description": "Block used to manage authentication with AWS. AWS authentication is\nhandled via the `boto3` module. Refer to the\n[boto3 docs](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html)\nfor more info about the possible credential configurations.", + "type": "object", + "properties": { + "aws_access_key_id": { + "title": "AWS Access Key ID", + "description": "A specific AWS access key ID.", + "type": "string" + }, + "aws_secret_access_key": { + "title": "AWS Access Key Secret", + "description": "A specific AWS secret access key.", + "type": "string", + "writeOnly": true, + "format": "password" + }, + "aws_session_token": { + "title": "AWS Session Token", + "description": "The session key for your AWS account. This is only needed when you are using temporary credentials.", + "type": "string" + }, + "profile_name": { + "title": "Profile Name", + "description": "The profile to use when creating your session.", + "type": "string" + }, + "region_name": { + "title": "Region Name", + "description": "The AWS Region where you want to create new connections.", + "type": "string" + }, + "aws_client_parameters": { + "title": "AWS Client Parameters", + "description": "Extra parameters to initialize the Client.", + "allOf": [ + { + "$ref": "#/definitions/AwsClientParameters" + } + ] + } + }, + "block_type_slug": "aws-credentials", + "secret_fields": [ + "aws_secret_access_key" + ], + "block_schema_references": {} + } + } + }, + "capabilities": [ + "run-infrastructure" + ], + "version": "0.4.10" + } + }, + "lambda-function": { + "name": "Lambda Function", + "slug": "lambda-function", + "logo_url": "https://cdn.sanity.io/images/3ugk85nk/production/d74b16fe84ce626345adf235a47008fea2869a60-225x225.png", + "documentation_url": "https://prefecthq.github.io/prefect-aws/s3/#prefect_aws.lambda_function.LambdaFunction", + "description": "Invoke a Lambda function. This block is part of the prefect-aws\ncollection. Install prefect-aws with `pip install prefect-aws` to use this\nblock. This block is part of the prefect-aws collection. Install prefect-aws with `pip install prefect-aws` to use this block.", + "code_example": "```python\nfrom prefect_aws.lambda_function import LambdaFunction\n\nlambda_function_block = LambdaFunction.load(\"BLOCK_NAME\")\n```", + "block_schema": { + "checksum": "sha256:93fb424309b85c0ef9a8e69cc9d0df1e0afa0f2ed15f1ecc710ec3463513b2e4", + "fields": { + "title": "LambdaFunction", + "description": "Invoke a Lambda function. This block is part of the prefect-aws\ncollection. Install prefect-aws with `pip install prefect-aws` to use this\nblock.", + "type": "object", + "properties": { + "function_name": { + "title": "Function Name", + "description": "The name, ARN, or partial ARN of the Lambda function to run. This must be the name of a function that is already deployed to AWS Lambda.", + "type": "string" + }, + "qualifier": { + "title": "Qualifier", + "description": "The version or alias of the Lambda function to use when invoked. If not specified, the latest (unqualified) version of the Lambda function will be used.", + "type": "string" + }, + "aws_credentials": { + "title": "AWS Credentials", + "description": "The AWS credentials to invoke the Lambda with.", + "allOf": [ + { + "$ref": "#/definitions/AwsCredentials" + } + ] + } + }, + "required": [ + "function_name" + ], + "block_type_slug": "lambda-function", + "secret_fields": [ + "aws_credentials.aws_secret_access_key" + ], + "block_schema_references": { + "aws_credentials": { + "block_type_slug": "aws-credentials", + "block_schema_checksum": "sha256:17b73297ed60f080fb235b3a5a145a6d9b28a09b3ff2d9d17810b5e2c2075ebe" + } + }, + "definitions": { + "AwsClientParameters": { + "title": "AwsClientParameters", + "description": "Model used to manage extra parameters that you can pass when you initialize\nthe Client. If you want to find more information, see\n[boto3 docs](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html)\nfor more info about the possible client configurations.\n\nAttributes:\n api_version: The API version to use. By default, botocore will\n use the latest API version when creating a client. You only need\n to specify this parameter if you want to use a previous API version\n of the client.\n use_ssl: Whether or not to use SSL. By default, SSL is used.\n Note that not all services support non-ssl connections.\n verify: Whether or not to verify SSL certificates. By default\n SSL certificates are verified. If False, SSL will still be used\n (unless use_ssl is False), but SSL certificates\n will not be verified. Passing a file path to this is deprecated.\n verify_cert_path: A filename of the CA cert bundle to\n use. You can specify this argument if you want to use a\n different CA cert bundle than the one used by botocore.\n endpoint_url: The complete URL to use for the constructed\n client. Normally, botocore will automatically construct the\n appropriate URL to use when communicating with a service. You\n can specify a complete URL (including the \"http/https\" scheme)\n to override this behavior. If this value is provided,\n then ``use_ssl`` is ignored.\n config: Advanced configuration for Botocore clients. See\n [botocore docs](https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html)\n for more details.", + "type": "object", + "properties": { + "api_version": { + "title": "API Version", + "description": "The API version to use.", + "type": "string" + }, + "use_ssl": { + "title": "Use SSL", + "description": "Whether or not to use SSL.", + "default": true, + "type": "boolean" + }, + "verify": { + "title": "Verify", + "description": "Whether or not to verify SSL certificates.", + "default": true, + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "format": "file-path" + } + ] + }, + "verify_cert_path": { + "title": "Certificate Authority Bundle File Path", + "description": "Path to the CA cert bundle to use.", + "format": "file-path", + "type": "string" + }, + "endpoint_url": { + "title": "Endpoint URL", + "description": "The complete URL to use for the constructed client.", + "type": "string" + }, + "config": { + "title": "Botocore Config", + "description": "Advanced configuration for Botocore clients.", + "type": "object" + } + } + }, + "AwsCredentials": { + "title": "AwsCredentials", + "description": "Block used to manage authentication with AWS. AWS authentication is\nhandled via the `boto3` module. Refer to the\n[boto3 docs](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html)\nfor more info about the possible credential configurations.", + "type": "object", + "properties": { + "aws_access_key_id": { + "title": "AWS Access Key ID", + "description": "A specific AWS access key ID.", + "type": "string" + }, + "aws_secret_access_key": { + "title": "AWS Access Key Secret", + "description": "A specific AWS secret access key.", + "type": "string", + "writeOnly": true, + "format": "password" + }, + "aws_session_token": { + "title": "AWS Session Token", + "description": "The session key for your AWS account. This is only needed when you are using temporary credentials.", + "type": "string" + }, + "profile_name": { + "title": "Profile Name", + "description": "The profile to use when creating your session.", + "type": "string" + }, + "region_name": { + "title": "Region Name", + "description": "The AWS Region where you want to create new connections.", + "type": "string" + }, + "aws_client_parameters": { + "title": "AWS Client Parameters", + "description": "Extra parameters to initialize the Client.", + "allOf": [ + { + "$ref": "#/definitions/AwsClientParameters" + } + ] + } + }, + "block_type_slug": "aws-credentials", + "secret_fields": [ + "aws_secret_access_key" + ], + "block_schema_references": {} + } + } + }, + "capabilities": [], + "version": "0.4.10" + } + }, + "minio-credentials": { + "name": "MinIO Credentials", + "slug": "minio-credentials", + "logo_url": "https://cdn.sanity.io/images/3ugk85nk/production/676cb17bcbdff601f97e0a02ff8bcb480e91ff40-250x250.png", + "documentation_url": "https://prefecthq.github.io/prefect-aws/credentials/#prefect_aws.credentials.MinIOCredentials", + "description": "Block used to manage authentication with MinIO. Refer to the MinIO docs: https://docs.min.io/docs/minio-server-configuration-guide.html for more info about the possible credential configurations. This block is part of the prefect-aws collection. Install prefect-aws with `pip install prefect-aws` to use this block.", + "code_example": "Load stored MinIO credentials:\n```python\nfrom prefect_aws import MinIOCredentials\n\nminio_credentials_block = MinIOCredentials.load(\"BLOCK_NAME\")\n```", + "block_schema": { + "checksum": "sha256:5b4f1e5270f3a3670ff3d06b7e6e8246d54dacba976321dec42abe51c33415fb", + "fields": { + "title": "MinIOCredentials", + "description": "Block used to manage authentication with MinIO. Refer to the MinIO docs: https://docs.min.io/docs/minio-server-configuration-guide.html for more info about the possible credential configurations.", + "type": "object", + "properties": { + "minio_root_user": { + "title": "Minio Root User", + "description": "Admin or root user.", + "type": "string" + }, + "minio_root_password": { + "title": "Minio Root Password", + "description": "Admin or root password.", + "type": "string", + "writeOnly": true, + "format": "password" + }, + "region_name": { + "title": "Region Name", + "description": "The AWS Region where you want to create new connections.", + "type": "string" + }, + "aws_client_parameters": { + "title": "Aws Client Parameters", + "description": "Extra parameters to initialize the Client.", + "allOf": [ + { + "$ref": "#/definitions/AwsClientParameters" + } + ] + } + }, + "required": [ + "minio_root_user", + "minio_root_password" + ], + "block_type_slug": "minio-credentials", + "secret_fields": [ + "minio_root_password" + ], + "block_schema_references": {}, + "definitions": { + "AwsClientParameters": { + "title": "AwsClientParameters", + "description": "Model used to manage extra parameters that you can pass when you initialize\nthe Client. If you want to find more information, see\n[boto3 docs](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html)\nfor more info about the possible client configurations.\n\nAttributes:\n api_version: The API version to use. By default, botocore will\n use the latest API version when creating a client. You only need\n to specify this parameter if you want to use a previous API version\n of the client.\n use_ssl: Whether or not to use SSL. By default, SSL is used.\n Note that not all services support non-ssl connections.\n verify: Whether or not to verify SSL certificates. By default\n SSL certificates are verified. If False, SSL will still be used\n (unless use_ssl is False), but SSL certificates\n will not be verified. Passing a file path to this is deprecated.\n verify_cert_path: A filename of the CA cert bundle to\n use. You can specify this argument if you want to use a\n different CA cert bundle than the one used by botocore.\n endpoint_url: The complete URL to use for the constructed\n client. Normally, botocore will automatically construct the\n appropriate URL to use when communicating with a service. You\n can specify a complete URL (including the \"http/https\" scheme)\n to override this behavior. If this value is provided,\n then ``use_ssl`` is ignored.\n config: Advanced configuration for Botocore clients. See\n [botocore docs](https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html)\n for more details.", + "type": "object", + "properties": { + "api_version": { + "title": "API Version", + "description": "The API version to use.", + "type": "string" + }, + "use_ssl": { + "title": "Use SSL", + "description": "Whether or not to use SSL.", + "default": true, + "type": "boolean" + }, + "verify": { + "title": "Verify", + "description": "Whether or not to verify SSL certificates.", + "default": true, + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "format": "file-path" + } + ] + }, + "verify_cert_path": { + "title": "Certificate Authority Bundle File Path", + "description": "Path to the CA cert bundle to use.", + "format": "file-path", + "type": "string" + }, + "endpoint_url": { + "title": "Endpoint URL", + "description": "The complete URL to use for the constructed client.", + "type": "string" + }, + "config": { + "title": "Botocore Config", + "description": "Advanced configuration for Botocore clients.", + "type": "object" + } + } + } + } + }, + "capabilities": [], + "version": "0.4.10" + } + }, + "s3-bucket": { + "name": "S3 Bucket", + "slug": "s3-bucket", + "logo_url": "https://cdn.sanity.io/images/3ugk85nk/production/d74b16fe84ce626345adf235a47008fea2869a60-225x225.png", + "documentation_url": "https://prefecthq.github.io/prefect-aws/s3/#prefect_aws.s3.S3Bucket", + "description": "Block used to store data using AWS S3 or S3-compatible object storage like MinIO. This block is part of the prefect-aws collection. Install prefect-aws with `pip install prefect-aws` to use this block.", + "code_example": "```python\nfrom prefect_aws.s3 import S3Bucket\n\ns3_bucket_block = S3Bucket.load(\"BLOCK_NAME\")\n```", + "block_schema": { + "checksum": "sha256:da1e638612365b12ec83b6102986cc5efe54e84b7144bd668629f6972afe748f", + "fields": { + "title": "S3Bucket", + "description": "Block used to store data using AWS S3 or S3-compatible object storage like MinIO.", + "type": "object", + "properties": { + "bucket_name": { + "title": "Bucket Name", + "description": "Name of your bucket.", + "type": "string" + }, + "credentials": { + "title": "Credentials", + "description": "A block containing your credentials to AWS or MinIO.", + "anyOf": [ + { + "$ref": "#/definitions/MinIOCredentials" + }, + { + "$ref": "#/definitions/AwsCredentials" + } + ] + }, + "bucket_folder": { + "title": "Bucket Folder", + "description": "A default path to a folder within the S3 bucket to use for reading and writing objects.", + "default": "", + "type": "string" + } + }, + "required": [ + "bucket_name" + ], + "block_type_slug": "s3-bucket", + "secret_fields": [ + "credentials.minio_root_password", + "credentials.aws_secret_access_key" + ], + "block_schema_references": { + "credentials": [ + { + "block_type_slug": "minio-credentials", + "block_schema_checksum": "sha256:5b4f1e5270f3a3670ff3d06b7e6e8246d54dacba976321dec42abe51c33415fb" + }, + { + "block_type_slug": "aws-credentials", + "block_schema_checksum": "sha256:17b73297ed60f080fb235b3a5a145a6d9b28a09b3ff2d9d17810b5e2c2075ebe" + } + ] + }, + "definitions": { + "AwsClientParameters": { + "title": "AwsClientParameters", + "description": "Model used to manage extra parameters that you can pass when you initialize\nthe Client. If you want to find more information, see\n[boto3 docs](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html)\nfor more info about the possible client configurations.\n\nAttributes:\n api_version: The API version to use. By default, botocore will\n use the latest API version when creating a client. You only need\n to specify this parameter if you want to use a previous API version\n of the client.\n use_ssl: Whether or not to use SSL. By default, SSL is used.\n Note that not all services support non-ssl connections.\n verify: Whether or not to verify SSL certificates. By default\n SSL certificates are verified. If False, SSL will still be used\n (unless use_ssl is False), but SSL certificates\n will not be verified. Passing a file path to this is deprecated.\n verify_cert_path: A filename of the CA cert bundle to\n use. You can specify this argument if you want to use a\n different CA cert bundle than the one used by botocore.\n endpoint_url: The complete URL to use for the constructed\n client. Normally, botocore will automatically construct the\n appropriate URL to use when communicating with a service. You\n can specify a complete URL (including the \"http/https\" scheme)\n to override this behavior. If this value is provided,\n then ``use_ssl`` is ignored.\n config: Advanced configuration for Botocore clients. See\n [botocore docs](https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html)\n for more details.", + "type": "object", + "properties": { + "api_version": { + "title": "API Version", + "description": "The API version to use.", + "type": "string" + }, + "use_ssl": { + "title": "Use SSL", + "description": "Whether or not to use SSL.", + "default": true, + "type": "boolean" + }, + "verify": { + "title": "Verify", + "description": "Whether or not to verify SSL certificates.", + "default": true, + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "format": "file-path" + } + ] + }, + "verify_cert_path": { + "title": "Certificate Authority Bundle File Path", + "description": "Path to the CA cert bundle to use.", + "format": "file-path", + "type": "string" + }, + "endpoint_url": { + "title": "Endpoint URL", + "description": "The complete URL to use for the constructed client.", + "type": "string" + }, + "config": { + "title": "Botocore Config", + "description": "Advanced configuration for Botocore clients.", + "type": "object" + } + } + }, + "MinIOCredentials": { + "title": "MinIOCredentials", + "description": "Block used to manage authentication with MinIO. Refer to the MinIO docs: https://docs.min.io/docs/minio-server-configuration-guide.html for more info about the possible credential configurations.", + "type": "object", + "properties": { + "minio_root_user": { + "title": "Minio Root User", + "description": "Admin or root user.", + "type": "string" + }, + "minio_root_password": { + "title": "Minio Root Password", + "description": "Admin or root password.", + "type": "string", + "writeOnly": true, + "format": "password" + }, + "region_name": { + "title": "Region Name", + "description": "The AWS Region where you want to create new connections.", + "type": "string" + }, + "aws_client_parameters": { + "title": "Aws Client Parameters", + "description": "Extra parameters to initialize the Client.", + "allOf": [ + { + "$ref": "#/definitions/AwsClientParameters" + } + ] + } + }, + "required": [ + "minio_root_user", + "minio_root_password" + ], + "block_type_slug": "minio-credentials", + "secret_fields": [ + "minio_root_password" + ], + "block_schema_references": {} + }, + "AwsCredentials": { + "title": "AwsCredentials", + "description": "Block used to manage authentication with AWS. AWS authentication is\nhandled via the `boto3` module. Refer to the\n[boto3 docs](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html)\nfor more info about the possible credential configurations.", + "type": "object", + "properties": { + "aws_access_key_id": { + "title": "AWS Access Key ID", + "description": "A specific AWS access key ID.", + "type": "string" + }, + "aws_secret_access_key": { + "title": "AWS Access Key Secret", + "description": "A specific AWS secret access key.", + "type": "string", + "writeOnly": true, + "format": "password" + }, + "aws_session_token": { + "title": "AWS Session Token", + "description": "The session key for your AWS account. This is only needed when you are using temporary credentials.", + "type": "string" + }, + "profile_name": { + "title": "Profile Name", + "description": "The profile to use when creating your session.", + "type": "string" + }, + "region_name": { + "title": "Region Name", + "description": "The AWS Region where you want to create new connections.", + "type": "string" + }, + "aws_client_parameters": { + "title": "AWS Client Parameters", + "description": "Extra parameters to initialize the Client.", + "allOf": [ + { + "$ref": "#/definitions/AwsClientParameters" + } + ] + } + }, + "block_type_slug": "aws-credentials", + "secret_fields": [ + "aws_secret_access_key" + ], + "block_schema_references": {} + } + } + }, + "capabilities": [ + "get-directory", + "put-directory", + "read-path", + "write-path" + ], + "version": "0.4.10" + } + } + } + } +} \ No newline at end of file From 582afbc2a59576ea15691078b005124145aea122 Mon Sep 17 00:00:00 2001 From: Marvin <41086007+marvin-robot@users.noreply.github.com> Date: Wed, 6 Mar 2024 06:01:49 -0500 Subject: [PATCH 3/5] Update aggregate block metadata with `prefect-aws` `v0.4.10` --- views/aggregate-block-metadata.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/views/aggregate-block-metadata.json b/views/aggregate-block-metadata.json index 5eff6d2f..de499ce2 100644 --- a/views/aggregate-block-metadata.json +++ b/views/aggregate-block-metadata.json @@ -2087,7 +2087,7 @@ } }, "capabilities": [], - "version": "0.4.9" + "version": "0.4.10" } }, "aws-secret": { @@ -2227,7 +2227,7 @@ } }, "capabilities": [], - "version": "0.4.9" + "version": "0.4.10" } }, "ecs-task": { @@ -2514,7 +2514,7 @@ "capabilities": [ "run-infrastructure" ], - "version": "0.4.9" + "version": "0.4.10" } }, "lambda-function": { @@ -2664,7 +2664,7 @@ } }, "capabilities": [], - "version": "0.4.9" + "version": "0.4.10" } }, "minio-credentials": { @@ -2769,7 +2769,7 @@ } }, "capabilities": [], - "version": "0.4.9" + "version": "0.4.10" } }, "s3-bucket": { @@ -2977,7 +2977,7 @@ "read-path", "write-path" ], - "version": "0.4.9" + "version": "0.4.10" } } } From 73c891414f4780a5175c9e6cb72fa4c6624392a8 Mon Sep 17 00:00:00 2001 From: Marvin <41086007+marvin-robot@users.noreply.github.com> Date: Wed, 6 Mar 2024 06:01:56 -0500 Subject: [PATCH 4/5] Add `prefect-aws` `v0.4.10` to worker records --- collections/prefect-aws/workers/v0.4.10.json | 313 +++++++++++++++++++ 1 file changed, 313 insertions(+) create mode 100644 collections/prefect-aws/workers/v0.4.10.json diff --git a/collections/prefect-aws/workers/v0.4.10.json b/collections/prefect-aws/workers/v0.4.10.json new file mode 100644 index 00000000..99de1a32 --- /dev/null +++ b/collections/prefect-aws/workers/v0.4.10.json @@ -0,0 +1,313 @@ +{ + "prefect-aws": { + "ecs": { + "default_base_job_configuration": { + "job_configuration": { + "command": "{{ command }}", + "env": "{{ env }}", + "labels": "{{ labels }}", + "name": "{{ name }}", + "aws_credentials": "{{ aws_credentials }}", + "task_definition": { + "containerDefinitions": [ + { + "image": "{{ image }}", + "name": "{{ container_name }}" + } + ], + "cpu": "{{ cpu }}", + "family": "{{ family }}", + "memory": "{{ memory }}", + "executionRoleArn": "{{ execution_role_arn }}" + }, + "task_run_request": { + "launchType": "{{ launch_type }}", + "cluster": "{{ cluster }}", + "overrides": { + "containerOverrides": [ + { + "name": "{{ container_name }}", + "command": "{{ command }}", + "environment": "{{ env }}", + "cpu": "{{ cpu }}", + "memory": "{{ memory }}" + } + ], + "cpu": "{{ cpu }}", + "memory": "{{ memory }}", + "taskRoleArn": "{{ task_role_arn }}" + }, + "tags": "{{ labels }}", + "taskDefinition": "{{ task_definition_arn }}" + }, + "configure_cloudwatch_logs": "{{ configure_cloudwatch_logs }}", + "cloudwatch_logs_options": "{{ cloudwatch_logs_options }}", + "network_configuration": "{{ network_configuration }}", + "stream_output": "{{ stream_output }}", + "task_start_timeout_seconds": "{{ task_start_timeout_seconds }}", + "task_watch_poll_interval": "{{ task_watch_poll_interval }}", + "auto_deregister_task_definition": "{{ auto_deregister_task_definition }}", + "vpc_id": "{{ vpc_id }}", + "container_name": "{{ container_name }}", + "cluster": "{{ cluster }}", + "match_latest_revision_in_family": "{{ match_latest_revision_in_family }}" + }, + "variables": { + "description": "Variables for templating an ECS job.", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "Name given to infrastructure created by a worker.", + "type": "string" + }, + "env": { + "title": "Environment Variables", + "description": "Environment variables to provide to the task run. These variables are set on the Prefect container at task runtime. These will not be set on the task definition.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "labels": { + "title": "Labels", + "description": "Labels applied to infrastructure created by a worker.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "command": { + "title": "Command", + "description": "The command to use when starting a flow run. In most cases, this should be left blank and the command will be automatically generated by the worker.", + "type": "string" + }, + "task_definition_arn": { + "title": "Task Definition Arn", + "description": "An identifier for an existing task definition to use. If set, options that require changes to the task definition will be ignored. All contents of the task definition in the job configuration will be ignored.", + "type": "string" + }, + "aws_credentials": { + "title": "AWS Credentials", + "description": "The AWS credentials to use to connect to ECS. If not provided, credentials will be inferred from the local environment following AWS's boto client's rules.", + "allOf": [ + { + "$ref": "#/definitions/AwsCredentials" + } + ] + }, + "cluster": { + "title": "Cluster", + "description": "The ECS cluster to run the task in. An ARN or name may be provided. If not provided, the default cluster will be used.", + "type": "string" + }, + "family": { + "title": "Family", + "description": "A family for the task definition. If not provided, it will be inferred from the task definition. If the task definition does not have a family, the name will be generated. When flow and deployment metadata is available, the generated name will include their names. Values for this field will be slugified to match AWS character requirements.", + "type": "string" + }, + "launch_type": { + "title": "Launch Type", + "description": "The type of ECS task run infrastructure that should be used. Note that 'FARGATE_SPOT' is not a formal ECS launch type, but we will configure the proper capacity provider strategy if set here.", + "default": "FARGATE", + "enum": [ + "FARGATE", + "EC2", + "EXTERNAL", + "FARGATE_SPOT" + ], + "type": "string" + }, + "image": { + "title": "Image", + "description": "The image to use for the Prefect container in the task. If this value is not null, it will override the value in the task definition. This value defaults to a Prefect base image matching your local versions.", + "type": "string" + }, + "cpu": { + "title": "CPU", + "description": "The amount of CPU to provide to the ECS task. Valid amounts are specified in the AWS documentation. If not provided, a default value of 1024 will be used unless present on the task definition.", + "type": "integer" + }, + "memory": { + "title": "Memory", + "description": "The amount of memory to provide to the ECS task. Valid amounts are specified in the AWS documentation. If not provided, a default value of 2048 will be used unless present on the task definition.", + "type": "integer" + }, + "container_name": { + "title": "Container Name", + "description": "The name of the container flow run orchestration will occur in. If not specified, a default value of prefect will be used and if that is not found in the task definition the first container will be used.", + "type": "string" + }, + "task_role_arn": { + "title": "Task Role ARN", + "description": "A role to attach to the task run. This controls the permissions of the task while it is running.", + "type": "string" + }, + "execution_role_arn": { + "title": "Execution Role ARN", + "description": "An execution role to use for the task. This controls the permissions of the task when it is launching. If this value is not null, it will override the value in the task definition. An execution role must be provided to capture logs from the container.", + "type": "string" + }, + "vpc_id": { + "title": "VPC ID", + "description": "The AWS VPC to link the task run to. This is only applicable when using the 'awsvpc' network mode for your task. FARGATE tasks require this network mode, but for EC2 tasks the default network mode is 'bridge'. If using the 'awsvpc' network mode and this field is null, your default VPC will be used. If no default VPC can be found, the task run will fail.", + "type": "string" + }, + "configure_cloudwatch_logs": { + "title": "Configure Cloudwatch Logs", + "description": "If enabled, the Prefect container will be configured to send its output to the AWS CloudWatch logs service. This functionality requires an execution role with logs:CreateLogStream, logs:CreateLogGroup, and logs:PutLogEvents permissions. The default for this field is `False` unless `stream_output` is set.", + "type": "boolean" + }, + "cloudwatch_logs_options": { + "title": "Cloudwatch Logs Options", + "description": "When `configure_cloudwatch_logs` is enabled, this setting may be used to pass additional options to the CloudWatch logs configuration or override the default options. See the [AWS documentation](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html#create_awslogs_logdriver_options) for available options. ", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "network_configuration": { + "title": "Network Configuration", + "description": "When `network_configuration` is supplied it will override ECS Worker'sawsvpcConfiguration that defined in the ECS task executing your workload. See the [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-awsvpcconfiguration.html) for available options.", + "type": "object" + }, + "stream_output": { + "title": "Stream Output", + "description": "If enabled, logs will be streamed from the Prefect container to the local console. Unless you have configured AWS CloudWatch logs manually on your task definition, this requires the same prerequisites outlined in `configure_cloudwatch_logs`.", + "type": "boolean" + }, + "task_start_timeout_seconds": { + "title": "Task Start Timeout Seconds", + "description": "The amount of time to watch for the start of the ECS task before marking it as failed. The task must enter a RUNNING state to be considered started.", + "default": 300, + "type": "integer" + }, + "task_watch_poll_interval": { + "title": "Task Watch Poll Interval", + "description": "The amount of time to wait between AWS API calls while monitoring the state of an ECS task.", + "default": 5.0, + "type": "number" + }, + "auto_deregister_task_definition": { + "title": "Auto Deregister Task Definition", + "description": "If enabled, any task definitions that are created by this block will be deregistered. Existing task definitions linked by ARN will never be deregistered. Deregistering a task definition does not remove it from your AWS account, instead it will be marked as INACTIVE.", + "default": false, + "type": "boolean" + }, + "match_latest_revision_in_family": { + "title": "Match Latest Revision In Family", + "description": "If enabled, the most recent active revision in the task definition family will be compared against the desired ECS task configuration. If they are equal, the existing task definition will be used instead of registering a new one. If no family is specified the default family \"prefect\" will be used.", + "default": false, + "type": "boolean" + } + }, + "definitions": { + "AwsClientParameters": { + "title": "AwsClientParameters", + "description": "Model used to manage extra parameters that you can pass when you initialize\nthe Client. If you want to find more information, see\n[boto3 docs](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html)\nfor more info about the possible client configurations.\n\nAttributes:\n api_version: The API version to use. By default, botocore will\n use the latest API version when creating a client. You only need\n to specify this parameter if you want to use a previous API version\n of the client.\n use_ssl: Whether or not to use SSL. By default, SSL is used.\n Note that not all services support non-ssl connections.\n verify: Whether or not to verify SSL certificates. By default\n SSL certificates are verified. If False, SSL will still be used\n (unless use_ssl is False), but SSL certificates\n will not be verified. Passing a file path to this is deprecated.\n verify_cert_path: A filename of the CA cert bundle to\n use. You can specify this argument if you want to use a\n different CA cert bundle than the one used by botocore.\n endpoint_url: The complete URL to use for the constructed\n client. Normally, botocore will automatically construct the\n appropriate URL to use when communicating with a service. You\n can specify a complete URL (including the \"http/https\" scheme)\n to override this behavior. If this value is provided,\n then ``use_ssl`` is ignored.\n config: Advanced configuration for Botocore clients. See\n [botocore docs](https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html)\n for more details.", + "type": "object", + "properties": { + "api_version": { + "title": "API Version", + "description": "The API version to use.", + "type": "string" + }, + "use_ssl": { + "title": "Use SSL", + "description": "Whether or not to use SSL.", + "default": true, + "type": "boolean" + }, + "verify": { + "title": "Verify", + "description": "Whether or not to verify SSL certificates.", + "default": true, + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "format": "file-path" + } + ] + }, + "verify_cert_path": { + "title": "Certificate Authority Bundle File Path", + "description": "Path to the CA cert bundle to use.", + "format": "file-path", + "type": "string" + }, + "endpoint_url": { + "title": "Endpoint URL", + "description": "The complete URL to use for the constructed client.", + "type": "string" + }, + "config": { + "title": "Botocore Config", + "description": "Advanced configuration for Botocore clients.", + "type": "object" + } + } + }, + "AwsCredentials": { + "title": "AwsCredentials", + "description": "Block used to manage authentication with AWS. AWS authentication is\nhandled via the `boto3` module. Refer to the\n[boto3 docs](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html)\nfor more info about the possible credential configurations.", + "type": "object", + "properties": { + "aws_access_key_id": { + "title": "AWS Access Key ID", + "description": "A specific AWS access key ID.", + "type": "string" + }, + "aws_secret_access_key": { + "title": "AWS Access Key Secret", + "description": "A specific AWS secret access key.", + "type": "string", + "writeOnly": true, + "format": "password" + }, + "aws_session_token": { + "title": "AWS Session Token", + "description": "The session key for your AWS account. This is only needed when you are using temporary credentials.", + "type": "string" + }, + "profile_name": { + "title": "Profile Name", + "description": "The profile to use when creating your session.", + "type": "string" + }, + "region_name": { + "title": "Region Name", + "description": "The AWS Region where you want to create new connections.", + "type": "string" + }, + "aws_client_parameters": { + "title": "AWS Client Parameters", + "description": "Extra parameters to initialize the Client.", + "allOf": [ + { + "$ref": "#/definitions/AwsClientParameters" + } + ] + } + }, + "block_type_slug": "aws-credentials", + "secret_fields": [ + "aws_secret_access_key" + ], + "block_schema_references": {} + } + } + } + }, + "description": "Execute flow runs within containers on AWS ECS. Works with EC2 and Fargate clusters. Requires an AWS account.", + "display_name": "AWS Elastic Container Service", + "documentation_url": "https://prefecthq.github.io/prefect-aws/ecs_worker/", + "install_command": "pip install prefect-aws", + "is_beta": false, + "logo_url": "https://cdn.sanity.io/images/3ugk85nk/production/d74b16fe84ce626345adf235a47008fea2869a60-225x225.png", + "type": "ecs" + } + } +} \ No newline at end of file From a67ca9ae20d349f7b82ffa7cdcca0bfeb44f6b89 Mon Sep 17 00:00:00 2001 From: Marvin <41086007+marvin-robot@users.noreply.github.com> Date: Wed, 6 Mar 2024 06:01:56 -0500 Subject: [PATCH 5/5] Update aggregate worker metadata with `prefect-aws` `v0.4.10` --- views/aggregate-worker-metadata.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/views/aggregate-worker-metadata.json b/views/aggregate-worker-metadata.json index 477d4475..f92e8adc 100644 --- a/views/aggregate-worker-metadata.json +++ b/views/aggregate-worker-metadata.json @@ -122,7 +122,8 @@ "auto_deregister_task_definition": "{{ auto_deregister_task_definition }}", "vpc_id": "{{ vpc_id }}", "container_name": "{{ container_name }}", - "cluster": "{{ cluster }}" + "cluster": "{{ cluster }}", + "match_latest_revision_in_family": "{{ match_latest_revision_in_family }}" }, "variables": { "description": "Variables for templating an ECS job.", @@ -265,6 +266,12 @@ "description": "If enabled, any task definitions that are created by this block will be deregistered. Existing task definitions linked by ARN will never be deregistered. Deregistering a task definition does not remove it from your AWS account, instead it will be marked as INACTIVE.", "default": false, "type": "boolean" + }, + "match_latest_revision_in_family": { + "title": "Match Latest Revision In Family", + "description": "If enabled, the most recent active revision in the task definition family will be compared against the desired ECS task configuration. If they are equal, the existing task definition will be used instead of registering a new one. If no family is specified the default family \"prefect\" will be used.", + "default": false, + "type": "boolean" } }, "definitions": {