CfnCrawler

class aws_cdk.aws_glue.CfnCrawler(scope, id, *, role, targets, classifiers=None, configuration=None, crawler_security_configuration=None, database_name=None, description=None, name=None, recrawl_policy=None, schedule=None, schema_change_policy=None, table_prefix=None, tags=None)

Bases: CfnResource

The AWS::Glue::Crawler resource specifies an AWS Glue crawler.

For more information, see Cataloging Tables with a Crawler and Crawler Structure in the AWS Glue Developer Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-crawler.html

CloudformationResource:

AWS::Glue::Crawler

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_glue as glue

# tags: Any

cfn_crawler = glue.CfnCrawler(self, "MyCfnCrawler",
    role="role",
    targets=glue.CfnCrawler.TargetsProperty(
        catalog_targets=[glue.CfnCrawler.CatalogTargetProperty(
            connection_name="connectionName",
            database_name="databaseName",
            dlq_event_queue_arn="dlqEventQueueArn",
            event_queue_arn="eventQueueArn",
            tables=["tables"]
        )],
        delta_targets=[glue.CfnCrawler.DeltaTargetProperty(
            connection_name="connectionName",
            create_native_delta_table=False,
            delta_tables=["deltaTables"],
            write_manifest=False
        )],
        dynamo_db_targets=[glue.CfnCrawler.DynamoDBTargetProperty(
            path="path"
        )],
        iceberg_targets=[glue.CfnCrawler.IcebergTargetProperty(
            connection_name="connectionName",
            exclusions=["exclusions"],
            maximum_traversal_depth=123,
            paths=["paths"]
        )],
        jdbc_targets=[glue.CfnCrawler.JdbcTargetProperty(
            connection_name="connectionName",
            exclusions=["exclusions"],
            path="path"
        )],
        mongo_db_targets=[glue.CfnCrawler.MongoDBTargetProperty(
            connection_name="connectionName",
            path="path"
        )],
        s3_targets=[glue.CfnCrawler.S3TargetProperty(
            connection_name="connectionName",
            dlq_event_queue_arn="dlqEventQueueArn",
            event_queue_arn="eventQueueArn",
            exclusions=["exclusions"],
            path="path",
            sample_size=123
        )]
    ),

    # the properties below are optional
    classifiers=["classifiers"],
    configuration="configuration",
    crawler_security_configuration="crawlerSecurityConfiguration",
    database_name="databaseName",
    description="description",
    name="name",
    recrawl_policy=glue.CfnCrawler.RecrawlPolicyProperty(
        recrawl_behavior="recrawlBehavior"
    ),
    schedule=glue.CfnCrawler.ScheduleProperty(
        schedule_expression="scheduleExpression"
    ),
    schema_change_policy=glue.CfnCrawler.SchemaChangePolicyProperty(
        delete_behavior="deleteBehavior",
        update_behavior="updateBehavior"
    ),
    table_prefix="tablePrefix",
    tags=tags
)
Parameters:
  • scope (Construct) – Scope in which this resource is defined.

  • id (str) – Construct identifier for this resource (unique in its scope).

  • role (str) – The Amazon Resource Name (ARN) of an IAM role that’s used to access customer resources, such as Amazon Simple Storage Service (Amazon S3) data.

  • targets (Union[IResolvable, TargetsProperty, Dict[str, Any]]) – A collection of targets to crawl.

  • classifiers (Optional[Sequence[str]]) – A list of UTF-8 strings that specify the names of custom classifiers that are associated with the crawler.

  • configuration (Optional[str]) – Crawler configuration information. This versioned JSON string allows users to specify aspects of a crawler’s behavior. For more information, see Configuring a Crawler .

  • crawler_security_configuration (Optional[str]) – The name of the SecurityConfiguration structure to be used by this crawler.

  • database_name (Optional[str]) – The name of the database in which the crawler’s output is stored.

  • description (Optional[str]) – A description of the crawler.

  • name (Optional[str]) – The name of the crawler.

  • recrawl_policy (Union[IResolvable, RecrawlPolicyProperty, Dict[str, Any], None]) – A policy that specifies whether to crawl the entire dataset again, or to crawl only folders that were added since the last crawler run.

  • schedule (Union[IResolvable, ScheduleProperty, Dict[str, Any], None]) – For scheduled crawlers, the schedule when the crawler runs.

  • schema_change_policy (Union[IResolvable, SchemaChangePolicyProperty, Dict[str, Any], None]) – The policy that specifies update and delete behaviors for the crawler. The policy tells the crawler what to do in the event that it detects a change in a table that already exists in the customer’s database at the time of the crawl. The SchemaChangePolicy does not affect whether or how new tables and partitions are added. New tables and partitions are always created regardless of the SchemaChangePolicy on a crawler. The SchemaChangePolicy consists of two components, UpdateBehavior and DeleteBehavior .

  • table_prefix (Optional[str]) – The prefix added to the names of tables that are created.

  • tags (Optional[Any]) – The tags to use with this crawler.

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters:

