1. Packages
  2. Google Cloud Native
  3. API Docs
  4. orgpolicy
  5. orgpolicy/v2
  6. getCustomConstraint

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

google-native.orgpolicy/v2.getCustomConstraint

Explore with Pulumi AI

google-native logo

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

    Gets a custom constraint. Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the custom constraint does not exist.

    Using getCustomConstraint

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getCustomConstraint(args: GetCustomConstraintArgs, opts?: InvokeOptions): Promise<GetCustomConstraintResult>
    function getCustomConstraintOutput(args: GetCustomConstraintOutputArgs, opts?: InvokeOptions): Output<GetCustomConstraintResult>
    def get_custom_constraint(custom_constraint_id: Optional[str] = None,
                              organization_id: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetCustomConstraintResult
    def get_custom_constraint_output(custom_constraint_id: Optional[pulumi.Input[str]] = None,
                              organization_id: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetCustomConstraintResult]
    func LookupCustomConstraint(ctx *Context, args *LookupCustomConstraintArgs, opts ...InvokeOption) (*LookupCustomConstraintResult, error)
    func LookupCustomConstraintOutput(ctx *Context, args *LookupCustomConstraintOutputArgs, opts ...InvokeOption) LookupCustomConstraintResultOutput

    > Note: This function is named LookupCustomConstraint in the Go SDK.

    public static class GetCustomConstraint 
    {
        public static Task<GetCustomConstraintResult> InvokeAsync(GetCustomConstraintArgs args, InvokeOptions? opts = null)
        public static Output<GetCustomConstraintResult> Invoke(GetCustomConstraintInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCustomConstraintResult> getCustomConstraint(GetCustomConstraintArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: google-native:orgpolicy/v2:getCustomConstraint
      arguments:
        # arguments dictionary

    The following arguments are supported:

    getCustomConstraint Result

    The following output properties are available:

    ActionType string
    Allow or deny type.
    Condition string
    Org policy condition/expression. For example: resource.instanceName.matches("[production|test]_.*_(\d)+") or, resource.management.auto_upgrade == true The max length of the condition is 1000 characters.
    Description string
    Detailed information about this custom policy constraint. The max length of the description is 2000 characters.
    DisplayName string
    One line display name for the UI. The max length of the display_name is 200 characters.
    MethodTypes List<string>
    All the operations being applied for this constraint.
    Name string
    Immutable. Name of the constraint. This is unique within the organization. Format of the name should be * organizations/{organization_id}/customConstraints/{custom_constraint_id} Example: organizations/123/customConstraints/custom.createOnlyE2TypeVms The max length is 70 characters and the minimum length is 1. Note that the prefix organizations/{organization_id}/customConstraints/ is not counted.
    ResourceTypes List<string>
    Immutable. The resource instance type on which this policy applies. Format will be of the form : / Example: * compute.googleapis.com/Instance.
    UpdateTime string
    The last time this custom constraint was updated. This represents the last time that the CreateCustomConstraint or UpdateCustomConstraint RPC was called
    ActionType string
    Allow or deny type.
    Condition string
    Org policy condition/expression. For example: resource.instanceName.matches("[production|test]_.*_(\d)+") or, resource.management.auto_upgrade == true The max length of the condition is 1000 characters.
    Description string
    Detailed information about this custom policy constraint. The max length of the description is 2000 characters.
    DisplayName string
    One line display name for the UI. The max length of the display_name is 200 characters.
    MethodTypes []string
    All the operations being applied for this constraint.
    Name string
    Immutable. Name of the constraint. This is unique within the organization. Format of the name should be * organizations/{organization_id}/customConstraints/{custom_constraint_id} Example: organizations/123/customConstraints/custom.createOnlyE2TypeVms The max length is 70 characters and the minimum length is 1. Note that the prefix organizations/{organization_id}/customConstraints/ is not counted.
    ResourceTypes []string
    Immutable. The resource instance type on which this policy applies. Format will be of the form : / Example: * compute.googleapis.com/Instance.
    UpdateTime string
    The last time this custom constraint was updated. This represents the last time that the CreateCustomConstraint or UpdateCustomConstraint RPC was called
    actionType String
    Allow or deny type.
    condition String
    Org policy condition/expression. For example: resource.instanceName.matches("[production|test]_.*_(\d)+") or, resource.management.auto_upgrade == true The max length of the condition is 1000 characters.
    description String
    Detailed information about this custom policy constraint. The max length of the description is 2000 characters.
    displayName String
    One line display name for the UI. The max length of the display_name is 200 characters.
    methodTypes List<String>
    All the operations being applied for this constraint.
    name String
    Immutable. Name of the constraint. This is unique within the organization. Format of the name should be * organizations/{organization_id}/customConstraints/{custom_constraint_id} Example: organizations/123/customConstraints/custom.createOnlyE2TypeVms The max length is 70 characters and the minimum length is 1. Note that the prefix organizations/{organization_id}/customConstraints/ is not counted.
    resourceTypes List<String>
    Immutable. The resource instance type on which this policy applies. Format will be of the form : / Example: * compute.googleapis.com/Instance.
    updateTime String
    The last time this custom constraint was updated. This represents the last time that the CreateCustomConstraint or UpdateCustomConstraint RPC was called
    actionType string
    Allow or deny type.
    condition string
    Org policy condition/expression. For example: resource.instanceName.matches("[production|test]_.*_(\d)+") or, resource.management.auto_upgrade == true The max length of the condition is 1000 characters.
    description string
    Detailed information about this custom policy constraint. The max length of the description is 2000 characters.
    displayName string
    One line display name for the UI. The max length of the display_name is 200 characters.
    methodTypes string[]
    All the operations being applied for this constraint.
    name string
    Immutable. Name of the constraint. This is unique within the organization. Format of the name should be * organizations/{organization_id}/customConstraints/{custom_constraint_id} Example: organizations/123/customConstraints/custom.createOnlyE2TypeVms The max length is 70 characters and the minimum length is 1. Note that the prefix organizations/{organization_id}/customConstraints/ is not counted.
    resourceTypes string[]
    Immutable. The resource instance type on which this policy applies. Format will be of the form : / Example: * compute.googleapis.com/Instance.
    updateTime string
    The last time this custom constraint was updated. This represents the last time that the CreateCustomConstraint or UpdateCustomConstraint RPC was called
    action_type str
    Allow or deny type.
    condition str
    Org policy condition/expression. For example: resource.instanceName.matches("[production|test]_.*_(\d)+") or, resource.management.auto_upgrade == true The max length of the condition is 1000 characters.
    description str
    Detailed information about this custom policy constraint. The max length of the description is 2000 characters.
    display_name str
    One line display name for the UI. The max length of the display_name is 200 characters.
    method_types Sequence[str]
    All the operations being applied for this constraint.
    name str
    Immutable. Name of the constraint. This is unique within the organization. Format of the name should be * organizations/{organization_id}/customConstraints/{custom_constraint_id} Example: organizations/123/customConstraints/custom.createOnlyE2TypeVms The max length is 70 characters and the minimum length is 1. Note that the prefix organizations/{organization_id}/customConstraints/ is not counted.
    resource_types Sequence[str]
    Immutable. The resource instance type on which this policy applies. Format will be of the form : / Example: * compute.googleapis.com/Instance.
    update_time str
    The last time this custom constraint was updated. This represents the last time that the CreateCustomConstraint or UpdateCustomConstraint RPC was called
    actionType String
    Allow or deny type.
    condition String
    Org policy condition/expression. For example: resource.instanceName.matches("[production|test]_.*_(\d)+") or, resource.management.auto_upgrade == true The max length of the condition is 1000 characters.
    description String
    Detailed information about this custom policy constraint. The max length of the description is 2000 characters.
    displayName String
    One line display name for the UI. The max length of the display_name is 200 characters.
    methodTypes List<String>
    All the operations being applied for this constraint.
    name String
    Immutable. Name of the constraint. This is unique within the organization. Format of the name should be * organizations/{organization_id}/customConstraints/{custom_constraint_id} Example: organizations/123/customConstraints/custom.createOnlyE2TypeVms The max length is 70 characters and the minimum length is 1. Note that the prefix organizations/{organization_id}/customConstraints/ is not counted.
    resourceTypes List<String>
    Immutable. The resource instance type on which this policy applies. Format will be of the form : / Example: * compute.googleapis.com/Instance.
    updateTime String
    The last time this custom constraint was updated. This represents the last time that the CreateCustomConstraint or UpdateCustomConstraint RPC was called

    Package Details

    Repository
    Google Cloud Native pulumi/pulumi-google-native
    License
    Apache-2.0
    google-native logo

    Google Cloud Native is in preview. Google Cloud Classic is fully supported.

    Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi