Class FormType


  • public class FormType
    extends com.pulumi.resources.CustomResource
    Resource for managing an AWS DataZone Form Type. ## Example Usage ### Basic Usage
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.iam.Role;
     import com.pulumi.aws.iam.RoleArgs;
     import com.pulumi.aws.iam.inputs.RoleInlinePolicyArgs;
     import com.pulumi.aws.datazone.Domain;
     import com.pulumi.aws.datazone.DomainArgs;
     import com.pulumi.aws.ec2.SecurityGroup;
     import com.pulumi.aws.ec2.SecurityGroupArgs;
     import com.pulumi.aws.datazone.Project;
     import com.pulumi.aws.datazone.ProjectArgs;
     import com.pulumi.aws.datazone.FormType;
     import com.pulumi.aws.datazone.FormTypeArgs;
     import com.pulumi.aws.datazone.inputs.FormTypeModelArgs;
     import static com.pulumi.codegen.internal.Serialization.*;
     import java.util.ArrayList;
     import java.util.Arrays;
     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 domainExecutionRole = new Role("domainExecutionRole", RoleArgs.builder()
                 .inlinePolicies(RoleInlinePolicyArgs.builder()
                     .name("example-policy")
                     .policy(serializeJson(
                         jsonObject(
                             jsonProperty("Version", "2012-10-17"),
                             jsonProperty("Statement", jsonArray(jsonObject(
                                 jsonProperty("Action", jsonArray(
                                     "datazone:*", 
                                     "ram:*", 
                                     "sso:*", 
                                     "kms:*"
                                 )),
                                 jsonProperty("Effect", "Allow"),
                                 jsonProperty("Resource", "*")
                             )))
                         )))
                     .build())
                 .name("example-role")
                 .assumeRolePolicy(serializeJson(
                     jsonObject(
                         jsonProperty("Version", "2012-10-17"),
                         jsonProperty("Statement", jsonArray(
                             jsonObject(
                                 jsonProperty("Action", jsonArray(
                                     "sts:AssumeRole", 
                                     "sts:TagSession"
                                 )),
                                 jsonProperty("Effect", "Allow"),
                                 jsonProperty("Principal", jsonObject(
                                     jsonProperty("Service", "datazone.amazonaws.com")
                                 ))
                             ), 
                             jsonObject(
                                 jsonProperty("Action", jsonArray(
                                     "sts:AssumeRole", 
                                     "sts:TagSession"
                                 )),
                                 jsonProperty("Effect", "Allow"),
                                 jsonProperty("Principal", jsonObject(
                                     jsonProperty("Service", "cloudformation.amazonaws.com")
                                 ))
                             )
                         ))
                     )))
                 .build());
     
             var test = new Domain("test", DomainArgs.builder()
                 .name("example")
                 .domainExecutionRole(domainExecutionRole.arn())
                 .build());
     
             var testSecurityGroup = new SecurityGroup("testSecurityGroup", SecurityGroupArgs.builder()
                 .name("example")
                 .build());
     
             var testProject = new Project("testProject", ProjectArgs.builder()
                 .domainIdentifier(test.id())
                 .glossaryTerms("2N8w6XJCwZf")
                 .name("example name")
                 .description("desc")
                 .skipDeletionCheck(true)
                 .build());
     
             var testFormType = new FormType("testFormType", FormTypeArgs.builder()
                 .model(FormTypeModelArgs.builder()
                     .smithy("""
     \tstructure SageMakerModelFormType {
     \t\t\t@required
     \t\t\t@amazon.datazone#searchable
     \t\t\tmodelName: String
     
     \t\t\t@required
     \t\t\tmodelArn: String
     
     \t\t\t@required
     \t\t\tcreationTime: String
     \t\t\t}
                     """)
                     .build())
                 .description("desc")
                 .name("SageMakerModelFormType")
                 .domainIdentifier(test.id())
                 .owningProjectIdentifier(testProject.id())
                 .status("DISABLED")
                 .build());
     
         }
     }
     
     
    ## Import ### Identity Schema #### Required * `domainIdentifier` - (String) Identifier of the DataZone domain. * `name` - (String) Name of the form type. * `revision` - (String) Revision of the form type. #### Optional * `accountId` (String) AWS Account where this resource is managed. * `region` (String) Region where this resource is managed. Using `pulumi import`, import DataZone Form Type using a comma separated value of `domainIdentifier`,`name`,`revision`. For example: ```sh $ pulumi import aws:datazone/formType:FormType example domain_identifier,name,revision ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Constructor Summary

      Constructors 
      Constructor Description
      FormType​(java.lang.String name)  
      FormType​(java.lang.String name, FormTypeArgs args)  
      FormType​(java.lang.String name, FormTypeArgs args, com.pulumi.resources.CustomResourceOptions options)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> createdAt()  
      com.pulumi.core.Output<java.lang.String> createdBy()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()  
      com.pulumi.core.Output<java.lang.String> domainIdentifier()  
      static FormType get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, FormTypeState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.util.List<FormTypeImport>> imports()  
      com.pulumi.core.Output<FormTypeModel> model()  
      com.pulumi.core.Output<java.lang.String> name()  
      com.pulumi.core.Output<java.lang.String> originDomainId()  
      com.pulumi.core.Output<java.lang.String> originProjectId()  
      com.pulumi.core.Output<java.lang.String> owningProjectIdentifier()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.lang.String> revision()  
      com.pulumi.core.Output<java.lang.String> status()  
      com.pulumi.core.Output<java.util.Optional<FormTypeTimeouts>> timeouts()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FormType

        public FormType​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • FormType

        public FormType​(java.lang.String name,
                        FormTypeArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • FormType

        public FormType​(java.lang.String name,
                        FormTypeArgs args,
                        @Nullable
                        com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • createdAt

        public com.pulumi.core.Output<java.lang.String> createdAt()
        Returns:
        Creation time of the Form Type.
      • createdBy

        public com.pulumi.core.Output<java.lang.String> createdBy()
        Returns:
        Creator of the Form Type.
      • description

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
        Returns:
        Description of form type. Must have a length of between 1 and 2048 characters.
      • domainIdentifier

        public com.pulumi.core.Output<java.lang.String> domainIdentifier()
        Returns:
        Identifier of the domain.
      • imports

        public com.pulumi.core.Output<java.util.List<FormTypeImport>> imports()
      • model

        public com.pulumi.core.Output<FormTypeModel> model()
        Returns:
        Object of the model of the form type that contains the following attributes.
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        Name of the form type. Must be the name of the structure in smithy document.
      • originDomainId

        public com.pulumi.core.Output<java.lang.String> originDomainId()
        Returns:
        Origin domain ID of the Form Type.
      • originProjectId

        public com.pulumi.core.Output<java.lang.String> originProjectId()
        Returns:
        Origin project ID of the Form Type.
      • owningProjectIdentifier

        public com.pulumi.core.Output<java.lang.String> owningProjectIdentifier()
        Returns:
        Identifier of project that owns the form type. Must follow regex of ^[a-zA-Z0-9_-]{1,36}.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        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.
      • revision

        public com.pulumi.core.Output<java.lang.String> revision()
        Returns:
        Revision of the Form Type.
      • status

        public com.pulumi.core.Output<java.lang.String> status()
        Returns:
        Status of form type. Must be "ENABLED" or "DISABLED" If status is set to "ENABLED" terraform cannot delete the resource until it is manually changed in the AWS console.
      • timeouts

        public com.pulumi.core.Output<java.util.Optional<FormTypeTimeouts>> timeouts()
      • get

        public static FormType get​(java.lang.String name,
                                   com.pulumi.core.Output<java.lang.String> id,
                                   @Nullable
                                   FormTypeState state,
                                   @Nullable
                                   com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.