path (str) – The path of the value to delete.

Return type:

None

add_dependency(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

add_depends_on(target)

(deprecated) Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

Parameters:

target (CfnResource) –

Deprecated:

use addDependency

Stability:

deprecated

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str) –

  • value (Any) –

See:

Return type:

None

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
  "GlobalSecondaryIndexes": [
    {
      "Projection": {
        "NonKeyAttributes": [ "myattribute" ]
        ...
      }
      ...
    },
    {
      "ProjectionType": "INCLUDE"
      ...
    },
  ]
  ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters:
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type:

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters:

property_path (str) – The path to the property.

Return type:

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters:
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type:

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

Parameters:
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resource, please consult that specific resource’s documentation.

See:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options

Return type:

None

get_att(attribute_name, type_hint=None)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters:
  • attribute_name (str) – The name of the attribute.

  • type_hint (Optional[ResolutionTypeHint]) –

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str) –

See:

Return type:

Any

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) – tree inspector to collect and process attributes.

Return type:

None

obtain_dependencies()

Retrieves an array of resources this resource depends on.

This assembles dependencies on resources across stacks (including nested stacks) automatically.

Return type:

List[Union[Stack, CfnResource]]

obtain_resource_dependencies()

Get a shallow copy of dependencies between this resource and other resources in the same stack.

Return type:

List[CfnResource]

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters:

new_logical_id (str) – The new logical ID to use for this stack element.

Return type:

None

remove_dependency(target)

Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

replace_dependency(target, new_target)

Replaces one dependency with another.

Parameters:
Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Returns:

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::Glue::Crawler'
attr_id

Id

Type:

cloudformationAttribute

cfn_options

Options for this resource, such as condition, update policy etc.

cfn_resource_type

AWS resource type.

classifiers

A list of UTF-8 strings that specify the names of custom classifiers that are associated with the crawler.

configuration

Crawler configuration information.

crawler_security_configuration

The name of the SecurityConfiguration structure to be used by this crawler.

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

database_name

The name of the database in which the crawler’s output is stored.

description

A description of the crawler.

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Returns:

the logical ID as a stringified token. This value will only get resolved during synthesis.

name

The name of the crawler.

node

The tree node.

recrawl_policy

A policy that specifies whether to crawl the entire dataset again, or to crawl only folders that were added since the last crawler run.

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

role

The Amazon Resource Name (ARN) of an IAM role that’s used to access customer resources, such as Amazon Simple Storage Service (Amazon S3) data.

schedule

For scheduled crawlers, the schedule when the crawler runs.

schema_change_policy

The policy that specifies update and delete behaviors for the crawler.

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

table_prefix

The prefix added to the names of tables that are created.

tags

Tag Manager which manages the tags for this resource.

tags_raw

The tags to use with this crawler.

targets

A collection of targets to crawl.

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters:

x (Any) –

Return type:

bool

Returns:

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(x)

Check whether the given object is a CfnResource.

Parameters:

x (Any) –

Return type:

bool

classmethod is_construct(x)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Construct.

CatalogTargetProperty

class CfnCrawler.CatalogTargetProperty(*, connection_name=None, database_name=None, dlq_event_queue_arn=None, event_queue_arn=None, tables=None)

Bases: object

Specifies an AWS Glue Data Catalog target.

Parameters:
  • connection_name (Optional[str]) – The name of the connection for an Amazon S3-backed Data Catalog table to be a target of the crawl when using a Catalog connection type paired with a NETWORK Connection type.

  • database_name (Optional[str]) – The name of the database to be synchronized.

  • dlq_event_queue_arn (Optional[str]) – A valid Amazon dead-letter SQS ARN. For example, arn:aws:sqs:region:account:deadLetterQueue .

  • event_queue_arn (Optional[str]) – A valid Amazon SQS ARN. For example, arn:aws:sqs:region:account:sqs .

  • tables (Optional[Sequence[str]]) – A list of the tables to be synchronized.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-catalogtarget.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_glue as glue

