tencentcloud.WedataResourceFile
Provides a resource to create a wedata wedata_resource_file
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const wedataResourceFolder = new tencentcloud.WedataResourceFolder("wedata_resource_folder", {
projectId: "2905622749543821312",
parentFolderPath: "/",
folderName: "folder",
});
const wedataResourceFile = new tencentcloud.WedataResourceFile("wedata_resource_file", {
projectId: "2905622749543821312",
resourceName: "tftest.txt",
bucketName: "data-manage-fsi-1315051789",
cosRegion: "ap-beijing-fsi",
parentFolderPath: pulumi.interpolate`${wedataResourceFolder.parentFolderPath}${wedataResourceFolder.folderName}`,
resourceFile: pulumi.interpolate`/datastudio/resource/2905622749543821312/${wedataResourceFolder.parentFolderPath}${wedataResourceFolder.folderName}/test`,
});
import pulumi
import pulumi_tencentcloud as tencentcloud
wedata_resource_folder = tencentcloud.WedataResourceFolder("wedata_resource_folder",
project_id="2905622749543821312",
parent_folder_path="/",
folder_name="folder")
wedata_resource_file = tencentcloud.WedataResourceFile("wedata_resource_file",
project_id="2905622749543821312",
resource_name_="tftest.txt",
bucket_name="data-manage-fsi-1315051789",
cos_region="ap-beijing-fsi",
parent_folder_path=pulumi.Output.all(
parent_folder_path=wedata_resource_folder.parent_folder_path,
folder_name=wedata_resource_folder.folder_name
).apply(lambda resolved_outputs: f"{resolved_outputs['parent_folder_path']}{resolved_outputs['folder_name']}")
,
resource_file=pulumi.Output.all(
parent_folder_path=wedata_resource_folder.parent_folder_path,
folder_name=wedata_resource_folder.folder_name
).apply(lambda resolved_outputs: f"/datastudio/resource/2905622749543821312/{resolved_outputs['parent_folder_path']}{resolved_outputs['folder_name']}/test")
)
package main
import (
"fmt"
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
wedataResourceFolder, err := tencentcloud.NewWedataResourceFolder(ctx, "wedata_resource_folder", &tencentcloud.WedataResourceFolderArgs{
ProjectId: pulumi.String("2905622749543821312"),
ParentFolderPath: pulumi.String("/"),
FolderName: pulumi.String("folder"),
})
if err != nil {
return err
}
_, err = tencentcloud.NewWedataResourceFile(ctx, "wedata_resource_file", &tencentcloud.WedataResourceFileArgs{
ProjectId: pulumi.String("2905622749543821312"),
ResourceName: pulumi.String("tftest.txt"),
BucketName: pulumi.String("data-manage-fsi-1315051789"),
CosRegion: pulumi.String("ap-beijing-fsi"),
ParentFolderPath: pulumi.All(wedataResourceFolder.ParentFolderPath, wedataResourceFolder.FolderName).ApplyT(func(_args []interface{}) (string, error) {
parentFolderPath := _args[0].(string)
folderName := _args[1].(string)
return fmt.Sprintf("%v%v", parentFolderPath, folderName), nil
}).(pulumi.StringOutput),
ResourceFile: pulumi.All(wedataResourceFolder.ParentFolderPath, wedataResourceFolder.FolderName).ApplyT(func(_args []interface{}) (string, error) {
parentFolderPath := _args[0].(string)
folderName := _args[1].(string)
return fmt.Sprintf("/datastudio/resource/2905622749543821312/%v%v/test", parentFolderPath, folderName), nil
}).(pulumi.StringOutput),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var wedataResourceFolder = new Tencentcloud.WedataResourceFolder("wedata_resource_folder", new()
{
ProjectId = "2905622749543821312",
ParentFolderPath = "/",
FolderName = "folder",
});
var wedataResourceFile = new Tencentcloud.WedataResourceFile("wedata_resource_file", new()
{
ProjectId = "2905622749543821312",
ResourceName = "tftest.txt",
BucketName = "data-manage-fsi-1315051789",
CosRegion = "ap-beijing-fsi",
ParentFolderPath = Output.Tuple(wedataResourceFolder.ParentFolderPath, wedataResourceFolder.FolderName).Apply(values =>
{
var parentFolderPath = values.Item1;
var folderName = values.Item2;
return $"{parentFolderPath}{folderName}";
}),
ResourceFile = Output.Tuple(wedataResourceFolder.ParentFolderPath, wedataResourceFolder.FolderName).Apply(values =>
{
var parentFolderPath = values.Item1;
var folderName = values.Item2;
return $"/datastudio/resource/2905622749543821312/{parentFolderPath}{folderName}/test";
}),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.WedataResourceFolder;
import com.pulumi.tencentcloud.WedataResourceFolderArgs;
import com.pulumi.tencentcloud.WedataResourceFile;
import com.pulumi.tencentcloud.WedataResourceFileArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var wedataResourceFolder = new WedataResourceFolder("wedataResourceFolder", WedataResourceFolderArgs.builder()
.projectId("2905622749543821312")
.parentFolderPath("/")
.folderName("folder")
.build());
var wedataResourceFile = new WedataResourceFile("wedataResourceFile", WedataResourceFileArgs.builder()
.projectId("2905622749543821312")
.resourceName("tftest.txt")
.bucketName("data-manage-fsi-1315051789")
.cosRegion("ap-beijing-fsi")
.parentFolderPath(Output.tuple(wedataResourceFolder.parentFolderPath(), wedataResourceFolder.folderName()).applyValue(values -> {
var parentFolderPath = values.t1;
var folderName = values.t2;
return String.format("%s%s", parentFolderPath,folderName);
}))
.resourceFile(Output.tuple(wedataResourceFolder.parentFolderPath(), wedataResourceFolder.folderName()).applyValue(values -> {
var parentFolderPath = values.t1;
var folderName = values.t2;
return String.format("/datastudio/resource/2905622749543821312/%s%s/test", parentFolderPath,folderName);
}))
.build());
}
}
resources:
wedataResourceFolder:
type: tencentcloud:WedataResourceFolder
name: wedata_resource_folder
properties:
projectId: 2.9056227495438213e+18
parentFolderPath: /
folderName: folder
wedataResourceFile:
type: tencentcloud:WedataResourceFile
name: wedata_resource_file
properties:
projectId: 2.9056227495438213e+18
resourceName: tftest.txt
bucketName: data-manage-fsi-1315051789
cosRegion: ap-beijing-fsi
parentFolderPath: ${wedataResourceFolder.parentFolderPath}${wedataResourceFolder.folderName}
resourceFile: /datastudio/resource/2905622749543821312/${wedataResourceFolder.parentFolderPath}${wedataResourceFolder.folderName}/test
Create WedataResourceFile Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WedataResourceFile(name: string, args: WedataResourceFileArgs, opts?: CustomResourceOptions);@overload
def WedataResourceFile(resource_name: str,
args: WedataResourceFileArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WedataResourceFile(resource_name: str,
opts: Optional[ResourceOptions] = None,
bucket_name: Optional[str] = None,
cos_region: Optional[str] = None,
parent_folder_path: Optional[str] = None,
project_id: Optional[str] = None,
resource_file: Optional[str] = None,
resource_name_: Optional[str] = None,
bundle_id: Optional[str] = None,
bundle_info: Optional[str] = None,
wedata_resource_file_id: Optional[str] = None)func NewWedataResourceFile(ctx *Context, name string, args WedataResourceFileArgs, opts ...ResourceOption) (*WedataResourceFile, error)public WedataResourceFile(string name, WedataResourceFileArgs args, CustomResourceOptions? opts = null)
public WedataResourceFile(String name, WedataResourceFileArgs args)
public WedataResourceFile(String name, WedataResourceFileArgs args, CustomResourceOptions options)
type: tencentcloud:WedataResourceFile
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args WedataResourceFileArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args WedataResourceFileArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args WedataResourceFileArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WedataResourceFileArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WedataResourceFileArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
WedataResourceFile Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The WedataResourceFile resource accepts the following input properties:
- Bucket
Name string - cos bucket name, which can be obtained from the GetResourceCosPath interface.
- Cos
Region string - The cos bucket area corresponding to the BucketName bucket.
- Parent
Folder stringPath - The path to upload resource files in the project, example value: /wedata/qxxxm/, root directory, please use/.
- Project
Id string - Project id.
- Resource
File string - You can only choose one of the two methods of uploading a file and manually filling. If both are provided, the order of values is file> manual filling value -the manual filling value must be the existing cos path, /datastudio/resource/is a fixed prefix, projectId is the project ID, and a specific value needs to be passed in, parentFolderPath is the parent folder path, name is the file name, and examples of manual filling value values are: /datastudio/resource/projectId/parentFolderPath/name .
- Resource
Name string - The resource file name should be consistent with the uploaded file name as much as possible.
- Bundle
Id string - bundle client ID.
- Bundle
Info string - bundle client information.
- Wedata
Resource stringFile Id - ID of the resource.
- Bucket
Name string - cos bucket name, which can be obtained from the GetResourceCosPath interface.
- Cos
Region string - The cos bucket area corresponding to the BucketName bucket.
- Parent
Folder stringPath - The path to upload resource files in the project, example value: /wedata/qxxxm/, root directory, please use/.
- Project
Id string - Project id.
- Resource
File string - You can only choose one of the two methods of uploading a file and manually filling. If both are provided, the order of values is file> manual filling value -the manual filling value must be the existing cos path, /datastudio/resource/is a fixed prefix, projectId is the project ID, and a specific value needs to be passed in, parentFolderPath is the parent folder path, name is the file name, and examples of manual filling value values are: /datastudio/resource/projectId/parentFolderPath/name .
- Resource
Name string - The resource file name should be consistent with the uploaded file name as much as possible.
- Bundle
Id string - bundle client ID.
- Bundle
Info string - bundle client information.
- Wedata
Resource stringFile Id - ID of the resource.
- bucket
Name String - cos bucket name, which can be obtained from the GetResourceCosPath interface.
- cos
Region String - The cos bucket area corresponding to the BucketName bucket.
- parent
Folder StringPath - The path to upload resource files in the project, example value: /wedata/qxxxm/, root directory, please use/.
- project
Id String - Project id.
- resource
File String - You can only choose one of the two methods of uploading a file and manually filling. If both are provided, the order of values is file> manual filling value -the manual filling value must be the existing cos path, /datastudio/resource/is a fixed prefix, projectId is the project ID, and a specific value needs to be passed in, parentFolderPath is the parent folder path, name is the file name, and examples of manual filling value values are: /datastudio/resource/projectId/parentFolderPath/name .
- resource
Name String - The resource file name should be consistent with the uploaded file name as much as possible.
- bundle
Id String - bundle client ID.
- bundle
Info String - bundle client information.
- wedata
Resource StringFile Id - ID of the resource.
- bucket
Name string - cos bucket name, which can be obtained from the GetResourceCosPath interface.
- cos
Region string - The cos bucket area corresponding to the BucketName bucket.
- parent
Folder stringPath - The path to upload resource files in the project, example value: /wedata/qxxxm/, root directory, please use/.
- project
Id string - Project id.
- resource
File string - You can only choose one of the two methods of uploading a file and manually filling. If both are provided, the order of values is file> manual filling value -the manual filling value must be the existing cos path, /datastudio/resource/is a fixed prefix, projectId is the project ID, and a specific value needs to be passed in, parentFolderPath is the parent folder path, name is the file name, and examples of manual filling value values are: /datastudio/resource/projectId/parentFolderPath/name .
- resource
Name string - The resource file name should be consistent with the uploaded file name as much as possible.
- bundle
Id string - bundle client ID.
- bundle
Info string - bundle client information.
- wedata
Resource stringFile Id - ID of the resource.
- bucket_
name str - cos bucket name, which can be obtained from the GetResourceCosPath interface.
- cos_
region str - The cos bucket area corresponding to the BucketName bucket.
- parent_
folder_ strpath - The path to upload resource files in the project, example value: /wedata/qxxxm/, root directory, please use/.
- project_
id str - Project id.
- resource_
file str - You can only choose one of the two methods of uploading a file and manually filling. If both are provided, the order of values is file> manual filling value -the manual filling value must be the existing cos path, /datastudio/resource/is a fixed prefix, projectId is the project ID, and a specific value needs to be passed in, parentFolderPath is the parent folder path, name is the file name, and examples of manual filling value values are: /datastudio/resource/projectId/parentFolderPath/name .
- resource_
name str - The resource file name should be consistent with the uploaded file name as much as possible.
- bundle_
id str - bundle client ID.
- bundle_
info str - bundle client information.
- wedata_
resource_ strfile_ id - ID of the resource.
- bucket
Name String - cos bucket name, which can be obtained from the GetResourceCosPath interface.
- cos
Region String - The cos bucket area corresponding to the BucketName bucket.
- parent
Folder StringPath - The path to upload resource files in the project, example value: /wedata/qxxxm/, root directory, please use/.
- project
Id String - Project id.
- resource
File String - You can only choose one of the two methods of uploading a file and manually filling. If both are provided, the order of values is file> manual filling value -the manual filling value must be the existing cos path, /datastudio/resource/is a fixed prefix, projectId is the project ID, and a specific value needs to be passed in, parentFolderPath is the parent folder path, name is the file name, and examples of manual filling value values are: /datastudio/resource/projectId/parentFolderPath/name .
- resource
Name String - The resource file name should be consistent with the uploaded file name as much as possible.
- bundle
Id String - bundle client ID.
- bundle
Info String - bundle client information.
- wedata
Resource StringFile Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the WedataResourceFile resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing WedataResourceFile Resource
Get an existing WedataResourceFile resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: WedataResourceFileState, opts?: CustomResourceOptions): WedataResourceFile@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bucket_name: Optional[str] = None,
bundle_id: Optional[str] = None,
bundle_info: Optional[str] = None,
cos_region: Optional[str] = None,
parent_folder_path: Optional[str] = None,
project_id: Optional[str] = None,
resource_file: Optional[str] = None,
resource_name: Optional[str] = None,
wedata_resource_file_id: Optional[str] = None) -> WedataResourceFilefunc GetWedataResourceFile(ctx *Context, name string, id IDInput, state *WedataResourceFileState, opts ...ResourceOption) (*WedataResourceFile, error)public static WedataResourceFile Get(string name, Input<string> id, WedataResourceFileState? state, CustomResourceOptions? opts = null)public static WedataResourceFile get(String name, Output<String> id, WedataResourceFileState state, CustomResourceOptions options)resources: _: type: tencentcloud:WedataResourceFile get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Bucket
Name string - cos bucket name, which can be obtained from the GetResourceCosPath interface.
- Bundle
Id string - bundle client ID.
- Bundle
Info string - bundle client information.
- Cos
Region string - The cos bucket area corresponding to the BucketName bucket.
- Parent
Folder stringPath - The path to upload resource files in the project, example value: /wedata/qxxxm/, root directory, please use/.
- Project
Id string - Project id.
- Resource
File string - You can only choose one of the two methods of uploading a file and manually filling. If both are provided, the order of values is file> manual filling value -the manual filling value must be the existing cos path, /datastudio/resource/is a fixed prefix, projectId is the project ID, and a specific value needs to be passed in, parentFolderPath is the parent folder path, name is the file name, and examples of manual filling value values are: /datastudio/resource/projectId/parentFolderPath/name .
- Resource
Name string - The resource file name should be consistent with the uploaded file name as much as possible.
- Wedata
Resource stringFile Id - ID of the resource.
- Bucket
Name string - cos bucket name, which can be obtained from the GetResourceCosPath interface.
- Bundle
Id string - bundle client ID.
- Bundle
Info string - bundle client information.
- Cos
Region string - The cos bucket area corresponding to the BucketName bucket.
- Parent
Folder stringPath - The path to upload resource files in the project, example value: /wedata/qxxxm/, root directory, please use/.
- Project
Id string - Project id.
- Resource
File string - You can only choose one of the two methods of uploading a file and manually filling. If both are provided, the order of values is file> manual filling value -the manual filling value must be the existing cos path, /datastudio/resource/is a fixed prefix, projectId is the project ID, and a specific value needs to be passed in, parentFolderPath is the parent folder path, name is the file name, and examples of manual filling value values are: /datastudio/resource/projectId/parentFolderPath/name .
- Resource
Name string - The resource file name should be consistent with the uploaded file name as much as possible.
- Wedata
Resource stringFile Id - ID of the resource.
- bucket
Name String - cos bucket name, which can be obtained from the GetResourceCosPath interface.
- bundle
Id String - bundle client ID.
- bundle
Info String - bundle client information.
- cos
Region String - The cos bucket area corresponding to the BucketName bucket.
- parent
Folder StringPath - The path to upload resource files in the project, example value: /wedata/qxxxm/, root directory, please use/.
- project
Id String - Project id.
- resource
File String - You can only choose one of the two methods of uploading a file and manually filling. If both are provided, the order of values is file> manual filling value -the manual filling value must be the existing cos path, /datastudio/resource/is a fixed prefix, projectId is the project ID, and a specific value needs to be passed in, parentFolderPath is the parent folder path, name is the file name, and examples of manual filling value values are: /datastudio/resource/projectId/parentFolderPath/name .
- resource
Name String - The resource file name should be consistent with the uploaded file name as much as possible.
- wedata
Resource StringFile Id - ID of the resource.
- bucket
Name string - cos bucket name, which can be obtained from the GetResourceCosPath interface.
- bundle
Id string - bundle client ID.
- bundle
Info string - bundle client information.
- cos
Region string - The cos bucket area corresponding to the BucketName bucket.
- parent
Folder stringPath - The path to upload resource files in the project, example value: /wedata/qxxxm/, root directory, please use/.
- project
Id string - Project id.
- resource
File string - You can only choose one of the two methods of uploading a file and manually filling. If both are provided, the order of values is file> manual filling value -the manual filling value must be the existing cos path, /datastudio/resource/is a fixed prefix, projectId is the project ID, and a specific value needs to be passed in, parentFolderPath is the parent folder path, name is the file name, and examples of manual filling value values are: /datastudio/resource/projectId/parentFolderPath/name .
- resource
Name string - The resource file name should be consistent with the uploaded file name as much as possible.
- wedata
Resource stringFile Id - ID of the resource.
- bucket_
name str - cos bucket name, which can be obtained from the GetResourceCosPath interface.
- bundle_
id str - bundle client ID.
- bundle_
info str - bundle client information.
- cos_
region str - The cos bucket area corresponding to the BucketName bucket.
- parent_
folder_ strpath - The path to upload resource files in the project, example value: /wedata/qxxxm/, root directory, please use/.
- project_
id str - Project id.
- resource_
file str - You can only choose one of the two methods of uploading a file and manually filling. If both are provided, the order of values is file> manual filling value -the manual filling value must be the existing cos path, /datastudio/resource/is a fixed prefix, projectId is the project ID, and a specific value needs to be passed in, parentFolderPath is the parent folder path, name is the file name, and examples of manual filling value values are: /datastudio/resource/projectId/parentFolderPath/name .
- resource_
name str - The resource file name should be consistent with the uploaded file name as much as possible.
- wedata_
resource_ strfile_ id - ID of the resource.
- bucket
Name String - cos bucket name, which can be obtained from the GetResourceCosPath interface.
- bundle
Id String - bundle client ID.
- bundle
Info String - bundle client information.
- cos
Region String - The cos bucket area corresponding to the BucketName bucket.
- parent
Folder StringPath - The path to upload resource files in the project, example value: /wedata/qxxxm/, root directory, please use/.
- project
Id String - Project id.
- resource
File String - You can only choose one of the two methods of uploading a file and manually filling. If both are provided, the order of values is file> manual filling value -the manual filling value must be the existing cos path, /datastudio/resource/is a fixed prefix, projectId is the project ID, and a specific value needs to be passed in, parentFolderPath is the parent folder path, name is the file name, and examples of manual filling value values are: /datastudio/resource/projectId/parentFolderPath/name .
- resource
Name String - The resource file name should be consistent with the uploaded file name as much as possible.
- wedata
Resource StringFile Id - ID of the resource.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloudTerraform Provider.
