alicloud.imm.Project
Explore with Pulumi AI
Provides a Intelligent Media Management Project resource.
For information about Intelligent Media Management Project and how to use it, see What is Project.
NOTE: Available since v1.134.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "tfexample";
const role = new alicloud.ram.Role("role", {
name: name,
document: ` {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": [
"imm.aliyuncs.com"
]
}
}
],
"Version": "1"
}
`,
description: "this is a role test.",
force: true,
});
const example = new alicloud.imm.Project("example", {
project: name,
serviceRole: role.name,
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tfexample"
role = alicloud.ram.Role("role",
name=name,
document=""" {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": [
"imm.aliyuncs.com"
]
}
}
],
"Version": "1"
}
""",
description="this is a role test.",
force=True)
example = alicloud.imm.Project("example",
project=name,
service_role=role.name)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/imm"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ram"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "tfexample"
if param := cfg.Get("name"); param != "" {
name = param
}
role, err := ram.NewRole(ctx, "role", &ram.RoleArgs{
Name: pulumi.String(name),
Document: pulumi.String(` {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": [
"imm.aliyuncs.com"
]
}
}
],
"Version": "1"
}
`),
Description: pulumi.String("this is a role test."),
Force: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = imm.NewProject(ctx, "example", &imm.ProjectArgs{
Project: pulumi.String(name),
ServiceRole: role.Name,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "tfexample";
var role = new AliCloud.Ram.Role("role", new()
{
Name = name,
Document = @" {
""Statement"": [
{
""Action"": ""sts:AssumeRole"",
""Effect"": ""Allow"",
""Principal"": {
""Service"": [
""imm.aliyuncs.com""
]
}
}
],
""Version"": ""1""
}
",
Description = "this is a role test.",
Force = true,
});
var example = new AliCloud.Imm.Project("example", new()
{
ProjectName = name,
ServiceRole = role.Name,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ram.Role;
import com.pulumi.alicloud.ram.RoleArgs;
import com.pulumi.alicloud.imm.Project;
import com.pulumi.alicloud.imm.ProjectArgs;
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) {
final var config = ctx.config();
final var name = config.get("name").orElse("tfexample");
var role = new Role("role", RoleArgs.builder()
.name(name)
.document("""
{
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": [
"imm.aliyuncs.com"
]
}
}
],
"Version": "1"
}
""")
.description("this is a role test.")
.force(true)
.build());
var example = new Project("example", ProjectArgs.builder()
.project(name)
.serviceRole(role.name())
.build());
}
}
configuration:
name:
type: string
default: tfexample
resources:
role:
type: alicloud:ram:Role
properties:
name: ${name}
document: |2
{
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": [
"imm.aliyuncs.com"
]
}
}
],
"Version": "1"
}
description: this is a role test.
force: true
example:
type: alicloud:imm:Project
properties:
project: ${name}
serviceRole: ${role.name}
Create Project Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Project(name: string, args: ProjectArgs, opts?: CustomResourceOptions);
@overload
def Project(resource_name: str,
args: ProjectArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Project(resource_name: str,
opts: Optional[ResourceOptions] = None,
project: Optional[str] = None,
service_role: Optional[str] = None)
func NewProject(ctx *Context, name string, args ProjectArgs, opts ...ResourceOption) (*Project, error)
public Project(string name, ProjectArgs args, CustomResourceOptions? opts = null)
public Project(String name, ProjectArgs args)
public Project(String name, ProjectArgs args, CustomResourceOptions options)
type: alicloud:imm:Project
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 ProjectArgs
- 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 ProjectArgs
- 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 ProjectArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProjectArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ProjectArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var alicloudProjectResource = new AliCloud.Imm.Project("alicloudProjectResource", new()
{
ProjectName = "string",
ServiceRole = "string",
});
example, err := imm.NewProject(ctx, "alicloudProjectResource", &imm.ProjectArgs{
Project: pulumi.String("string"),
ServiceRole: pulumi.String("string"),
})
var alicloudProjectResource = new Project("alicloudProjectResource", ProjectArgs.builder()
.project("string")
.serviceRole("string")
.build());
alicloud_project_resource = alicloud.imm.Project("alicloudProjectResource",
project="string",
service_role="string")
const alicloudProjectResource = new alicloud.imm.Project("alicloudProjectResource", {
project: "string",
serviceRole: "string",
});
type: alicloud:imm:Project
properties:
project: string
serviceRole: string
Project Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Project resource accepts the following input properties:
- Project
Name string - The name of Project.
- Service
Role string - The service role authorized to the Intelligent Media Management service to access other cloud resources. Default value:
AliyunIMMDefaultRole
. You can also create authorization roles through thealicloud.ram.Role
.
- Project string
- The name of Project.
- Service
Role string - The service role authorized to the Intelligent Media Management service to access other cloud resources. Default value:
AliyunIMMDefaultRole
. You can also create authorization roles through thealicloud.ram.Role
.
- project String
- The name of Project.
- service
Role String - The service role authorized to the Intelligent Media Management service to access other cloud resources. Default value:
AliyunIMMDefaultRole
. You can also create authorization roles through thealicloud.ram.Role
.
- project string
- The name of Project.
- service
Role string - The service role authorized to the Intelligent Media Management service to access other cloud resources. Default value:
AliyunIMMDefaultRole
. You can also create authorization roles through thealicloud.ram.Role
.
- project str
- The name of Project.
- service_
role str - The service role authorized to the Intelligent Media Management service to access other cloud resources. Default value:
AliyunIMMDefaultRole
. You can also create authorization roles through thealicloud.ram.Role
.
- project String
- The name of Project.
- service
Role String - The service role authorized to the Intelligent Media Management service to access other cloud resources. Default value:
AliyunIMMDefaultRole
. You can also create authorization roles through thealicloud.ram.Role
.
Outputs
All input properties are implicitly available as output properties. Additionally, the Project 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 Project Resource
Get an existing Project 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?: ProjectState, opts?: CustomResourceOptions): Project
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
project: Optional[str] = None,
service_role: Optional[str] = None) -> Project
func GetProject(ctx *Context, name string, id IDInput, state *ProjectState, opts ...ResourceOption) (*Project, error)
public static Project Get(string name, Input<string> id, ProjectState? state, CustomResourceOptions? opts = null)
public static Project get(String name, Output<String> id, ProjectState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Project
Name string - The name of Project.
- Service
Role string - The service role authorized to the Intelligent Media Management service to access other cloud resources. Default value:
AliyunIMMDefaultRole
. You can also create authorization roles through thealicloud.ram.Role
.
- Project string
- The name of Project.
- Service
Role string - The service role authorized to the Intelligent Media Management service to access other cloud resources. Default value:
AliyunIMMDefaultRole
. You can also create authorization roles through thealicloud.ram.Role
.
- project String
- The name of Project.
- service
Role String - The service role authorized to the Intelligent Media Management service to access other cloud resources. Default value:
AliyunIMMDefaultRole
. You can also create authorization roles through thealicloud.ram.Role
.
- project string
- The name of Project.
- service
Role string - The service role authorized to the Intelligent Media Management service to access other cloud resources. Default value:
AliyunIMMDefaultRole
. You can also create authorization roles through thealicloud.ram.Role
.
- project str
- The name of Project.
- service_
role str - The service role authorized to the Intelligent Media Management service to access other cloud resources. Default value:
AliyunIMMDefaultRole
. You can also create authorization roles through thealicloud.ram.Role
.
- project String
- The name of Project.
- service
Role String - The service role authorized to the Intelligent Media Management service to access other cloud resources. Default value:
AliyunIMMDefaultRole
. You can also create authorization roles through thealicloud.ram.Role
.
Import
Intelligent Media Management Project can be imported using the id, e.g.
$ pulumi import alicloud:imm/project:Project example <project>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.