Policy types for @turbot/servicenow-aws-s3
- AWS > S3 > Bucket > ServiceNow
- AWS > S3 > Bucket > ServiceNow > Configuration Item
- AWS > S3 > Bucket > ServiceNow > Configuration Item > Record
- AWS > S3 > Bucket > ServiceNow > Configuration Item > Table Definition
- AWS > S3 > Bucket > ServiceNow > Table
- AWS > S3 > Bucket > ServiceNow > Table > Definition
AWS > S3 > Bucket > ServiceNow
tmod:@turbot/servicenow-aws-s3#/policy/types/bucketServiceNow
AWS > S3 > Bucket > ServiceNow > Configuration Item
Synchronize the data for the AWS > S3 > Bucket based on the policies AWS > S3 > Bucket > ServiceNow > Configuration Item > *
The policy ensures that AWS > S3 > Bucket data is automatically synchronized as Configuration Items (CIs) in a designated ServiceNow table, maintaining an up-to-date reflection of the AWS > S3 > Bucket information within the ServiceNow CMDB.
tmod:@turbot/servicenow-aws-s3#/policy/types/bucketServiceNowConfigurationItem
[ "Skip", "Check: Archived", "Check: Deleted", "Check: Sync", "Enforce: Archived", "Enforce: Deleted", "Enforce: Sync", "Enforce: Sync, archive on delete"]
{ "type": "string", "enum": [ "Skip", "Check: Archived", "Check: Deleted", "Check: Sync", "Enforce: Archived", "Enforce: Deleted", "Enforce: Sync", "Enforce: Sync, archive on delete" ], "example": [ "Skip" ], "default": "Skip"}
AWS > S3 > Bucket > ServiceNow > Configuration Item > Record
The policy facilitates the accurate representation of cloud resource within the ServiceNow environment, ensuring that critical data is effectively mapped and managed. Attribute of an AWS > S3 > Bucket
is systematically mapped to a specific column in a ServiceNow table.
The policy allows enabling organizations to select and map only those attributes that are most relevant to their operational needs. It significantly reduces the manual effort involved in data transfer and minimizes the risk of errors, thereby enhancing the overall efficiency of data management.
tmod:@turbot/servicenow-aws-s3#/policy/types/bucketServiceNowConfigurationItemRecord
"{\n resource: bucket{\n data\n metadata\n turbot {\n akas\n id\n tags\n title\n }\n }\n}\n"
"account_id: {{ $.resource.metadata.aws.accountId | dump | safe }}\narn: {{ $.resource.turbot.akas[0] | dump | safe }}\nblock_public_acls: {{ $.resource.data.PublicAccessBlock.BlockPublicAcls | dump | safe }}\nblock_public_policy: {{ $.resource.data.PublicAccessBlock.BlockPublicPolicy | dump | safe }}\nbucket_name: {{ $.resource.data.Name | dump | safe }}\ncreation_date: {{ $.resource.data.CreationDate | dump | safe }}\nignore_public_acls: {{ $.resource.data.PublicAccessBlock.IgnorePublicAcls | dump | safe }}\nlifecycle_rules: {{ $.resource.data.Lifecycle.Rules | dump | safe }}\nlogging: {{ $.resource.data.Logging | dump | safe }}\nregion: {{ $.resource.metadata.aws.regionName | dump | safe }}\nreplication: {{ $.resource.data.Replication | dump | safe }}\nrestrict_public_buckets: {{ $.resource.data.PublicAccessBlock.RestrictPublicBuckets | dump | safe }}\nserver_side_encryption_configuration: {{ $.resource.data.Encryption.ServerSideEncryptionConfiguration | dump | safe }}\ntags: {{ $.resource.turbot.tags | dump | safe }}\nversioning_enabled: {{ $.resource.data.Versioning.Status | dump | safe }}\nwebsite_configuration: {{ $.resource.data.Website | dump | safe }}\n"
{ "type": "object"}
AWS > S3 > Bucket > ServiceNow > Configuration Item > Table Definition
This policy specifically allows users to define two key aspects: the name of the ServiceNow table where the AWS > S3 > Bucket
data will be stored, and the details of the columns used for archiving purposes.
tmod:@turbot/servicenow-aws-s3#/policy/types/bucketServiceNowConfigurationItemTableDefinition
[ "{\n serviceNowInstance: resources(filter: \"resourceTypeId:tmod:@turbot/servicenow#/resource/types/instance level:self limit:1\") {\n items {\n turbot {\n id\n }\n }\n }\n}\n", "{\n tableDefinition: policyValues(filter: \"policyTypeId:tmod:@turbot/servicenow-aws-s3#/policy/types/bucketServiceNowTableDefinition resourceId:{{$.serviceNowInstance.items[0].turbot.id}} level:self\") {\n items {\n value\n }\n }\n applicationScope: policyValues(filter: \"policyTypeId:tmod:@turbot/servicenow#/policy/types/serviceNowApplicationScope resourceId:{{$.serviceNowInstance.items[0].turbot.id}} level:self\") {\n items {\n value\n }\n }\n}\n"]
"tableName: "{%- if $.applicationScope.items | length == 0 or $.tableDefinition.items | length == 0 %} {%- else %}{{$.applicationScope.items[0].value}}_{{$.tableDefinition.items[0].value.table.name | lower}}{% endif %}"\n"
{ "type": "object", "additionalProperties": false, "required": [ "tableName" ], "properties": { "tableName": { "type": "string" }, "archiveColumns": { "type": "object" } }}
AWS > S3 > Bucket > ServiceNow > Table
Configure a table for AWS > S3 > Bucket
resource type in ServiceNow via the AWS > S3 > Bucket > ServiceNow > Table > *
policies.
tmod:@turbot/servicenow-aws-s3#/policy/types/bucketServiceNowTable
[ "Skip", "Check: Configured", "Enforce: Configured"]
{ "type": "string", "enum": [ "Skip", "Check: Configured", "Enforce: Configured" ], "example": [ "Skip" ], "default": "Skip"}
AWS > S3 > Bucket > ServiceNow > Table > Definition
The policy enables the definition of ServiceNow table properties, including its name and the base table from which it extends, and details the specific columns required for representing AWS > S3 > Bucket data.
tmod:@turbot/servicenow-aws-s3#/policy/types/bucketServiceNowTableDefinition
{ "type": "object", "additionalProperties": false, "required": [ "table", "columns" ], "properties": { "table": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "pattern": "^([0-9a-z_])+$" }, "label": { "type": "string" }, "extendsTable": { "type": "string", "pattern": "^([0-9a-z_])+$" } } }, "columns": { "type": "array", "description": "An array of columns with their mappings to the CMDB.", "default": [], "items": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "description": "The name of the column in the table.", "pattern": "^([0-9a-z_])+$" }, "label": { "type": "string", "description": "The label for the column." }, "type": { "description": "The data type of the column.", "type": "string" }, "size": { "type": "integer", "description": "The length for data type." } } } } }, "default": { "table": { "name": "guardrails_aws_s3_bucket", "label": "AWS > S3 > Bucket", "extendsTable": "cmdb_ci" }, "columns": [ { "name": "account_id", "label": "Account ID" }, { "name": "arn", "label": "ARN" }, { "name": "block_public_acls", "label": "Block Public ACLs", "type": "boolean" }, { "name": "block_public_policy", "label": "Block Public Policy", "type": "boolean" }, { "name": "bucket_name", "label": "Bucket Name" }, { "name": "creation_date", "label": "Creation Date" }, { "name": "ignore_public_acls", "label": "Ignore Public ACLs", "type": "boolean" }, { "name": "lifecycle_rules", "label": "Lifecycle Rules", "type": "string", "size": 1000 }, { "name": "logging", "label": "Logging", "type": "string", "size": 1000 }, { "name": "region", "label": "Region" }, { "name": "replication", "label": "Replication", "type": "string", "size": 1000 }, { "name": "restrict_public_buckets", "label": "Restrict Public Buckets", "type": "boolean" }, { "name": "server_side_encryption_configuration", "label": "Server Side Encryption Configuration", "type": "string", "size": 1000 }, { "name": "tags", "label": "Tags", "type": "string", "size": 1000 }, { "name": "versioning_enabled", "label": "Versioning Enabled" }, { "name": "website_configuration", "label": "Website Configuration", "type": "string", "size": 1000 } ] }}