catalog_target_property = glue.CfnCrawler.CatalogTargetProperty(
    connection_name="connectionName",
    database_name="databaseName",
    dlq_event_queue_arn="dlqEventQueueArn",
    event_queue_arn="eventQueueArn",
    tables=["tables"]
)

Attributes

connection_name

The name of the connection for an Amazon S3-backed Data Catalog table to be a target of the crawl when using a Catalog connection type paired with a NETWORK Connection type.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-catalogtarget.html#cfn-glue-crawler-catalogtarget-connectionname

database_name

The name of the database to be synchronized.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-catalogtarget.html#cfn-glue-crawler-catalogtarget-databasename

dlq_event_queue_arn

A valid Amazon dead-letter SQS ARN.

For example, arn:aws:sqs:region:account:deadLetterQueue .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-catalogtarget.html#cfn-glue-crawler-catalogtarget-dlqeventqueuearn

event_queue_arn

A valid Amazon SQS ARN.

For example, arn:aws:sqs:region:account:sqs .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-catalogtarget.html#cfn-glue-crawler-catalogtarget-eventqueuearn

tables

A list of the tables to be synchronized.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-catalogtarget.html#cfn-glue-crawler-catalogtarget-tables

DeltaTargetProperty

class CfnCrawler.DeltaTargetProperty(*, connection_name=None, create_native_delta_table=None, delta_tables=None, write_manifest=None)

Bases: object

Specifies a Delta data store to crawl one or more Delta tables.

Parameters:
  • connection_name (Optional[str]) – The name of the connection to use to connect to the Delta table target.

  • create_native_delta_table (Union[bool, IResolvable, None]) – Specifies whether the crawler will create native tables, to allow integration with query engines that support querying of the Delta transaction log directly.

  • delta_tables (Optional[Sequence[str]]) – A list of the Amazon S3 paths to the Delta tables.

  • write_manifest (Union[bool, IResolvable, None]) – Specifies whether to write the manifest files to the Delta table path.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-deltatarget.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_glue as glue

delta_target_property = glue.CfnCrawler.DeltaTargetProperty(
    connection_name="connectionName",
    create_native_delta_table=False,
    delta_tables=["deltaTables"],
    write_manifest=False
)

Attributes

connection_name

The name of the connection to use to connect to the Delta table target.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-deltatarget.html#cfn-glue-crawler-deltatarget-connectionname

create_native_delta_table

Specifies whether the crawler will create native tables, to allow integration with query engines that support querying of the Delta transaction log directly.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-deltatarget.html#cfn-glue-crawler-deltatarget-createnativedeltatable

delta_tables

A list of the Amazon S3 paths to the Delta tables.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-deltatarget.html#cfn-glue-crawler-deltatarget-deltatables

write_manifest

Specifies whether to write the manifest files to the Delta table path.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-deltatarget.html#cfn-glue-crawler-deltatarget-writemanifest

DynamoDBTargetProperty

class CfnCrawler.DynamoDBTargetProperty(*, path=None)

Bases: object

Specifies an Amazon DynamoDB table to crawl.

Parameters:

path (Optional[str]) – The name of the DynamoDB table to crawl.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-dynamodbtarget.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_glue as glue

dynamo_dBTarget_property = glue.CfnCrawler.DynamoDBTargetProperty(
    path="path"
)

Attributes

path

The name of the DynamoDB table to crawl.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-dynamodbtarget.html#cfn-glue-crawler-dynamodbtarget-path

IcebergTargetProperty

class CfnCrawler.IcebergTargetProperty(*, connection_name=None, exclusions=None, maximum_traversal_depth=None, paths=None)

Bases: object

Specifies Apache Iceberg data store targets.

Parameters:
  • connection_name (Optional[str]) – The name of the connection to use to connect to the Iceberg target.

  • exclusions (Optional[Sequence[str]]) – A list of global patterns used to exclude from the crawl.

  • maximum_traversal_depth (Union[int, float, None]) – The maximum depth of Amazon S3 paths that the crawler can traverse to discover the Iceberg metadata folder in your Amazon S3 path. Used to limit the crawler run time.

  • paths (Optional[Sequence[str]]) – One or more Amazon S3 paths that contains Iceberg metadata folders as s3://bucket/prefix .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-icebergtarget.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_glue as glue

iceberg_target_property = glue.CfnCrawler.IcebergTargetProperty(
    connection_name="connectionName",
    exclusions=["exclusions"],
    maximum_traversal_depth=123,
    paths=["paths"]
)

