ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud
ibm.getCodeEngineBinding
Explore with Pulumi AI
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 dictionaryThe following arguments are supported:
- Binding
Id string - The id of your binding.
- Constraints: The maximum length is 
253characters. The minimum length is1character. The value must match regular expression/.+/. 
 - Constraints: The maximum length is 
 - Project
Id string - The ID of the project.
- Constraints: The maximum length is 
36characters. The minimum length is36characters. 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}$/. 
 - Constraints: The maximum length is 
 - Id string
 - The unique identifier of the code_engine_binding.
 
- Binding
Id string - The id of your binding.
- Constraints: The maximum length is 
253characters. The minimum length is1character. The value must match regular expression/.+/. 
 - Constraints: The maximum length is 
 - Project
Id string - The ID of the project.
- Constraints: The maximum length is 
36characters. The minimum length is36characters. 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}$/. 
 - Constraints: The maximum length is 
 - Id string
 - The unique identifier of the code_engine_binding.
 
- binding
Id String - The id of your binding.
- Constraints: The maximum length is 
253characters. The minimum length is1character. The value must match regular expression/.+/. 
 - Constraints: The maximum length is 
 - project
Id String - The ID of the project.
- Constraints: The maximum length is 
36characters. The minimum length is36characters. 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}$/. 
 - Constraints: The maximum length is 
 - id String
 - The unique identifier of the code_engine_binding.
 
- binding
Id string - The id of your binding.
- Constraints: The maximum length is 
253characters. The minimum length is1character. The value must match regular expression/.+/. 
 - Constraints: The maximum length is 
 - project
Id string - The ID of the project.
- Constraints: The maximum length is 
36characters. The minimum length is36characters. 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}$/. 
 - Constraints: The maximum length is 
 - id string
 - The unique identifier of the code_engine_binding.
 
- binding_
id str - The id of your binding.
- Constraints: The maximum length is 
253characters. The minimum length is1character. The value must match regular expression/.+/. 
 - Constraints: The maximum length is 
 - project_
id str - The ID of the project.
- Constraints: The maximum length is 
36characters. The minimum length is36characters. 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}$/. 
 - Constraints: The maximum length is 
 - id str
 - The unique identifier of the code_engine_binding.
 
- binding
Id String - The id of your binding.
- Constraints: The maximum length is 
253characters. The minimum length is1character. The value must match regular expression/.+/. 
 - Constraints: The maximum length is 
 - project
Id String - The ID of the project.
- Constraints: The maximum length is 
36characters. The minimum length is36characters. 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}$/. 
 - Constraints: The maximum length is 
 - id String
 - The unique identifier of the code_engine_binding.
 
