Class Constraint


  • public class Constraint
    extends com.pulumi.resources.CustomResource
    Manages a Service Catalog Constraint. > **NOTE:** This resource does not associate a Service Catalog product and portfolio. However, the product and portfolio must be associated (see the `aws.servicecatalog.ProductPortfolioAssociation` resource) prior to creating a constraint or you will receive an error. ## Example Usage ### Basic Usage <!--Start PulumiCodeChooser -->
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.servicecatalog.Constraint;
     import com.pulumi.aws.servicecatalog.ConstraintArgs;
     import static com.pulumi.codegen.internal.Serialization.*;
     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 example = new Constraint("example", ConstraintArgs.builder()        
                 .description("Back off, man. I'm a scientist.")
                 .portfolioId(exampleAwsServicecatalogPortfolio.id())
                 .productId(exampleAwsServicecatalogProduct.id())
                 .type("LAUNCH")
                 .parameters(serializeJson(
                     jsonObject(
                         jsonProperty("RoleArn", "arn:aws:iam::123456789012:role/LaunchRole")
                     )))
                 .build());
     
         }
     }
     
     
    <!--End PulumiCodeChooser --> ## Import Using `pulumi import`, import `aws_servicecatalog_constraint` using the constraint ID. For example: ```sh $ pulumi import aws:servicecatalog/constraint:Constraint example cons-nmdkb6cgxfcrs ```
    • 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
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> acceptLanguage()  
      com.pulumi.core.Output<java.lang.String> description()  
      static Constraint get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ConstraintState 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.lang.String> owner()  
      com.pulumi.core.Output<java.lang.String> parameters()  
      com.pulumi.core.Output<java.lang.String> portfolioId()  
      com.pulumi.core.Output<java.lang.String> productId()  
      com.pulumi.core.Output<java.lang.String> status()  
      com.pulumi.core.Output<java.lang.String> type()  
      • 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

      • Constraint

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

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

        public Constraint​(java.lang.String name,
                          ConstraintArgs 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

      • acceptLanguage

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> acceptLanguage()
        Returns:
        Language code. Valid values: `en` (English), `jp` (Japanese), `zh` (Chinese). Default value is `en`.
      • description

        public com.pulumi.core.Output<java.lang.String> description()
        Returns:
        Description of the constraint.
      • owner

        public com.pulumi.core.Output<java.lang.String> owner()
        Returns:
        Owner of the constraint.
      • parameters

        public com.pulumi.core.Output<java.lang.String> parameters()
        Returns:
        Constraint parameters in JSON format. The syntax depends on the constraint type. See details below.
      • portfolioId

        public com.pulumi.core.Output<java.lang.String> portfolioId()
        Returns:
        Portfolio identifier.
      • productId

        public com.pulumi.core.Output<java.lang.String> productId()
        Returns:
        Product identifier.
      • status

        public com.pulumi.core.Output<java.lang.String> status()
      • type

        public com.pulumi.core.Output<java.lang.String> type()
        Returns:
        Type of constraint. Valid values are `LAUNCH`, `NOTIFICATION`, `RESOURCE_UPDATE`, `STACKSET`, and `TEMPLATE`. The following arguments are optional:
      • get

        public static Constraint get​(java.lang.String name,
                                     com.pulumi.core.Output<java.lang.String> id,
                                     @Nullable
                                     ConstraintState 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.