Attributes

connection_name

The name of the connection to use to connect to the Iceberg target.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-icebergtarget.html#cfn-glue-crawler-icebergtarget-connectionname

exclusions

A list of global patterns used to exclude from the crawl.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-icebergtarget.html#cfn-glue-crawler-icebergtarget-exclusions

maximum_traversal_depth

The maximum depth of Amazon S3 paths that the crawler can traverse to discover the Iceberg metadata folder in your Amazon S3 path.

Used to limit the crawler run time.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-icebergtarget.html#cfn-glue-crawler-icebergtarget-maximumtraversaldepth

paths

//bucket/prefix .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-icebergtarget.html#cfn-glue-crawler-icebergtarget-paths

Type:

One or more Amazon S3 paths that contains Iceberg metadata folders as s3

JdbcTargetProperty

class CfnCrawler.JdbcTargetProperty(*, connection_name=None, exclusions=None, path=None)

Bases: object

Specifies a JDBC data store to crawl.

Parameters:
  • connection_name (Optional[str]) – The name of the connection to use to connect to the JDBC target.

  • exclusions (Optional[Sequence[str]]) – A list of glob patterns used to exclude from the crawl. For more information, see Catalog Tables with a Crawler .

  • path (Optional[str]) – The path of the JDBC target.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-jdbctarget.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_glue as glue

jdbc_target_property = glue.CfnCrawler.JdbcTargetProperty(
    connection_name="connectionName",
    exclusions=["exclusions"],
    path="path"
)

Attributes

connection_name

The name of the connection to use to connect to the JDBC target.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-jdbctarget.html#cfn-glue-crawler-jdbctarget-connectionname

exclusions

A list of glob patterns used to exclude from the crawl.

For more information, see Catalog Tables with a Crawler .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-jdbctarget.html#cfn-glue-crawler-jdbctarget-exclusions

path

The path of the JDBC target.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-jdbctarget.html#cfn-glue-crawler-jdbctarget-path

MongoDBTargetProperty

class CfnCrawler.MongoDBTargetProperty(*, connection_name=None, path=None)

Bases: object

Specifies an Amazon DocumentDB or MongoDB data store to crawl.

Parameters:
  • connection_name (Optional[str]) – The name of the connection to use to connect to the Amazon DocumentDB or MongoDB target.

  • path (Optional[str]) – The path of the Amazon DocumentDB or MongoDB target (database/collection).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-mongodbtarget.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_glue as glue

mongo_dBTarget_property = glue.CfnCrawler.MongoDBTargetProperty(
    connection_name="connectionName",
    path="path"
)

Attributes

connection_name

The name of the connection to use to connect to the Amazon DocumentDB or MongoDB target.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-mongodbtarget.html#cfn-glue-crawler-mongodbtarget-connectionname

path

The path of the Amazon DocumentDB or MongoDB target (database/collection).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-mongodbtarget.html#cfn-glue-crawler-mongodbtarget-path

RecrawlPolicyProperty

class CfnCrawler.RecrawlPolicyProperty(*, recrawl_behavior=None)

Bases: object

When crawling an Amazon S3 data source after the first crawl is complete, specifies whether to crawl the entire dataset again or to crawl only folders that were added since the last crawler run.

For more information, see Incremental Crawls in AWS Glue in the developer guide.

Parameters:

recrawl_behavior (Optional[str]) – Specifies whether to crawl the entire dataset again or to crawl only folders that were added since the last crawler run. A value of CRAWL_EVERYTHING specifies crawling the entire dataset again. A value of CRAWL_NEW_FOLDERS_ONLY specifies crawling only folders that were added since the last crawler run. A value of CRAWL_EVENT_MODE specifies crawling only the changes identified by Amazon S3 events.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-recrawlpolicy.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_glue as glue

recrawl_policy_property = glue.CfnCrawler.RecrawlPolicyProperty(
    recrawl_behavior="recrawlBehavior"
)

Attributes

recrawl_behavior

Specifies whether to crawl the entire dataset again or to crawl only folders that were added since the last crawler run.

A value of CRAWL_EVERYTHING specifies crawling the entire dataset again.

A value of CRAWL_NEW_FOLDERS_ONLY specifies crawling only folders that were added since the last crawler run.

A value of CRAWL_EVENT_MODE specifies crawling only the changes identified by Amazon S3 events.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-recrawlpolicy.html#cfn-glue-crawler-recrawlpolicy-recrawlbehavior

S3TargetProperty

