1. Packages
  2. Ibm Provider
  3. API Docs
  4. getCodeEngineBinding
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getCodeEngineBinding

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Provides a read-only data source to retrieve information about a code_engine_binding. You can then reference the fields of the data source in other resources within the same configuration by using interpolation syntax.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const codeEngineBinding = ibm.getCodeEngineBinding({
        bindingId: "a172ced-b5f21bc-71ba50c-1638604",
        projectId: ibm_code_engine_binding.code_engine_binding_instance.project_id,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    code_engine_binding = ibm.get_code_engine_binding(binding_id="a172ced-b5f21bc-71ba50c-1638604",
        project_id=ibm_code_engine_binding["code_engine_binding_instance"]["project_id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.LookupCodeEngineBinding(ctx, &ibm.LookupCodeEngineBindingArgs{
    			BindingId: "a172ced-b5f21bc-71ba50c-1638604",
    			ProjectId: ibm_code_engine_binding.Code_engine_binding_instance.Project_id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var codeEngineBinding = Ibm.GetCodeEngineBinding.Invoke(new()
        {
            BindingId = "a172ced-b5f21bc-71ba50c-1638604",
            ProjectId = ibm_code_engine_binding.Code_engine_binding_instance.Project_id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetCodeEngineBindingArgs;
    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 codeEngineBinding = IbmFunctions.getCodeEngineBinding(GetCodeEngineBindingArgs.builder()
                .bindingId("a172ced-b5f21bc-71ba50c-1638604")
                .projectId(ibm_code_engine_binding.code_engine_binding_instance().project_id())
                .build());
    
        }
    }
    
    variables:
      codeEngineBinding:
        fn::invoke:
          function: ibm:getCodeEngineBinding
          arguments:
            bindingId: a172ced-b5f21bc-71ba50c-1638604
            projectId: ${ibm_code_engine_binding.code_engine_binding_instance.project_id}
    

    Using getCodeEngineBinding

    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 getCodeEngineBinding(args: GetCodeEngineBindingArgs, opts?: InvokeOptions): Promise<GetCodeEngineBindingResult>
    function getCodeEngineBindingOutput(args: GetCodeEngineBindingOutputArgs, opts?: InvokeOptions): Output<GetCodeEngineBindingResult>
    def get_code_engine_binding(binding_id: Optional[str] = None,
                                id: Optional[str] = None,
                                project_id: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetCodeEngineBindingResult
    def get_code_engine_binding_output(binding_id: Optional[pulumi.Input[str]] = None,
                                id: Optional[pulumi.Input[str]] = None,
                                project_id: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetCodeEngineBindingResult]
    func LookupCodeEngineBinding(ctx *Context, args *LookupCodeEngineBindingArgs, opts ...InvokeOption) (*LookupCodeEngineBindingResult, error)
    func LookupCodeEngineBindingOutput(ctx *Context, args *LookupCodeEngineBindingOutputArgs, opts ...InvokeOption) LookupCodeEngineBindingResultOutput

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

    public static class GetCodeEngineBinding 
    {
        public static Task<GetCodeEngineBindingResult> InvokeAsync(GetCodeEngineBindingArgs args, InvokeOptions? opts = null)
        public static Output<GetCodeEngineBindingResult> Invoke(GetCodeEngineBindingInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCodeEngineBindingResult> getCodeEngineBinding(GetCodeEngineBindingArgs args, InvokeOptions options)
    public static Output<GetCodeEngineBindingResult> getCodeEngineBinding(GetCodeEngineBindingArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getCodeEngineBinding:getCodeEngineBinding
      arguments:
        # arguments dictionary

    The following arguments are supported:

    BindingId string
    The id of your binding.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /.+/.
    ProjectId string
    The ID of the project.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$/.
    Id string
    The unique identifier of the code_engine_binding.
    BindingId string
    The id of your binding.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /.+/.
    ProjectId string
    The ID of the project.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$/.
    Id string
    The unique identifier of the code_engine_binding.
    bindingId String
    The id of your binding.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /.+/.
    projectId String
    The ID of the project.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$/.
    id String
    The unique identifier of the code_engine_binding.
    bindingId string
    The id of your binding.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /.+/.
    projectId string
    The ID of the project.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$/.
    id string
    The unique identifier of the code_engine_binding.
    binding_id str
    The id of your binding.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /.+/.
    project_id str
    The ID of the project.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$/.
    id str
    The unique identifier of the code_engine_binding.
    bindingId String
    The id of your binding.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /.+/.
    projectId String
    The ID of the project.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$/.
    id String
    The unique identifier of the code_engine_binding.

    getCodeEngineBinding Result

    The following output properties are available:

    BindingId string
    Components List<GetCodeEngineBindingComponent>
    (List) A reference to another component. Nested schema for component:
    Href string
    (String) When you provision a new binding, a URL is created identifying the location of the instance.

    • Constraints: The maximum length is 2048 characters. The minimum length is 0 characters. The value must match regular expression /(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/.
    Id string
    The unique identifier of the code_engine_binding.
    Prefix string
    (String) The value that is set as a prefix in the component that is bound.

    • Constraints: The maximum length is 31 characters. The minimum length is 0 characters. The value must match regular expression /^A-Z*$/.
    ProjectId string
    ResourceType string
    (String) The type of the binding.

    • Constraints: Allowable values are: binding_v2.
    SecretName string
    (String) The service access secret that is bound to a component.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^a-z0-9?(\\.a-z0-9?)*$/.
    Status string
    (String) The current status of the binding.
    BindingId string
    Components []GetCodeEngineBindingComponent
    (List) A reference to another component. Nested schema for component:
    Href string
    (String) When you provision a new binding, a URL is created identifying the location of the instance.

    • Constraints: The maximum length is 2048 characters. The minimum length is 0 characters. The value must match regular expression /(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/.
    Id string
    The unique identifier of the code_engine_binding.
    Prefix string
    (String) The value that is set as a prefix in the component that is bound.

    • Constraints: The maximum length is 31 characters. The minimum length is 0 characters. The value must match regular expression /^A-Z*$/.
    ProjectId string
    ResourceType string
    (String) The type of the binding.

    • Constraints: Allowable values are: binding_v2.
    SecretName string
    (String) The service access secret that is bound to a component.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^a-z0-9?(\\.a-z0-9?)*$/.
    Status string
    (String) The current status of the binding.
    bindingId String
    components List<GetCodeEngineBindingComponent>
    (List) A reference to another component. Nested schema for component:
    href String
    (String) When you provision a new binding, a URL is created identifying the location of the instance.

    • Constraints: The maximum length is 2048 characters. The minimum length is 0 characters. The value must match regular expression /(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/.
    id String
    The unique identifier of the code_engine_binding.
    prefix String
    (String) The value that is set as a prefix in the component that is bound.

    • Constraints: The maximum length is 31 characters. The minimum length is 0 characters. The value must match regular expression /^A-Z*$/.
    projectId String
    resourceType String
    (String) The type of the binding.

    • Constraints: Allowable values are: binding_v2.
    secretName String
    (String) The service access secret that is bound to a component.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^a-z0-9?(\\.a-z0-9?)*$/.
    status String
    (String) The current status of the binding.
    bindingId string
    components GetCodeEngineBindingComponent[]
    (List) A reference to another component. Nested schema for component:
    href string
    (String) When you provision a new binding, a URL is created identifying the location of the instance.

    • Constraints: The maximum length is 2048 characters. The minimum length is 0 characters. The value must match regular expression /(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/.
    id string
    The unique identifier of the code_engine_binding.
    prefix string
    (String) The value that is set as a prefix in the component that is bound.

    • Constraints: The maximum length is 31 characters. The minimum length is 0 characters. The value must match regular expression /^A-Z*$/.
    projectId string
    resourceType string
    (String) The type of the binding.

    • Constraints: Allowable values are: binding_v2.
    secretName string
    (String) The service access secret that is bound to a component.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^a-z0-9?(\\.a-z0-9?)*$/.
    status string
    (String) The current status of the binding.
    binding_id str
    components Sequence[GetCodeEngineBindingComponent]
    (List) A reference to another component. Nested schema for component:
    href str
    (String) When you provision a new binding, a URL is created identifying the location of the instance.

    • Constraints: The maximum length is 2048 characters. The minimum length is 0 characters. The value must match regular expression /(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/.
    id str
    The unique identifier of the code_engine_binding.
    prefix str
    (String) The value that is set as a prefix in the component that is bound.

    • Constraints: The maximum length is 31 characters. The minimum length is 0 characters. The value must match regular expression /^A-Z*$/.
    project_id str
    resource_type str
    (String) The type of the binding.

    • Constraints: Allowable values are: binding_v2.
    secret_name str
    (String) The service access secret that is bound to a component.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^a-z0-9?(\\.a-z0-9?)*$/.
    status str
    (String) The current status of the binding.
    bindingId String
    components List<Property Map>
    (List) A reference to another component. Nested schema for component:
    href String
    (String) When you provision a new binding, a URL is created identifying the location of the instance.

    • Constraints: The maximum length is 2048 characters. The minimum length is 0 characters. The value must match regular expression /(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/.
    id String
    The unique identifier of the code_engine_binding.
    prefix String
    (String) The value that is set as a prefix in the component that is bound.

    • Constraints: The maximum length is 31 characters. The minimum length is 0 characters. The value must match regular expression /^A-Z*$/.
    projectId String
    resourceType String
    (String) The type of the binding.

    • Constraints: Allowable values are: binding_v2.
    secretName String
    (String) The service access secret that is bound to a component.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^a-z0-9?(\\.a-z0-9?)*$/.
    status String
    (String) The current status of the binding.

    Supporting Types

    GetCodeEngineBindingComponent

    Name string
    (String) The name of the referenced component.

    • Constraints: The maximum length is 63 characters. The minimum length is 1 character. The value must match regular expression /^a-z0-9?$/.
    ResourceType string
    (String) The type of the binding.

    • Constraints: Allowable values are: binding_v2.
    Name string
    (String) The name of the referenced component.

    • Constraints: The maximum length is 63 characters. The minimum length is 1 character. The value must match regular expression /^a-z0-9?$/.
    ResourceType string
    (String) The type of the binding.

    • Constraints: Allowable values are: binding_v2.
    name String
    (String) The name of the referenced component.

    • Constraints: The maximum length is 63 characters. The minimum length is 1 character. The value must match regular expression /^a-z0-9?$/.
    resourceType String
    (String) The type of the binding.

    • Constraints: Allowable values are: binding_v2.
    name string
    (String) The name of the referenced component.

    • Constraints: The maximum length is 63 characters. The minimum length is 1 character. The value must match regular expression /^a-z0-9?$/.
    resourceType string
    (String) The type of the binding.

    • Constraints: Allowable values are: binding_v2.
    name str
    (String) The name of the referenced component.

    • Constraints: The maximum length is 63 characters. The minimum length is 1 character. The value must match regular expression /^a-z0-9?$/.
    resource_type str
    (String) The type of the binding.

    • Constraints: Allowable values are: binding_v2.
    name String
    (String) The name of the referenced component.

    • Constraints: The maximum length is 63 characters. The minimum length is 1 character. The value must match regular expression /^a-z0-9?$/.
    resourceType String
    (String) The type of the binding.

    • Constraints: Allowable values are: binding_v2.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud