import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Use this data source to generate a Glue script from a Directed Acyclic Graph (DAG). * * ## Example Usage * * ### Generate Python Script * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.glue.getScript({ * dagEdges: [ * { * source: "datasource0", * target: "applymapping1", * }, * { * source: "applymapping1", * target: "selectfields2", * }, * { * source: "selectfields2", * target: "resolvechoice3", * }, * { * source: "resolvechoice3", * target: "datasink4", * }, * ], * dagNodes: [ * { * args: [ * { * name: "database", * value: `"${source.name}"`, * }, * { * name: "table_name", * value: `"${sourceAwsGlueCatalogTable.name}"`, * }, * ], * id: "datasource0", * nodeType: "DataSource", * }, * { * args: [{ * name: "mapping", * value: "[(\"column1\", \"string\", \"column1\", \"string\")]", * }], * id: "applymapping1", * nodeType: "ApplyMapping", * }, * { * args: [{ * name: "paths", * value: "[\"column1\"]", * }], * id: "selectfields2", * nodeType: "SelectFields", * }, * { * args: [ * { * name: "choice", * value: "\"MATCH_CATALOG\"", * }, * { * name: "database", * value: `"${destination.name}"`, * }, * { * name: "table_name", * value: `"${destinationAwsGlueCatalogTable.name}"`, * }, * ], * id: "resolvechoice3", * nodeType: "ResolveChoice", * }, * { * args: [ * { * name: "database", * value: `"${destination.name}"`, * }, * { * name: "table_name", * value: `"${destinationAwsGlueCatalogTable.name}"`, * }, * ], * id: "datasink4", * nodeType: "DataSink", * }, * ], * language: "PYTHON", * }); * export const pythonScript = example.then(example => example.pythonScript); * ``` * * ### Generate Scala Code * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.glue.getScript({ * dagEdges: [ * { * source: "datasource0", * target: "applymapping1", * }, * { * source: "applymapping1", * target: "selectfields2", * }, * { * source: "selectfields2", * target: "resolvechoice3", * }, * { * source: "resolvechoice3", * target: "datasink4", * }, * ], * dagNodes: [ * { * args: [ * { * name: "database", * value: `"${source.name}"`, * }, * { * name: "table_name", * value: `"${sourceAwsGlueCatalogTable.name}"`, * }, * ], * id: "datasource0", * nodeType: "DataSource", * }, * { * args: [{ * name: "mappings", * value: "[(\"column1\", \"string\", \"column1\", \"string\")]", * }], * id: "applymapping1", * nodeType: "ApplyMapping", * }, * { * args: [{ * name: "paths", * value: "[\"column1\"]", * }], * id: "selectfields2", * nodeType: "SelectFields", * }, * { * args: [ * { * name: "choice", * value: "\"MATCH_CATALOG\"", * }, * { * name: "database", * value: `"${destination.name}"`, * }, * { * name: "table_name", * value: `"${destinationAwsGlueCatalogTable.name}"`, * }, * ], * id: "resolvechoice3", * nodeType: "ResolveChoice", * }, * { * args: [ * { * name: "database", * value: `"${destination.name}"`, * }, * { * name: "table_name", * value: `"${destinationAwsGlueCatalogTable.name}"`, * }, * ], * id: "datasink4", * nodeType: "DataSink", * }, * ], * language: "SCALA", * }); * export const scalaCode = example.then(example => example.scalaCode); * ``` */ export declare function getScript(args: GetScriptArgs, opts?: pulumi.InvokeOptions): Promise; /** * A collection of arguments for invoking getScript. */ export interface GetScriptArgs { /** * List of the edges in the DAG. Defined below. */ dagEdges: inputs.glue.GetScriptDagEdge[]; /** * List of the nodes in the DAG. Defined below. */ dagNodes: inputs.glue.GetScriptDagNode[]; /** * Programming language of the resulting code from the DAG. Defaults to `PYTHON`. Valid values are `PYTHON` and `SCALA`. */ language?: string; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: string; } /** * A collection of values returned by getScript. */ export interface GetScriptResult { readonly dagEdges: outputs.glue.GetScriptDagEdge[]; readonly dagNodes: outputs.glue.GetScriptDagNode[]; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; readonly language?: string; /** * Python script generated from the DAG when the `language` argument is set to `PYTHON`. */ readonly pythonScript: string; readonly region: string; /** * Scala code generated from the DAG when the `language` argument is set to `SCALA`. */ readonly scalaCode: string; } /** * Use this data source to generate a Glue script from a Directed Acyclic Graph (DAG). * * ## Example Usage * * ### Generate Python Script * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.glue.getScript({ * dagEdges: [ * { * source: "datasource0", * target: "applymapping1", * }, * { * source: "applymapping1", * target: "selectfields2", * }, * { * source: "selectfields2", * target: "resolvechoice3", * }, * { * source: "resolvechoice3", * target: "datasink4", * }, * ], * dagNodes: [ * { * args: [ * { * name: "database", * value: `"${source.name}"`, * }, * { * name: "table_name", * value: `"${sourceAwsGlueCatalogTable.name}"`, * }, * ], * id: "datasource0", * nodeType: "DataSource", * }, * { * args: [{ * name: "mapping", * value: "[(\"column1\", \"string\", \"column1\", \"string\")]", * }], * id: "applymapping1", * nodeType: "ApplyMapping", * }, * { * args: [{ * name: "paths", * value: "[\"column1\"]", * }], * id: "selectfields2", * nodeType: "SelectFields", * }, * { * args: [ * { * name: "choice", * value: "\"MATCH_CATALOG\"", * }, * { * name: "database", * value: `"${destination.name}"`, * }, * { * name: "table_name", * value: `"${destinationAwsGlueCatalogTable.name}"`, * }, * ], * id: "resolvechoice3", * nodeType: "ResolveChoice", * }, * { * args: [ * { * name: "database", * value: `"${destination.name}"`, * }, * { * name: "table_name", * value: `"${destinationAwsGlueCatalogTable.name}"`, * }, * ], * id: "datasink4", * nodeType: "DataSink", * }, * ], * language: "PYTHON", * }); * export const pythonScript = example.then(example => example.pythonScript); * ``` * * ### Generate Scala Code * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.glue.getScript({ * dagEdges: [ * { * source: "datasource0", * target: "applymapping1", * }, * { * source: "applymapping1", * target: "selectfields2", * }, * { * source: "selectfields2", * target: "resolvechoice3", * }, * { * source: "resolvechoice3", * target: "datasink4", * }, * ], * dagNodes: [ * { * args: [ * { * name: "database", * value: `"${source.name}"`, * }, * { * name: "table_name", * value: `"${sourceAwsGlueCatalogTable.name}"`, * }, * ], * id: "datasource0", * nodeType: "DataSource", * }, * { * args: [{ * name: "mappings", * value: "[(\"column1\", \"string\", \"column1\", \"string\")]", * }], * id: "applymapping1", * nodeType: "ApplyMapping", * }, * { * args: [{ * name: "paths", * value: "[\"column1\"]", * }], * id: "selectfields2", * nodeType: "SelectFields", * }, * { * args: [ * { * name: "choice", * value: "\"MATCH_CATALOG\"", * }, * { * name: "database", * value: `"${destination.name}"`, * }, * { * name: "table_name", * value: `"${destinationAwsGlueCatalogTable.name}"`, * }, * ], * id: "resolvechoice3", * nodeType: "ResolveChoice", * }, * { * args: [ * { * name: "database", * value: `"${destination.name}"`, * }, * { * name: "table_name", * value: `"${destinationAwsGlueCatalogTable.name}"`, * }, * ], * id: "datasink4", * nodeType: "DataSink", * }, * ], * language: "SCALA", * }); * export const scalaCode = example.then(example => example.scalaCode); * ``` */ export declare function getScriptOutput(args: GetScriptOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output; /** * A collection of arguments for invoking getScript. */ export interface GetScriptOutputArgs { /** * List of the edges in the DAG. Defined below. */ dagEdges: pulumi.Input[]>; /** * List of the nodes in the DAG. Defined below. */ dagNodes: pulumi.Input[]>; /** * Programming language of the resulting code from the DAG. Defaults to `PYTHON`. Valid values are `PYTHON` and `SCALA`. */ language?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; } //# sourceMappingURL=getScript.d.ts.map