class CfnCrawler.S3TargetProperty(*, connection_name=None, dlq_event_queue_arn=None, event_queue_arn=None, exclusions=None, path=None, sample_size=None)

Bases: object

Specifies a data store in Amazon Simple Storage Service (Amazon S3).

Parameters:
  • connection_name (Optional[str]) – The name of a connection which allows a job or crawler to access data in Amazon S3 within an Amazon Virtual Private Cloud environment (Amazon VPC).

  • dlq_event_queue_arn (Optional[str]) – A valid Amazon dead-letter SQS ARN. For example, arn:aws:sqs:region:account:deadLetterQueue .

  • event_queue_arn (Optional[str]) – A valid Amazon SQS ARN. For example, arn:aws:sqs:region:account:sqs .

  • exclusions (Optional[Sequence[str]]) –

    A list of glob patterns used to exclude from the crawl. For more information, see Catalog Tables with a Crawler .

  • path (Optional[str]) – The path to the Amazon S3 target.

  • sample_size (Union[int, float, None]) – Sets the number of files in each leaf folder to be crawled when crawling sample files in a dataset. If not set, all the files are crawled. A valid value is an integer between 1 and 249.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-s3target.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_glue as glue

s3_target_property = glue.CfnCrawler.S3TargetProperty(
    connection_name="connectionName",
    dlq_event_queue_arn="dlqEventQueueArn",
    event_queue_arn="eventQueueArn",
    exclusions=["exclusions"],
    path="path",
    sample_size=123
)

Attributes

connection_name

The name of a connection which allows a job or crawler to access data in Amazon S3 within an Amazon Virtual Private Cloud environment (Amazon VPC).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-s3target.html#cfn-glue-crawler-s3target-connectionname

dlq_event_queue_arn

A valid Amazon dead-letter SQS ARN.

For example, arn:aws:sqs:region:account:deadLetterQueue .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-s3target.html#cfn-glue-crawler-s3target-dlqeventqueuearn

event_queue_arn

A valid Amazon SQS ARN.

For example, arn:aws:sqs:region:account:sqs .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-s3target.html#cfn-glue-crawler-s3target-eventqueuearn

exclusions

A list of glob patterns used to exclude from the crawl.

For more information, see Catalog Tables with a Crawler .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-s3target.html#cfn-glue-crawler-s3target-exclusions

path

The path to the Amazon S3 target.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-s3target.html#cfn-glue-crawler-s3target-path

sample_size

Sets the number of files in each leaf folder to be crawled when crawling sample files in a dataset.

If not set, all the files are crawled. A valid value is an integer between 1 and 249.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-s3target.html#cfn-glue-crawler-s3target-samplesize

ScheduleProperty

class CfnCrawler.ScheduleProperty(*, schedule_expression=None)

Bases: object

A scheduling object using a cron statement to schedule an event.

Parameters:

schedule_expression (Optional[str]) – A cron expression used to specify the schedule. For more information, see Time-Based Schedules for Jobs and Crawlers . For example, to run something every day at 12:15 UTC, specify cron(15 12 * * ? *) .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-schedule.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_glue as glue

schedule_property = glue.CfnCrawler.ScheduleProperty(
    schedule_expression="scheduleExpression"
)

Attributes

schedule_expression

A cron expression used to specify the schedule.

For more information, see Time-Based Schedules for Jobs and Crawlers . For example, to run something every day at 12:15 UTC, specify cron(15 12 * * ? *) .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-schedule.html#cfn-glue-crawler-schedule-scheduleexpression

SchemaChangePolicyProperty

class CfnCrawler.SchemaChangePolicyProperty(*, delete_behavior=None, update_behavior=None)

Bases: object

The policy that specifies update and delete behaviors for the crawler.

The policy tells the crawler what to do in the event that it detects a change in a table that already exists in the customer’s database at the time of the crawl. The SchemaChangePolicy does not affect whether or how new tables and partitions are added. New tables and partitions are always created regardless of the SchemaChangePolicy on a crawler.

The SchemaChangePolicy consists of two components, UpdateBehavior and DeleteBehavior .

