# AWS RDS for SQL Server

AWS RDS for SQL Server target for executing queries on an RDS-managed MSSQL instance.

## YAML Parameters

```typescript
interface YAMLParameters {
  /** Hash ID or identifier of an AWS integration */
  integration: string;
  /** AWS region of the RDS instance, e.g. us-east-1 */
  region: string;
  /** RDS DB instance identifier */
  db_instance_identifier: string;
  /** The endpoint hostname of the RDS instance */
  host: string;
  /** The human-readable ID of the target */
  target: string;
  /** The name of the target */
  name?: string;
  /** The port of the RDS MSSQL instance. Default: 1433 */
  port?: string;
  /** The default database name */
  database?: string;
  /** SSL connection mode. Default: REQUIRE. */
  ssl_mode?: "DISABLE" | "REQUIRE" | "VERIFY_FULL";
  /** PEM-encoded CA certificate (required when ssl_mode is VERIFY_FULL) */
  ca_certificate?: string;
  /** MSSQL authentication credentials */
  auth?: MssqlAuthYaml;
  /** SSH proxy target for tunneling to RDS instances in private VPCs */
  proxy?: string;
  /** Access permissions for the target */
  permissions?: PermissionsYaml;
  /** Indicates if this target is disabled (default: false) */
  disabled?: boolean;
  /** The list of tags associated with the target */
  tags?: string[];
  /** Defines how the target can be used (as deployment target, proxy, or both) */
  use_as?: UseAsYaml;
  /** Note for this resource */
  note?: string;
  /** YAML note for AI agents operating on this resource */
  agent_note?: string;
  type?: "RDS_MSSQL";
}
```

## Type Definitions

```typescript
interface MssqlAuthYaml {
  /** The MSSQL username */
  username?: string;
  /** The MSSQL password */
  password?: string;
}

interface PermissionsYaml {
  /** Access level for other workspace members */
  others?: "DENIED" | "READ_ONLY" | "USE_ONLY" | "BLIND" | "RUN_ONLY" | "READ_WRITE" | "MANAGE" | "DEFAULT" | "ALLOWED" | "STAGE" | "COMMIT";
  /** List of specific users with their access levels */
  users?: object;
  /** List of user groups with their access levels */
  groups?: object;
  /** List of pipelines allowed to access this resource */
  pipelines?: AllowedPipelineYaml[];
  /** List of sandboxes allowed to access this resource */
  sandboxes?: AllowedSandboxYaml[];
}

interface AllowedPipelineYaml {
  /** When true, allow all pipelines to access this resource */
  all?: "DENIED" | "READ_ONLY" | "USE_ONLY" | "BLIND" | "RUN_ONLY" | "READ_WRITE" | "MANAGE" | "DEFAULT" | "ALLOWED" | "STAGE" | "COMMIT";
  /** Project name containing the allowed pipeline */
  project?: string;
  /** Pipeline identifier that is allowed to access this resource */
  pipeline?: string;
  /** Access level granted to the pipeline */
  access?: "DENIED" | "READ_ONLY" | "USE_ONLY" | "BLIND" | "RUN_ONLY" | "READ_WRITE" | "MANAGE" | "DEFAULT" | "ALLOWED" | "STAGE" | "COMMIT";
}

interface AllowedSandboxYaml {
  /** When true, allow all sandboxes to access this resource */
  all?: "DENIED" | "READ_ONLY" | "USE_ONLY" | "BLIND" | "RUN_ONLY" | "READ_WRITE" | "MANAGE" | "DEFAULT" | "ALLOWED" | "STAGE" | "COMMIT";
  /** Project name containing the allowed sandbox */
  project?: string;
  /** Sandbox identifier that is allowed to access this resource */
  sandbox?: string;
  /** Access level granted to the sandbox */
  access?: "DENIED" | "READ_ONLY" | "USE_ONLY" | "BLIND" | "RUN_ONLY" | "READ_WRITE" | "MANAGE" | "DEFAULT" | "ALLOWED" | "STAGE" | "COMMIT";
}

interface UseAsYaml {
  /** Whether the target can be used as a deployment target (default: on) */
  target?: boolean | "on" | "off";
  /** Whether the target can be used as a proxy (default: on) */
  proxy?: boolean | "on" | "off";
}

```

## YAML Examples

### AWS RDS for SQL Server target with an AWS integration

```yaml
- target: rds_mssql_prod
  type: RDS_MSSQL
  name: Production MSSQL on RDS
  integration: aws_prod
  region: us-east-1
  db_instance_identifier: my-prod-mssql
  host: my-prod-mssql.abc123.us-east-1.rds.amazonaws.com
  port: "1433"
  database: production
  ssl_mode: REQUIRE
  auth:
    username: admin
    password: $password
  proxy: my_ssh_bastion
  tags:
    - rds
    - mssql

```

### Minimal

```yaml
- target: rds_mssql_prod
  type: RDS_MSSQL
  integration: aws_prod
  region: us-east-1
  db_instance_identifier: my-prod-mssql
  host: my-prod-mssql.abc123.us-east-1.rds.amazonaws.com
  auth:
    username: admin
    password: $password

```


---
Original source: https://buddy.works/docs/yaml/yaml-targets/rds-mssql