ibm.ApiGatewayEndpoint
Explore with Pulumi AI
Create, update, or delete an API endpoint for an API gateway. For more information, about API Gateway custom endpoint, see customizing the domain for an API endpoint.
Example Usage
Create ApiGatewayEndpoint Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ApiGatewayEndpoint(name: string, args: ApiGatewayEndpointArgs, opts?: CustomResourceOptions);
@overload
def ApiGatewayEndpoint(resource_name: str,
args: ApiGatewayEndpointArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ApiGatewayEndpoint(resource_name: str,
opts: Optional[ResourceOptions] = None,
open_api_doc_name: Optional[str] = None,
service_instance_crn: Optional[str] = None,
api_gateway_endpoint_id: Optional[str] = None,
managed: Optional[bool] = None,
name: Optional[str] = None,
provider_id: Optional[str] = None,
routes: Optional[Sequence[str]] = None,
type: Optional[str] = None)
func NewApiGatewayEndpoint(ctx *Context, name string, args ApiGatewayEndpointArgs, opts ...ResourceOption) (*ApiGatewayEndpoint, error)
public ApiGatewayEndpoint(string name, ApiGatewayEndpointArgs args, CustomResourceOptions? opts = null)
public ApiGatewayEndpoint(String name, ApiGatewayEndpointArgs args)
public ApiGatewayEndpoint(String name, ApiGatewayEndpointArgs args, CustomResourceOptions options)
type: ibm:ApiGatewayEndpoint
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ApiGatewayEndpointArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ApiGatewayEndpointArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ApiGatewayEndpointArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApiGatewayEndpointArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ApiGatewayEndpointArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var apiGatewayEndpointResource = new Ibm.ApiGatewayEndpoint("apiGatewayEndpointResource", new()
{
OpenApiDocName = "string",
ServiceInstanceCrn = "string",
ApiGatewayEndpointId = "string",
Managed = false,
Name = "string",
ProviderId = "string",
Routes = new[]
{
"string",
},
Type = "string",
});
example, err := ibm.NewApiGatewayEndpoint(ctx, "apiGatewayEndpointResource", &ibm.ApiGatewayEndpointArgs{
OpenApiDocName: pulumi.String("string"),
ServiceInstanceCrn: pulumi.String("string"),
ApiGatewayEndpointId: pulumi.String("string"),
Managed: pulumi.Bool(false),
Name: pulumi.String("string"),
ProviderId: pulumi.String("string"),
Routes: pulumi.StringArray{
pulumi.String("string"),
},
Type: pulumi.String("string"),
})
var apiGatewayEndpointResource = new ApiGatewayEndpoint("apiGatewayEndpointResource", ApiGatewayEndpointArgs.builder()
.openApiDocName("string")
.serviceInstanceCrn("string")
.apiGatewayEndpointId("string")
.managed(false)
.name("string")
.providerId("string")
.routes("string")
.type("string")
.build());
api_gateway_endpoint_resource = ibm.ApiGatewayEndpoint("apiGatewayEndpointResource",
open_api_doc_name="string",
service_instance_crn="string",
api_gateway_endpoint_id="string",
managed=False,
name="string",
provider_id="string",
routes=["string"],
type="string")
const apiGatewayEndpointResource = new ibm.ApiGatewayEndpoint("apiGatewayEndpointResource", {
openApiDocName: "string",
serviceInstanceCrn: "string",
apiGatewayEndpointId: "string",
managed: false,
name: "string",
providerId: "string",
routes: ["string"],
type: "string",
});
type: ibm:ApiGatewayEndpoint
properties:
apiGatewayEndpointId: string
managed: false
name: string
openApiDocName: string
providerId: string
routes:
- string
serviceInstanceCrn: string
type: string
ApiGatewayEndpoint Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ApiGatewayEndpoint resource accepts the following input properties:
- Open
Api stringDoc Name - Json File path
- Service
Instance stringCrn - Api Gateway Service Instance Crn
- Api
Gateway stringEndpoint Id - (String) The ID of the endpoint. The ID is composed of
<service_instance_crn>//<endpoint_ID>
. - Managed bool
- Managed indicates if endpoint is online or offline.
- Name string
- Endpoint name
- Provider
Id string - Provider ID of an endpoint allowable values user-defined and whisk
- Routes List<string>
- Invokable routes for an endpoint
- Type string
- Action type of Endpoint ALoowable values are share, unshare, manage, unmanage
- Open
Api stringDoc Name - Json File path
- Service
Instance stringCrn - Api Gateway Service Instance Crn
- Api
Gateway stringEndpoint Id - (String) The ID of the endpoint. The ID is composed of
<service_instance_crn>//<endpoint_ID>
. - Managed bool
- Managed indicates if endpoint is online or offline.
- Name string
- Endpoint name
- Provider
Id string - Provider ID of an endpoint allowable values user-defined and whisk
- Routes []string
- Invokable routes for an endpoint
- Type string
- Action type of Endpoint ALoowable values are share, unshare, manage, unmanage
- open
Api StringDoc Name - Json File path
- service
Instance StringCrn - Api Gateway Service Instance Crn
- api
Gateway StringEndpoint Id - (String) The ID of the endpoint. The ID is composed of
<service_instance_crn>//<endpoint_ID>
. - managed Boolean
- Managed indicates if endpoint is online or offline.
- name String
- Endpoint name
- provider
Id String - Provider ID of an endpoint allowable values user-defined and whisk
- routes List<String>
- Invokable routes for an endpoint
- type String
- Action type of Endpoint ALoowable values are share, unshare, manage, unmanage
- open
Api stringDoc Name - Json File path
- service
Instance stringCrn - Api Gateway Service Instance Crn
- api
Gateway stringEndpoint Id - (String) The ID of the endpoint. The ID is composed of
<service_instance_crn>//<endpoint_ID>
. - managed boolean
- Managed indicates if endpoint is online or offline.
- name string
- Endpoint name
- provider
Id string - Provider ID of an endpoint allowable values user-defined and whisk
- routes string[]
- Invokable routes for an endpoint
- type string
- Action type of Endpoint ALoowable values are share, unshare, manage, unmanage
- open_
api_ strdoc_ name - Json File path
- service_
instance_ strcrn - Api Gateway Service Instance Crn
- api_
gateway_ strendpoint_ id - (String) The ID of the endpoint. The ID is composed of
<service_instance_crn>//<endpoint_ID>
. - managed bool
- Managed indicates if endpoint is online or offline.
- name str
- Endpoint name
- provider_
id str - Provider ID of an endpoint allowable values user-defined and whisk
- routes Sequence[str]
- Invokable routes for an endpoint
- type str
- Action type of Endpoint ALoowable values are share, unshare, manage, unmanage
- open
Api StringDoc Name - Json File path
- service
Instance StringCrn - Api Gateway Service Instance Crn
- api
Gateway StringEndpoint Id - (String) The ID of the endpoint. The ID is composed of
<service_instance_crn>//<endpoint_ID>
. - managed Boolean
- Managed indicates if endpoint is online or offline.
- name String
- Endpoint name
- provider
Id String - Provider ID of an endpoint allowable values user-defined and whisk
- routes List<String>
- Invokable routes for an endpoint
- type String
- Action type of Endpoint ALoowable values are share, unshare, manage, unmanage
Outputs
All input properties are implicitly available as output properties. Additionally, the ApiGatewayEndpoint resource produces the following output properties:
- Base
Path string - (String) The base path of an endpoint. The base paths must be unique.
- Endpoint
Id string - (String) The ID of the endpoint, also referred to as the artifact ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- bool
- (String) The shared status of an endpoint.
- Base
Path string - (String) The base path of an endpoint. The base paths must be unique.
- Endpoint
Id string - (String) The ID of the endpoint, also referred to as the artifact ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- bool
- (String) The shared status of an endpoint.
- base
Path String - (String) The base path of an endpoint. The base paths must be unique.
- endpoint
Id String - (String) The ID of the endpoint, also referred to as the artifact ID.
- id String
- The provider-assigned unique ID for this managed resource.
- Boolean
- (String) The shared status of an endpoint.
- base
Path string - (String) The base path of an endpoint. The base paths must be unique.
- endpoint
Id string - (String) The ID of the endpoint, also referred to as the artifact ID.
- id string
- The provider-assigned unique ID for this managed resource.
- boolean
- (String) The shared status of an endpoint.
- base_
path str - (String) The base path of an endpoint. The base paths must be unique.
- endpoint_
id str - (String) The ID of the endpoint, also referred to as the artifact ID.
- id str
- The provider-assigned unique ID for this managed resource.
- bool
- (String) The shared status of an endpoint.
- base
Path String - (String) The base path of an endpoint. The base paths must be unique.
- endpoint
Id String - (String) The ID of the endpoint, also referred to as the artifact ID.
- id String
- The provider-assigned unique ID for this managed resource.
- Boolean
- (String) The shared status of an endpoint.
Look up Existing ApiGatewayEndpoint Resource
Get an existing ApiGatewayEndpoint resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ApiGatewayEndpointState, opts?: CustomResourceOptions): ApiGatewayEndpoint
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
api_gateway_endpoint_id: Optional[str] = None,
base_path: Optional[str] = None,
endpoint_id: Optional[str] = None,
managed: Optional[bool] = None,
name: Optional[str] = None,
open_api_doc_name: Optional[str] = None,
provider_id: Optional[str] = None,
routes: Optional[Sequence[str]] = None,
service_instance_crn: Optional[str] = None,
shared: Optional[bool] = None,
type: Optional[str] = None) -> ApiGatewayEndpoint
func GetApiGatewayEndpoint(ctx *Context, name string, id IDInput, state *ApiGatewayEndpointState, opts ...ResourceOption) (*ApiGatewayEndpoint, error)
public static ApiGatewayEndpoint Get(string name, Input<string> id, ApiGatewayEndpointState? state, CustomResourceOptions? opts = null)
public static ApiGatewayEndpoint get(String name, Output<String> id, ApiGatewayEndpointState state, CustomResourceOptions options)
resources: _: type: ibm:ApiGatewayEndpoint get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Api
Gateway stringEndpoint Id - (String) The ID of the endpoint. The ID is composed of
<service_instance_crn>//<endpoint_ID>
. - Base
Path string - (String) The base path of an endpoint. The base paths must be unique.
- Endpoint
Id string - (String) The ID of the endpoint, also referred to as the artifact ID.
- Managed bool
- Managed indicates if endpoint is online or offline.
- Name string
- Endpoint name
- Open
Api stringDoc Name - Json File path
- Provider
Id string - Provider ID of an endpoint allowable values user-defined and whisk
- Routes List<string>
- Invokable routes for an endpoint
- Service
Instance stringCrn - Api Gateway Service Instance Crn
- bool
- (String) The shared status of an endpoint.
- Type string
- Action type of Endpoint ALoowable values are share, unshare, manage, unmanage
- Api
Gateway stringEndpoint Id - (String) The ID of the endpoint. The ID is composed of
<service_instance_crn>//<endpoint_ID>
. - Base
Path string - (String) The base path of an endpoint. The base paths must be unique.
- Endpoint
Id string - (String) The ID of the endpoint, also referred to as the artifact ID.
- Managed bool
- Managed indicates if endpoint is online or offline.
- Name string
- Endpoint name
- Open
Api stringDoc Name - Json File path
- Provider
Id string - Provider ID of an endpoint allowable values user-defined and whisk
- Routes []string
- Invokable routes for an endpoint
- Service
Instance stringCrn - Api Gateway Service Instance Crn
- bool
- (String) The shared status of an endpoint.
- Type string
- Action type of Endpoint ALoowable values are share, unshare, manage, unmanage
- api
Gateway StringEndpoint Id - (String) The ID of the endpoint. The ID is composed of
<service_instance_crn>//<endpoint_ID>
. - base
Path String - (String) The base path of an endpoint. The base paths must be unique.
- endpoint
Id String - (String) The ID of the endpoint, also referred to as the artifact ID.
- managed Boolean
- Managed indicates if endpoint is online or offline.
- name String
- Endpoint name
- open
Api StringDoc Name - Json File path
- provider
Id String - Provider ID of an endpoint allowable values user-defined and whisk
- routes List<String>
- Invokable routes for an endpoint
- service
Instance StringCrn - Api Gateway Service Instance Crn
- Boolean
- (String) The shared status of an endpoint.
- type String
- Action type of Endpoint ALoowable values are share, unshare, manage, unmanage
- api
Gateway stringEndpoint Id - (String) The ID of the endpoint. The ID is composed of
<service_instance_crn>//<endpoint_ID>
. - base
Path string - (String) The base path of an endpoint. The base paths must be unique.
- endpoint
Id string - (String) The ID of the endpoint, also referred to as the artifact ID.
- managed boolean
- Managed indicates if endpoint is online or offline.
- name string
- Endpoint name
- open
Api stringDoc Name - Json File path
- provider
Id string - Provider ID of an endpoint allowable values user-defined and whisk
- routes string[]
- Invokable routes for an endpoint
- service
Instance stringCrn - Api Gateway Service Instance Crn
- boolean
- (String) The shared status of an endpoint.
- type string
- Action type of Endpoint ALoowable values are share, unshare, manage, unmanage
- api_
gateway_ strendpoint_ id - (String) The ID of the endpoint. The ID is composed of
<service_instance_crn>//<endpoint_ID>
. - base_
path str - (String) The base path of an endpoint. The base paths must be unique.
- endpoint_
id str - (String) The ID of the endpoint, also referred to as the artifact ID.
- managed bool
- Managed indicates if endpoint is online or offline.
- name str
- Endpoint name
- open_
api_ strdoc_ name - Json File path
- provider_
id str - Provider ID of an endpoint allowable values user-defined and whisk
- routes Sequence[str]
- Invokable routes for an endpoint
- service_
instance_ strcrn - Api Gateway Service Instance Crn
- bool
- (String) The shared status of an endpoint.
- type str
- Action type of Endpoint ALoowable values are share, unshare, manage, unmanage
- api
Gateway StringEndpoint Id - (String) The ID of the endpoint. The ID is composed of
<service_instance_crn>//<endpoint_ID>
. - base
Path String - (String) The base path of an endpoint. The base paths must be unique.
- endpoint
Id String - (String) The ID of the endpoint, also referred to as the artifact ID.
- managed Boolean
- Managed indicates if endpoint is online or offline.
- name String
- Endpoint name
- open
Api StringDoc Name - Json File path
- provider
Id String - Provider ID of an endpoint allowable values user-defined and whisk
- routes List<String>
- Invokable routes for an endpoint
- service
Instance StringCrn - Api Gateway Service Instance Crn
- Boolean
- (String) The shared status of an endpoint.
- type String
- Action type of Endpoint ALoowable values are share, unshare, manage, unmanage
Import
The ibm_api_gateway_endpoint
resource can be imported by using the ID. The ID is composed of <service_instance_crn>//<endpoint_ID>
.
The CRN will be located on the Overview page of the API Gateway Service.
CRN is a 120 digit character string of the form:
crn:v1:bluemix:public:internet-svcs:global:a/4ea1882a2d3401ed1e459979941966ea:31fa970d-51d0-4b05-893e-251cba75a7b3::
Endpoint ID is a string of the form:
b2f2c5b1-a29d-4e0b-ae2f-a0313c3ea2d3
. The ID of an existing endpoint is not avaiable through the console. It can be retrieved programmatically through the API Gateway Endpoint API.
Syntax
$ pulumi import ibm:index/apiGatewayEndpoint:ApiGatewayEndpoint endpoint <service_instance_crn>//<endpoint_id>
Example
$ pulumi import ibm:index/apiGatewayEndpoint:ApiGatewayEndpoint endpoint crn:v1:bluemix:public:api-gateway:global:a/4448261269a14562b839e0a3019ed980:a608ff36-7037-4da1-b7e9-663e3e1c6254:://b2f2c5b1-a29d-4e0b-ae2f-a0313c3ea2d3
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.