getCodeEngineBinding Result
The following output properties are available:
- Binding
Id string - Components
List<Get
Code Engine Binding Component>  - (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 
2048characters. The minimum length is0characters. The value must match regular expression/(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/. 
 - Constraints: The maximum length is 
 - 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 
31characters. The minimum length is0characters. The value must match regular expression/^A-Z*$/. 
 - Constraints: The maximum length is 
 - Project
Id string - Resource
Type string - (String) The type of the binding.
- Constraints: Allowable values are: 
binding_v2. 
 - Constraints: Allowable values are: 
 - Secret
Name string - (String) The service access secret that is bound to a component.
- Constraints: The maximum length is 
253characters. The minimum length is1character. The value must match regular expression/^a-z0-9?(\\.a-z0-9?)*$/. 
 - Constraints: The maximum length is 
 - Status string
 - (String) The current status of the binding.
 
- Binding
Id string - Components
[]Get
Code Engine Binding Component  - (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 
2048characters. The minimum length is0characters. The value must match regular expression/(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/. 
 - Constraints: The maximum length is 
 - 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 
31characters. The minimum length is0characters. The value must match regular expression/^A-Z*$/. 
 - Constraints: The maximum length is 
 - Project
Id string - Resource
Type string - (String) The type of the binding.
- Constraints: Allowable values are: 
binding_v2. 
 - Constraints: Allowable values are: 
 - Secret
Name string - (String) The service access secret that is bound to a component.
- Constraints: The maximum length is 
253characters. The minimum length is1character. The value must match regular expression/^a-z0-9?(\\.a-z0-9?)*$/. 
 - Constraints: The maximum length is 
 - Status string
 - (String) The current status of the binding.
 
- binding
Id String - components
List<Get
Code Engine Binding Component>  - (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 
2048characters. The minimum length is0characters. The value must match regular expression/(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/. 
 - Constraints: The maximum length is 
 - 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 
31characters. The minimum length is0characters. The value must match regular expression/^A-Z*$/. 
 - Constraints: The maximum length is 
 - project
Id String - resource
Type String - (String) The type of the binding.
- Constraints: Allowable values are: 
binding_v2. 
 - Constraints: Allowable values are: 
 - secret
Name String - (String) The service access secret that is bound to a component.
- Constraints: The maximum length is 
253characters. The minimum length is1character. The value must match regular expression/^a-z0-9?(\\.a-z0-9?)*$/. 
 - Constraints: The maximum length is 
 - status String
 - (String) The current status of the binding.
 
- binding
Id string - components
Get
Code Engine Binding Component[]  - (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 
2048characters. The minimum length is0characters. The value must match regular expression/(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/. 
 - Constraints: The maximum length is 
 - 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 
31characters. The minimum length is0characters. The value must match regular expression/^A-Z*$/. 
 - Constraints: The maximum length is 
 - project
Id string - resource
Type string - (String) The type of the binding.
- Constraints: Allowable values are: 
binding_v2. 
 - Constraints: Allowable values are: 
 - secret
Name string - (String) The service access secret that is bound to a component.
- Constraints: The maximum length is 
253characters. The minimum length is1character. The value must match regular expression/^a-z0-9?(\\.a-z0-9?)*$/. 
 - Constraints: The maximum length is 
 - status string
 - (String) The current status of the binding.
 
- binding_
id str - components
Sequence[Get
Code Engine Binding Component]  - (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 
2048characters. The minimum length is0characters. The value must match regular expression/(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/. 
 - Constraints: The maximum length is 
 - 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 
31characters. The minimum length is0characters. The value must match regular expression/^A-Z*$/. 
 - Constraints: The maximum length is 
 - project_
id str - resource_
type str - (String) The type of the binding.
- Constraints: Allowable values are: 
binding_v2. 
 - Constraints: Allowable values are: 
 - secret_
name str - (String) The service access secret that is bound to a component.
- Constraints: The maximum length is 
253characters. The minimum length is1character. The value must match regular expression/^a-z0-9?(\\.a-z0-9?)*$/. 
 - Constraints: The maximum length is 
 - status str
 - (String) The current status of the binding.
 
- binding
Id 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 
2048characters. The minimum length is0characters. The value must match regular expression/(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/. 
 - Constraints: The maximum length is 
 - 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 
31characters. The minimum length is0characters. The value must match regular expression/^A-Z*$/. 
 - Constraints: The maximum length is 
 - project
Id String - resource
Type String - (String) The type of the binding.
- Constraints: Allowable values are: 
binding_v2. 
 - Constraints: Allowable values are: 
 - secret
Name String - (String) The service access secret that is bound to a component.
- Constraints: The maximum length is 
253characters. The minimum length is1character. The value must match regular expression/^a-z0-9?(\\.a-z0-9?)*$/. 
 - Constraints: The maximum length is 
 - 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 
63characters. The minimum length is1character. The value must match regular expression/^a-z0-9?$/. 
 - Constraints: The maximum length is 
 - Resource
Type string - (String) The type of the binding.
- Constraints: Allowable values are: 
binding_v2. 
 - Constraints: Allowable values are: 
 
- Name string
 - (String) The name of the referenced component.
- Constraints: The maximum length is 
63characters. The minimum length is1character. The value must match regular expression/^a-z0-9?$/. 
 - Constraints: The maximum length is 
 - Resource
Type string - (String) The type of the binding.
- Constraints: Allowable values are: 
binding_v2. 
 - Constraints: Allowable values are: 
 
- name String
 - (String) The name of the referenced component.
- Constraints: The maximum length is 
63characters. The minimum length is1character. The value must match regular expression/^a-z0-9?$/. 
 - Constraints: The maximum length is 
 - resource
Type String - (String) The type of the binding.
- Constraints: Allowable values are: 
binding_v2. 
 - Constraints: Allowable values are: 
 
- name string
 - (String) The name of the referenced component.
- Constraints: The maximum length is 
63characters. The minimum length is1character. The value must match regular expression/^a-z0-9?$/. 
 - Constraints: The maximum length is 
 - resource
Type string - (String) The type of the binding.
- Constraints: Allowable values are: 
binding_v2. 
 - Constraints: Allowable values are: 
 
- name str
 - (String) The name of the referenced component.
- Constraints: The maximum length is 
63characters. The minimum length is1character. The value must match regular expression/^a-z0-9?$/. 
 - Constraints: The maximum length is 
 - resource_
type str - (String) The type of the binding.
- Constraints: Allowable values are: 
binding_v2. 
 - Constraints: Allowable values are: 
 
- name String
 - (String) The name of the referenced component.
- Constraints: The maximum length is 
63characters. The minimum length is1character. The value must match regular expression/^a-z0-9?$/. 
 - Constraints: The maximum length is 
 - resource
Type String - (String) The type of the binding.
- Constraints: Allowable values are: 
binding_v2. 
 - Constraints: Allowable values are: 
 
Package Details
- Repository
 - ibm ibm-cloud/terraform-provider-ibm
 - License
 - Notes
 - This Pulumi package is based on the 
ibmTerraform Provider.