Parameters:
  • delete_behavior (Optional[str]) – The deletion behavior when the crawler finds a deleted object. A value of LOG specifies that if a table or partition is found to no longer exist, do not delete it, only log that it was found to no longer exist. A value of DELETE_FROM_DATABASE specifies that if a table or partition is found to have been removed, delete it from the database. A value of DEPRECATE_IN_DATABASE specifies that if a table has been found to no longer exist, to add a property to the table that says “DEPRECATED” and includes a timestamp with the time of deprecation.

  • update_behavior (Optional[str]) – The update behavior when the crawler finds a changed schema. A value of LOG specifies that if a table or a partition already exists, and a change is detected, do not update it, only log that a change was detected. Add new tables and new partitions (including on existing tables). A value of UPDATE_IN_DATABASE specifies that if a table or partition already exists, and a change is detected, update it. Add new tables and partitions.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-schemachangepolicy.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_glue as glue

schema_change_policy_property = glue.CfnCrawler.SchemaChangePolicyProperty(
    delete_behavior="deleteBehavior",
    update_behavior="updateBehavior"
)

Attributes

delete_behavior

The deletion behavior when the crawler finds a deleted object.

A value of LOG specifies that if a table or partition is found to no longer exist, do not delete it, only log that it was found to no longer exist.

A value of DELETE_FROM_DATABASE specifies that if a table or partition is found to have been removed, delete it from the database.

A value of DEPRECATE_IN_DATABASE specifies that if a table has been found to no longer exist, to add a property to the table that says “DEPRECATED” and includes a timestamp with the time of deprecation.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-schemachangepolicy.html#cfn-glue-crawler-schemachangepolicy-deletebehavior

update_behavior

The update behavior when the crawler finds a changed schema.

A value of LOG specifies that if a table or a partition already exists, and a change is detected, do not update it, only log that a change was detected. Add new tables and new partitions (including on existing tables).

A value of UPDATE_IN_DATABASE specifies that if a table or partition already exists, and a change is detected, update it. Add new tables and partitions.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-schemachangepolicy.html#cfn-glue-crawler-schemachangepolicy-updatebehavior

TargetsProperty

class CfnCrawler.TargetsProperty(*, catalog_targets=None, delta_targets=None, dynamo_db_targets=None, iceberg_targets=None, jdbc_targets=None, mongo_db_targets=None, s3_targets=None)

Bases: object

Specifies data stores to crawl.

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-targets.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_glue as glue

targets_property = glue.CfnCrawler.TargetsProperty(
    catalog_targets=[glue.CfnCrawler.CatalogTargetProperty(
        connection_name="connectionName",
        database_name="databaseName",
        dlq_event_queue_arn="dlqEventQueueArn",
        event_queue_arn="eventQueueArn",
        tables=["tables"]
    )],
    delta_targets=[glue.CfnCrawler.DeltaTargetProperty(
        connection_name="connectionName",
        create_native_delta_table=False,
        delta_tables=["deltaTables"],
        write_manifest=False
    )],
    dynamo_db_targets=[glue.CfnCrawler.DynamoDBTargetProperty(
        path="path"
    )],
    iceberg_targets=[glue.CfnCrawler.IcebergTargetProperty(
        connection_name="connectionName",
        exclusions=["exclusions"],
        maximum_traversal_depth=123,
        paths=["paths"]
    )],
    jdbc_targets=[glue.CfnCrawler.JdbcTargetProperty(
        connection_name="connectionName",
        exclusions=["exclusions"],
        path="path"
    )],
    mongo_db_targets=[glue.CfnCrawler.MongoDBTargetProperty(
        connection_name="connectionName",
        path="path"
    )],
    s3_targets=[glue.CfnCrawler.S3TargetProperty(
        connection_name="connectionName",
        dlq_event_queue_arn="dlqEventQueueArn",
        event_queue_arn="eventQueueArn",
        exclusions=["exclusions"],
        path="path",
        sample_size=123
    )]
)

Attributes

catalog_targets

Specifies AWS Glue Data Catalog targets.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-targets.html#cfn-glue-crawler-targets-catalogtargets

delta_targets

Specifies an array of Delta data store targets.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-targets.html#cfn-glue-crawler-targets-deltatargets

dynamo_db_targets

Specifies Amazon DynamoDB targets.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-targets.html#cfn-glue-crawler-targets-dynamodbtargets

iceberg_targets

Specifies Apache Iceberg data store targets.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-targets.html#cfn-glue-crawler-targets-icebergtargets

jdbc_targets

Specifies JDBC targets.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-targets.html#cfn-glue-crawler-targets-jdbctargets

mongo_db_targets

A list of Mongo DB targets.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-targets.html#cfn-glue-crawler-targets-mongodbtargets

s3_targets

Specifies Amazon Simple Storage Service (Amazon S3) targets.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-targets.html#cfn-glue-crawler-targets-s3targets