@@ -150,6 +150,9 @@ type CreateOps struct {
150150
151151 // Indicates the parameter related to the yearly/monthly billing mode.
152152 BssParam BssParam `json:"bss_param,omitempty"`
153+
154+ // The access mode of the Kafka instance.
155+ PortProtocol * PortProtocol `json:"port_protocol,omitempty"`
153156}
154157
155158type BssParam struct {
@@ -169,6 +172,39 @@ type BssParam struct {
169172 IsAutoPay * bool `json:"is_auto_pay,omitempty"`
170173}
171174
175+ type PortProtocol struct {
176+ // Whether to enable private plaintext access. Default to `false`.
177+ // + true: Enable private plaintext access. Connection address: ip:9092, access protocol: PLAINTEXT.
178+ // + false: Disable private plaintext access.
179+ PrivatePlainEnable * bool `json:"private_plain_enable,omitempty"`
180+
181+ // Whether to enable private ciphertext access mode with the SASL_SSL security protocol. Default to `false`.
182+ // `private_sasl_ssl_enable` and `private_sasl_plaintext_enable` cannot be set to `true` at the same time.
183+ PrivateSaslSslEnable * bool `json:"private_sasl_ssl_enable,omitempty"`
184+
185+ // Whether to enable private SASL plaintext access. Default to `false`.
186+ // Connection address: ip:9093, access protocol: SASL_PLAINTEXT.
187+ // `private_sasl_plaintext_enable` and `private_sasl_ssl_enable` cannot be set to `true` at the same time.
188+ PrivateSaslPlaintextEnable * bool `json:"private_sasl_plaintext_enable,omitempty"`
189+
190+ // Whether to enable public plaintext access. Default to `false`.
191+ // Before enabling public plaintext access, you must enable public network access.
192+ // Connection address: ip:9094, access protocol: PLAINTEXT.
193+ PublicPlainEnable * bool `json:"public_plain_enable,omitempty"`
194+
195+ // Whether to enable public SASL SSL access. Default to `false`.
196+ // Connection address: ip:9095, access protocol: SASL_SSL.
197+ // `public_sasl_ssl_enable` and `public_sasl_plaintext_enable` cannot be set to `true` at the same time.
198+ // When this parameter is set to `true`, the instance must be enabled for public network access.
199+ PublicSaslSslEnable * bool `json:"public_sasl_ssl_enable,omitempty"`
200+
201+ // Whether to enable public SASL plaintext access. Default to `false`.
202+ // Connection address: ip:9095, access protocol: SASL_PLAINTEXT.
203+ // `public_sasl_plaintext_enable` and `public_sasl_ssl_enable` cannot be set to `true` at the same time.
204+ // When this parameter is set to `true`, the instance must be enabled for public network access.
205+ PublicSaslPlaintextEnable * bool `json:"public_sasl_plaintext_enable,omitempty"`
206+ }
207+
172208// ToInstanceCreateMap is used for type convert
173209func (ops CreateOps ) ToInstanceCreateMap () (map [string ]interface {}, error ) {
174210 return golangsdk .BuildRequestBody (ops , "" )
@@ -189,6 +225,20 @@ func Create(client *golangsdk.ServiceClient, ops CreateOpsBuilder) (r CreateResu
189225 return
190226}
191227
228+ func CreateWithEngine (client * golangsdk.ServiceClient , ops CreateOpsBuilder , engine string ) (r CreateResult ) {
229+ b , err := ops .ToInstanceCreateMap ()
230+ if err != nil {
231+ r .Err = err
232+ return
233+ }
234+
235+ _ , r .Err = client .Post (createURLWithEngine (engine , client ), b , & r .Body , & golangsdk.RequestOpts {
236+ OkCodes : []int {200 },
237+ })
238+
239+ return
240+ }
241+
192242// Delete an instance by id
193243func Delete (client * golangsdk.ServiceClient , id string ) (r DeleteResult ) {
194244 _ , r .Err = client .Delete (deleteURL (client , id ), & golangsdk.RequestOpts {
0 commit comments