ibm.ApiGatewayEndpointSubscription
Explore with Pulumi AI
Create, update, or delete a subscription for an API Gateway endpoint. For more information, about API Gateway subscription, see managing access for API Gateway.
Endpoint subscriptions can be added only if the endpoint is online. Make sure to set the managed
input parameter to true in the ibm.ApiGatewayEndpoint
resource.
Configuration of an api gateway data resource requires the region parameter to be set for the IBM provider in the provider.tf
. If not specified, endpoint to which subscription is being created will default to us-south
.
Create ApiGatewayEndpointSubscription Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ApiGatewayEndpointSubscription(name: string, args: ApiGatewayEndpointSubscriptionArgs, opts?: CustomResourceOptions);
@overload
def ApiGatewayEndpointSubscription(resource_name: str,
args: ApiGatewayEndpointSubscriptionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ApiGatewayEndpointSubscription(resource_name: str,
opts: Optional[ResourceOptions] = None,
artifact_id: Optional[str] = None,
type: Optional[str] = None,
api_gateway_endpoint_subscription_id: Optional[str] = None,
client_id: Optional[str] = None,
client_secret: Optional[str] = None,
generate_secret: Optional[bool] = None,
name: Optional[str] = None)
func NewApiGatewayEndpointSubscription(ctx *Context, name string, args ApiGatewayEndpointSubscriptionArgs, opts ...ResourceOption) (*ApiGatewayEndpointSubscription, error)
public ApiGatewayEndpointSubscription(string name, ApiGatewayEndpointSubscriptionArgs args, CustomResourceOptions? opts = null)
public ApiGatewayEndpointSubscription(String name, ApiGatewayEndpointSubscriptionArgs args)
public ApiGatewayEndpointSubscription(String name, ApiGatewayEndpointSubscriptionArgs args, CustomResourceOptions options)
type: ibm:ApiGatewayEndpointSubscription
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 ApiGatewayEndpointSubscriptionArgs
- 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 ApiGatewayEndpointSubscriptionArgs
- 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 ApiGatewayEndpointSubscriptionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApiGatewayEndpointSubscriptionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ApiGatewayEndpointSubscriptionArgs
- 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 apiGatewayEndpointSubscriptionResource = new Ibm.ApiGatewayEndpointSubscription("apiGatewayEndpointSubscriptionResource", new()
{
ArtifactId = "string",
Type = "string",
ApiGatewayEndpointSubscriptionId = "string",
ClientId = "string",
ClientSecret = "string",
GenerateSecret = false,
Name = "string",
});
example, err := ibm.NewApiGatewayEndpointSubscription(ctx, "apiGatewayEndpointSubscriptionResource", &ibm.ApiGatewayEndpointSubscriptionArgs{
ArtifactId: pulumi.String("string"),
Type: pulumi.String("string"),
ApiGatewayEndpointSubscriptionId: pulumi.String("string"),
ClientId: pulumi.String("string"),
ClientSecret: pulumi.String("string"),
GenerateSecret: pulumi.Bool(false),
Name: pulumi.String("string"),
})
var apiGatewayEndpointSubscriptionResource = new ApiGatewayEndpointSubscription("apiGatewayEndpointSubscriptionResource", ApiGatewayEndpointSubscriptionArgs.builder()
.artifactId("string")
.type("string")
.apiGatewayEndpointSubscriptionId("string")
.clientId("string")
.clientSecret("string")
.generateSecret(false)
.name("string")
.build());
api_gateway_endpoint_subscription_resource = ibm.ApiGatewayEndpointSubscription("apiGatewayEndpointSubscriptionResource",
artifact_id="string",
type="string",
api_gateway_endpoint_subscription_id="string",
client_id="string",
client_secret="string",
generate_secret=False,
name="string")
const apiGatewayEndpointSubscriptionResource = new ibm.ApiGatewayEndpointSubscription("apiGatewayEndpointSubscriptionResource", {
artifactId: "string",
type: "string",
apiGatewayEndpointSubscriptionId: "string",
clientId: "string",
clientSecret: "string",
generateSecret: false,
name: "string",
});
type: ibm:ApiGatewayEndpointSubscription
properties:
apiGatewayEndpointSubscriptionId: string
artifactId: string
clientId: string
clientSecret: string
generateSecret: false
name: string
type: string
ApiGatewayEndpointSubscription 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 ApiGatewayEndpointSubscription resource accepts the following input properties:
- Artifact
Id string - Endpoint ID
- Type string
- Subscription type. Allowable values are external, internal
- Api
Gateway stringEndpoint Subscription Id - (String) The ID of the subscription resource. The ID is composed of
<artifact_id>//<client_id>
. - Client
Id string - Subscription Id, API key that is used to create subscription
- Client
Secret string - Client Sercret of a Subscription
- Generate
Secret bool - Indicates if Client Sercret has to be autogenerated
- Name string
- Subscription name
- Artifact
Id string - Endpoint ID
- Type string
- Subscription type. Allowable values are external, internal
- Api
Gateway stringEndpoint Subscription Id - (String) The ID of the subscription resource. The ID is composed of
<artifact_id>//<client_id>
. - Client
Id string - Subscription Id, API key that is used to create subscription
- Client
Secret string - Client Sercret of a Subscription
- Generate
Secret bool - Indicates if Client Sercret has to be autogenerated
- Name string
- Subscription name
- artifact
Id String - Endpoint ID
- type String
- Subscription type. Allowable values are external, internal
- api
Gateway StringEndpoint Subscription Id - (String) The ID of the subscription resource. The ID is composed of
<artifact_id>//<client_id>
. - client
Id String - Subscription Id, API key that is used to create subscription
- client
Secret String - Client Sercret of a Subscription
- generate
Secret Boolean - Indicates if Client Sercret has to be autogenerated
- name String
- Subscription name
- artifact
Id string - Endpoint ID
- type string
- Subscription type. Allowable values are external, internal
- api
Gateway stringEndpoint Subscription Id - (String) The ID of the subscription resource. The ID is composed of
<artifact_id>//<client_id>
. - client
Id string - Subscription Id, API key that is used to create subscription
- client
Secret string - Client Sercret of a Subscription
- generate
Secret boolean - Indicates if Client Sercret has to be autogenerated
- name string
- Subscription name
- artifact_
id str - Endpoint ID
- type str
- Subscription type. Allowable values are external, internal
- api_
gateway_ strendpoint_ subscription_ id - (String) The ID of the subscription resource. The ID is composed of
<artifact_id>//<client_id>
. - client_
id str - Subscription Id, API key that is used to create subscription
- client_
secret str - Client Sercret of a Subscription
- generate_
secret bool - Indicates if Client Sercret has to be autogenerated
- name str
- Subscription name
- artifact
Id String - Endpoint ID
- type String
- Subscription type. Allowable values are external, internal
- api
Gateway StringEndpoint Subscription Id - (String) The ID of the subscription resource. The ID is composed of
<artifact_id>//<client_id>
. - client
Id String - Subscription Id, API key that is used to create subscription
- client
Secret String - Client Sercret of a Subscription
- generate
Secret Boolean - Indicates if Client Sercret has to be autogenerated
- name String
- Subscription name
Outputs
All input properties are implicitly available as output properties. Additionally, the ApiGatewayEndpointSubscription resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Secret
Provided bool - (Boolean) Indicates your secrete if provided or not. If set to true, the client secret is provided. If set to false, the client secret is not provided.
- Id string
- The provider-assigned unique ID for this managed resource.
- Secret
Provided bool - (Boolean) Indicates your secrete if provided or not. If set to true, the client secret is provided. If set to false, the client secret is not provided.
- id String
- The provider-assigned unique ID for this managed resource.
- secret
Provided Boolean - (Boolean) Indicates your secrete if provided or not. If set to true, the client secret is provided. If set to false, the client secret is not provided.
- id string
- The provider-assigned unique ID for this managed resource.
- secret
Provided boolean - (Boolean) Indicates your secrete if provided or not. If set to true, the client secret is provided. If set to false, the client secret is not provided.
- id str
- The provider-assigned unique ID for this managed resource.
- secret_
provided bool - (Boolean) Indicates your secrete if provided or not. If set to true, the client secret is provided. If set to false, the client secret is not provided.
- id String
- The provider-assigned unique ID for this managed resource.
- secret
Provided Boolean - (Boolean) Indicates your secrete if provided or not. If set to true, the client secret is provided. If set to false, the client secret is not provided.
Look up Existing ApiGatewayEndpointSubscription Resource
Get an existing ApiGatewayEndpointSubscription 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?: ApiGatewayEndpointSubscriptionState, opts?: CustomResourceOptions): ApiGatewayEndpointSubscription
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
api_gateway_endpoint_subscription_id: Optional[str] = None,
artifact_id: Optional[str] = None,
client_id: Optional[str] = None,
client_secret: Optional[str] = None,
generate_secret: Optional[bool] = None,
name: Optional[str] = None,
secret_provided: Optional[bool] = None,
type: Optional[str] = None) -> ApiGatewayEndpointSubscription
func GetApiGatewayEndpointSubscription(ctx *Context, name string, id IDInput, state *ApiGatewayEndpointSubscriptionState, opts ...ResourceOption) (*ApiGatewayEndpointSubscription, error)
public static ApiGatewayEndpointSubscription Get(string name, Input<string> id, ApiGatewayEndpointSubscriptionState? state, CustomResourceOptions? opts = null)
public static ApiGatewayEndpointSubscription get(String name, Output<String> id, ApiGatewayEndpointSubscriptionState state, CustomResourceOptions options)
resources: _: type: ibm:ApiGatewayEndpointSubscription 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 Subscription Id - (String) The ID of the subscription resource. The ID is composed of
<artifact_id>//<client_id>
. - Artifact
Id string - Endpoint ID
- Client
Id string - Subscription Id, API key that is used to create subscription
- Client
Secret string - Client Sercret of a Subscription
- Generate
Secret bool - Indicates if Client Sercret has to be autogenerated
- Name string
- Subscription name
- Secret
Provided bool - (Boolean) Indicates your secrete if provided or not. If set to true, the client secret is provided. If set to false, the client secret is not provided.
- Type string
- Subscription type. Allowable values are external, internal
- Api
Gateway stringEndpoint Subscription Id - (String) The ID of the subscription resource. The ID is composed of
<artifact_id>//<client_id>
. - Artifact
Id string - Endpoint ID
- Client
Id string - Subscription Id, API key that is used to create subscription
- Client
Secret string - Client Sercret of a Subscription
- Generate
Secret bool - Indicates if Client Sercret has to be autogenerated
- Name string
- Subscription name
- Secret
Provided bool - (Boolean) Indicates your secrete if provided or not. If set to true, the client secret is provided. If set to false, the client secret is not provided.
- Type string
- Subscription type. Allowable values are external, internal
- api
Gateway StringEndpoint Subscription Id - (String) The ID of the subscription resource. The ID is composed of
<artifact_id>//<client_id>
. - artifact
Id String - Endpoint ID
- client
Id String - Subscription Id, API key that is used to create subscription
- client
Secret String - Client Sercret of a Subscription
- generate
Secret Boolean - Indicates if Client Sercret has to be autogenerated
- name String
- Subscription name
- secret
Provided Boolean - (Boolean) Indicates your secrete if provided or not. If set to true, the client secret is provided. If set to false, the client secret is not provided.
- type String
- Subscription type. Allowable values are external, internal
- api
Gateway stringEndpoint Subscription Id - (String) The ID of the subscription resource. The ID is composed of
<artifact_id>//<client_id>
. - artifact
Id string - Endpoint ID
- client
Id string - Subscription Id, API key that is used to create subscription
- client
Secret string - Client Sercret of a Subscription
- generate
Secret boolean - Indicates if Client Sercret has to be autogenerated
- name string
- Subscription name
- secret
Provided boolean - (Boolean) Indicates your secrete if provided or not. If set to true, the client secret is provided. If set to false, the client secret is not provided.
- type string
- Subscription type. Allowable values are external, internal
- api_
gateway_ strendpoint_ subscription_ id - (String) The ID of the subscription resource. The ID is composed of
<artifact_id>//<client_id>
. - artifact_
id str - Endpoint ID
- client_
id str - Subscription Id, API key that is used to create subscription
- client_
secret str - Client Sercret of a Subscription
- generate_
secret bool - Indicates if Client Sercret has to be autogenerated
- name str
- Subscription name
- secret_
provided bool - (Boolean) Indicates your secrete if provided or not. If set to true, the client secret is provided. If set to false, the client secret is not provided.
- type str
- Subscription type. Allowable values are external, internal
- api
Gateway StringEndpoint Subscription Id - (String) The ID of the subscription resource. The ID is composed of
<artifact_id>//<client_id>
. - artifact
Id String - Endpoint ID
- client
Id String - Subscription Id, API key that is used to create subscription
- client
Secret String - Client Sercret of a Subscription
- generate
Secret Boolean - Indicates if Client Sercret has to be autogenerated
- name String
- Subscription name
- secret
Provided Boolean - (Boolean) Indicates your secrete if provided or not. If set to true, the client secret is provided. If set to false, the client secret is not provided.
- type String
- Subscription type. Allowable values are external, internal
Import
The ibm_api_gateway_endpoint_subscription
resource can be imported by using the ID. The ID is composed of <artifact_id>//<client_id>
.
Endpoint ID: The Endpoint ID can be retrieved programmatically via the API Gateway endpoint API.
Client ID: The Client ID is an auto-generated string. To view the client ID in the IBM Cloud console, you must enable Application authentication on the Define and secure page of the API Gateway service. The client ID of a particular subscription is available as an API key in the Manage and Sharing page of the API Gateway service.
Syntax
$ pulumi import ibm:index/apiGatewayEndpointSubscription:ApiGatewayEndpointSubscription subscription <artifact_id>//<client_id>
Example
$ pulumi import ibm:index/apiGatewayEndpointSubscription:ApiGatewayEndpointSubscription subscription 705fd456-224e-412d-833f-51ff46e27fc8//testID
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.