1. Packages
  2. Ibm Provider
  3. API Docs
  4. ApiGatewayEndpointSubscription
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

ibm.ApiGatewayEndpointSubscription

Explore with Pulumi AI

ibm logo
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

    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:

    ArtifactId string
    Endpoint ID
    Type string
    Subscription type. Allowable values are external, internal
    ApiGatewayEndpointSubscriptionId string
    (String) The ID of the subscription resource. The ID is composed of <artifact_id>//<client_id>.
    ClientId string
    Subscription Id, API key that is used to create subscription
    ClientSecret string
    Client Sercret of a Subscription
    GenerateSecret bool
    Indicates if Client Sercret has to be autogenerated
    Name string
    Subscription name
    ArtifactId string
    Endpoint ID
    Type string
    Subscription type. Allowable values are external, internal
    ApiGatewayEndpointSubscriptionId string
    (String) The ID of the subscription resource. The ID is composed of <artifact_id>//<client_id>.
    ClientId string
    Subscription Id, API key that is used to create subscription
    ClientSecret string
    Client Sercret of a Subscription
    GenerateSecret bool
    Indicates if Client Sercret has to be autogenerated
    Name string
    Subscription name
    artifactId String
    Endpoint ID
    type String
    Subscription type. Allowable values are external, internal
    apiGatewayEndpointSubscriptionId String
    (String) The ID of the subscription resource. The ID is composed of <artifact_id>//<client_id>.
    clientId String
    Subscription Id, API key that is used to create subscription
    clientSecret String
    Client Sercret of a Subscription
    generateSecret Boolean
    Indicates if Client Sercret has to be autogenerated
    name String
    Subscription name
    artifactId string
    Endpoint ID
    type string
    Subscription type. Allowable values are external, internal
    apiGatewayEndpointSubscriptionId string
    (String) The ID of the subscription resource. The ID is composed of <artifact_id>//<client_id>.
    clientId string
    Subscription Id, API key that is used to create subscription
    clientSecret string
    Client Sercret of a Subscription
    generateSecret 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_endpoint_subscription_id str
    (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
    artifactId String
    Endpoint ID
    type String
    Subscription type. Allowable values are external, internal
    apiGatewayEndpointSubscriptionId String
    (String) The ID of the subscription resource. The ID is composed of <artifact_id>//<client_id>.
    clientId String
    Subscription Id, API key that is used to create subscription
    clientSecret String
    Client Sercret of a Subscription
    generateSecret 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.
    SecretProvided 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.
    SecretProvided 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.
    secretProvided 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.
    secretProvided 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.
    secretProvided 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.
    The following state arguments are supported:
    ApiGatewayEndpointSubscriptionId string
    (String) The ID of the subscription resource. The ID is composed of <artifact_id>//<client_id>.
    ArtifactId string
    Endpoint ID
    ClientId string
    Subscription Id, API key that is used to create subscription
    ClientSecret string
    Client Sercret of a Subscription
    GenerateSecret bool
    Indicates if Client Sercret has to be autogenerated
    Name string
    Subscription name
    SecretProvided 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
    ApiGatewayEndpointSubscriptionId string
    (String) The ID of the subscription resource. The ID is composed of <artifact_id>//<client_id>.
    ArtifactId string
    Endpoint ID
    ClientId string
    Subscription Id, API key that is used to create subscription
    ClientSecret string
    Client Sercret of a Subscription
    GenerateSecret bool
    Indicates if Client Sercret has to be autogenerated
    Name string
    Subscription name
    SecretProvided 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
    apiGatewayEndpointSubscriptionId String
    (String) The ID of the subscription resource. The ID is composed of <artifact_id>//<client_id>.
    artifactId String
    Endpoint ID
    clientId String
    Subscription Id, API key that is used to create subscription
    clientSecret String
    Client Sercret of a Subscription
    generateSecret Boolean
    Indicates if Client Sercret has to be autogenerated
    name String
    Subscription name
    secretProvided 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
    apiGatewayEndpointSubscriptionId string
    (String) The ID of the subscription resource. The ID is composed of <artifact_id>//<client_id>.
    artifactId string
    Endpoint ID
    clientId string
    Subscription Id, API key that is used to create subscription
    clientSecret string
    Client Sercret of a Subscription
    generateSecret boolean
    Indicates if Client Sercret has to be autogenerated
    name string
    Subscription name
    secretProvided 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_endpoint_subscription_id str
    (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
    apiGatewayEndpointSubscriptionId String
    (String) The ID of the subscription resource. The ID is composed of <artifact_id>//<client_id>.
    artifactId String
    Endpoint ID
    clientId String
    Subscription Id, API key that is used to create subscription
    clientSecret String
    Client Sercret of a Subscription
    generateSecret Boolean
    Indicates if Client Sercret has to be autogenerated
    name String
    Subscription name
    secretProvided 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.
    ibm logo
    ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud