published on Monday, Oct 5, 2026 by OVHcloud
published on Monday, Oct 5, 2026 by OVHcloud
Import
OAuth2 clients can be imported using their client_id:
bash
$ pulumi import ovh:Me/aPIOAuth2Client:APIOAuth2Client my_oauth2_client client_id
Because the client_secret is only available for resources created using terraform, OAuth2 clients can also be imported using a client_id and a client_secret with a pipe separator:
bash
$ pulumi import ovh:Me/aPIOAuth2Client:APIOAuth2Client my_oauth2_client 'client_id|client_secret'
Imported OAuth2 clients have discard_client_secret set to false. If your configuration sets it to true, the next pulumi up removes the client secret from the state without recreating the OAuth2 client.
Create APIOAuth2Client Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new APIOAuth2Client(name: string, args: APIOAuth2ClientArgs, opts?: CustomResourceOptions);@overload
def APIOAuth2Client(resource_name: str,
args: APIOAuth2ClientArgs,
opts: Optional[ResourceOptions] = None)
@overload
def APIOAuth2Client(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
flow: Optional[str] = None,
callback_urls: Optional[Sequence[str]] = None,
discard_client_secret: Optional[bool] = None,
name: Optional[str] = None)func NewAPIOAuth2Client(ctx *Context, name string, args APIOAuth2ClientArgs, opts ...ResourceOption) (*APIOAuth2Client, error)public APIOAuth2Client(string name, APIOAuth2ClientArgs args, CustomResourceOptions? opts = null)
public APIOAuth2Client(String name, APIOAuth2ClientArgs args)
public APIOAuth2Client(String name, APIOAuth2ClientArgs args, CustomResourceOptions options)
type: ovh:Me:APIOAuth2Client
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "ovh_me_a_p_i_o_auth2_client" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args APIOAuth2ClientArgs
- 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 APIOAuth2ClientArgs
- 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 APIOAuth2ClientArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args APIOAuth2ClientArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args APIOAuth2ClientArgs
- 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 apioauth2ClientResource = new Ovh.Me.APIOAuth2Client("apioauth2ClientResource", new()
{
Description = "string",
Flow = "string",
CallbackUrls = new[]
{
"string",
},
DiscardClientSecret = false,
Name = "string",
});
example, err := me.NewAPIOAuth2Client(ctx, "apioauth2ClientResource", &me.APIOAuth2ClientArgs{
Description: pulumi.String("string"),
Flow: pulumi.String("string"),
CallbackUrls: pulumi.StringArray{
pulumi.String("string"),
},
DiscardClientSecret: pulumi.Bool(false),
Name: pulumi.String("string"),
})
resource "ovh_me_a_p_i_o_auth2_client" "apioauth2ClientResource" {
lifecycle {
create_before_destroy = true
}
description = "string"
flow = "string"
callback_urls = ["string"]
discard_client_secret = false
name = "string"
}
var apioauth2ClientResource = new APIOAuth2Client("apioauth2ClientResource", APIOAuth2ClientArgs.builder()
.description("string")
.flow("string")
.callbackUrls("string")
.discardClientSecret(false)
.name("string")
.build());
apioauth2_client_resource = ovh.me.APIOAuth2Client("apioauth2ClientResource",
description="string",
flow="string",
callback_urls=["string"],
discard_client_secret=False,
name="string")
const apioauth2ClientResource = new ovh.me.APIOAuth2Client("apioauth2ClientResource", {
description: "string",
flow: "string",
callbackUrls: ["string"],
discardClientSecret: false,
name: "string",
});
type: ovh:Me:APIOAuth2Client
properties:
callbackUrls:
- string
description: string
discardClientSecret: false
flow: string
name: string
APIOAuth2Client 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 APIOAuth2Client resource accepts the following input properties:
- Description string
- OAuth2 client description.
- Flow string
- The OAuth2 flow to use.
AUTHORIZATION_CODEorCLIENT_CREDENTIALSare supported at the moment. - Callback
Urls List<string> - List of callback urls when configuring the
AUTHORIZATION_CODEflow. - Discard
Client boolSecret - Name string
- OAuth2 client name.
- Description string
- OAuth2 client description.
- Flow string
- The OAuth2 flow to use.
AUTHORIZATION_CODEorCLIENT_CREDENTIALSare supported at the moment. - Callback
Urls []string - List of callback urls when configuring the
AUTHORIZATION_CODEflow. - Discard
Client boolSecret - Name string
- OAuth2 client name.
- description string
- OAuth2 client description.
- flow string
- The OAuth2 flow to use.
AUTHORIZATION_CODEorCLIENT_CREDENTIALSare supported at the moment. - callback_
urls list(string) - List of callback urls when configuring the
AUTHORIZATION_CODEflow. - discard_
client_ boolsecret - name string
- OAuth2 client name.
- description String
- OAuth2 client description.
- flow String
- The OAuth2 flow to use.
AUTHORIZATION_CODEorCLIENT_CREDENTIALSare supported at the moment. - callback
Urls List<String> - List of callback urls when configuring the
AUTHORIZATION_CODEflow. - discard
Client BooleanSecret - name String
- OAuth2 client name.
- description string
- OAuth2 client description.
- flow string
- The OAuth2 flow to use.
AUTHORIZATION_CODEorCLIENT_CREDENTIALSare supported at the moment. - callback
Urls string[] - List of callback urls when configuring the
AUTHORIZATION_CODEflow. - discard
Client booleanSecret - name string
- OAuth2 client name.
- description str
- OAuth2 client description.
- flow str
- The OAuth2 flow to use.
AUTHORIZATION_CODEorCLIENT_CREDENTIALSare supported at the moment. - callback_
urls Sequence[str] - List of callback urls when configuring the
AUTHORIZATION_CODEflow. - discard_
client_ boolsecret - name str
- OAuth2 client name.
- description String
- OAuth2 client description.
- flow String
- The OAuth2 flow to use.
AUTHORIZATION_CODEorCLIENT_CREDENTIALSare supported at the moment. - callback
Urls List<String> - List of callback urls when configuring the
AUTHORIZATION_CODEflow. - discard
Client BooleanSecret - name String
- OAuth2 client name.
Outputs
All input properties are implicitly available as output properties. Additionally, the APIOAuth2Client resource produces the following output properties:
- Client
Id string - Client ID of the created service account.
- Client
Secret string - Client secret of the created service account. Empty when
discard_client_secretistrue. - Id string
- The provider-assigned unique ID for this managed resource.
- Identity string
- Identity URN of the service account to be used inside an IAM policy.
- Client
Id string - Client ID of the created service account.
- Client
Secret string - Client secret of the created service account. Empty when
discard_client_secretistrue. - Id string
- The provider-assigned unique ID for this managed resource.
- Identity string
- Identity URN of the service account to be used inside an IAM policy.
- client_
id string - Client ID of the created service account.
- client_
secret string - Client secret of the created service account. Empty when
discard_client_secretistrue. - id string
- The provider-assigned unique ID for this managed resource.
- identity string
- Identity URN of the service account to be used inside an IAM policy.
- client
Id String - Client ID of the created service account.
- client
Secret String - Client secret of the created service account. Empty when
discard_client_secretistrue. - id String
- The provider-assigned unique ID for this managed resource.
- identity String
- Identity URN of the service account to be used inside an IAM policy.
- client
Id string - Client ID of the created service account.
- client
Secret string - Client secret of the created service account. Empty when
discard_client_secretistrue. - id string
- The provider-assigned unique ID for this managed resource.
- identity string
- Identity URN of the service account to be used inside an IAM policy.
- client_
id str - Client ID of the created service account.
- client_
secret str - Client secret of the created service account. Empty when
discard_client_secretistrue. - id str
- The provider-assigned unique ID for this managed resource.
- identity str
- Identity URN of the service account to be used inside an IAM policy.
- client
Id String - Client ID of the created service account.
- client
Secret String - Client secret of the created service account. Empty when
discard_client_secretistrue. - id String
- The provider-assigned unique ID for this managed resource.
- identity String
- Identity URN of the service account to be used inside an IAM policy.
Look up Existing APIOAuth2Client Resource
Get an existing APIOAuth2Client 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?: APIOAuth2ClientState, opts?: CustomResourceOptions): APIOAuth2Client@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
callback_urls: Optional[Sequence[str]] = None,
client_id: Optional[str] = None,
client_secret: Optional[str] = None,
description: Optional[str] = None,
discard_client_secret: Optional[bool] = None,
flow: Optional[str] = None,
identity: Optional[str] = None,
name: Optional[str] = None) -> APIOAuth2Clientfunc GetAPIOAuth2Client(ctx *Context, name string, id IDInput, state *APIOAuth2ClientState, opts ...ResourceOption) (*APIOAuth2Client, error)public static APIOAuth2Client Get(string name, Input<string> id, APIOAuth2ClientState? state, CustomResourceOptions? opts = null)public static APIOAuth2Client get(String name, Output<String> id, APIOAuth2ClientState state, CustomResourceOptions options)resources: _: type: ovh:Me:APIOAuth2Client get: id: ${id}import {
to = ovh_me_a_p_i_o_auth2_client.example
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.
- Callback
Urls List<string> - List of callback urls when configuring the
AUTHORIZATION_CODEflow. - Client
Id string - Client ID of the created service account.
- Client
Secret string - Client secret of the created service account. Empty when
discard_client_secretistrue. - Description string
- OAuth2 client description.
- Discard
Client boolSecret - Flow string
- The OAuth2 flow to use.
AUTHORIZATION_CODEorCLIENT_CREDENTIALSare supported at the moment. - Identity string
- Identity URN of the service account to be used inside an IAM policy.
- Name string
- OAuth2 client name.
- Callback
Urls []string - List of callback urls when configuring the
AUTHORIZATION_CODEflow. - Client
Id string - Client ID of the created service account.
- Client
Secret string - Client secret of the created service account. Empty when
discard_client_secretistrue. - Description string
- OAuth2 client description.
- Discard
Client boolSecret - Flow string
- The OAuth2 flow to use.
AUTHORIZATION_CODEorCLIENT_CREDENTIALSare supported at the moment. - Identity string
- Identity URN of the service account to be used inside an IAM policy.
- Name string
- OAuth2 client name.
- callback_
urls list(string) - List of callback urls when configuring the
AUTHORIZATION_CODEflow. - client_
id string - Client ID of the created service account.
- client_
secret string - Client secret of the created service account. Empty when
discard_client_secretistrue. - description string
- OAuth2 client description.
- discard_
client_ boolsecret - flow string
- The OAuth2 flow to use.
AUTHORIZATION_CODEorCLIENT_CREDENTIALSare supported at the moment. - identity string
- Identity URN of the service account to be used inside an IAM policy.
- name string
- OAuth2 client name.
- callback
Urls List<String> - List of callback urls when configuring the
AUTHORIZATION_CODEflow. - client
Id String - Client ID of the created service account.
- client
Secret String - Client secret of the created service account. Empty when
discard_client_secretistrue. - description String
- OAuth2 client description.
- discard
Client BooleanSecret - flow String
- The OAuth2 flow to use.
AUTHORIZATION_CODEorCLIENT_CREDENTIALSare supported at the moment. - identity String
- Identity URN of the service account to be used inside an IAM policy.
- name String
- OAuth2 client name.
- callback
Urls string[] - List of callback urls when configuring the
AUTHORIZATION_CODEflow. - client
Id string - Client ID of the created service account.
- client
Secret string - Client secret of the created service account. Empty when
discard_client_secretistrue. - description string
- OAuth2 client description.
- discard
Client booleanSecret - flow string
- The OAuth2 flow to use.
AUTHORIZATION_CODEorCLIENT_CREDENTIALSare supported at the moment. - identity string
- Identity URN of the service account to be used inside an IAM policy.
- name string
- OAuth2 client name.
- callback_
urls Sequence[str] - List of callback urls when configuring the
AUTHORIZATION_CODEflow. - client_
id str - Client ID of the created service account.
- client_
secret str - Client secret of the created service account. Empty when
discard_client_secretistrue. - description str
- OAuth2 client description.
- discard_
client_ boolsecret - flow str
- The OAuth2 flow to use.
AUTHORIZATION_CODEorCLIENT_CREDENTIALSare supported at the moment. - identity str
- Identity URN of the service account to be used inside an IAM policy.
- name str
- OAuth2 client name.
- callback
Urls List<String> - List of callback urls when configuring the
AUTHORIZATION_CODEflow. - client
Id String - Client ID of the created service account.
- client
Secret String - Client secret of the created service account. Empty when
discard_client_secretistrue. - description String
- OAuth2 client description.
- discard
Client BooleanSecret - flow String
- The OAuth2 flow to use.
AUTHORIZATION_CODEorCLIENT_CREDENTIALSare supported at the moment. - identity String
- Identity URN of the service account to be used inside an IAM policy.
- name String
- OAuth2 client name.
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovhTerraform Provider.
published on Monday, Oct 5, 2026 by OVHcloud