body_hash
stringlengths 64
64
| body
stringlengths 23
109k
| docstring
stringlengths 1
57k
| path
stringlengths 4
198
| name
stringlengths 1
115
| repository_name
stringlengths 7
111
| repository_stars
float64 0
191k
| lang
stringclasses 1
value | body_without_docstring
stringlengths 14
108k
| unified
stringlengths 45
133k
|
---|---|---|---|---|---|---|---|---|---|
13aa7b19772d82e9d28dac3d2367a83644ca980c7ecaff49a3d8d08ae29742b1 | def evaluate(self, calculator, divide=False):
'Evaluate this AST node, and return a Sass value.\n\n `divide` indicates whether a descendant node representing a division\n should be forcibly treated as a division. See the commentary in\n `BinaryOp`.\n '
raise NotImplementedError | Evaluate this AST node, and return a Sass value.
`divide` indicates whether a descendant node representing a division
should be forcibly treated as a division. See the commentary in
`BinaryOp`. | scss/expression.py | evaluate | ojengwa/pyScss | 1 | python | def evaluate(self, calculator, divide=False):
'Evaluate this AST node, and return a Sass value.\n\n `divide` indicates whether a descendant node representing a division\n should be forcibly treated as a division. See the commentary in\n `BinaryOp`.\n '
raise NotImplementedError | def evaluate(self, calculator, divide=False):
'Evaluate this AST node, and return a Sass value.\n\n `divide` indicates whether a descendant node representing a division\n should be forcibly treated as a division. See the commentary in\n `BinaryOp`.\n '
raise NotImplementedError<|docstring|>Evaluate this AST node, and return a Sass value.
`divide` indicates whether a descendant node representing a division
should be forcibly treated as a division. See the commentary in
`BinaryOp`.<|endoftext|> |
496f98322fd4e728f758ecccd49cd63f82384ad7e9e8187d84546741b574bd12 | def iter_def_argspec(self):
'Interpreting this literal as a function definition, yields pairs of\n (variable name as a string, default value as an AST node or None).\n '
started_kwargs = False
seen_vars = set()
for (var, value) in self.argpairs:
if (var is None):
var = value
value = None
if started_kwargs:
raise SyntaxError(('Required argument %r must precede optional arguments' % (var.name,)))
else:
started_kwargs = True
if (not isinstance(var, Variable)):
raise SyntaxError(('Expected variable name, got %r' % (var,)))
if (var.name in seen_vars):
raise SyntaxError(('Duplicate argument %r' % (var.name,)))
seen_vars.add(var.name)
(yield (var.name, value)) | Interpreting this literal as a function definition, yields pairs of
(variable name as a string, default value as an AST node or None). | scss/expression.py | iter_def_argspec | ojengwa/pyScss | 1 | python | def iter_def_argspec(self):
'Interpreting this literal as a function definition, yields pairs of\n (variable name as a string, default value as an AST node or None).\n '
started_kwargs = False
seen_vars = set()
for (var, value) in self.argpairs:
if (var is None):
var = value
value = None
if started_kwargs:
raise SyntaxError(('Required argument %r must precede optional arguments' % (var.name,)))
else:
started_kwargs = True
if (not isinstance(var, Variable)):
raise SyntaxError(('Expected variable name, got %r' % (var,)))
if (var.name in seen_vars):
raise SyntaxError(('Duplicate argument %r' % (var.name,)))
seen_vars.add(var.name)
(yield (var.name, value)) | def iter_def_argspec(self):
'Interpreting this literal as a function definition, yields pairs of\n (variable name as a string, default value as an AST node or None).\n '
started_kwargs = False
seen_vars = set()
for (var, value) in self.argpairs:
if (var is None):
var = value
value = None
if started_kwargs:
raise SyntaxError(('Required argument %r must precede optional arguments' % (var.name,)))
else:
started_kwargs = True
if (not isinstance(var, Variable)):
raise SyntaxError(('Expected variable name, got %r' % (var,)))
if (var.name in seen_vars):
raise SyntaxError(('Duplicate argument %r' % (var.name,)))
seen_vars.add(var.name)
(yield (var.name, value))<|docstring|>Interpreting this literal as a function definition, yields pairs of
(variable name as a string, default value as an AST node or None).<|endoftext|> |
b613b19c2c8516a1f4f5d63205ac59e3bfd5a96f4396fe739841f3b32d7a31c2 | def evaluate_call_args(self, calculator):
'Interpreting this literal as a function call, return a 2-tuple of\n ``(args, kwargs)``.\n '
args = []
kwargs = {}
for (var_node, value_node) in self.argpairs:
value = value_node.evaluate(calculator, divide=True)
if (var_node is None):
args.append(value)
else:
if (not isinstance(var_node, Variable)):
raise SyntaxError(('Expected variable name, got %r' % (var_node,)))
kwargs[var_node.name] = value
if self.slurp:
args.extend(self.slurp.evaluate(calculator, divide=True))
return (args, kwargs) | Interpreting this literal as a function call, return a 2-tuple of
``(args, kwargs)``. | scss/expression.py | evaluate_call_args | ojengwa/pyScss | 1 | python | def evaluate_call_args(self, calculator):
'Interpreting this literal as a function call, return a 2-tuple of\n ``(args, kwargs)``.\n '
args = []
kwargs = {}
for (var_node, value_node) in self.argpairs:
value = value_node.evaluate(calculator, divide=True)
if (var_node is None):
args.append(value)
else:
if (not isinstance(var_node, Variable)):
raise SyntaxError(('Expected variable name, got %r' % (var_node,)))
kwargs[var_node.name] = value
if self.slurp:
args.extend(self.slurp.evaluate(calculator, divide=True))
return (args, kwargs) | def evaluate_call_args(self, calculator):
'Interpreting this literal as a function call, return a 2-tuple of\n ``(args, kwargs)``.\n '
args = []
kwargs = {}
for (var_node, value_node) in self.argpairs:
value = value_node.evaluate(calculator, divide=True)
if (var_node is None):
args.append(value)
else:
if (not isinstance(var_node, Variable)):
raise SyntaxError(('Expected variable name, got %r' % (var_node,)))
kwargs[var_node.name] = value
if self.slurp:
args.extend(self.slurp.evaluate(calculator, divide=True))
return (args, kwargs)<|docstring|>Interpreting this literal as a function call, return a 2-tuple of
``(args, kwargs)``.<|endoftext|> |
baff00a147a670d28da895ee5b8f53edc95fd1bce05185d8894afbfbbc96abbe | def _peek(self, types):
'\n Returns the token type for lookahead; if there are any args\n then the list of args is the set of token types to allow\n '
try:
tok = self._scanner.token(self._pos, types)
return tok[2]
except SyntaxError:
return None | Returns the token type for lookahead; if there are any args
then the list of args is the set of token types to allow | scss/expression.py | _peek | ojengwa/pyScss | 1 | python | def _peek(self, types):
'\n Returns the token type for lookahead; if there are any args\n then the list of args is the set of token types to allow\n '
try:
tok = self._scanner.token(self._pos, types)
return tok[2]
except SyntaxError:
return None | def _peek(self, types):
'\n Returns the token type for lookahead; if there are any args\n then the list of args is the set of token types to allow\n '
try:
tok = self._scanner.token(self._pos, types)
return tok[2]
except SyntaxError:
return None<|docstring|>Returns the token type for lookahead; if there are any args
then the list of args is the set of token types to allow<|endoftext|> |
cacbaa149e61191eb2d84bb2043b3fd1c012398f691615932cf9816b8f33c044 | def _scan(self, type):
'\n Returns the matched text, and moves to the next token\n '
tok = self._scanner.token(self._pos, set([type]))
self._char_pos = tok[0]
if (tok[2] != type):
raise SyntaxError(('SyntaxError[@ char %s: %s]' % (repr(tok[0]), ('Trying to find ' + type))))
self._pos += 1
return tok[3] | Returns the matched text, and moves to the next token | scss/expression.py | _scan | ojengwa/pyScss | 1 | python | def _scan(self, type):
'\n \n '
tok = self._scanner.token(self._pos, set([type]))
self._char_pos = tok[0]
if (tok[2] != type):
raise SyntaxError(('SyntaxError[@ char %s: %s]' % (repr(tok[0]), ('Trying to find ' + type))))
self._pos += 1
return tok[3] | def _scan(self, type):
'\n \n '
tok = self._scanner.token(self._pos, set([type]))
self._char_pos = tok[0]
if (tok[2] != type):
raise SyntaxError(('SyntaxError[@ char %s: %s]' % (repr(tok[0]), ('Trying to find ' + type))))
self._pos += 1
return tok[3]<|docstring|>Returns the matched text, and moves to the next token<|endoftext|> |
fe5ae2330cf2c0f51a3224d0c594a069654b4e512ae5bc0779f48e8486af2ae6 | def check_brat_annotation_and_text_compatibility(brat_folder):
'\n Check if brat annotation and text files are compatible.\n '
dataset_type = os.path.basename(brat_folder)
print('Checking the validity of BRAT-formatted {0} set... '.format(dataset_type), end='')
text_filepaths = sorted(glob.glob(os.path.join(brat_folder, '*.txt')))
for text_filepath in text_filepaths:
base_filename = os.path.splitext(os.path.basename(text_filepath))[0]
annotation_filepath = os.path.join(os.path.dirname(text_filepath), (base_filename + '.ann'))
if (not os.path.exists(annotation_filepath)):
raise IOError('Annotation file does not exist: {0}'.format(annotation_filepath))
(text, entities) = get_entities_from_brat(text_filepath, annotation_filepath)
print('Done.') | Check if brat annotation and text files are compatible. | software/opt/TeMU-NeuroNER/brat_to_conll.py | check_brat_annotation_and_text_compatibility | Rbbt-Workflows/TeMU | 0 | python | def check_brat_annotation_and_text_compatibility(brat_folder):
'\n \n '
dataset_type = os.path.basename(brat_folder)
print('Checking the validity of BRAT-formatted {0} set... '.format(dataset_type), end=)
text_filepaths = sorted(glob.glob(os.path.join(brat_folder, '*.txt')))
for text_filepath in text_filepaths:
base_filename = os.path.splitext(os.path.basename(text_filepath))[0]
annotation_filepath = os.path.join(os.path.dirname(text_filepath), (base_filename + '.ann'))
if (not os.path.exists(annotation_filepath)):
raise IOError('Annotation file does not exist: {0}'.format(annotation_filepath))
(text, entities) = get_entities_from_brat(text_filepath, annotation_filepath)
print('Done.') | def check_brat_annotation_and_text_compatibility(brat_folder):
'\n \n '
dataset_type = os.path.basename(brat_folder)
print('Checking the validity of BRAT-formatted {0} set... '.format(dataset_type), end=)
text_filepaths = sorted(glob.glob(os.path.join(brat_folder, '*.txt')))
for text_filepath in text_filepaths:
base_filename = os.path.splitext(os.path.basename(text_filepath))[0]
annotation_filepath = os.path.join(os.path.dirname(text_filepath), (base_filename + '.ann'))
if (not os.path.exists(annotation_filepath)):
raise IOError('Annotation file does not exist: {0}'.format(annotation_filepath))
(text, entities) = get_entities_from_brat(text_filepath, annotation_filepath)
print('Done.')<|docstring|>Check if brat annotation and text files are compatible.<|endoftext|> |
8f1203dba9ba49f4043de5d44cf957da735f7634ab317711453a8c6dbe72b7f6 | def brat_to_conll(input_folder, output_filepath, tokenizer, language, use_pos=False):
"\n Assumes '.txt' and '.ann' files are in the input_folder.\n Checks for the compatibility between .txt and .ann at the same time.\n "
if use_pos:
"\n TAGGER_PATH = '../../PlanTL-SPACCC_POS-TAGGER-9b64add/Med_Tagger'\n sys.path.append(TAGGER_PATH)\n from Med_Tagger import Med_Tagger\n from Med_Tagger import elimina_tildes\n med_tagger = Med_Tagger()\n "
elif (tokenizer == 'spacy'):
spacy_nlp = spacy.load(language)
elif (tokenizer == 'stanford'):
core_nlp = StanfordCoreNLP('http://localhost:{0}'.format(9000))
else:
raise ValueError("tokenizer should be either 'spacy' or 'stanford'.")
verbose = False
dataset_type = os.path.basename(input_folder)
print('Formatting {0} set from BRAT to CONLL... '.format(dataset_type), end='')
text_filepaths = sorted(glob.glob(os.path.join(input_folder, '*.txt')))
output_file = codecs.open(output_filepath, 'w', 'utf-8')
for text_filepath in text_filepaths:
base_filename = os.path.splitext(os.path.basename(text_filepath))[0]
annotation_filepath = os.path.join(os.path.dirname(text_filepath), (base_filename + '.ann'))
if (not os.path.exists(annotation_filepath)):
codecs.open(annotation_filepath, 'w', 'UTF-8').close()
if use_pos:
annotation_filepath2 = os.path.join(os.path.dirname(text_filepath), (base_filename + '.ann2'))
if (not os.path.exists(annotation_filepath2)):
codecs.open(annotation_filepath2, 'w', 'UTF-8').close()
(text, entities) = get_entities_from_brat(text_filepath, annotation_filepath)
entities = sorted(entities, key=(lambda entity: entity['start']))
if use_pos:
pos_tags = get_pos_tags_from_brat(text, annotation_filepath2)
sentences = get_sentences_and_tokens_from_spacy(text, spacy_nlp)
elif (tokenizer == 'spacy'):
sentences = get_sentences_and_tokens_from_spacy(text, spacy_nlp)
elif (tokenizer == 'stanford'):
sentences = get_sentences_and_tokens_from_stanford(text, core_nlp)
if use_pos:
token_counter = 0
for sentence in sentences:
inside = False
previous_token_label = 'O'
for token in sentence:
token['label'] = 'O'
for entity in entities:
if ((entity['start'] <= token['start'] < entity['end']) or (entity['start'] < token['end'] <= entity['end']) or (token['start'] < entity['start'] < entity['end'] < token['end'])):
token['label'] = entity['type'].replace('-', '_')
break
elif (token['end'] < entity['start']):
break
if (len(entities) == 0):
entity = {'end': 0}
if (token['label'] == 'O'):
gold_label = 'O'
inside = False
elif (inside and (token['label'] == previous_token_label)):
gold_label = 'I-{0}'.format(token['label'])
else:
inside = True
gold_label = 'B-{0}'.format(token['label'])
if (token['end'] == entity['end']):
inside = False
previous_token_label = token['label']
if use_pos:
pos_tag = pos_tags[token_counter]
token_counter += 1
if verbose:
print('{0} {1} {2} {3} {4} {5}\n'.format(token['text'], base_filename, token['start'], token['end'], pos_tag, gold_label))
output_file.write('{0} {1} {2} {3} {4} {5}\n'.format(token['text'], base_filename, token['start'], token['end'], pos_tag, gold_label))
else:
if verbose:
print('{0} {1} {2} {3} {4}\n'.format(token['text'], base_filename, token['start'], token['end'], gold_label))
output_file.write('{0} {1} {2} {3} {4}\n'.format(token['text'], base_filename, token['start'], token['end'], gold_label))
if verbose:
print('\n')
output_file.write('\n')
output_file.close()
print('Done.')
if (not use_pos):
if (tokenizer == 'spacy'):
del spacy_nlp
elif (tokenizer == 'stanford'):
del core_nlp | Assumes '.txt' and '.ann' files are in the input_folder.
Checks for the compatibility between .txt and .ann at the same time. | software/opt/TeMU-NeuroNER/brat_to_conll.py | brat_to_conll | Rbbt-Workflows/TeMU | 0 | python | def brat_to_conll(input_folder, output_filepath, tokenizer, language, use_pos=False):
"\n Assumes '.txt' and '.ann' files are in the input_folder.\n Checks for the compatibility between .txt and .ann at the same time.\n "
if use_pos:
"\n TAGGER_PATH = '../../PlanTL-SPACCC_POS-TAGGER-9b64add/Med_Tagger'\n sys.path.append(TAGGER_PATH)\n from Med_Tagger import Med_Tagger\n from Med_Tagger import elimina_tildes\n med_tagger = Med_Tagger()\n "
elif (tokenizer == 'spacy'):
spacy_nlp = spacy.load(language)
elif (tokenizer == 'stanford'):
core_nlp = StanfordCoreNLP('http://localhost:{0}'.format(9000))
else:
raise ValueError("tokenizer should be either 'spacy' or 'stanford'.")
verbose = False
dataset_type = os.path.basename(input_folder)
print('Formatting {0} set from BRAT to CONLL... '.format(dataset_type), end=)
text_filepaths = sorted(glob.glob(os.path.join(input_folder, '*.txt')))
output_file = codecs.open(output_filepath, 'w', 'utf-8')
for text_filepath in text_filepaths:
base_filename = os.path.splitext(os.path.basename(text_filepath))[0]
annotation_filepath = os.path.join(os.path.dirname(text_filepath), (base_filename + '.ann'))
if (not os.path.exists(annotation_filepath)):
codecs.open(annotation_filepath, 'w', 'UTF-8').close()
if use_pos:
annotation_filepath2 = os.path.join(os.path.dirname(text_filepath), (base_filename + '.ann2'))
if (not os.path.exists(annotation_filepath2)):
codecs.open(annotation_filepath2, 'w', 'UTF-8').close()
(text, entities) = get_entities_from_brat(text_filepath, annotation_filepath)
entities = sorted(entities, key=(lambda entity: entity['start']))
if use_pos:
pos_tags = get_pos_tags_from_brat(text, annotation_filepath2)
sentences = get_sentences_and_tokens_from_spacy(text, spacy_nlp)
elif (tokenizer == 'spacy'):
sentences = get_sentences_and_tokens_from_spacy(text, spacy_nlp)
elif (tokenizer == 'stanford'):
sentences = get_sentences_and_tokens_from_stanford(text, core_nlp)
if use_pos:
token_counter = 0
for sentence in sentences:
inside = False
previous_token_label = 'O'
for token in sentence:
token['label'] = 'O'
for entity in entities:
if ((entity['start'] <= token['start'] < entity['end']) or (entity['start'] < token['end'] <= entity['end']) or (token['start'] < entity['start'] < entity['end'] < token['end'])):
token['label'] = entity['type'].replace('-', '_')
break
elif (token['end'] < entity['start']):
break
if (len(entities) == 0):
entity = {'end': 0}
if (token['label'] == 'O'):
gold_label = 'O'
inside = False
elif (inside and (token['label'] == previous_token_label)):
gold_label = 'I-{0}'.format(token['label'])
else:
inside = True
gold_label = 'B-{0}'.format(token['label'])
if (token['end'] == entity['end']):
inside = False
previous_token_label = token['label']
if use_pos:
pos_tag = pos_tags[token_counter]
token_counter += 1
if verbose:
print('{0} {1} {2} {3} {4} {5}\n'.format(token['text'], base_filename, token['start'], token['end'], pos_tag, gold_label))
output_file.write('{0} {1} {2} {3} {4} {5}\n'.format(token['text'], base_filename, token['start'], token['end'], pos_tag, gold_label))
else:
if verbose:
print('{0} {1} {2} {3} {4}\n'.format(token['text'], base_filename, token['start'], token['end'], gold_label))
output_file.write('{0} {1} {2} {3} {4}\n'.format(token['text'], base_filename, token['start'], token['end'], gold_label))
if verbose:
print('\n')
output_file.write('\n')
output_file.close()
print('Done.')
if (not use_pos):
if (tokenizer == 'spacy'):
del spacy_nlp
elif (tokenizer == 'stanford'):
del core_nlp | def brat_to_conll(input_folder, output_filepath, tokenizer, language, use_pos=False):
"\n Assumes '.txt' and '.ann' files are in the input_folder.\n Checks for the compatibility between .txt and .ann at the same time.\n "
if use_pos:
"\n TAGGER_PATH = '../../PlanTL-SPACCC_POS-TAGGER-9b64add/Med_Tagger'\n sys.path.append(TAGGER_PATH)\n from Med_Tagger import Med_Tagger\n from Med_Tagger import elimina_tildes\n med_tagger = Med_Tagger()\n "
elif (tokenizer == 'spacy'):
spacy_nlp = spacy.load(language)
elif (tokenizer == 'stanford'):
core_nlp = StanfordCoreNLP('http://localhost:{0}'.format(9000))
else:
raise ValueError("tokenizer should be either 'spacy' or 'stanford'.")
verbose = False
dataset_type = os.path.basename(input_folder)
print('Formatting {0} set from BRAT to CONLL... '.format(dataset_type), end=)
text_filepaths = sorted(glob.glob(os.path.join(input_folder, '*.txt')))
output_file = codecs.open(output_filepath, 'w', 'utf-8')
for text_filepath in text_filepaths:
base_filename = os.path.splitext(os.path.basename(text_filepath))[0]
annotation_filepath = os.path.join(os.path.dirname(text_filepath), (base_filename + '.ann'))
if (not os.path.exists(annotation_filepath)):
codecs.open(annotation_filepath, 'w', 'UTF-8').close()
if use_pos:
annotation_filepath2 = os.path.join(os.path.dirname(text_filepath), (base_filename + '.ann2'))
if (not os.path.exists(annotation_filepath2)):
codecs.open(annotation_filepath2, 'w', 'UTF-8').close()
(text, entities) = get_entities_from_brat(text_filepath, annotation_filepath)
entities = sorted(entities, key=(lambda entity: entity['start']))
if use_pos:
pos_tags = get_pos_tags_from_brat(text, annotation_filepath2)
sentences = get_sentences_and_tokens_from_spacy(text, spacy_nlp)
elif (tokenizer == 'spacy'):
sentences = get_sentences_and_tokens_from_spacy(text, spacy_nlp)
elif (tokenizer == 'stanford'):
sentences = get_sentences_and_tokens_from_stanford(text, core_nlp)
if use_pos:
token_counter = 0
for sentence in sentences:
inside = False
previous_token_label = 'O'
for token in sentence:
token['label'] = 'O'
for entity in entities:
if ((entity['start'] <= token['start'] < entity['end']) or (entity['start'] < token['end'] <= entity['end']) or (token['start'] < entity['start'] < entity['end'] < token['end'])):
token['label'] = entity['type'].replace('-', '_')
break
elif (token['end'] < entity['start']):
break
if (len(entities) == 0):
entity = {'end': 0}
if (token['label'] == 'O'):
gold_label = 'O'
inside = False
elif (inside and (token['label'] == previous_token_label)):
gold_label = 'I-{0}'.format(token['label'])
else:
inside = True
gold_label = 'B-{0}'.format(token['label'])
if (token['end'] == entity['end']):
inside = False
previous_token_label = token['label']
if use_pos:
pos_tag = pos_tags[token_counter]
token_counter += 1
if verbose:
print('{0} {1} {2} {3} {4} {5}\n'.format(token['text'], base_filename, token['start'], token['end'], pos_tag, gold_label))
output_file.write('{0} {1} {2} {3} {4} {5}\n'.format(token['text'], base_filename, token['start'], token['end'], pos_tag, gold_label))
else:
if verbose:
print('{0} {1} {2} {3} {4}\n'.format(token['text'], base_filename, token['start'], token['end'], gold_label))
output_file.write('{0} {1} {2} {3} {4}\n'.format(token['text'], base_filename, token['start'], token['end'], gold_label))
if verbose:
print('\n')
output_file.write('\n')
output_file.close()
print('Done.')
if (not use_pos):
if (tokenizer == 'spacy'):
del spacy_nlp
elif (tokenizer == 'stanford'):
del core_nlp<|docstring|>Assumes '.txt' and '.ann' files are in the input_folder.
Checks for the compatibility between .txt and .ann at the same time.<|endoftext|> |
e41e2597036426813295b007b7430c23bdcee1bc47e18d5469ed33e4c2f21a74 | def __init__(self, n, cell_, *args):
'\n polymer init\n '
self.n = n
self.cell = cell_
print([move.__str__() for move in args])
self.coords_tmp = None
self.coords = self.set_init_coords()
for move in args:
name = ('move_' + move.__str__())
setattr(self, name, move)
self.distance_matrix = None | polymer init | sim/polymer.py | __init__ | raalesir/sim | 0 | python | def __init__(self, n, cell_, *args):
'\n \n '
self.n = n
self.cell = cell_
print([move.__str__() for move in args])
self.coords_tmp = None
self.coords = self.set_init_coords()
for move in args:
name = ('move_' + move.__str__())
setattr(self, name, move)
self.distance_matrix = None | def __init__(self, n, cell_, *args):
'\n \n '
self.n = n
self.cell = cell_
print([move.__str__() for move in args])
self.coords_tmp = None
self.coords = self.set_init_coords()
for move in args:
name = ('move_' + move.__str__())
setattr(self, name, move)
self.distance_matrix = None<|docstring|>polymer init<|endoftext|> |
a815937cd7814220c9d11cf3a66031197f6595216b7ae300186a47a15324d92a | def check_borders(self):
'\n given coordinates ``c`` checks if any of the coordinates leaves the bound box\n\n :return: True of False\n :rtype: bool\n '
if ((((((np.max(self.coords_tmp[(0, :)]) < self.cell.A) & (np.max(self.coords_tmp[(1, :)]) < self.cell.B)) & (np.max(self.coords_tmp[2]) < self.cell.C)) & (np.min(self.coords_tmp[(0, :)]) > 0)) & (np.min(self.coords_tmp[(1, :)]) > 0)) & (np.min(self.coords_tmp[2]) > 0)):
return True
else:
return False | given coordinates ``c`` checks if any of the coordinates leaves the bound box
:return: True of False
:rtype: bool | sim/polymer.py | check_borders | raalesir/sim | 0 | python | def check_borders(self):
'\n given coordinates ``c`` checks if any of the coordinates leaves the bound box\n\n :return: True of False\n :rtype: bool\n '
if ((((((np.max(self.coords_tmp[(0, :)]) < self.cell.A) & (np.max(self.coords_tmp[(1, :)]) < self.cell.B)) & (np.max(self.coords_tmp[2]) < self.cell.C)) & (np.min(self.coords_tmp[(0, :)]) > 0)) & (np.min(self.coords_tmp[(1, :)]) > 0)) & (np.min(self.coords_tmp[2]) > 0)):
return True
else:
return False | def check_borders(self):
'\n given coordinates ``c`` checks if any of the coordinates leaves the bound box\n\n :return: True of False\n :rtype: bool\n '
if ((((((np.max(self.coords_tmp[(0, :)]) < self.cell.A) & (np.max(self.coords_tmp[(1, :)]) < self.cell.B)) & (np.max(self.coords_tmp[2]) < self.cell.C)) & (np.min(self.coords_tmp[(0, :)]) > 0)) & (np.min(self.coords_tmp[(1, :)]) > 0)) & (np.min(self.coords_tmp[2]) > 0)):
return True
else:
return False<|docstring|>given coordinates ``c`` checks if any of the coordinates leaves the bound box
:return: True of False
:rtype: bool<|endoftext|> |
ea17fa31273fc2b7ba835c9a81d88ae5b6b486bda50b208621e6c30374937b52 | def check_overlap(self):
'\n checking chain for overlaps\n\n :return: True/False\n :rtype: bool\n '
return (self.coords_tmp.shape == np.unique(self.coords_tmp, axis=1).shape) | checking chain for overlaps
:return: True/False
:rtype: bool | sim/polymer.py | check_overlap | raalesir/sim | 0 | python | def check_overlap(self):
'\n checking chain for overlaps\n\n :return: True/False\n :rtype: bool\n '
return (self.coords_tmp.shape == np.unique(self.coords_tmp, axis=1).shape) | def check_overlap(self):
'\n checking chain for overlaps\n\n :return: True/False\n :rtype: bool\n '
return (self.coords_tmp.shape == np.unique(self.coords_tmp, axis=1).shape)<|docstring|>checking chain for overlaps
:return: True/False
:rtype: bool<|endoftext|> |
cc73851cc9b1b80cb2ace6c6ae2b62c74525188e6c8afcb077a8a56bdf999dc5 | def calculate_distances(self):
'\n calculating distance matrix\n\n :return: distance matrix `NxN`\n :rtype: numpy array\n '
size_ = self.coords.shape[1]
dst = np.zeros((size_, size_))
for i in range(size_):
for j in range(0, i):
tmp = (self.coords[(:, i)] - self.coords[(:, j)])
dst[(i, j)] = np.dot(tmp, tmp)
self.distance_matrix = dst | calculating distance matrix
:return: distance matrix `NxN`
:rtype: numpy array | sim/polymer.py | calculate_distances | raalesir/sim | 0 | python | def calculate_distances(self):
'\n calculating distance matrix\n\n :return: distance matrix `NxN`\n :rtype: numpy array\n '
size_ = self.coords.shape[1]
dst = np.zeros((size_, size_))
for i in range(size_):
for j in range(0, i):
tmp = (self.coords[(:, i)] - self.coords[(:, j)])
dst[(i, j)] = np.dot(tmp, tmp)
self.distance_matrix = dst | def calculate_distances(self):
'\n calculating distance matrix\n\n :return: distance matrix `NxN`\n :rtype: numpy array\n '
size_ = self.coords.shape[1]
dst = np.zeros((size_, size_))
for i in range(size_):
for j in range(0, i):
tmp = (self.coords[(:, i)] - self.coords[(:, j)])
dst[(i, j)] = np.dot(tmp, tmp)
self.distance_matrix = dst<|docstring|>calculating distance matrix
:return: distance matrix `NxN`
:rtype: numpy array<|endoftext|> |
552288e56dc6e137f7438305adc9de421e5b1acd24e5bd63f31b9984710e6560 | def _make_circular_indexes(self):
'\n\n :param N: number of bead\n :type N: int\n :return: tuple of 4 lists, each list keeps the indexes of beads belonging to a particular group\n :rtype: tuple\n '
tmp = [i for i in range(self.n)]
evens = tmp[::2]
odds = tmp[1::2]
tmp = len(evens)
idx = int(np.ceil((self.n / 4)))
i0 = odds[(- idx):]
i1 = evens[:idx]
i2 = evens[((- tmp) + idx):]
i3 = odds[:(tmp - idx)]
return (i0, i1, i2, i3) | :param N: number of bead
:type N: int
:return: tuple of 4 lists, each list keeps the indexes of beads belonging to a particular group
:rtype: tuple | sim/polymer.py | _make_circular_indexes | raalesir/sim | 0 | python | def _make_circular_indexes(self):
'\n\n :param N: number of bead\n :type N: int\n :return: tuple of 4 lists, each list keeps the indexes of beads belonging to a particular group\n :rtype: tuple\n '
tmp = [i for i in range(self.n)]
evens = tmp[::2]
odds = tmp[1::2]
tmp = len(evens)
idx = int(np.ceil((self.n / 4)))
i0 = odds[(- idx):]
i1 = evens[:idx]
i2 = evens[((- tmp) + idx):]
i3 = odds[:(tmp - idx)]
return (i0, i1, i2, i3) | def _make_circular_indexes(self):
'\n\n :param N: number of bead\n :type N: int\n :return: tuple of 4 lists, each list keeps the indexes of beads belonging to a particular group\n :rtype: tuple\n '
tmp = [i for i in range(self.n)]
evens = tmp[::2]
odds = tmp[1::2]
tmp = len(evens)
idx = int(np.ceil((self.n / 4)))
i0 = odds[(- idx):]
i1 = evens[:idx]
i2 = evens[((- tmp) + idx):]
i3 = odds[:(tmp - idx)]
return (i0, i1, i2, i3)<|docstring|>:param N: number of bead
:type N: int
:return: tuple of 4 lists, each list keeps the indexes of beads belonging to a particular group
:rtype: tuple<|endoftext|> |
840d165fb406e9fc9f218fcf92d7d3c80062f34badbf8ea8c4231247b6719663 | def set_init_coords(self):
'\n making circular chain of N beads\n\n :return: *squashed* 3D-coordinates of the circular polymer\n :rtype: numpy array (3,N)\n '
c = np.zeros((3, self.n))
init_point = self.cell.get_center()
(i0, i1, i2, i3) = self._make_circular_indexes()
c[(:, i0)] = (np.array([0, 1, 0]) + init_point).reshape(3, 1)
c[(:, i1)] = (np.array([1, 1, 0]) + init_point).reshape(3, 1)
c[(:, i2)] = (np.array([0, 0, 0]) + init_point).reshape(3, 1)
c[(:, i3)] = (np.array([1, 0, 0]) + init_point).reshape(3, 1)
return c | making circular chain of N beads
:return: *squashed* 3D-coordinates of the circular polymer
:rtype: numpy array (3,N) | sim/polymer.py | set_init_coords | raalesir/sim | 0 | python | def set_init_coords(self):
'\n making circular chain of N beads\n\n :return: *squashed* 3D-coordinates of the circular polymer\n :rtype: numpy array (3,N)\n '
c = np.zeros((3, self.n))
init_point = self.cell.get_center()
(i0, i1, i2, i3) = self._make_circular_indexes()
c[(:, i0)] = (np.array([0, 1, 0]) + init_point).reshape(3, 1)
c[(:, i1)] = (np.array([1, 1, 0]) + init_point).reshape(3, 1)
c[(:, i2)] = (np.array([0, 0, 0]) + init_point).reshape(3, 1)
c[(:, i3)] = (np.array([1, 0, 0]) + init_point).reshape(3, 1)
return c | def set_init_coords(self):
'\n making circular chain of N beads\n\n :return: *squashed* 3D-coordinates of the circular polymer\n :rtype: numpy array (3,N)\n '
c = np.zeros((3, self.n))
init_point = self.cell.get_center()
(i0, i1, i2, i3) = self._make_circular_indexes()
c[(:, i0)] = (np.array([0, 1, 0]) + init_point).reshape(3, 1)
c[(:, i1)] = (np.array([1, 1, 0]) + init_point).reshape(3, 1)
c[(:, i2)] = (np.array([0, 0, 0]) + init_point).reshape(3, 1)
c[(:, i3)] = (np.array([1, 0, 0]) + init_point).reshape(3, 1)
return c<|docstring|>making circular chain of N beads
:return: *squashed* 3D-coordinates of the circular polymer
:rtype: numpy array (3,N)<|endoftext|> |
206e6cf294edf15757389d5858887590842ec670cfa35b62e2901f04c2450202 | def generate_x_rotation_seq(self):
'\n returns a sequence of multiples of 90 degrees rotation around x-axis for a conformation generated by ``make_circular_chain``. For example for ``N=12`` the output is ``[1, 1, 2, 1]``\n\n\n :return: ``[1,1,2,1,2,1,2,2,...]``\n :rtype: list\n '
n_2 = 1
n = 0
seq = [[1]]
while (n < ((self.n / 2) - 2)):
t1 = (([1] + (n_2 * [2])) + [1])
t2 = t1[1:(- 1)]
n_2 += 1
n = ((n + len(t1)) + len(t2))
seq.append((t1 + t2))
return [item for sublist in seq for item in sublist][:int(((self.n / 2) - 2))] | returns a sequence of multiples of 90 degrees rotation around x-axis for a conformation generated by ``make_circular_chain``. For example for ``N=12`` the output is ``[1, 1, 2, 1]``
:return: ``[1,1,2,1,2,1,2,2,...]``
:rtype: list | sim/polymer.py | generate_x_rotation_seq | raalesir/sim | 0 | python | def generate_x_rotation_seq(self):
'\n returns a sequence of multiples of 90 degrees rotation around x-axis for a conformation generated by ``make_circular_chain``. For example for ``N=12`` the output is ``[1, 1, 2, 1]``\n\n\n :return: ``[1,1,2,1,2,1,2,2,...]``\n :rtype: list\n '
n_2 = 1
n = 0
seq = [[1]]
while (n < ((self.n / 2) - 2)):
t1 = (([1] + (n_2 * [2])) + [1])
t2 = t1[1:(- 1)]
n_2 += 1
n = ((n + len(t1)) + len(t2))
seq.append((t1 + t2))
return [item for sublist in seq for item in sublist][:int(((self.n / 2) - 2))] | def generate_x_rotation_seq(self):
'\n returns a sequence of multiples of 90 degrees rotation around x-axis for a conformation generated by ``make_circular_chain``. For example for ``N=12`` the output is ``[1, 1, 2, 1]``\n\n\n :return: ``[1,1,2,1,2,1,2,2,...]``\n :rtype: list\n '
n_2 = 1
n = 0
seq = [[1]]
while (n < ((self.n / 2) - 2)):
t1 = (([1] + (n_2 * [2])) + [1])
t2 = t1[1:(- 1)]
n_2 += 1
n = ((n + len(t1)) + len(t2))
seq.append((t1 + t2))
return [item for sublist in seq for item in sublist][:int(((self.n / 2) - 2))]<|docstring|>returns a sequence of multiples of 90 degrees rotation around x-axis for a conformation generated by ``make_circular_chain``. For example for ``N=12`` the output is ``[1, 1, 2, 1]``
:return: ``[1,1,2,1,2,1,2,2,...]``
:rtype: list<|endoftext|> |
c50636af595beb2b684e2b4fd5fb71dab7724cec47c452be2033d6b31afb0659 | def unroll_move(self, A, B, rotation):
'\n unrolls the squashed conformation into a spiral one\n '
tail = self.coords[(:, (A + 1):B)]
tail0 = self.coords[(:, A:(A + 1))]
tail = (tail - tail0)
for i in range(tail.shape[1]):
self.coords[(:, ((A + i) + 1))] = (np.matmul(rotation, tail[(:, i)]) + tail0[(:, 0)])
return self.coords | unrolls the squashed conformation into a spiral one | sim/polymer.py | unroll_move | raalesir/sim | 0 | python | def unroll_move(self, A, B, rotation):
'\n \n '
tail = self.coords[(:, (A + 1):B)]
tail0 = self.coords[(:, A:(A + 1))]
tail = (tail - tail0)
for i in range(tail.shape[1]):
self.coords[(:, ((A + i) + 1))] = (np.matmul(rotation, tail[(:, i)]) + tail0[(:, 0)])
return self.coords | def unroll_move(self, A, B, rotation):
'\n \n '
tail = self.coords[(:, (A + 1):B)]
tail0 = self.coords[(:, A:(A + 1))]
tail = (tail - tail0)
for i in range(tail.shape[1]):
self.coords[(:, ((A + i) + 1))] = (np.matmul(rotation, tail[(:, i)]) + tail0[(:, 0)])
return self.coords<|docstring|>unrolls the squashed conformation into a spiral one<|endoftext|> |
a8bd6d0309014a8fd6daaa474f16655a96dc94cb3ef63222b2db5ec8e7a3c0fb | def unroll_chain(self):
'\n unroll the chain\n '
rotation_sequence = self.generate_x_rotation_seq()
rotation = rot[(:, :, 1)]
for i in range(len(rotation_sequence)):
for j in range(rotation_sequence[i]):
self.coords = self.unroll_move((i + 1), ((self.n - i) - 2), rotation)
return self.coords | unroll the chain | sim/polymer.py | unroll_chain | raalesir/sim | 0 | python | def unroll_chain(self):
'\n \n '
rotation_sequence = self.generate_x_rotation_seq()
rotation = rot[(:, :, 1)]
for i in range(len(rotation_sequence)):
for j in range(rotation_sequence[i]):
self.coords = self.unroll_move((i + 1), ((self.n - i) - 2), rotation)
return self.coords | def unroll_chain(self):
'\n \n '
rotation_sequence = self.generate_x_rotation_seq()
rotation = rot[(:, :, 1)]
for i in range(len(rotation_sequence)):
for j in range(rotation_sequence[i]):
self.coords = self.unroll_move((i + 1), ((self.n - i) - 2), rotation)
return self.coords<|docstring|>unroll the chain<|endoftext|> |
b809d36775c9e3406d159766228cd2d51d1fca1b59070aaea5483187b925df18 | def run_migrations_offline():
"Run migrations in 'offline' mode.\n\n This configures the context with just a URL\n and not an Engine, though an Engine is acceptable\n here as well. By skipping the Engine creation\n we don't even need a DBAPI to be available.\n\n Calls to context.execute() here emit the given string to the\n script output.\n\n "
url = config.get_main_option('sqlalchemy.url')
context.configure(url=url, target_metadata=target_metadata, literal_binds=True, dialect_opts={'paramstyle': 'named'})
with context.begin_transaction():
context.run_migrations() | Run migrations in 'offline' mode.
This configures the context with just a URL
and not an Engine, though an Engine is acceptable
here as well. By skipping the Engine creation
we don't even need a DBAPI to be available.
Calls to context.execute() here emit the given string to the
script output. | migrations/env.py | run_migrations_offline | LehaDurotar/ForwarderBot | 1 | python | def run_migrations_offline():
"Run migrations in 'offline' mode.\n\n This configures the context with just a URL\n and not an Engine, though an Engine is acceptable\n here as well. By skipping the Engine creation\n we don't even need a DBAPI to be available.\n\n Calls to context.execute() here emit the given string to the\n script output.\n\n "
url = config.get_main_option('sqlalchemy.url')
context.configure(url=url, target_metadata=target_metadata, literal_binds=True, dialect_opts={'paramstyle': 'named'})
with context.begin_transaction():
context.run_migrations() | def run_migrations_offline():
"Run migrations in 'offline' mode.\n\n This configures the context with just a URL\n and not an Engine, though an Engine is acceptable\n here as well. By skipping the Engine creation\n we don't even need a DBAPI to be available.\n\n Calls to context.execute() here emit the given string to the\n script output.\n\n "
url = config.get_main_option('sqlalchemy.url')
context.configure(url=url, target_metadata=target_metadata, literal_binds=True, dialect_opts={'paramstyle': 'named'})
with context.begin_transaction():
context.run_migrations()<|docstring|>Run migrations in 'offline' mode.
This configures the context with just a URL
and not an Engine, though an Engine is acceptable
here as well. By skipping the Engine creation
we don't even need a DBAPI to be available.
Calls to context.execute() here emit the given string to the
script output.<|endoftext|> |
da3ec54124d380e26618bef34e2b036d8621b6932a250c49e3f13ebc04892ad8 | def run_migrations_online():
"Run migrations in 'online' mode.\n\n In this scenario we need to create an Engine\n and associate a connection with the context.\n\n "
connectable = engine_from_config(config.get_section(config.config_ini_section), prefix='sqlalchemy.', poolclass=pool.NullPool)
with connectable.connect() as connection:
context.configure(connection=connection, target_metadata=target_metadata)
with context.begin_transaction():
context.run_migrations() | Run migrations in 'online' mode.
In this scenario we need to create an Engine
and associate a connection with the context. | migrations/env.py | run_migrations_online | LehaDurotar/ForwarderBot | 1 | python | def run_migrations_online():
"Run migrations in 'online' mode.\n\n In this scenario we need to create an Engine\n and associate a connection with the context.\n\n "
connectable = engine_from_config(config.get_section(config.config_ini_section), prefix='sqlalchemy.', poolclass=pool.NullPool)
with connectable.connect() as connection:
context.configure(connection=connection, target_metadata=target_metadata)
with context.begin_transaction():
context.run_migrations() | def run_migrations_online():
"Run migrations in 'online' mode.\n\n In this scenario we need to create an Engine\n and associate a connection with the context.\n\n "
connectable = engine_from_config(config.get_section(config.config_ini_section), prefix='sqlalchemy.', poolclass=pool.NullPool)
with connectable.connect() as connection:
context.configure(connection=connection, target_metadata=target_metadata)
with context.begin_transaction():
context.run_migrations()<|docstring|>Run migrations in 'online' mode.
In this scenario we need to create an Engine
and associate a connection with the context.<|endoftext|> |
db10da0b58f447fd45f48d7efbe16353ae193dda072ae23f7873cf1ca3706ff9 | def preload(self):
'Pre-loads the images and annotations into a list.'
print(f'Pre-loading dataset. [....]', end='\r')
train_x_dir = os.path.join(self.dstruct.dataset_dir, self.dstruct.train_images_dir)
self.train_images = [self._imload(os.path.join(train_x_dir, fname), False) for fname in self.dstruct.train_images_list]
print(f'Pre-loading dataset. [-...]', end='\r')
train_y_dir = os.path.join(self.dstruct.dataset_dir, self.dstruct.train_annotations_dir)
self.train_annos = [self._imload(os.path.join(train_y_dir, fname), True) for fname in self.dstruct.train_annotations_list]
print(f'Pre-loading dataset. [--..]', end='\r')
test_x_dir = os.path.join(self.dstruct.dataset_dir, self.dstruct.test_images_dir)
self.test_images = [self._imload(os.path.join(test_x_dir, fname), False) for fname in self.dstruct.test_images_list]
print(f'Pre-loading dataset. [---.]', end='\r')
test_y_dir = os.path.join(self.dstruct.dataset_dir, self.dstruct.test_annotations_dir)
self.test_annos = [self._imload(os.path.join(test_y_dir, fname), True) for fname in self.dstruct.test_annotations_list]
self.loaded = True
print(f'Pre-loading dataset. [Done]') | Pre-loads the images and annotations into a list. | deephisto/data/BaseDataset.py | preload | adfoucart/deephisto | 1 | python | def preload(self):
print(f'Pre-loading dataset. [....]', end='\r')
train_x_dir = os.path.join(self.dstruct.dataset_dir, self.dstruct.train_images_dir)
self.train_images = [self._imload(os.path.join(train_x_dir, fname), False) for fname in self.dstruct.train_images_list]
print(f'Pre-loading dataset. [-...]', end='\r')
train_y_dir = os.path.join(self.dstruct.dataset_dir, self.dstruct.train_annotations_dir)
self.train_annos = [self._imload(os.path.join(train_y_dir, fname), True) for fname in self.dstruct.train_annotations_list]
print(f'Pre-loading dataset. [--..]', end='\r')
test_x_dir = os.path.join(self.dstruct.dataset_dir, self.dstruct.test_images_dir)
self.test_images = [self._imload(os.path.join(test_x_dir, fname), False) for fname in self.dstruct.test_images_list]
print(f'Pre-loading dataset. [---.]', end='\r')
test_y_dir = os.path.join(self.dstruct.dataset_dir, self.dstruct.test_annotations_dir)
self.test_annos = [self._imload(os.path.join(test_y_dir, fname), True) for fname in self.dstruct.test_annotations_list]
self.loaded = True
print(f'Pre-loading dataset. [Done]') | def preload(self):
print(f'Pre-loading dataset. [....]', end='\r')
train_x_dir = os.path.join(self.dstruct.dataset_dir, self.dstruct.train_images_dir)
self.train_images = [self._imload(os.path.join(train_x_dir, fname), False) for fname in self.dstruct.train_images_list]
print(f'Pre-loading dataset. [-...]', end='\r')
train_y_dir = os.path.join(self.dstruct.dataset_dir, self.dstruct.train_annotations_dir)
self.train_annos = [self._imload(os.path.join(train_y_dir, fname), True) for fname in self.dstruct.train_annotations_list]
print(f'Pre-loading dataset. [--..]', end='\r')
test_x_dir = os.path.join(self.dstruct.dataset_dir, self.dstruct.test_images_dir)
self.test_images = [self._imload(os.path.join(test_x_dir, fname), False) for fname in self.dstruct.test_images_list]
print(f'Pre-loading dataset. [---.]', end='\r')
test_y_dir = os.path.join(self.dstruct.dataset_dir, self.dstruct.test_annotations_dir)
self.test_annos = [self._imload(os.path.join(test_y_dir, fname), True) for fname in self.dstruct.test_annotations_list]
self.loaded = True
print(f'Pre-loading dataset. [Done]')<|docstring|>Pre-loads the images and annotations into a list.<|endoftext|> |
399cb789fea6a5f1f52ac93faf38fb24247904076097130c29babdba2ffb18f7 | def _imload(self, path: str, is_anno: bool) -> np.array:
'Loads an image with optional pre-resizing'
return self._pre_resize(imread(path), is_anno) | Loads an image with optional pre-resizing | deephisto/data/BaseDataset.py | _imload | adfoucart/deephisto | 1 | python | def _imload(self, path: str, is_anno: bool) -> np.array:
return self._pre_resize(imread(path), is_anno) | def _imload(self, path: str, is_anno: bool) -> np.array:
return self._pre_resize(imread(path), is_anno)<|docstring|>Loads an image with optional pre-resizing<|endoftext|> |
e98530b991ad687f32ecd5dc0ea766458e52189b60bd3c2f5240b75b7c9cb85f | def _annotation_preset(self, im: np.array) -> np.array:
'Modifies the annotation depending on the type.\n If annotations are encoded as instances -> binarize (2 channels).\n If annotations are encoded as classes -> separate into channels\n If annotation strategy is "keep" -> don\'t change anything.'
if (self.dstruct.annotation_strategy is AnnotationStrategy.KEEP):
return im
if (self.dstruct.annotation_strategy is AnnotationStrategy.INSTANCE):
im_ = np.zeros((im.shape[:2] + (2,))).astype('int')
im_[(..., 0)] = (im > 0)
im_[(..., 1)] = (im == 0)
return im_
if (self.dstruct.annotation_strategy is AnnotationStrategy.CLASS):
im_ = np.zeros((im.shape[:2] + (self.dstruct.n_classes,)))
for i in range(1, (self.dstruct.n_classes + 1)):
im_[(..., i)] = (im == i)
return im_ | Modifies the annotation depending on the type.
If annotations are encoded as instances -> binarize (2 channels).
If annotations are encoded as classes -> separate into channels
If annotation strategy is "keep" -> don't change anything. | deephisto/data/BaseDataset.py | _annotation_preset | adfoucart/deephisto | 1 | python | def _annotation_preset(self, im: np.array) -> np.array:
'Modifies the annotation depending on the type.\n If annotations are encoded as instances -> binarize (2 channels).\n If annotations are encoded as classes -> separate into channels\n If annotation strategy is "keep" -> don\'t change anything.'
if (self.dstruct.annotation_strategy is AnnotationStrategy.KEEP):
return im
if (self.dstruct.annotation_strategy is AnnotationStrategy.INSTANCE):
im_ = np.zeros((im.shape[:2] + (2,))).astype('int')
im_[(..., 0)] = (im > 0)
im_[(..., 1)] = (im == 0)
return im_
if (self.dstruct.annotation_strategy is AnnotationStrategy.CLASS):
im_ = np.zeros((im.shape[:2] + (self.dstruct.n_classes,)))
for i in range(1, (self.dstruct.n_classes + 1)):
im_[(..., i)] = (im == i)
return im_ | def _annotation_preset(self, im: np.array) -> np.array:
'Modifies the annotation depending on the type.\n If annotations are encoded as instances -> binarize (2 channels).\n If annotations are encoded as classes -> separate into channels\n If annotation strategy is "keep" -> don\'t change anything.'
if (self.dstruct.annotation_strategy is AnnotationStrategy.KEEP):
return im
if (self.dstruct.annotation_strategy is AnnotationStrategy.INSTANCE):
im_ = np.zeros((im.shape[:2] + (2,))).astype('int')
im_[(..., 0)] = (im > 0)
im_[(..., 1)] = (im == 0)
return im_
if (self.dstruct.annotation_strategy is AnnotationStrategy.CLASS):
im_ = np.zeros((im.shape[:2] + (self.dstruct.n_classes,)))
for i in range(1, (self.dstruct.n_classes + 1)):
im_[(..., i)] = (im == i)
return im_<|docstring|>Modifies the annotation depending on the type.
If annotations are encoded as instances -> binarize (2 channels).
If annotations are encoded as classes -> separate into channels
If annotation strategy is "keep" -> don't change anything.<|endoftext|> |
f9b590e7174124ea80f9e991cd04a0aa3d72c8b699106da7bb1e3f3359a3af83 | def _pre_resize(self, im: np.array, is_anno: bool) -> np.array:
"Resizes an image if it's required in the config. If annotation, make sure to preserve the values."
if is_anno:
im = self._annotation_preset(im)
if (self.dstruct.pre_resize is None):
return im
if is_anno:
return resize(im, self.dstruct.pre_resize, order=0, preserve_range=True, anti_aliasing=False)
return resize(im, self.dstruct.pre_resize, order=3, preserve_range=False, anti_aliasing=True) | Resizes an image if it's required in the config. If annotation, make sure to preserve the values. | deephisto/data/BaseDataset.py | _pre_resize | adfoucart/deephisto | 1 | python | def _pre_resize(self, im: np.array, is_anno: bool) -> np.array:
if is_anno:
im = self._annotation_preset(im)
if (self.dstruct.pre_resize is None):
return im
if is_anno:
return resize(im, self.dstruct.pre_resize, order=0, preserve_range=True, anti_aliasing=False)
return resize(im, self.dstruct.pre_resize, order=3, preserve_range=False, anti_aliasing=True) | def _pre_resize(self, im: np.array, is_anno: bool) -> np.array:
if is_anno:
im = self._annotation_preset(im)
if (self.dstruct.pre_resize is None):
return im
if is_anno:
return resize(im, self.dstruct.pre_resize, order=0, preserve_range=True, anti_aliasing=False)
return resize(im, self.dstruct.pre_resize, order=3, preserve_range=False, anti_aliasing=True)<|docstring|>Resizes an image if it's required in the config. If annotation, make sure to preserve the values.<|endoftext|> |
a8d7a7d5d5e5aa23df6e0a598c69387d7043a19a95ab39a40516a29775e742ec | def simpleGenerator(self, is_train=True) -> Generator:
'Generates tuples of im, annotations sequentially in the training or test set.'
if self.loaded:
return self._preloaded_generator(is_train)
return self._hotloaded_generator(is_train) | Generates tuples of im, annotations sequentially in the training or test set. | deephisto/data/BaseDataset.py | simpleGenerator | adfoucart/deephisto | 1 | python | def simpleGenerator(self, is_train=True) -> Generator:
if self.loaded:
return self._preloaded_generator(is_train)
return self._hotloaded_generator(is_train) | def simpleGenerator(self, is_train=True) -> Generator:
if self.loaded:
return self._preloaded_generator(is_train)
return self._hotloaded_generator(is_train)<|docstring|>Generates tuples of im, annotations sequentially in the training or test set.<|endoftext|> |
3277fe7c4c3098d72781a72a82dc4ecf4ba9ab088c6e08dabd4e5f10425df1d1 | def randomGenerator(self, seed=None, is_train=True) -> Generator:
'Generates tuples of im, annotations in random order in the training or test set.'
idxs = list(range(self.getsize(is_train)))
if (seed is not None):
random.seed(seed)
random.shuffle(idxs)
if self.loaded:
return self._preloaded_generator(is_train, order=idxs)
return self._hotloaded_generator(is_train, order=idxs) | Generates tuples of im, annotations in random order in the training or test set. | deephisto/data/BaseDataset.py | randomGenerator | adfoucart/deephisto | 1 | python | def randomGenerator(self, seed=None, is_train=True) -> Generator:
idxs = list(range(self.getsize(is_train)))
if (seed is not None):
random.seed(seed)
random.shuffle(idxs)
if self.loaded:
return self._preloaded_generator(is_train, order=idxs)
return self._hotloaded_generator(is_train, order=idxs) | def randomGenerator(self, seed=None, is_train=True) -> Generator:
idxs = list(range(self.getsize(is_train)))
if (seed is not None):
random.seed(seed)
random.shuffle(idxs)
if self.loaded:
return self._preloaded_generator(is_train, order=idxs)
return self._hotloaded_generator(is_train, order=idxs)<|docstring|>Generates tuples of im, annotations in random order in the training or test set.<|endoftext|> |
9e242051f299054ea0e8fb80ce42cfa7594831dde4fd217301c68366a7d2c2e3 | def sequenceGenerator(self, sequence: list, is_train=True) -> Generator:
'Generates tuples of im, annotations in the prespecified order.'
if (len(sequence) != self.getsize(is_train)):
raise InvalidDatasetError('Invalid sequence provided.')
if self.loaded:
return self._preloaded_generator(is_train, order=sequence)
return self._hotloaded_generator(is_train, order=sequence) | Generates tuples of im, annotations in the prespecified order. | deephisto/data/BaseDataset.py | sequenceGenerator | adfoucart/deephisto | 1 | python | def sequenceGenerator(self, sequence: list, is_train=True) -> Generator:
if (len(sequence) != self.getsize(is_train)):
raise InvalidDatasetError('Invalid sequence provided.')
if self.loaded:
return self._preloaded_generator(is_train, order=sequence)
return self._hotloaded_generator(is_train, order=sequence) | def sequenceGenerator(self, sequence: list, is_train=True) -> Generator:
if (len(sequence) != self.getsize(is_train)):
raise InvalidDatasetError('Invalid sequence provided.')
if self.loaded:
return self._preloaded_generator(is_train, order=sequence)
return self._hotloaded_generator(is_train, order=sequence)<|docstring|>Generates tuples of im, annotations in the prespecified order.<|endoftext|> |
481d11217e5dad31efc4f25acd5bfc24b863f2013ea26d88445e3d25f43c347f | def saveTo(self, f: str):
'Save all the pre-loaded images and annotations to a pickle file, alongside the datastruct info'
if (not self.loaded):
raise ValueError("Cannot save dataset that hasn't been pre-loaded.")
toSave = {}
for (key, value) in self.dstruct.d.items():
toSave[key] = value
toSave['train_images'] = self.train_images
toSave['train_annos'] = self.train_annos
toSave['test_images'] = self.test_images
toSave['test_annos'] = self.test_annos
with open(f, 'wb') as fp:
pickle.dump(toSave, fp) | Save all the pre-loaded images and annotations to a pickle file, alongside the datastruct info | deephisto/data/BaseDataset.py | saveTo | adfoucart/deephisto | 1 | python | def saveTo(self, f: str):
if (not self.loaded):
raise ValueError("Cannot save dataset that hasn't been pre-loaded.")
toSave = {}
for (key, value) in self.dstruct.d.items():
toSave[key] = value
toSave['train_images'] = self.train_images
toSave['train_annos'] = self.train_annos
toSave['test_images'] = self.test_images
toSave['test_annos'] = self.test_annos
with open(f, 'wb') as fp:
pickle.dump(toSave, fp) | def saveTo(self, f: str):
if (not self.loaded):
raise ValueError("Cannot save dataset that hasn't been pre-loaded.")
toSave = {}
for (key, value) in self.dstruct.d.items():
toSave[key] = value
toSave['train_images'] = self.train_images
toSave['train_annos'] = self.train_annos
toSave['test_images'] = self.test_images
toSave['test_annos'] = self.test_annos
with open(f, 'wb') as fp:
pickle.dump(toSave, fp)<|docstring|>Save all the pre-loaded images and annotations to a pickle file, alongside the datastruct info<|endoftext|> |
bbb14778cdada4306170b347d296618ed27c08baf25d9ddfaaac20cf2fc9f8ba | @staticmethod
def loadFrom(f: str):
'Loads all pre-loaded images and annotations from a pickle file'
with open(f, 'rb') as fp:
toLoad = pickle.load(fp)
d = {}
for key in DatasetStructure.accepted_keys:
d[key] = (toLoad[key] if (key in toLoad) else None)
dstruct = DictDatasetStructure(d)
dataset = BaseDataset(dstruct)
dataset.train_images = toLoad['train_images']
dataset.train_annos = toLoad['train_annos']
dataset.test_images = toLoad['test_images']
dataset.test_annos = toLoad['test_annos']
dataset.loaded = True
return dataset | Loads all pre-loaded images and annotations from a pickle file | deephisto/data/BaseDataset.py | loadFrom | adfoucart/deephisto | 1 | python | @staticmethod
def loadFrom(f: str):
with open(f, 'rb') as fp:
toLoad = pickle.load(fp)
d = {}
for key in DatasetStructure.accepted_keys:
d[key] = (toLoad[key] if (key in toLoad) else None)
dstruct = DictDatasetStructure(d)
dataset = BaseDataset(dstruct)
dataset.train_images = toLoad['train_images']
dataset.train_annos = toLoad['train_annos']
dataset.test_images = toLoad['test_images']
dataset.test_annos = toLoad['test_annos']
dataset.loaded = True
return dataset | @staticmethod
def loadFrom(f: str):
with open(f, 'rb') as fp:
toLoad = pickle.load(fp)
d = {}
for key in DatasetStructure.accepted_keys:
d[key] = (toLoad[key] if (key in toLoad) else None)
dstruct = DictDatasetStructure(d)
dataset = BaseDataset(dstruct)
dataset.train_images = toLoad['train_images']
dataset.train_annos = toLoad['train_annos']
dataset.test_images = toLoad['test_images']
dataset.test_annos = toLoad['test_annos']
dataset.loaded = True
return dataset<|docstring|>Loads all pre-loaded images and annotations from a pickle file<|endoftext|> |
eac96a2558b020135f0643072d3c5648e2e1694497a8517a8609863e3e0424b4 | def testAddArguments(self):
'Tests the AddArguments function.'
argument_parser = argparse.ArgumentParser(prog='cli_helper.py', description='Test argument parser.', add_help=False, formatter_class=cli_test_lib.SortedArgumentsHelpFormatter)
output_modules.OutputModulesArgumentsHelper.AddArguments(argument_parser)
output = self._RunArgparseFormatHelp(argument_parser)
self.assertEqual(output, self._EXPECTED_OUTPUT) | Tests the AddArguments function. | tests/cli/helpers/output_modules.py | testAddArguments | roshanmaskey/plaso | 1,253 | python | def testAddArguments(self):
argument_parser = argparse.ArgumentParser(prog='cli_helper.py', description='Test argument parser.', add_help=False, formatter_class=cli_test_lib.SortedArgumentsHelpFormatter)
output_modules.OutputModulesArgumentsHelper.AddArguments(argument_parser)
output = self._RunArgparseFormatHelp(argument_parser)
self.assertEqual(output, self._EXPECTED_OUTPUT) | def testAddArguments(self):
argument_parser = argparse.ArgumentParser(prog='cli_helper.py', description='Test argument parser.', add_help=False, formatter_class=cli_test_lib.SortedArgumentsHelpFormatter)
output_modules.OutputModulesArgumentsHelper.AddArguments(argument_parser)
output = self._RunArgparseFormatHelp(argument_parser)
self.assertEqual(output, self._EXPECTED_OUTPUT)<|docstring|>Tests the AddArguments function.<|endoftext|> |
cb1f3fa7efd60939f589871c5f56f166288ebe1e9fc2de34ab2b5102107cd504 | def testParseOptions(self):
'Tests the ParseOptions function.'
options = cli_test_lib.TestOptions()
options.output_format = 'dynamic'
options.write = 'output.dynamic'
test_tool = tools.CLITool()
output_modules.OutputModulesArgumentsHelper.ParseOptions(options, test_tool)
self.assertEqual(test_tool._output_format, options.output_format)
self.assertEqual(test_tool._output_filename, options.write)
with self.assertRaises(errors.BadConfigObject):
output_modules.OutputModulesArgumentsHelper.ParseOptions(options, None) | Tests the ParseOptions function. | tests/cli/helpers/output_modules.py | testParseOptions | roshanmaskey/plaso | 1,253 | python | def testParseOptions(self):
options = cli_test_lib.TestOptions()
options.output_format = 'dynamic'
options.write = 'output.dynamic'
test_tool = tools.CLITool()
output_modules.OutputModulesArgumentsHelper.ParseOptions(options, test_tool)
self.assertEqual(test_tool._output_format, options.output_format)
self.assertEqual(test_tool._output_filename, options.write)
with self.assertRaises(errors.BadConfigObject):
output_modules.OutputModulesArgumentsHelper.ParseOptions(options, None) | def testParseOptions(self):
options = cli_test_lib.TestOptions()
options.output_format = 'dynamic'
options.write = 'output.dynamic'
test_tool = tools.CLITool()
output_modules.OutputModulesArgumentsHelper.ParseOptions(options, test_tool)
self.assertEqual(test_tool._output_format, options.output_format)
self.assertEqual(test_tool._output_filename, options.write)
with self.assertRaises(errors.BadConfigObject):
output_modules.OutputModulesArgumentsHelper.ParseOptions(options, None)<|docstring|>Tests the ParseOptions function.<|endoftext|> |
54ddb82c95f59e01ff6574628d0452307444b4090b10160b409bd9d587469349 | @register.filter
def in_list(value, arg):
'\n Usage\n {% if value|in_list:list %}\n {% endif %}\n '
return (value in arg) | Usage
{% if value|in_list:list %}
{% endif %} | sugar/templatetags/in_list.py | in_list | acdha/django-sugar | 2 | python | @register.filter
def in_list(value, arg):
'\n Usage\n {% if value|in_list:list %}\n {% endif %}\n '
return (value in arg) | @register.filter
def in_list(value, arg):
'\n Usage\n {% if value|in_list:list %}\n {% endif %}\n '
return (value in arg)<|docstring|>Usage
{% if value|in_list:list %}
{% endif %}<|endoftext|> |
a1dcbd8bc5941e770dcf495737e78332df620d795f95a575638b85c6c4fe74ac | def get_default_package_name() -> str:
'Return default package name based on repo name.'
return normalize_package_name_for_code(load_repository_name()) | Return default package name based on repo name. | setup_python_package/utils/get_default_package_name.py | get_default_package_name | LucaCappelletti94/setup_python_package | 5 | python | def get_default_package_name() -> str:
return normalize_package_name_for_code(load_repository_name()) | def get_default_package_name() -> str:
return normalize_package_name_for_code(load_repository_name())<|docstring|>Return default package name based on repo name.<|endoftext|> |
5e636e977d596ea0cb9ee127d5de1a511e2213c3073291f2921d115ca30453fc | def __call__(self, x: str) -> Any:
'\n Parameters\n x: Text\n\n Returns\n Transformed Text\n '
if ('self' not in inspect.getfullargspec(self.func).args):
return self.func(x, **self.resources)
else:
cls_obj = self.resources['cls']
del self.resources['cls']
return self.func(cls_obj, x, **self.resources) | Parameters
x: Text
Returns
Transformed Text | datalabs/operations/operation.py | __call__ | ExpressAI/DataLab | 54 | python | def __call__(self, x: str) -> Any:
'\n Parameters\n x: Text\n\n Returns\n Transformed Text\n '
if ('self' not in inspect.getfullargspec(self.func).args):
return self.func(x, **self.resources)
else:
cls_obj = self.resources['cls']
del self.resources['cls']
return self.func(cls_obj, x, **self.resources) | def __call__(self, x: str) -> Any:
'\n Parameters\n x: Text\n\n Returns\n Transformed Text\n '
if ('self' not in inspect.getfullargspec(self.func).args):
return self.func(x, **self.resources)
else:
cls_obj = self.resources['cls']
del self.resources['cls']
return self.func(cls_obj, x, **self.resources)<|docstring|>Parameters
x: Text
Returns
Transformed Text<|endoftext|> |
b153234cb7429f4b1708474e3f50d07ed3832c438bda46b67e247c1d0a315e57 | def describe_pet(pet_name, animal_type='dog'):
'Display information about a pet.'
print((('\nI have a ' + animal_type) + '.'))
print((((('My ' + animal_type) + "'s name is ") + pet_name.title()) + '.')) | Display information about a pet. | PYTHON/Python-Arquivos_txt/CURSO_EXTENSIVO_PYTHON/chapter_08/pets.py | describe_pet | sourcery-ai-bot/Estudos | 4 | python | def describe_pet(pet_name, animal_type='dog'):
print((('\nI have a ' + animal_type) + '.'))
print((((('My ' + animal_type) + "'s name is ") + pet_name.title()) + '.')) | def describe_pet(pet_name, animal_type='dog'):
print((('\nI have a ' + animal_type) + '.'))
print((((('My ' + animal_type) + "'s name is ") + pet_name.title()) + '.'))<|docstring|>Display information about a pet.<|endoftext|> |
4b2a4c7debf47da264cd2a0b4ee18895b4e9f433db2244334de905715fef4f7b | def __init__(__self__, *, databases: pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterDatabaseArgs']]], environment: pulumi.Input[str], hosts: pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterHostArgs']]], network_id: pulumi.Input[str], resources: pulumi.Input['MdbMysqlClusterResourcesArgs'], users: pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterUserArgs']]], version: pulumi.Input[str], access: Optional[pulumi.Input['MdbMysqlClusterAccessArgs']]=None, allow_regeneration_host: Optional[pulumi.Input[bool]]=None, backup_window_start: Optional[pulumi.Input['MdbMysqlClusterBackupWindowStartArgs']]=None, deletion_protection: Optional[pulumi.Input[bool]]=None, description: Optional[pulumi.Input[str]]=None, folder_id: Optional[pulumi.Input[str]]=None, labels: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, maintenance_window: Optional[pulumi.Input['MdbMysqlClusterMaintenanceWindowArgs']]=None, mysql_config: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, name: Optional[pulumi.Input[str]]=None, restore: Optional[pulumi.Input['MdbMysqlClusterRestoreArgs']]=None, security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None):
'\n The set of arguments for constructing a MdbMysqlCluster resource.\n :param pulumi.Input[Sequence[pulumi.Input[\'MdbMysqlClusterDatabaseArgs\']]] databases: A database of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[str] environment: Deployment environment of the MySQL cluster.\n :param pulumi.Input[Sequence[pulumi.Input[\'MdbMysqlClusterHostArgs\']]] hosts: A host of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[str] network_id: ID of the network, to which the MySQL cluster uses.\n :param pulumi.Input[\'MdbMysqlClusterResourcesArgs\'] resources: Resources allocated to hosts of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[Sequence[pulumi.Input[\'MdbMysqlClusterUserArgs\']]] users: A user of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[str] version: Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)\n :param pulumi.Input[\'MdbMysqlClusterAccessArgs\'] access: Access policy to the MySQL cluster. The structure is documented below.\n :param pulumi.Input[\'MdbMysqlClusterBackupWindowStartArgs\'] backup_window_start: Time to start the daily backup, in the UTC. The structure is documented below.\n :param pulumi.Input[bool] deletion_protection: Inhibits deletion of the cluster. Can be either `true` or `false`.\n :param pulumi.Input[str] description: Description of the MySQL cluster.\n :param pulumi.Input[str] folder_id: The ID of the folder that the resource belongs to. If it\n is not provided, the default provider folder is used.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: A set of key/value label pairs to assign to the MySQL cluster.\n :param pulumi.Input[\'MdbMysqlClusterMaintenanceWindowArgs\'] maintenance_window: Maintenance policy of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] mysql_config: MySQL cluster config. Detail info in "MySQL config" section (documented below).\n :param pulumi.Input[str] name: Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter.\n :param pulumi.Input[\'MdbMysqlClusterRestoreArgs\'] restore: The cluster will be created from the specified backup. The structure is documented below.\n :param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_ids: A set of ids of security groups assigned to hosts of the cluster.\n '
pulumi.set(__self__, 'databases', databases)
pulumi.set(__self__, 'environment', environment)
pulumi.set(__self__, 'hosts', hosts)
pulumi.set(__self__, 'network_id', network_id)
pulumi.set(__self__, 'resources', resources)
pulumi.set(__self__, 'users', users)
pulumi.set(__self__, 'version', version)
if (access is not None):
pulumi.set(__self__, 'access', access)
if (allow_regeneration_host is not None):
warnings.warn('You can safely remove this option. There is no need to recreate host if assign_public_ip is changed.', DeprecationWarning)
pulumi.log.warn('allow_regeneration_host is deprecated: You can safely remove this option. There is no need to recreate host if assign_public_ip is changed.')
if (allow_regeneration_host is not None):
pulumi.set(__self__, 'allow_regeneration_host', allow_regeneration_host)
if (backup_window_start is not None):
pulumi.set(__self__, 'backup_window_start', backup_window_start)
if (deletion_protection is not None):
pulumi.set(__self__, 'deletion_protection', deletion_protection)
if (description is not None):
pulumi.set(__self__, 'description', description)
if (folder_id is not None):
pulumi.set(__self__, 'folder_id', folder_id)
if (labels is not None):
pulumi.set(__self__, 'labels', labels)
if (maintenance_window is not None):
pulumi.set(__self__, 'maintenance_window', maintenance_window)
if (mysql_config is not None):
pulumi.set(__self__, 'mysql_config', mysql_config)
if (name is not None):
pulumi.set(__self__, 'name', name)
if (restore is not None):
pulumi.set(__self__, 'restore', restore)
if (security_group_ids is not None):
pulumi.set(__self__, 'security_group_ids', security_group_ids) | The set of arguments for constructing a MdbMysqlCluster resource.
:param pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterDatabaseArgs']]] databases: A database of the MySQL cluster. The structure is documented below.
:param pulumi.Input[str] environment: Deployment environment of the MySQL cluster.
:param pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterHostArgs']]] hosts: A host of the MySQL cluster. The structure is documented below.
:param pulumi.Input[str] network_id: ID of the network, to which the MySQL cluster uses.
:param pulumi.Input['MdbMysqlClusterResourcesArgs'] resources: Resources allocated to hosts of the MySQL cluster. The structure is documented below.
:param pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterUserArgs']]] users: A user of the MySQL cluster. The structure is documented below.
:param pulumi.Input[str] version: Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)
:param pulumi.Input['MdbMysqlClusterAccessArgs'] access: Access policy to the MySQL cluster. The structure is documented below.
:param pulumi.Input['MdbMysqlClusterBackupWindowStartArgs'] backup_window_start: Time to start the daily backup, in the UTC. The structure is documented below.
:param pulumi.Input[bool] deletion_protection: Inhibits deletion of the cluster. Can be either `true` or `false`.
:param pulumi.Input[str] description: Description of the MySQL cluster.
:param pulumi.Input[str] folder_id: The ID of the folder that the resource belongs to. If it
is not provided, the default provider folder is used.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: A set of key/value label pairs to assign to the MySQL cluster.
:param pulumi.Input['MdbMysqlClusterMaintenanceWindowArgs'] maintenance_window: Maintenance policy of the MySQL cluster. The structure is documented below.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] mysql_config: MySQL cluster config. Detail info in "MySQL config" section (documented below).
:param pulumi.Input[str] name: Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter.
:param pulumi.Input['MdbMysqlClusterRestoreArgs'] restore: The cluster will be created from the specified backup. The structure is documented below.
:param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_ids: A set of ids of security groups assigned to hosts of the cluster. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | __init__ | pulumi/pulumi-yandex | 9 | python | def __init__(__self__, *, databases: pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterDatabaseArgs']]], environment: pulumi.Input[str], hosts: pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterHostArgs']]], network_id: pulumi.Input[str], resources: pulumi.Input['MdbMysqlClusterResourcesArgs'], users: pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterUserArgs']]], version: pulumi.Input[str], access: Optional[pulumi.Input['MdbMysqlClusterAccessArgs']]=None, allow_regeneration_host: Optional[pulumi.Input[bool]]=None, backup_window_start: Optional[pulumi.Input['MdbMysqlClusterBackupWindowStartArgs']]=None, deletion_protection: Optional[pulumi.Input[bool]]=None, description: Optional[pulumi.Input[str]]=None, folder_id: Optional[pulumi.Input[str]]=None, labels: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, maintenance_window: Optional[pulumi.Input['MdbMysqlClusterMaintenanceWindowArgs']]=None, mysql_config: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, name: Optional[pulumi.Input[str]]=None, restore: Optional[pulumi.Input['MdbMysqlClusterRestoreArgs']]=None, security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None):
'\n The set of arguments for constructing a MdbMysqlCluster resource.\n :param pulumi.Input[Sequence[pulumi.Input[\'MdbMysqlClusterDatabaseArgs\']]] databases: A database of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[str] environment: Deployment environment of the MySQL cluster.\n :param pulumi.Input[Sequence[pulumi.Input[\'MdbMysqlClusterHostArgs\']]] hosts: A host of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[str] network_id: ID of the network, to which the MySQL cluster uses.\n :param pulumi.Input[\'MdbMysqlClusterResourcesArgs\'] resources: Resources allocated to hosts of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[Sequence[pulumi.Input[\'MdbMysqlClusterUserArgs\']]] users: A user of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[str] version: Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)\n :param pulumi.Input[\'MdbMysqlClusterAccessArgs\'] access: Access policy to the MySQL cluster. The structure is documented below.\n :param pulumi.Input[\'MdbMysqlClusterBackupWindowStartArgs\'] backup_window_start: Time to start the daily backup, in the UTC. The structure is documented below.\n :param pulumi.Input[bool] deletion_protection: Inhibits deletion of the cluster. Can be either `true` or `false`.\n :param pulumi.Input[str] description: Description of the MySQL cluster.\n :param pulumi.Input[str] folder_id: The ID of the folder that the resource belongs to. If it\n is not provided, the default provider folder is used.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: A set of key/value label pairs to assign to the MySQL cluster.\n :param pulumi.Input[\'MdbMysqlClusterMaintenanceWindowArgs\'] maintenance_window: Maintenance policy of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] mysql_config: MySQL cluster config. Detail info in "MySQL config" section (documented below).\n :param pulumi.Input[str] name: Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter.\n :param pulumi.Input[\'MdbMysqlClusterRestoreArgs\'] restore: The cluster will be created from the specified backup. The structure is documented below.\n :param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_ids: A set of ids of security groups assigned to hosts of the cluster.\n '
pulumi.set(__self__, 'databases', databases)
pulumi.set(__self__, 'environment', environment)
pulumi.set(__self__, 'hosts', hosts)
pulumi.set(__self__, 'network_id', network_id)
pulumi.set(__self__, 'resources', resources)
pulumi.set(__self__, 'users', users)
pulumi.set(__self__, 'version', version)
if (access is not None):
pulumi.set(__self__, 'access', access)
if (allow_regeneration_host is not None):
warnings.warn('You can safely remove this option. There is no need to recreate host if assign_public_ip is changed.', DeprecationWarning)
pulumi.log.warn('allow_regeneration_host is deprecated: You can safely remove this option. There is no need to recreate host if assign_public_ip is changed.')
if (allow_regeneration_host is not None):
pulumi.set(__self__, 'allow_regeneration_host', allow_regeneration_host)
if (backup_window_start is not None):
pulumi.set(__self__, 'backup_window_start', backup_window_start)
if (deletion_protection is not None):
pulumi.set(__self__, 'deletion_protection', deletion_protection)
if (description is not None):
pulumi.set(__self__, 'description', description)
if (folder_id is not None):
pulumi.set(__self__, 'folder_id', folder_id)
if (labels is not None):
pulumi.set(__self__, 'labels', labels)
if (maintenance_window is not None):
pulumi.set(__self__, 'maintenance_window', maintenance_window)
if (mysql_config is not None):
pulumi.set(__self__, 'mysql_config', mysql_config)
if (name is not None):
pulumi.set(__self__, 'name', name)
if (restore is not None):
pulumi.set(__self__, 'restore', restore)
if (security_group_ids is not None):
pulumi.set(__self__, 'security_group_ids', security_group_ids) | def __init__(__self__, *, databases: pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterDatabaseArgs']]], environment: pulumi.Input[str], hosts: pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterHostArgs']]], network_id: pulumi.Input[str], resources: pulumi.Input['MdbMysqlClusterResourcesArgs'], users: pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterUserArgs']]], version: pulumi.Input[str], access: Optional[pulumi.Input['MdbMysqlClusterAccessArgs']]=None, allow_regeneration_host: Optional[pulumi.Input[bool]]=None, backup_window_start: Optional[pulumi.Input['MdbMysqlClusterBackupWindowStartArgs']]=None, deletion_protection: Optional[pulumi.Input[bool]]=None, description: Optional[pulumi.Input[str]]=None, folder_id: Optional[pulumi.Input[str]]=None, labels: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, maintenance_window: Optional[pulumi.Input['MdbMysqlClusterMaintenanceWindowArgs']]=None, mysql_config: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, name: Optional[pulumi.Input[str]]=None, restore: Optional[pulumi.Input['MdbMysqlClusterRestoreArgs']]=None, security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None):
'\n The set of arguments for constructing a MdbMysqlCluster resource.\n :param pulumi.Input[Sequence[pulumi.Input[\'MdbMysqlClusterDatabaseArgs\']]] databases: A database of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[str] environment: Deployment environment of the MySQL cluster.\n :param pulumi.Input[Sequence[pulumi.Input[\'MdbMysqlClusterHostArgs\']]] hosts: A host of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[str] network_id: ID of the network, to which the MySQL cluster uses.\n :param pulumi.Input[\'MdbMysqlClusterResourcesArgs\'] resources: Resources allocated to hosts of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[Sequence[pulumi.Input[\'MdbMysqlClusterUserArgs\']]] users: A user of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[str] version: Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)\n :param pulumi.Input[\'MdbMysqlClusterAccessArgs\'] access: Access policy to the MySQL cluster. The structure is documented below.\n :param pulumi.Input[\'MdbMysqlClusterBackupWindowStartArgs\'] backup_window_start: Time to start the daily backup, in the UTC. The structure is documented below.\n :param pulumi.Input[bool] deletion_protection: Inhibits deletion of the cluster. Can be either `true` or `false`.\n :param pulumi.Input[str] description: Description of the MySQL cluster.\n :param pulumi.Input[str] folder_id: The ID of the folder that the resource belongs to. If it\n is not provided, the default provider folder is used.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: A set of key/value label pairs to assign to the MySQL cluster.\n :param pulumi.Input[\'MdbMysqlClusterMaintenanceWindowArgs\'] maintenance_window: Maintenance policy of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] mysql_config: MySQL cluster config. Detail info in "MySQL config" section (documented below).\n :param pulumi.Input[str] name: Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter.\n :param pulumi.Input[\'MdbMysqlClusterRestoreArgs\'] restore: The cluster will be created from the specified backup. The structure is documented below.\n :param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_ids: A set of ids of security groups assigned to hosts of the cluster.\n '
pulumi.set(__self__, 'databases', databases)
pulumi.set(__self__, 'environment', environment)
pulumi.set(__self__, 'hosts', hosts)
pulumi.set(__self__, 'network_id', network_id)
pulumi.set(__self__, 'resources', resources)
pulumi.set(__self__, 'users', users)
pulumi.set(__self__, 'version', version)
if (access is not None):
pulumi.set(__self__, 'access', access)
if (allow_regeneration_host is not None):
warnings.warn('You can safely remove this option. There is no need to recreate host if assign_public_ip is changed.', DeprecationWarning)
pulumi.log.warn('allow_regeneration_host is deprecated: You can safely remove this option. There is no need to recreate host if assign_public_ip is changed.')
if (allow_regeneration_host is not None):
pulumi.set(__self__, 'allow_regeneration_host', allow_regeneration_host)
if (backup_window_start is not None):
pulumi.set(__self__, 'backup_window_start', backup_window_start)
if (deletion_protection is not None):
pulumi.set(__self__, 'deletion_protection', deletion_protection)
if (description is not None):
pulumi.set(__self__, 'description', description)
if (folder_id is not None):
pulumi.set(__self__, 'folder_id', folder_id)
if (labels is not None):
pulumi.set(__self__, 'labels', labels)
if (maintenance_window is not None):
pulumi.set(__self__, 'maintenance_window', maintenance_window)
if (mysql_config is not None):
pulumi.set(__self__, 'mysql_config', mysql_config)
if (name is not None):
pulumi.set(__self__, 'name', name)
if (restore is not None):
pulumi.set(__self__, 'restore', restore)
if (security_group_ids is not None):
pulumi.set(__self__, 'security_group_ids', security_group_ids)<|docstring|>The set of arguments for constructing a MdbMysqlCluster resource.
:param pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterDatabaseArgs']]] databases: A database of the MySQL cluster. The structure is documented below.
:param pulumi.Input[str] environment: Deployment environment of the MySQL cluster.
:param pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterHostArgs']]] hosts: A host of the MySQL cluster. The structure is documented below.
:param pulumi.Input[str] network_id: ID of the network, to which the MySQL cluster uses.
:param pulumi.Input['MdbMysqlClusterResourcesArgs'] resources: Resources allocated to hosts of the MySQL cluster. The structure is documented below.
:param pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterUserArgs']]] users: A user of the MySQL cluster. The structure is documented below.
:param pulumi.Input[str] version: Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)
:param pulumi.Input['MdbMysqlClusterAccessArgs'] access: Access policy to the MySQL cluster. The structure is documented below.
:param pulumi.Input['MdbMysqlClusterBackupWindowStartArgs'] backup_window_start: Time to start the daily backup, in the UTC. The structure is documented below.
:param pulumi.Input[bool] deletion_protection: Inhibits deletion of the cluster. Can be either `true` or `false`.
:param pulumi.Input[str] description: Description of the MySQL cluster.
:param pulumi.Input[str] folder_id: The ID of the folder that the resource belongs to. If it
is not provided, the default provider folder is used.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: A set of key/value label pairs to assign to the MySQL cluster.
:param pulumi.Input['MdbMysqlClusterMaintenanceWindowArgs'] maintenance_window: Maintenance policy of the MySQL cluster. The structure is documented below.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] mysql_config: MySQL cluster config. Detail info in "MySQL config" section (documented below).
:param pulumi.Input[str] name: Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter.
:param pulumi.Input['MdbMysqlClusterRestoreArgs'] restore: The cluster will be created from the specified backup. The structure is documented below.
:param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_ids: A set of ids of security groups assigned to hosts of the cluster.<|endoftext|> |
ffc53dd11e3eb6a0753fe93ae641ab4882abb4784d510aafcae2707d9a9b9b0d | @property
@pulumi.getter
def databases(self) -> pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterDatabaseArgs']]]:
'\n A database of the MySQL cluster. The structure is documented below.\n '
return pulumi.get(self, 'databases') | A database of the MySQL cluster. The structure is documented below. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | databases | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def databases(self) -> pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterDatabaseArgs']]]:
'\n \n '
return pulumi.get(self, 'databases') | @property
@pulumi.getter
def databases(self) -> pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterDatabaseArgs']]]:
'\n \n '
return pulumi.get(self, 'databases')<|docstring|>A database of the MySQL cluster. The structure is documented below.<|endoftext|> |
1b4a33ac69f27d6069d7758ee32fbf50c9071de1dc70d6f71713d2dc5ca219cc | @property
@pulumi.getter
def environment(self) -> pulumi.Input[str]:
'\n Deployment environment of the MySQL cluster.\n '
return pulumi.get(self, 'environment') | Deployment environment of the MySQL cluster. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | environment | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def environment(self) -> pulumi.Input[str]:
'\n \n '
return pulumi.get(self, 'environment') | @property
@pulumi.getter
def environment(self) -> pulumi.Input[str]:
'\n \n '
return pulumi.get(self, 'environment')<|docstring|>Deployment environment of the MySQL cluster.<|endoftext|> |
dd87c07c0dc8d23f7d804265a9f30862df8d54fb9c0a75381c584eb177e239f1 | @property
@pulumi.getter
def hosts(self) -> pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterHostArgs']]]:
'\n A host of the MySQL cluster. The structure is documented below.\n '
return pulumi.get(self, 'hosts') | A host of the MySQL cluster. The structure is documented below. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | hosts | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def hosts(self) -> pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterHostArgs']]]:
'\n \n '
return pulumi.get(self, 'hosts') | @property
@pulumi.getter
def hosts(self) -> pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterHostArgs']]]:
'\n \n '
return pulumi.get(self, 'hosts')<|docstring|>A host of the MySQL cluster. The structure is documented below.<|endoftext|> |
18a708fdcf930e49d045959c234c885d893ad08612309b3f876de00f7ba13604 | @property
@pulumi.getter(name='networkId')
def network_id(self) -> pulumi.Input[str]:
'\n ID of the network, to which the MySQL cluster uses.\n '
return pulumi.get(self, 'network_id') | ID of the network, to which the MySQL cluster uses. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | network_id | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter(name='networkId')
def network_id(self) -> pulumi.Input[str]:
'\n \n '
return pulumi.get(self, 'network_id') | @property
@pulumi.getter(name='networkId')
def network_id(self) -> pulumi.Input[str]:
'\n \n '
return pulumi.get(self, 'network_id')<|docstring|>ID of the network, to which the MySQL cluster uses.<|endoftext|> |
501295ce5983deca38ba400f074fe4d931888e4453297b09483548af51e96bf3 | @property
@pulumi.getter
def resources(self) -> pulumi.Input['MdbMysqlClusterResourcesArgs']:
'\n Resources allocated to hosts of the MySQL cluster. The structure is documented below.\n '
return pulumi.get(self, 'resources') | Resources allocated to hosts of the MySQL cluster. The structure is documented below. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | resources | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def resources(self) -> pulumi.Input['MdbMysqlClusterResourcesArgs']:
'\n \n '
return pulumi.get(self, 'resources') | @property
@pulumi.getter
def resources(self) -> pulumi.Input['MdbMysqlClusterResourcesArgs']:
'\n \n '
return pulumi.get(self, 'resources')<|docstring|>Resources allocated to hosts of the MySQL cluster. The structure is documented below.<|endoftext|> |
4504c05189218f84c38a7d5e98f12566206028d20d8a2e375a7825a2782b2526 | @property
@pulumi.getter
def users(self) -> pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterUserArgs']]]:
'\n A user of the MySQL cluster. The structure is documented below.\n '
return pulumi.get(self, 'users') | A user of the MySQL cluster. The structure is documented below. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | users | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def users(self) -> pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterUserArgs']]]:
'\n \n '
return pulumi.get(self, 'users') | @property
@pulumi.getter
def users(self) -> pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterUserArgs']]]:
'\n \n '
return pulumi.get(self, 'users')<|docstring|>A user of the MySQL cluster. The structure is documented below.<|endoftext|> |
9bc5518a9ba2985c0356690ae0c44f4afc7abc9cfe811f0faf33bcbd985f183b | @property
@pulumi.getter
def version(self) -> pulumi.Input[str]:
'\n Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)\n '
return pulumi.get(self, 'version') | Version of the MySQL cluster. (allowed versions are: 5.7, 8.0) | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | version | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def version(self) -> pulumi.Input[str]:
'\n \n '
return pulumi.get(self, 'version') | @property
@pulumi.getter
def version(self) -> pulumi.Input[str]:
'\n \n '
return pulumi.get(self, 'version')<|docstring|>Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)<|endoftext|> |
2b37e1216ead81b40e7e81708536a08c0f27cb95f4a213dfd5206902549844bc | @property
@pulumi.getter
def access(self) -> Optional[pulumi.Input['MdbMysqlClusterAccessArgs']]:
'\n Access policy to the MySQL cluster. The structure is documented below.\n '
return pulumi.get(self, 'access') | Access policy to the MySQL cluster. The structure is documented below. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | access | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def access(self) -> Optional[pulumi.Input['MdbMysqlClusterAccessArgs']]:
'\n \n '
return pulumi.get(self, 'access') | @property
@pulumi.getter
def access(self) -> Optional[pulumi.Input['MdbMysqlClusterAccessArgs']]:
'\n \n '
return pulumi.get(self, 'access')<|docstring|>Access policy to the MySQL cluster. The structure is documented below.<|endoftext|> |
10824076015c4865c2469b6a3851da315bf8bc4c24568504dff6c3ba4a31941e | @property
@pulumi.getter(name='backupWindowStart')
def backup_window_start(self) -> Optional[pulumi.Input['MdbMysqlClusterBackupWindowStartArgs']]:
'\n Time to start the daily backup, in the UTC. The structure is documented below.\n '
return pulumi.get(self, 'backup_window_start') | Time to start the daily backup, in the UTC. The structure is documented below. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | backup_window_start | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter(name='backupWindowStart')
def backup_window_start(self) -> Optional[pulumi.Input['MdbMysqlClusterBackupWindowStartArgs']]:
'\n \n '
return pulumi.get(self, 'backup_window_start') | @property
@pulumi.getter(name='backupWindowStart')
def backup_window_start(self) -> Optional[pulumi.Input['MdbMysqlClusterBackupWindowStartArgs']]:
'\n \n '
return pulumi.get(self, 'backup_window_start')<|docstring|>Time to start the daily backup, in the UTC. The structure is documented below.<|endoftext|> |
ff558ab56d2e5918f949a9c7dcddb9807be772ef8f53df10ed38a21841779c3f | @property
@pulumi.getter(name='deletionProtection')
def deletion_protection(self) -> Optional[pulumi.Input[bool]]:
'\n Inhibits deletion of the cluster. Can be either `true` or `false`.\n '
return pulumi.get(self, 'deletion_protection') | Inhibits deletion of the cluster. Can be either `true` or `false`. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | deletion_protection | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter(name='deletionProtection')
def deletion_protection(self) -> Optional[pulumi.Input[bool]]:
'\n \n '
return pulumi.get(self, 'deletion_protection') | @property
@pulumi.getter(name='deletionProtection')
def deletion_protection(self) -> Optional[pulumi.Input[bool]]:
'\n \n '
return pulumi.get(self, 'deletion_protection')<|docstring|>Inhibits deletion of the cluster. Can be either `true` or `false`.<|endoftext|> |
35f4e5687719e30897fdf472df07c5c1b67c2444210936570432681dcdf46e67 | @property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
'\n Description of the MySQL cluster.\n '
return pulumi.get(self, 'description') | Description of the MySQL cluster. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | description | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
'\n \n '
return pulumi.get(self, 'description') | @property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
'\n \n '
return pulumi.get(self, 'description')<|docstring|>Description of the MySQL cluster.<|endoftext|> |
bd48ea5cfcac74e989ec7acd73a14470d8c100af7b2b372adbe9e4b69e9e5f0e | @property
@pulumi.getter(name='folderId')
def folder_id(self) -> Optional[pulumi.Input[str]]:
'\n The ID of the folder that the resource belongs to. If it\n is not provided, the default provider folder is used.\n '
return pulumi.get(self, 'folder_id') | The ID of the folder that the resource belongs to. If it
is not provided, the default provider folder is used. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | folder_id | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter(name='folderId')
def folder_id(self) -> Optional[pulumi.Input[str]]:
'\n The ID of the folder that the resource belongs to. If it\n is not provided, the default provider folder is used.\n '
return pulumi.get(self, 'folder_id') | @property
@pulumi.getter(name='folderId')
def folder_id(self) -> Optional[pulumi.Input[str]]:
'\n The ID of the folder that the resource belongs to. If it\n is not provided, the default provider folder is used.\n '
return pulumi.get(self, 'folder_id')<|docstring|>The ID of the folder that the resource belongs to. If it
is not provided, the default provider folder is used.<|endoftext|> |
a0cc011b33965c010a307620fc7793f87f322895df7c020cfec99839d95b88c4 | @property
@pulumi.getter
def labels(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]:
'\n A set of key/value label pairs to assign to the MySQL cluster.\n '
return pulumi.get(self, 'labels') | A set of key/value label pairs to assign to the MySQL cluster. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | labels | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def labels(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]:
'\n \n '
return pulumi.get(self, 'labels') | @property
@pulumi.getter
def labels(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]:
'\n \n '
return pulumi.get(self, 'labels')<|docstring|>A set of key/value label pairs to assign to the MySQL cluster.<|endoftext|> |
d3e3403c03cedce561ec9274852f1f9fc1c0a7887af874ca7dbf8422f0cdbd3e | @property
@pulumi.getter(name='maintenanceWindow')
def maintenance_window(self) -> Optional[pulumi.Input['MdbMysqlClusterMaintenanceWindowArgs']]:
'\n Maintenance policy of the MySQL cluster. The structure is documented below.\n '
return pulumi.get(self, 'maintenance_window') | Maintenance policy of the MySQL cluster. The structure is documented below. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | maintenance_window | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter(name='maintenanceWindow')
def maintenance_window(self) -> Optional[pulumi.Input['MdbMysqlClusterMaintenanceWindowArgs']]:
'\n \n '
return pulumi.get(self, 'maintenance_window') | @property
@pulumi.getter(name='maintenanceWindow')
def maintenance_window(self) -> Optional[pulumi.Input['MdbMysqlClusterMaintenanceWindowArgs']]:
'\n \n '
return pulumi.get(self, 'maintenance_window')<|docstring|>Maintenance policy of the MySQL cluster. The structure is documented below.<|endoftext|> |
ee6a9400cf8eb0f8a5dcd1f2db522b72d1bc24f95ea065cba5c9c4a15b660bdb | @property
@pulumi.getter(name='mysqlConfig')
def mysql_config(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]:
'\n MySQL cluster config. Detail info in "MySQL config" section (documented below).\n '
return pulumi.get(self, 'mysql_config') | MySQL cluster config. Detail info in "MySQL config" section (documented below). | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | mysql_config | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter(name='mysqlConfig')
def mysql_config(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]:
'\n \n '
return pulumi.get(self, 'mysql_config') | @property
@pulumi.getter(name='mysqlConfig')
def mysql_config(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]:
'\n \n '
return pulumi.get(self, 'mysql_config')<|docstring|>MySQL cluster config. Detail info in "MySQL config" section (documented below).<|endoftext|> |
ba24aa1924bc3ecad915d63ebba3d3b5d34e598a5cf587b4e3037fd20698011c | @property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
'\n Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter.\n '
return pulumi.get(self, 'name') | Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | name | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
'\n \n '
return pulumi.get(self, 'name') | @property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
'\n \n '
return pulumi.get(self, 'name')<|docstring|>Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter.<|endoftext|> |
242d24c1219a6456f1a24b5c11022116f44ae9877160702be3fce6f5ddecb7fd | @property
@pulumi.getter
def restore(self) -> Optional[pulumi.Input['MdbMysqlClusterRestoreArgs']]:
'\n The cluster will be created from the specified backup. The structure is documented below.\n '
return pulumi.get(self, 'restore') | The cluster will be created from the specified backup. The structure is documented below. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | restore | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def restore(self) -> Optional[pulumi.Input['MdbMysqlClusterRestoreArgs']]:
'\n \n '
return pulumi.get(self, 'restore') | @property
@pulumi.getter
def restore(self) -> Optional[pulumi.Input['MdbMysqlClusterRestoreArgs']]:
'\n \n '
return pulumi.get(self, 'restore')<|docstring|>The cluster will be created from the specified backup. The structure is documented below.<|endoftext|> |
25c1ed93967d7fda3b975f0130c8c838dcaee440bcfeaace53986028ac8f33c8 | @property
@pulumi.getter(name='securityGroupIds')
def security_group_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
'\n A set of ids of security groups assigned to hosts of the cluster.\n '
return pulumi.get(self, 'security_group_ids') | A set of ids of security groups assigned to hosts of the cluster. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | security_group_ids | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter(name='securityGroupIds')
def security_group_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
'\n \n '
return pulumi.get(self, 'security_group_ids') | @property
@pulumi.getter(name='securityGroupIds')
def security_group_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
'\n \n '
return pulumi.get(self, 'security_group_ids')<|docstring|>A set of ids of security groups assigned to hosts of the cluster.<|endoftext|> |
fa2c6c0891dc5daec5bb19a66be77a15f8d44ee83e3f3b88d0c57eed5ca70e49 | def __init__(__self__, *, access: Optional[pulumi.Input['MdbMysqlClusterAccessArgs']]=None, allow_regeneration_host: Optional[pulumi.Input[bool]]=None, backup_window_start: Optional[pulumi.Input['MdbMysqlClusterBackupWindowStartArgs']]=None, created_at: Optional[pulumi.Input[str]]=None, databases: Optional[pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterDatabaseArgs']]]]=None, deletion_protection: Optional[pulumi.Input[bool]]=None, description: Optional[pulumi.Input[str]]=None, environment: Optional[pulumi.Input[str]]=None, folder_id: Optional[pulumi.Input[str]]=None, health: Optional[pulumi.Input[str]]=None, hosts: Optional[pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterHostArgs']]]]=None, labels: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, maintenance_window: Optional[pulumi.Input['MdbMysqlClusterMaintenanceWindowArgs']]=None, mysql_config: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, name: Optional[pulumi.Input[str]]=None, network_id: Optional[pulumi.Input[str]]=None, resources: Optional[pulumi.Input['MdbMysqlClusterResourcesArgs']]=None, restore: Optional[pulumi.Input['MdbMysqlClusterRestoreArgs']]=None, security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None, status: Optional[pulumi.Input[str]]=None, users: Optional[pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterUserArgs']]]]=None, version: Optional[pulumi.Input[str]]=None):
'\n Input properties used for looking up and filtering MdbMysqlCluster resources.\n :param pulumi.Input[\'MdbMysqlClusterAccessArgs\'] access: Access policy to the MySQL cluster. The structure is documented below.\n :param pulumi.Input[\'MdbMysqlClusterBackupWindowStartArgs\'] backup_window_start: Time to start the daily backup, in the UTC. The structure is documented below.\n :param pulumi.Input[str] created_at: Creation timestamp of the cluster.\n :param pulumi.Input[Sequence[pulumi.Input[\'MdbMysqlClusterDatabaseArgs\']]] databases: A database of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[bool] deletion_protection: Inhibits deletion of the cluster. Can be either `true` or `false`.\n :param pulumi.Input[str] description: Description of the MySQL cluster.\n :param pulumi.Input[str] environment: Deployment environment of the MySQL cluster.\n :param pulumi.Input[str] folder_id: The ID of the folder that the resource belongs to. If it\n is not provided, the default provider folder is used.\n :param pulumi.Input[str] health: Aggregated health of the cluster.\n :param pulumi.Input[Sequence[pulumi.Input[\'MdbMysqlClusterHostArgs\']]] hosts: A host of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: A set of key/value label pairs to assign to the MySQL cluster.\n :param pulumi.Input[\'MdbMysqlClusterMaintenanceWindowArgs\'] maintenance_window: Maintenance policy of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] mysql_config: MySQL cluster config. Detail info in "MySQL config" section (documented below).\n :param pulumi.Input[str] name: Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter.\n :param pulumi.Input[str] network_id: ID of the network, to which the MySQL cluster uses.\n :param pulumi.Input[\'MdbMysqlClusterResourcesArgs\'] resources: Resources allocated to hosts of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[\'MdbMysqlClusterRestoreArgs\'] restore: The cluster will be created from the specified backup. The structure is documented below.\n :param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_ids: A set of ids of security groups assigned to hosts of the cluster.\n :param pulumi.Input[str] status: Status of the cluster.\n :param pulumi.Input[Sequence[pulumi.Input[\'MdbMysqlClusterUserArgs\']]] users: A user of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[str] version: Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)\n '
if (access is not None):
pulumi.set(__self__, 'access', access)
if (allow_regeneration_host is not None):
warnings.warn('You can safely remove this option. There is no need to recreate host if assign_public_ip is changed.', DeprecationWarning)
pulumi.log.warn('allow_regeneration_host is deprecated: You can safely remove this option. There is no need to recreate host if assign_public_ip is changed.')
if (allow_regeneration_host is not None):
pulumi.set(__self__, 'allow_regeneration_host', allow_regeneration_host)
if (backup_window_start is not None):
pulumi.set(__self__, 'backup_window_start', backup_window_start)
if (created_at is not None):
pulumi.set(__self__, 'created_at', created_at)
if (databases is not None):
pulumi.set(__self__, 'databases', databases)
if (deletion_protection is not None):
pulumi.set(__self__, 'deletion_protection', deletion_protection)
if (description is not None):
pulumi.set(__self__, 'description', description)
if (environment is not None):
pulumi.set(__self__, 'environment', environment)
if (folder_id is not None):
pulumi.set(__self__, 'folder_id', folder_id)
if (health is not None):
pulumi.set(__self__, 'health', health)
if (hosts is not None):
pulumi.set(__self__, 'hosts', hosts)
if (labels is not None):
pulumi.set(__self__, 'labels', labels)
if (maintenance_window is not None):
pulumi.set(__self__, 'maintenance_window', maintenance_window)
if (mysql_config is not None):
pulumi.set(__self__, 'mysql_config', mysql_config)
if (name is not None):
pulumi.set(__self__, 'name', name)
if (network_id is not None):
pulumi.set(__self__, 'network_id', network_id)
if (resources is not None):
pulumi.set(__self__, 'resources', resources)
if (restore is not None):
pulumi.set(__self__, 'restore', restore)
if (security_group_ids is not None):
pulumi.set(__self__, 'security_group_ids', security_group_ids)
if (status is not None):
pulumi.set(__self__, 'status', status)
if (users is not None):
pulumi.set(__self__, 'users', users)
if (version is not None):
pulumi.set(__self__, 'version', version) | Input properties used for looking up and filtering MdbMysqlCluster resources.
:param pulumi.Input['MdbMysqlClusterAccessArgs'] access: Access policy to the MySQL cluster. The structure is documented below.
:param pulumi.Input['MdbMysqlClusterBackupWindowStartArgs'] backup_window_start: Time to start the daily backup, in the UTC. The structure is documented below.
:param pulumi.Input[str] created_at: Creation timestamp of the cluster.
:param pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterDatabaseArgs']]] databases: A database of the MySQL cluster. The structure is documented below.
:param pulumi.Input[bool] deletion_protection: Inhibits deletion of the cluster. Can be either `true` or `false`.
:param pulumi.Input[str] description: Description of the MySQL cluster.
:param pulumi.Input[str] environment: Deployment environment of the MySQL cluster.
:param pulumi.Input[str] folder_id: The ID of the folder that the resource belongs to. If it
is not provided, the default provider folder is used.
:param pulumi.Input[str] health: Aggregated health of the cluster.
:param pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterHostArgs']]] hosts: A host of the MySQL cluster. The structure is documented below.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: A set of key/value label pairs to assign to the MySQL cluster.
:param pulumi.Input['MdbMysqlClusterMaintenanceWindowArgs'] maintenance_window: Maintenance policy of the MySQL cluster. The structure is documented below.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] mysql_config: MySQL cluster config. Detail info in "MySQL config" section (documented below).
:param pulumi.Input[str] name: Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter.
:param pulumi.Input[str] network_id: ID of the network, to which the MySQL cluster uses.
:param pulumi.Input['MdbMysqlClusterResourcesArgs'] resources: Resources allocated to hosts of the MySQL cluster. The structure is documented below.
:param pulumi.Input['MdbMysqlClusterRestoreArgs'] restore: The cluster will be created from the specified backup. The structure is documented below.
:param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_ids: A set of ids of security groups assigned to hosts of the cluster.
:param pulumi.Input[str] status: Status of the cluster.
:param pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterUserArgs']]] users: A user of the MySQL cluster. The structure is documented below.
:param pulumi.Input[str] version: Version of the MySQL cluster. (allowed versions are: 5.7, 8.0) | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | __init__ | pulumi/pulumi-yandex | 9 | python | def __init__(__self__, *, access: Optional[pulumi.Input['MdbMysqlClusterAccessArgs']]=None, allow_regeneration_host: Optional[pulumi.Input[bool]]=None, backup_window_start: Optional[pulumi.Input['MdbMysqlClusterBackupWindowStartArgs']]=None, created_at: Optional[pulumi.Input[str]]=None, databases: Optional[pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterDatabaseArgs']]]]=None, deletion_protection: Optional[pulumi.Input[bool]]=None, description: Optional[pulumi.Input[str]]=None, environment: Optional[pulumi.Input[str]]=None, folder_id: Optional[pulumi.Input[str]]=None, health: Optional[pulumi.Input[str]]=None, hosts: Optional[pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterHostArgs']]]]=None, labels: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, maintenance_window: Optional[pulumi.Input['MdbMysqlClusterMaintenanceWindowArgs']]=None, mysql_config: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, name: Optional[pulumi.Input[str]]=None, network_id: Optional[pulumi.Input[str]]=None, resources: Optional[pulumi.Input['MdbMysqlClusterResourcesArgs']]=None, restore: Optional[pulumi.Input['MdbMysqlClusterRestoreArgs']]=None, security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None, status: Optional[pulumi.Input[str]]=None, users: Optional[pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterUserArgs']]]]=None, version: Optional[pulumi.Input[str]]=None):
'\n Input properties used for looking up and filtering MdbMysqlCluster resources.\n :param pulumi.Input[\'MdbMysqlClusterAccessArgs\'] access: Access policy to the MySQL cluster. The structure is documented below.\n :param pulumi.Input[\'MdbMysqlClusterBackupWindowStartArgs\'] backup_window_start: Time to start the daily backup, in the UTC. The structure is documented below.\n :param pulumi.Input[str] created_at: Creation timestamp of the cluster.\n :param pulumi.Input[Sequence[pulumi.Input[\'MdbMysqlClusterDatabaseArgs\']]] databases: A database of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[bool] deletion_protection: Inhibits deletion of the cluster. Can be either `true` or `false`.\n :param pulumi.Input[str] description: Description of the MySQL cluster.\n :param pulumi.Input[str] environment: Deployment environment of the MySQL cluster.\n :param pulumi.Input[str] folder_id: The ID of the folder that the resource belongs to. If it\n is not provided, the default provider folder is used.\n :param pulumi.Input[str] health: Aggregated health of the cluster.\n :param pulumi.Input[Sequence[pulumi.Input[\'MdbMysqlClusterHostArgs\']]] hosts: A host of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: A set of key/value label pairs to assign to the MySQL cluster.\n :param pulumi.Input[\'MdbMysqlClusterMaintenanceWindowArgs\'] maintenance_window: Maintenance policy of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] mysql_config: MySQL cluster config. Detail info in "MySQL config" section (documented below).\n :param pulumi.Input[str] name: Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter.\n :param pulumi.Input[str] network_id: ID of the network, to which the MySQL cluster uses.\n :param pulumi.Input[\'MdbMysqlClusterResourcesArgs\'] resources: Resources allocated to hosts of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[\'MdbMysqlClusterRestoreArgs\'] restore: The cluster will be created from the specified backup. The structure is documented below.\n :param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_ids: A set of ids of security groups assigned to hosts of the cluster.\n :param pulumi.Input[str] status: Status of the cluster.\n :param pulumi.Input[Sequence[pulumi.Input[\'MdbMysqlClusterUserArgs\']]] users: A user of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[str] version: Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)\n '
if (access is not None):
pulumi.set(__self__, 'access', access)
if (allow_regeneration_host is not None):
warnings.warn('You can safely remove this option. There is no need to recreate host if assign_public_ip is changed.', DeprecationWarning)
pulumi.log.warn('allow_regeneration_host is deprecated: You can safely remove this option. There is no need to recreate host if assign_public_ip is changed.')
if (allow_regeneration_host is not None):
pulumi.set(__self__, 'allow_regeneration_host', allow_regeneration_host)
if (backup_window_start is not None):
pulumi.set(__self__, 'backup_window_start', backup_window_start)
if (created_at is not None):
pulumi.set(__self__, 'created_at', created_at)
if (databases is not None):
pulumi.set(__self__, 'databases', databases)
if (deletion_protection is not None):
pulumi.set(__self__, 'deletion_protection', deletion_protection)
if (description is not None):
pulumi.set(__self__, 'description', description)
if (environment is not None):
pulumi.set(__self__, 'environment', environment)
if (folder_id is not None):
pulumi.set(__self__, 'folder_id', folder_id)
if (health is not None):
pulumi.set(__self__, 'health', health)
if (hosts is not None):
pulumi.set(__self__, 'hosts', hosts)
if (labels is not None):
pulumi.set(__self__, 'labels', labels)
if (maintenance_window is not None):
pulumi.set(__self__, 'maintenance_window', maintenance_window)
if (mysql_config is not None):
pulumi.set(__self__, 'mysql_config', mysql_config)
if (name is not None):
pulumi.set(__self__, 'name', name)
if (network_id is not None):
pulumi.set(__self__, 'network_id', network_id)
if (resources is not None):
pulumi.set(__self__, 'resources', resources)
if (restore is not None):
pulumi.set(__self__, 'restore', restore)
if (security_group_ids is not None):
pulumi.set(__self__, 'security_group_ids', security_group_ids)
if (status is not None):
pulumi.set(__self__, 'status', status)
if (users is not None):
pulumi.set(__self__, 'users', users)
if (version is not None):
pulumi.set(__self__, 'version', version) | def __init__(__self__, *, access: Optional[pulumi.Input['MdbMysqlClusterAccessArgs']]=None, allow_regeneration_host: Optional[pulumi.Input[bool]]=None, backup_window_start: Optional[pulumi.Input['MdbMysqlClusterBackupWindowStartArgs']]=None, created_at: Optional[pulumi.Input[str]]=None, databases: Optional[pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterDatabaseArgs']]]]=None, deletion_protection: Optional[pulumi.Input[bool]]=None, description: Optional[pulumi.Input[str]]=None, environment: Optional[pulumi.Input[str]]=None, folder_id: Optional[pulumi.Input[str]]=None, health: Optional[pulumi.Input[str]]=None, hosts: Optional[pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterHostArgs']]]]=None, labels: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, maintenance_window: Optional[pulumi.Input['MdbMysqlClusterMaintenanceWindowArgs']]=None, mysql_config: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, name: Optional[pulumi.Input[str]]=None, network_id: Optional[pulumi.Input[str]]=None, resources: Optional[pulumi.Input['MdbMysqlClusterResourcesArgs']]=None, restore: Optional[pulumi.Input['MdbMysqlClusterRestoreArgs']]=None, security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None, status: Optional[pulumi.Input[str]]=None, users: Optional[pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterUserArgs']]]]=None, version: Optional[pulumi.Input[str]]=None):
'\n Input properties used for looking up and filtering MdbMysqlCluster resources.\n :param pulumi.Input[\'MdbMysqlClusterAccessArgs\'] access: Access policy to the MySQL cluster. The structure is documented below.\n :param pulumi.Input[\'MdbMysqlClusterBackupWindowStartArgs\'] backup_window_start: Time to start the daily backup, in the UTC. The structure is documented below.\n :param pulumi.Input[str] created_at: Creation timestamp of the cluster.\n :param pulumi.Input[Sequence[pulumi.Input[\'MdbMysqlClusterDatabaseArgs\']]] databases: A database of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[bool] deletion_protection: Inhibits deletion of the cluster. Can be either `true` or `false`.\n :param pulumi.Input[str] description: Description of the MySQL cluster.\n :param pulumi.Input[str] environment: Deployment environment of the MySQL cluster.\n :param pulumi.Input[str] folder_id: The ID of the folder that the resource belongs to. If it\n is not provided, the default provider folder is used.\n :param pulumi.Input[str] health: Aggregated health of the cluster.\n :param pulumi.Input[Sequence[pulumi.Input[\'MdbMysqlClusterHostArgs\']]] hosts: A host of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: A set of key/value label pairs to assign to the MySQL cluster.\n :param pulumi.Input[\'MdbMysqlClusterMaintenanceWindowArgs\'] maintenance_window: Maintenance policy of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] mysql_config: MySQL cluster config. Detail info in "MySQL config" section (documented below).\n :param pulumi.Input[str] name: Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter.\n :param pulumi.Input[str] network_id: ID of the network, to which the MySQL cluster uses.\n :param pulumi.Input[\'MdbMysqlClusterResourcesArgs\'] resources: Resources allocated to hosts of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[\'MdbMysqlClusterRestoreArgs\'] restore: The cluster will be created from the specified backup. The structure is documented below.\n :param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_ids: A set of ids of security groups assigned to hosts of the cluster.\n :param pulumi.Input[str] status: Status of the cluster.\n :param pulumi.Input[Sequence[pulumi.Input[\'MdbMysqlClusterUserArgs\']]] users: A user of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[str] version: Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)\n '
if (access is not None):
pulumi.set(__self__, 'access', access)
if (allow_regeneration_host is not None):
warnings.warn('You can safely remove this option. There is no need to recreate host if assign_public_ip is changed.', DeprecationWarning)
pulumi.log.warn('allow_regeneration_host is deprecated: You can safely remove this option. There is no need to recreate host if assign_public_ip is changed.')
if (allow_regeneration_host is not None):
pulumi.set(__self__, 'allow_regeneration_host', allow_regeneration_host)
if (backup_window_start is not None):
pulumi.set(__self__, 'backup_window_start', backup_window_start)
if (created_at is not None):
pulumi.set(__self__, 'created_at', created_at)
if (databases is not None):
pulumi.set(__self__, 'databases', databases)
if (deletion_protection is not None):
pulumi.set(__self__, 'deletion_protection', deletion_protection)
if (description is not None):
pulumi.set(__self__, 'description', description)
if (environment is not None):
pulumi.set(__self__, 'environment', environment)
if (folder_id is not None):
pulumi.set(__self__, 'folder_id', folder_id)
if (health is not None):
pulumi.set(__self__, 'health', health)
if (hosts is not None):
pulumi.set(__self__, 'hosts', hosts)
if (labels is not None):
pulumi.set(__self__, 'labels', labels)
if (maintenance_window is not None):
pulumi.set(__self__, 'maintenance_window', maintenance_window)
if (mysql_config is not None):
pulumi.set(__self__, 'mysql_config', mysql_config)
if (name is not None):
pulumi.set(__self__, 'name', name)
if (network_id is not None):
pulumi.set(__self__, 'network_id', network_id)
if (resources is not None):
pulumi.set(__self__, 'resources', resources)
if (restore is not None):
pulumi.set(__self__, 'restore', restore)
if (security_group_ids is not None):
pulumi.set(__self__, 'security_group_ids', security_group_ids)
if (status is not None):
pulumi.set(__self__, 'status', status)
if (users is not None):
pulumi.set(__self__, 'users', users)
if (version is not None):
pulumi.set(__self__, 'version', version)<|docstring|>Input properties used for looking up and filtering MdbMysqlCluster resources.
:param pulumi.Input['MdbMysqlClusterAccessArgs'] access: Access policy to the MySQL cluster. The structure is documented below.
:param pulumi.Input['MdbMysqlClusterBackupWindowStartArgs'] backup_window_start: Time to start the daily backup, in the UTC. The structure is documented below.
:param pulumi.Input[str] created_at: Creation timestamp of the cluster.
:param pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterDatabaseArgs']]] databases: A database of the MySQL cluster. The structure is documented below.
:param pulumi.Input[bool] deletion_protection: Inhibits deletion of the cluster. Can be either `true` or `false`.
:param pulumi.Input[str] description: Description of the MySQL cluster.
:param pulumi.Input[str] environment: Deployment environment of the MySQL cluster.
:param pulumi.Input[str] folder_id: The ID of the folder that the resource belongs to. If it
is not provided, the default provider folder is used.
:param pulumi.Input[str] health: Aggregated health of the cluster.
:param pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterHostArgs']]] hosts: A host of the MySQL cluster. The structure is documented below.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: A set of key/value label pairs to assign to the MySQL cluster.
:param pulumi.Input['MdbMysqlClusterMaintenanceWindowArgs'] maintenance_window: Maintenance policy of the MySQL cluster. The structure is documented below.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] mysql_config: MySQL cluster config. Detail info in "MySQL config" section (documented below).
:param pulumi.Input[str] name: Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter.
:param pulumi.Input[str] network_id: ID of the network, to which the MySQL cluster uses.
:param pulumi.Input['MdbMysqlClusterResourcesArgs'] resources: Resources allocated to hosts of the MySQL cluster. The structure is documented below.
:param pulumi.Input['MdbMysqlClusterRestoreArgs'] restore: The cluster will be created from the specified backup. The structure is documented below.
:param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_ids: A set of ids of security groups assigned to hosts of the cluster.
:param pulumi.Input[str] status: Status of the cluster.
:param pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterUserArgs']]] users: A user of the MySQL cluster. The structure is documented below.
:param pulumi.Input[str] version: Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)<|endoftext|> |
2b37e1216ead81b40e7e81708536a08c0f27cb95f4a213dfd5206902549844bc | @property
@pulumi.getter
def access(self) -> Optional[pulumi.Input['MdbMysqlClusterAccessArgs']]:
'\n Access policy to the MySQL cluster. The structure is documented below.\n '
return pulumi.get(self, 'access') | Access policy to the MySQL cluster. The structure is documented below. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | access | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def access(self) -> Optional[pulumi.Input['MdbMysqlClusterAccessArgs']]:
'\n \n '
return pulumi.get(self, 'access') | @property
@pulumi.getter
def access(self) -> Optional[pulumi.Input['MdbMysqlClusterAccessArgs']]:
'\n \n '
return pulumi.get(self, 'access')<|docstring|>Access policy to the MySQL cluster. The structure is documented below.<|endoftext|> |
10824076015c4865c2469b6a3851da315bf8bc4c24568504dff6c3ba4a31941e | @property
@pulumi.getter(name='backupWindowStart')
def backup_window_start(self) -> Optional[pulumi.Input['MdbMysqlClusterBackupWindowStartArgs']]:
'\n Time to start the daily backup, in the UTC. The structure is documented below.\n '
return pulumi.get(self, 'backup_window_start') | Time to start the daily backup, in the UTC. The structure is documented below. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | backup_window_start | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter(name='backupWindowStart')
def backup_window_start(self) -> Optional[pulumi.Input['MdbMysqlClusterBackupWindowStartArgs']]:
'\n \n '
return pulumi.get(self, 'backup_window_start') | @property
@pulumi.getter(name='backupWindowStart')
def backup_window_start(self) -> Optional[pulumi.Input['MdbMysqlClusterBackupWindowStartArgs']]:
'\n \n '
return pulumi.get(self, 'backup_window_start')<|docstring|>Time to start the daily backup, in the UTC. The structure is documented below.<|endoftext|> |
e7278cf0870beffdc631a0aafb459823c3f04cd5e8b24a36c3e08c3f845df252 | @property
@pulumi.getter(name='createdAt')
def created_at(self) -> Optional[pulumi.Input[str]]:
'\n Creation timestamp of the cluster.\n '
return pulumi.get(self, 'created_at') | Creation timestamp of the cluster. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | created_at | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter(name='createdAt')
def created_at(self) -> Optional[pulumi.Input[str]]:
'\n \n '
return pulumi.get(self, 'created_at') | @property
@pulumi.getter(name='createdAt')
def created_at(self) -> Optional[pulumi.Input[str]]:
'\n \n '
return pulumi.get(self, 'created_at')<|docstring|>Creation timestamp of the cluster.<|endoftext|> |
37d86960efcb9327ff1a617715065afa509784c1a51d4b9d25741471a9319510 | @property
@pulumi.getter
def databases(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterDatabaseArgs']]]]:
'\n A database of the MySQL cluster. The structure is documented below.\n '
return pulumi.get(self, 'databases') | A database of the MySQL cluster. The structure is documented below. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | databases | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def databases(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterDatabaseArgs']]]]:
'\n \n '
return pulumi.get(self, 'databases') | @property
@pulumi.getter
def databases(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterDatabaseArgs']]]]:
'\n \n '
return pulumi.get(self, 'databases')<|docstring|>A database of the MySQL cluster. The structure is documented below.<|endoftext|> |
ff558ab56d2e5918f949a9c7dcddb9807be772ef8f53df10ed38a21841779c3f | @property
@pulumi.getter(name='deletionProtection')
def deletion_protection(self) -> Optional[pulumi.Input[bool]]:
'\n Inhibits deletion of the cluster. Can be either `true` or `false`.\n '
return pulumi.get(self, 'deletion_protection') | Inhibits deletion of the cluster. Can be either `true` or `false`. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | deletion_protection | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter(name='deletionProtection')
def deletion_protection(self) -> Optional[pulumi.Input[bool]]:
'\n \n '
return pulumi.get(self, 'deletion_protection') | @property
@pulumi.getter(name='deletionProtection')
def deletion_protection(self) -> Optional[pulumi.Input[bool]]:
'\n \n '
return pulumi.get(self, 'deletion_protection')<|docstring|>Inhibits deletion of the cluster. Can be either `true` or `false`.<|endoftext|> |
35f4e5687719e30897fdf472df07c5c1b67c2444210936570432681dcdf46e67 | @property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
'\n Description of the MySQL cluster.\n '
return pulumi.get(self, 'description') | Description of the MySQL cluster. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | description | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
'\n \n '
return pulumi.get(self, 'description') | @property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
'\n \n '
return pulumi.get(self, 'description')<|docstring|>Description of the MySQL cluster.<|endoftext|> |
473216dfbb8af00cad9b77d8821299ce7b3836abc6aeb7c7f9dc18b3d056bcd7 | @property
@pulumi.getter
def environment(self) -> Optional[pulumi.Input[str]]:
'\n Deployment environment of the MySQL cluster.\n '
return pulumi.get(self, 'environment') | Deployment environment of the MySQL cluster. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | environment | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def environment(self) -> Optional[pulumi.Input[str]]:
'\n \n '
return pulumi.get(self, 'environment') | @property
@pulumi.getter
def environment(self) -> Optional[pulumi.Input[str]]:
'\n \n '
return pulumi.get(self, 'environment')<|docstring|>Deployment environment of the MySQL cluster.<|endoftext|> |
bd48ea5cfcac74e989ec7acd73a14470d8c100af7b2b372adbe9e4b69e9e5f0e | @property
@pulumi.getter(name='folderId')
def folder_id(self) -> Optional[pulumi.Input[str]]:
'\n The ID of the folder that the resource belongs to. If it\n is not provided, the default provider folder is used.\n '
return pulumi.get(self, 'folder_id') | The ID of the folder that the resource belongs to. If it
is not provided, the default provider folder is used. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | folder_id | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter(name='folderId')
def folder_id(self) -> Optional[pulumi.Input[str]]:
'\n The ID of the folder that the resource belongs to. If it\n is not provided, the default provider folder is used.\n '
return pulumi.get(self, 'folder_id') | @property
@pulumi.getter(name='folderId')
def folder_id(self) -> Optional[pulumi.Input[str]]:
'\n The ID of the folder that the resource belongs to. If it\n is not provided, the default provider folder is used.\n '
return pulumi.get(self, 'folder_id')<|docstring|>The ID of the folder that the resource belongs to. If it
is not provided, the default provider folder is used.<|endoftext|> |
52234122d63ded6555ae749b3ed87bbcc0872f2d10c886f3a4cb3f65573fe5da | @property
@pulumi.getter
def health(self) -> Optional[pulumi.Input[str]]:
'\n Aggregated health of the cluster.\n '
return pulumi.get(self, 'health') | Aggregated health of the cluster. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | health | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def health(self) -> Optional[pulumi.Input[str]]:
'\n \n '
return pulumi.get(self, 'health') | @property
@pulumi.getter
def health(self) -> Optional[pulumi.Input[str]]:
'\n \n '
return pulumi.get(self, 'health')<|docstring|>Aggregated health of the cluster.<|endoftext|> |
88266f8c92d7fd9894f41992e8effffef41b57b4fd5daadb562070f71f6a8050 | @property
@pulumi.getter
def hosts(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterHostArgs']]]]:
'\n A host of the MySQL cluster. The structure is documented below.\n '
return pulumi.get(self, 'hosts') | A host of the MySQL cluster. The structure is documented below. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | hosts | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def hosts(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterHostArgs']]]]:
'\n \n '
return pulumi.get(self, 'hosts') | @property
@pulumi.getter
def hosts(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterHostArgs']]]]:
'\n \n '
return pulumi.get(self, 'hosts')<|docstring|>A host of the MySQL cluster. The structure is documented below.<|endoftext|> |
a0cc011b33965c010a307620fc7793f87f322895df7c020cfec99839d95b88c4 | @property
@pulumi.getter
def labels(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]:
'\n A set of key/value label pairs to assign to the MySQL cluster.\n '
return pulumi.get(self, 'labels') | A set of key/value label pairs to assign to the MySQL cluster. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | labels | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def labels(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]:
'\n \n '
return pulumi.get(self, 'labels') | @property
@pulumi.getter
def labels(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]:
'\n \n '
return pulumi.get(self, 'labels')<|docstring|>A set of key/value label pairs to assign to the MySQL cluster.<|endoftext|> |
d3e3403c03cedce561ec9274852f1f9fc1c0a7887af874ca7dbf8422f0cdbd3e | @property
@pulumi.getter(name='maintenanceWindow')
def maintenance_window(self) -> Optional[pulumi.Input['MdbMysqlClusterMaintenanceWindowArgs']]:
'\n Maintenance policy of the MySQL cluster. The structure is documented below.\n '
return pulumi.get(self, 'maintenance_window') | Maintenance policy of the MySQL cluster. The structure is documented below. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | maintenance_window | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter(name='maintenanceWindow')
def maintenance_window(self) -> Optional[pulumi.Input['MdbMysqlClusterMaintenanceWindowArgs']]:
'\n \n '
return pulumi.get(self, 'maintenance_window') | @property
@pulumi.getter(name='maintenanceWindow')
def maintenance_window(self) -> Optional[pulumi.Input['MdbMysqlClusterMaintenanceWindowArgs']]:
'\n \n '
return pulumi.get(self, 'maintenance_window')<|docstring|>Maintenance policy of the MySQL cluster. The structure is documented below.<|endoftext|> |
ee6a9400cf8eb0f8a5dcd1f2db522b72d1bc24f95ea065cba5c9c4a15b660bdb | @property
@pulumi.getter(name='mysqlConfig')
def mysql_config(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]:
'\n MySQL cluster config. Detail info in "MySQL config" section (documented below).\n '
return pulumi.get(self, 'mysql_config') | MySQL cluster config. Detail info in "MySQL config" section (documented below). | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | mysql_config | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter(name='mysqlConfig')
def mysql_config(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]:
'\n \n '
return pulumi.get(self, 'mysql_config') | @property
@pulumi.getter(name='mysqlConfig')
def mysql_config(self) -> Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]:
'\n \n '
return pulumi.get(self, 'mysql_config')<|docstring|>MySQL cluster config. Detail info in "MySQL config" section (documented below).<|endoftext|> |
ba24aa1924bc3ecad915d63ebba3d3b5d34e598a5cf587b4e3037fd20698011c | @property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
'\n Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter.\n '
return pulumi.get(self, 'name') | Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | name | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
'\n \n '
return pulumi.get(self, 'name') | @property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
'\n \n '
return pulumi.get(self, 'name')<|docstring|>Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter.<|endoftext|> |
b0eddebe986b7e02a89a6510414a1143edc4e96c9014e5cbd90da3da63e833d5 | @property
@pulumi.getter(name='networkId')
def network_id(self) -> Optional[pulumi.Input[str]]:
'\n ID of the network, to which the MySQL cluster uses.\n '
return pulumi.get(self, 'network_id') | ID of the network, to which the MySQL cluster uses. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | network_id | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter(name='networkId')
def network_id(self) -> Optional[pulumi.Input[str]]:
'\n \n '
return pulumi.get(self, 'network_id') | @property
@pulumi.getter(name='networkId')
def network_id(self) -> Optional[pulumi.Input[str]]:
'\n \n '
return pulumi.get(self, 'network_id')<|docstring|>ID of the network, to which the MySQL cluster uses.<|endoftext|> |
4440242a2b1b75f6cbd785bcc33466ecfb119a65a6778171e737f975c56cf572 | @property
@pulumi.getter
def resources(self) -> Optional[pulumi.Input['MdbMysqlClusterResourcesArgs']]:
'\n Resources allocated to hosts of the MySQL cluster. The structure is documented below.\n '
return pulumi.get(self, 'resources') | Resources allocated to hosts of the MySQL cluster. The structure is documented below. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | resources | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def resources(self) -> Optional[pulumi.Input['MdbMysqlClusterResourcesArgs']]:
'\n \n '
return pulumi.get(self, 'resources') | @property
@pulumi.getter
def resources(self) -> Optional[pulumi.Input['MdbMysqlClusterResourcesArgs']]:
'\n \n '
return pulumi.get(self, 'resources')<|docstring|>Resources allocated to hosts of the MySQL cluster. The structure is documented below.<|endoftext|> |
242d24c1219a6456f1a24b5c11022116f44ae9877160702be3fce6f5ddecb7fd | @property
@pulumi.getter
def restore(self) -> Optional[pulumi.Input['MdbMysqlClusterRestoreArgs']]:
'\n The cluster will be created from the specified backup. The structure is documented below.\n '
return pulumi.get(self, 'restore') | The cluster will be created from the specified backup. The structure is documented below. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | restore | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def restore(self) -> Optional[pulumi.Input['MdbMysqlClusterRestoreArgs']]:
'\n \n '
return pulumi.get(self, 'restore') | @property
@pulumi.getter
def restore(self) -> Optional[pulumi.Input['MdbMysqlClusterRestoreArgs']]:
'\n \n '
return pulumi.get(self, 'restore')<|docstring|>The cluster will be created from the specified backup. The structure is documented below.<|endoftext|> |
25c1ed93967d7fda3b975f0130c8c838dcaee440bcfeaace53986028ac8f33c8 | @property
@pulumi.getter(name='securityGroupIds')
def security_group_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
'\n A set of ids of security groups assigned to hosts of the cluster.\n '
return pulumi.get(self, 'security_group_ids') | A set of ids of security groups assigned to hosts of the cluster. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | security_group_ids | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter(name='securityGroupIds')
def security_group_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
'\n \n '
return pulumi.get(self, 'security_group_ids') | @property
@pulumi.getter(name='securityGroupIds')
def security_group_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
'\n \n '
return pulumi.get(self, 'security_group_ids')<|docstring|>A set of ids of security groups assigned to hosts of the cluster.<|endoftext|> |
1bcf879f396761fe4227658ef9fd1f7e17f42889512ebe55ead71493e4a13b0e | @property
@pulumi.getter
def status(self) -> Optional[pulumi.Input[str]]:
'\n Status of the cluster.\n '
return pulumi.get(self, 'status') | Status of the cluster. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | status | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def status(self) -> Optional[pulumi.Input[str]]:
'\n \n '
return pulumi.get(self, 'status') | @property
@pulumi.getter
def status(self) -> Optional[pulumi.Input[str]]:
'\n \n '
return pulumi.get(self, 'status')<|docstring|>Status of the cluster.<|endoftext|> |
7fb83750021b7abaa32580170dad5fd02d21ee51756194468795c71fa4d05df3 | @property
@pulumi.getter
def users(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterUserArgs']]]]:
'\n A user of the MySQL cluster. The structure is documented below.\n '
return pulumi.get(self, 'users') | A user of the MySQL cluster. The structure is documented below. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | users | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def users(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterUserArgs']]]]:
'\n \n '
return pulumi.get(self, 'users') | @property
@pulumi.getter
def users(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['MdbMysqlClusterUserArgs']]]]:
'\n \n '
return pulumi.get(self, 'users')<|docstring|>A user of the MySQL cluster. The structure is documented below.<|endoftext|> |
ba273654297aebe33d05ae605a203cbc6003d7fd8972baa89d3530d9935d9253 | @property
@pulumi.getter
def version(self) -> Optional[pulumi.Input[str]]:
'\n Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)\n '
return pulumi.get(self, 'version') | Version of the MySQL cluster. (allowed versions are: 5.7, 8.0) | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | version | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def version(self) -> Optional[pulumi.Input[str]]:
'\n \n '
return pulumi.get(self, 'version') | @property
@pulumi.getter
def version(self) -> Optional[pulumi.Input[str]]:
'\n \n '
return pulumi.get(self, 'version')<|docstring|>Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)<|endoftext|> |
85338e4aa1bc7fdc1c14866e95463ec7559ba595af020de83efe48500f16cedd | @overload
def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions]=None, access: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterAccessArgs']]]=None, allow_regeneration_host: Optional[pulumi.Input[bool]]=None, backup_window_start: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterBackupWindowStartArgs']]]=None, databases: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterDatabaseArgs']]]]]=None, deletion_protection: Optional[pulumi.Input[bool]]=None, description: Optional[pulumi.Input[str]]=None, environment: Optional[pulumi.Input[str]]=None, folder_id: Optional[pulumi.Input[str]]=None, hosts: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterHostArgs']]]]]=None, labels: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, maintenance_window: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterMaintenanceWindowArgs']]]=None, mysql_config: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, name: Optional[pulumi.Input[str]]=None, network_id: Optional[pulumi.Input[str]]=None, resources: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterResourcesArgs']]]=None, restore: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterRestoreArgs']]]=None, security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None, users: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterUserArgs']]]]]=None, version: Optional[pulumi.Input[str]]=None, __props__=None):
'\n Manages a MySQL cluster within the Yandex.Cloud. For more information, see\n [the official documentation](https://cloud.yandex.com/docs/managed-mysql/).\n\n ## Example Usage\n\n Example of creating a Single Node MySQL.\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.5.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n mysql_config={\n "sql_mode": "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION",\n "max_connections": "100",\n "default_authentication_plugin": "MYSQL_NATIVE_PASSWORD",\n "innodb_print_all_deadlocks": "true",\n },\n access=yandex.MdbMysqlClusterAccessArgs(\n web_sql=True,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n )],\n hosts=[yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n subnet_id=foo_vpc_subnet.id,\n )])\n ```\n\n Example of creating a High-Availability(HA) MySQL Cluster.\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.1.0.0/24"])\n bar = yandex.VpcSubnet("bar",\n zone="ru-central1-b",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.2.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(\n type="WEEKLY",\n day="SAT",\n hour=12,\n ),\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n )],\n hosts=[\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n subnet_id=foo_vpc_subnet.id,\n ),\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-b",\n subnet_id=bar.id,\n ),\n ])\n ```\n\n Example of creating a MySQL Cluster with cascade replicas: HA-group consist of \'na-1\' and \'na-2\', cascade replicas form a chain \'na-1\' > \'nb-1\' > \'nb-2\'\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.1.0.0/24"])\n bar = yandex.VpcSubnet("bar",\n zone="ru-central1-b",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.2.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(\n type="WEEKLY",\n day="SAT",\n hour=12,\n ),\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n )],\n hosts=[\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n name="na-1",\n subnet_id=foo_vpc_subnet.id,\n ),\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n name="na-2",\n subnet_id=foo_vpc_subnet.id,\n ),\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-b",\n name="nb-1",\n replication_source_name="na-1",\n subnet_id=bar.id,\n ),\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-b",\n name="nb-2",\n replication_source_name="nb-1",\n subnet_id=bar.id,\n ),\n ])\n ```\n\n Example of creating a Single Node MySQL with user params.\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.5.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(\n type="ANYTIME",\n ),\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n connection_limits=yandex.MdbMysqlClusterUserConnectionLimitsArgs(\n max_questions_per_hour=10,\n ),\n global_permissions=[\n "REPLICATION_SLAVE",\n "PROCESS",\n ],\n authentication_plugin="CACHING_SHA2_PASSWORD",\n )],\n hosts=[yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n subnet_id=foo_vpc_subnet.id,\n )])\n ```\n\n Example of restoring MySQL cluster.\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.5.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n restore=yandex.MdbMysqlClusterRestoreArgs(\n backup_id="c9qj2tns23432471d9qha:stream_20210122T141717Z",\n time="2021-01-23T15:04:05",\n ),\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n )],\n hosts=[yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n subnet_id=foo_vpc_subnet.id,\n )])\n ```\n ## MySQL config\n\n If not specified `mysql_config` then does not make any changes.\n\n * `sql_mode` default value: `ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION`\n\n some of: \t-\t1: "ALLOW_INVALID_DATES"\n \t-\t2: "ANSI_QUOTES"\n \t-\t3: "ERROR_FOR_DIVISION_BY_ZERO"\n \t-\t4: "HIGH_NOT_PRECEDENCE"\n \t-\t5: "IGNORE_SPACE"\n \t-\t6: "NO_AUTO_VALUE_ON_ZERO"\n \t-\t7: "NO_BACKSLASH_ESCAPES"\n \t-\t8: "NO_ENGINE_SUBSTITUTION"\n \t-\t9: "NO_UNSIGNED_SUBTRACTION"\n \t-\t10: "NO_ZERO_DATE"\n \t-\t11: "NO_ZERO_IN_DATE"\n \t-\t15: "ONLY_FULL_GROUP_BY"\n \t-\t16: "PAD_CHAR_TO_FULL_LENGTH"\n \t-\t17: "PIPES_AS_CONCAT"\n \t-\t18: "REAL_AS_FLOAT"\n \t-\t19: "STRICT_ALL_TABLES"\n \t-\t20: "STRICT_TRANS_TABLES"\n \t-\t21: "TIME_TRUNCATE_FRACTIONAL"\n \t-\t22: "ANSI"\n \t-\t23: "TRADITIONAL"\n \t-\t24: "NO_DIR_IN_CREATE"\n or:\n - 0: "SQLMODE_UNSPECIFIED"\n\n ### MysqlConfig 8.0\n * `audit_log` boolean\n\n * `auto_increment_increment` integer\n\n * `auto_increment_offset` integer\n\n * `binlog_cache_size` integer\n\n * `binlog_group_commit_sync_delay` integer\n\n * `binlog_row_image` one of:\n - 0: "BINLOG_ROW_IMAGE_UNSPECIFIED"\n - 1: "FULL"\n - 2: "MINIMAL"\n - 3: "NOBLOB"\n\n * `binlog_rows_query_log_events` boolean\n\n * `character_set_server` text\n\n * `collation_server` text\n\n * `default_authentication_plugin` one of:\n - 0: "AUTH_PLUGIN_UNSPECIFIED"\n - 1: "MYSQL_NATIVE_PASSWORD"\n - 2: "CACHING_SHA2_PASSWORD"\n - 3: "SHA256_PASSWORD"\n\n * `default_time_zone` text\n\n * `explicit_defaults_for_timestamp` boolean\n\n * `general_log` boolean\n\n * `group_concat_max_len` integer\n\n * `innodb_adaptive_hash_index` boolean\n\n * `innodb_buffer_pool_size` integer\n\n * `innodb_flush_log_at_trx_commit` integer\n\n * `innodb_io_capacity` integer\n\n * `innodb_io_capacity_max` integer\n\n * `innodb_lock_wait_timeout` integer\n\n * `innodb_log_buffer_size` integer\n\n * `innodb_log_file_size` integer\n\n * `innodb_numa_interleave` boolean\n\n * `innodb_print_all_deadlocks` boolean\n\n * `innodb_purge_threads` integer\n\n * `innodb_read_io_threads` integer\n\n * `innodb_temp_data_file_max_size` integer\n\n * `innodb_thread_concurrency` integer\n\n * `innodb_write_io_threads` integer\n\n * `join_buffer_size` integer\n\n * `long_query_time` float\n\n * `max_allowed_packet` integer\n\n * `max_connections` integer\n\n * `max_heap_table_size` integer\n\n * `net_read_timeout` integer\n\n * `net_write_timeout` integer\n\n * `regexp_time_limit` integer\n\n * `rpl_semi_sync_master_wait_for_slave_count` integer\n\n * `slave_parallel_type` one of:\n - 0: "SLAVE_PARALLEL_TYPE_UNSPECIFIED"\n - 1: "DATABASE"\n - 2: "LOGICAL_CLOCK"\n\n * `slave_parallel_workers` integer\n\n * `sort_buffer_size` integer\n\n * `sync_binlog` integer\n\n * `table_definition_cache` integer\n\n * `table_open_cache` integer\n\n * `table_open_cache_instances` integer\n\n * `thread_cache_size` integer\n\n * `thread_stack` integer\n\n * `tmp_table_size` integer\n\n * `transaction_isolation` one of:\n - 0: "TRANSACTION_ISOLATION_UNSPECIFIED"\n - 1: "READ_COMMITTED"\n - 2: "REPEATABLE_READ"\n - 3: "SERIALIZABLE"\n\n ### MysqlConfig 5.7\n * `audit_log` boolean\n\n * `auto_increment_increment` integer\n\n * `auto_increment_offset` integer\n\n * `binlog_cache_size` integer\n\n * `binlog_group_commit_sync_delay` integer\n\n * `binlog_row_image` one of:\n - 0: "BINLOG_ROW_IMAGE_UNSPECIFIED"\n - 1: "FULL"\n - 2: "MINIMAL"\n - 3: "NOBLOB"\n\n * `binlog_rows_query_log_events` boolean\n\n * `character_set_server` text\n\n * `collation_server` text\n\n * `default_authentication_plugin` one of:\n - 0: "AUTH_PLUGIN_UNSPECIFIED"\n - 1: "MYSQL_NATIVE_PASSWORD"\n - 2: "CACHING_SHA2_PASSWORD"\n - 3: "SHA256_PASSWORD"\n\n * `default_time_zone` text\n\n * `explicit_defaults_for_timestamp` boolean\n\n * `general_log` boolean\n\n * `group_concat_max_len` integer\n\n * `innodb_adaptive_hash_index` boolean\n\n * `innodb_buffer_pool_size` integer\n\n * `innodb_flush_log_at_trx_commit` integer\n\n * `innodb_io_capacity` integer\n\n * `innodb_io_capacity_max` integer\n\n * `innodb_lock_wait_timeout` integer\n\n * `innodb_log_buffer_size` integer\n\n * `innodb_log_file_size` integer\n\n * `innodb_numa_interleave` boolean\n\n * `innodb_print_all_deadlocks` boolean\n\n * `innodb_purge_threads` integer\n\n * `innodb_read_io_threads` integer\n\n * `innodb_temp_data_file_max_size` integer\n\n * `innodb_thread_concurrency` integer\n\n * `innodb_write_io_threads` integer\n\n * `join_buffer_size` integer\n\n * `long_query_time` float\n\n * `max_allowed_packet` integer\n\n * `max_connections` integer\n\n * `max_heap_table_size` integer\n\n * `net_read_timeout` integer\n\n * `net_write_timeout` integer\n\n * `rpl_semi_sync_master_wait_for_slave_count` integer\n\n * `slave_parallel_type` one of:\n - 0: "SLAVE_PARALLEL_TYPE_UNSPECIFIED"\n - 1: "DATABASE"\n - 2: "LOGICAL_CLOCK"\n\n * `slave_parallel_workers` integer\n\n * `sort_buffer_size` integer\n\n * `sync_binlog` integer\n\n * `table_definition_cache` integer\n\n * `table_open_cache` integer\n\n * `table_open_cache_instances` integer\n\n * `thread_cache_size` integer\n\n * `thread_stack` integer\n\n * `tmp_table_size` integer\n\n * `transaction_isolation` one of:\n - 0: "TRANSACTION_ISOLATION_UNSPECIFIED"\n - 1: "READ_COMMITTED"\n - 2: "REPEATABLE_READ"\n - 3: "SERIALIZABLE"\n\n ## Import\n\n A cluster can be imported using the `id` of the resource, e.g.\n\n ```sh\n $ pulumi import yandex:index/mdbMysqlCluster:MdbMysqlCluster foo cluster_id\n ```\n\n :param str resource_name: The name of the resource.\n :param pulumi.ResourceOptions opts: Options for the resource.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterAccessArgs\']] access: Access policy to the MySQL cluster. The structure is documented below.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterBackupWindowStartArgs\']] backup_window_start: Time to start the daily backup, in the UTC. The structure is documented below.\n :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType[\'MdbMysqlClusterDatabaseArgs\']]]] databases: A database of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[bool] deletion_protection: Inhibits deletion of the cluster. Can be either `true` or `false`.\n :param pulumi.Input[str] description: Description of the MySQL cluster.\n :param pulumi.Input[str] environment: Deployment environment of the MySQL cluster.\n :param pulumi.Input[str] folder_id: The ID of the folder that the resource belongs to. If it\n is not provided, the default provider folder is used.\n :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType[\'MdbMysqlClusterHostArgs\']]]] hosts: A host of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: A set of key/value label pairs to assign to the MySQL cluster.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterMaintenanceWindowArgs\']] maintenance_window: Maintenance policy of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] mysql_config: MySQL cluster config. Detail info in "MySQL config" section (documented below).\n :param pulumi.Input[str] name: Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter.\n :param pulumi.Input[str] network_id: ID of the network, to which the MySQL cluster uses.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterResourcesArgs\']] resources: Resources allocated to hosts of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterRestoreArgs\']] restore: The cluster will be created from the specified backup. The structure is documented below.\n :param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_ids: A set of ids of security groups assigned to hosts of the cluster.\n :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType[\'MdbMysqlClusterUserArgs\']]]] users: A user of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[str] version: Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)\n '
... | Manages a MySQL cluster within the Yandex.Cloud. For more information, see
[the official documentation](https://cloud.yandex.com/docs/managed-mysql/).
## Example Usage
Example of creating a Single Node MySQL.
```python
import pulumi
import pulumi_yandex as yandex
foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")
foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",
zone="ru-central1-a",
network_id=foo_vpc_network.id,
v4_cidr_blocks=["10.5.0.0/24"])
foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",
environment="PRESTABLE",
network_id=foo_vpc_network.id,
version="8.0",
resources=yandex.MdbMysqlClusterResourcesArgs(
resource_preset_id="s2.micro",
disk_type_id="network-ssd",
disk_size=16,
),
mysql_config={
"sql_mode": "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION",
"max_connections": "100",
"default_authentication_plugin": "MYSQL_NATIVE_PASSWORD",
"innodb_print_all_deadlocks": "true",
},
access=yandex.MdbMysqlClusterAccessArgs(
web_sql=True,
),
databases=[yandex.MdbMysqlClusterDatabaseArgs(
name="db_name",
)],
users=[yandex.MdbMysqlClusterUserArgs(
name="user_name",
password="your_password",
permissions=[yandex.MdbMysqlClusterUserPermissionArgs(
database_name="db_name",
roles=["ALL"],
)],
)],
hosts=[yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-a",
subnet_id=foo_vpc_subnet.id,
)])
```
Example of creating a High-Availability(HA) MySQL Cluster.
```python
import pulumi
import pulumi_yandex as yandex
foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")
foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",
zone="ru-central1-a",
network_id=foo_vpc_network.id,
v4_cidr_blocks=["10.1.0.0/24"])
bar = yandex.VpcSubnet("bar",
zone="ru-central1-b",
network_id=foo_vpc_network.id,
v4_cidr_blocks=["10.2.0.0/24"])
foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",
environment="PRESTABLE",
network_id=foo_vpc_network.id,
version="8.0",
resources=yandex.MdbMysqlClusterResourcesArgs(
resource_preset_id="s2.micro",
disk_type_id="network-ssd",
disk_size=16,
),
databases=[yandex.MdbMysqlClusterDatabaseArgs(
name="db_name",
)],
maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(
type="WEEKLY",
day="SAT",
hour=12,
),
users=[yandex.MdbMysqlClusterUserArgs(
name="user_name",
password="your_password",
permissions=[yandex.MdbMysqlClusterUserPermissionArgs(
database_name="db_name",
roles=["ALL"],
)],
)],
hosts=[
yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-a",
subnet_id=foo_vpc_subnet.id,
),
yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-b",
subnet_id=bar.id,
),
])
```
Example of creating a MySQL Cluster with cascade replicas: HA-group consist of 'na-1' and 'na-2', cascade replicas form a chain 'na-1' > 'nb-1' > 'nb-2'
```python
import pulumi
import pulumi_yandex as yandex
foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")
foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",
zone="ru-central1-a",
network_id=foo_vpc_network.id,
v4_cidr_blocks=["10.1.0.0/24"])
bar = yandex.VpcSubnet("bar",
zone="ru-central1-b",
network_id=foo_vpc_network.id,
v4_cidr_blocks=["10.2.0.0/24"])
foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",
environment="PRESTABLE",
network_id=foo_vpc_network.id,
version="8.0",
resources=yandex.MdbMysqlClusterResourcesArgs(
resource_preset_id="s2.micro",
disk_type_id="network-ssd",
disk_size=16,
),
databases=[yandex.MdbMysqlClusterDatabaseArgs(
name="db_name",
)],
maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(
type="WEEKLY",
day="SAT",
hour=12,
),
users=[yandex.MdbMysqlClusterUserArgs(
name="user_name",
password="your_password",
permissions=[yandex.MdbMysqlClusterUserPermissionArgs(
database_name="db_name",
roles=["ALL"],
)],
)],
hosts=[
yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-a",
name="na-1",
subnet_id=foo_vpc_subnet.id,
),
yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-a",
name="na-2",
subnet_id=foo_vpc_subnet.id,
),
yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-b",
name="nb-1",
replication_source_name="na-1",
subnet_id=bar.id,
),
yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-b",
name="nb-2",
replication_source_name="nb-1",
subnet_id=bar.id,
),
])
```
Example of creating a Single Node MySQL with user params.
```python
import pulumi
import pulumi_yandex as yandex
foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")
foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",
zone="ru-central1-a",
network_id=foo_vpc_network.id,
v4_cidr_blocks=["10.5.0.0/24"])
foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",
environment="PRESTABLE",
network_id=foo_vpc_network.id,
version="8.0",
resources=yandex.MdbMysqlClusterResourcesArgs(
resource_preset_id="s2.micro",
disk_type_id="network-ssd",
disk_size=16,
),
databases=[yandex.MdbMysqlClusterDatabaseArgs(
name="db_name",
)],
maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(
type="ANYTIME",
),
users=[yandex.MdbMysqlClusterUserArgs(
name="user_name",
password="your_password",
permissions=[yandex.MdbMysqlClusterUserPermissionArgs(
database_name="db_name",
roles=["ALL"],
)],
connection_limits=yandex.MdbMysqlClusterUserConnectionLimitsArgs(
max_questions_per_hour=10,
),
global_permissions=[
"REPLICATION_SLAVE",
"PROCESS",
],
authentication_plugin="CACHING_SHA2_PASSWORD",
)],
hosts=[yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-a",
subnet_id=foo_vpc_subnet.id,
)])
```
Example of restoring MySQL cluster.
```python
import pulumi
import pulumi_yandex as yandex
foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")
foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",
zone="ru-central1-a",
network_id=foo_vpc_network.id,
v4_cidr_blocks=["10.5.0.0/24"])
foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",
environment="PRESTABLE",
network_id=foo_vpc_network.id,
version="8.0",
restore=yandex.MdbMysqlClusterRestoreArgs(
backup_id="c9qj2tns23432471d9qha:stream_20210122T141717Z",
time="2021-01-23T15:04:05",
),
resources=yandex.MdbMysqlClusterResourcesArgs(
resource_preset_id="s2.micro",
disk_type_id="network-ssd",
disk_size=16,
),
databases=[yandex.MdbMysqlClusterDatabaseArgs(
name="db_name",
)],
users=[yandex.MdbMysqlClusterUserArgs(
name="user_name",
password="your_password",
permissions=[yandex.MdbMysqlClusterUserPermissionArgs(
database_name="db_name",
roles=["ALL"],
)],
)],
hosts=[yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-a",
subnet_id=foo_vpc_subnet.id,
)])
```
## MySQL config
If not specified `mysql_config` then does not make any changes.
* `sql_mode` default value: `ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION`
some of: - 1: "ALLOW_INVALID_DATES"
- 2: "ANSI_QUOTES"
- 3: "ERROR_FOR_DIVISION_BY_ZERO"
- 4: "HIGH_NOT_PRECEDENCE"
- 5: "IGNORE_SPACE"
- 6: "NO_AUTO_VALUE_ON_ZERO"
- 7: "NO_BACKSLASH_ESCAPES"
- 8: "NO_ENGINE_SUBSTITUTION"
- 9: "NO_UNSIGNED_SUBTRACTION"
- 10: "NO_ZERO_DATE"
- 11: "NO_ZERO_IN_DATE"
- 15: "ONLY_FULL_GROUP_BY"
- 16: "PAD_CHAR_TO_FULL_LENGTH"
- 17: "PIPES_AS_CONCAT"
- 18: "REAL_AS_FLOAT"
- 19: "STRICT_ALL_TABLES"
- 20: "STRICT_TRANS_TABLES"
- 21: "TIME_TRUNCATE_FRACTIONAL"
- 22: "ANSI"
- 23: "TRADITIONAL"
- 24: "NO_DIR_IN_CREATE"
or:
- 0: "SQLMODE_UNSPECIFIED"
### MysqlConfig 8.0
* `audit_log` boolean
* `auto_increment_increment` integer
* `auto_increment_offset` integer
* `binlog_cache_size` integer
* `binlog_group_commit_sync_delay` integer
* `binlog_row_image` one of:
- 0: "BINLOG_ROW_IMAGE_UNSPECIFIED"
- 1: "FULL"
- 2: "MINIMAL"
- 3: "NOBLOB"
* `binlog_rows_query_log_events` boolean
* `character_set_server` text
* `collation_server` text
* `default_authentication_plugin` one of:
- 0: "AUTH_PLUGIN_UNSPECIFIED"
- 1: "MYSQL_NATIVE_PASSWORD"
- 2: "CACHING_SHA2_PASSWORD"
- 3: "SHA256_PASSWORD"
* `default_time_zone` text
* `explicit_defaults_for_timestamp` boolean
* `general_log` boolean
* `group_concat_max_len` integer
* `innodb_adaptive_hash_index` boolean
* `innodb_buffer_pool_size` integer
* `innodb_flush_log_at_trx_commit` integer
* `innodb_io_capacity` integer
* `innodb_io_capacity_max` integer
* `innodb_lock_wait_timeout` integer
* `innodb_log_buffer_size` integer
* `innodb_log_file_size` integer
* `innodb_numa_interleave` boolean
* `innodb_print_all_deadlocks` boolean
* `innodb_purge_threads` integer
* `innodb_read_io_threads` integer
* `innodb_temp_data_file_max_size` integer
* `innodb_thread_concurrency` integer
* `innodb_write_io_threads` integer
* `join_buffer_size` integer
* `long_query_time` float
* `max_allowed_packet` integer
* `max_connections` integer
* `max_heap_table_size` integer
* `net_read_timeout` integer
* `net_write_timeout` integer
* `regexp_time_limit` integer
* `rpl_semi_sync_master_wait_for_slave_count` integer
* `slave_parallel_type` one of:
- 0: "SLAVE_PARALLEL_TYPE_UNSPECIFIED"
- 1: "DATABASE"
- 2: "LOGICAL_CLOCK"
* `slave_parallel_workers` integer
* `sort_buffer_size` integer
* `sync_binlog` integer
* `table_definition_cache` integer
* `table_open_cache` integer
* `table_open_cache_instances` integer
* `thread_cache_size` integer
* `thread_stack` integer
* `tmp_table_size` integer
* `transaction_isolation` one of:
- 0: "TRANSACTION_ISOLATION_UNSPECIFIED"
- 1: "READ_COMMITTED"
- 2: "REPEATABLE_READ"
- 3: "SERIALIZABLE"
### MysqlConfig 5.7
* `audit_log` boolean
* `auto_increment_increment` integer
* `auto_increment_offset` integer
* `binlog_cache_size` integer
* `binlog_group_commit_sync_delay` integer
* `binlog_row_image` one of:
- 0: "BINLOG_ROW_IMAGE_UNSPECIFIED"
- 1: "FULL"
- 2: "MINIMAL"
- 3: "NOBLOB"
* `binlog_rows_query_log_events` boolean
* `character_set_server` text
* `collation_server` text
* `default_authentication_plugin` one of:
- 0: "AUTH_PLUGIN_UNSPECIFIED"
- 1: "MYSQL_NATIVE_PASSWORD"
- 2: "CACHING_SHA2_PASSWORD"
- 3: "SHA256_PASSWORD"
* `default_time_zone` text
* `explicit_defaults_for_timestamp` boolean
* `general_log` boolean
* `group_concat_max_len` integer
* `innodb_adaptive_hash_index` boolean
* `innodb_buffer_pool_size` integer
* `innodb_flush_log_at_trx_commit` integer
* `innodb_io_capacity` integer
* `innodb_io_capacity_max` integer
* `innodb_lock_wait_timeout` integer
* `innodb_log_buffer_size` integer
* `innodb_log_file_size` integer
* `innodb_numa_interleave` boolean
* `innodb_print_all_deadlocks` boolean
* `innodb_purge_threads` integer
* `innodb_read_io_threads` integer
* `innodb_temp_data_file_max_size` integer
* `innodb_thread_concurrency` integer
* `innodb_write_io_threads` integer
* `join_buffer_size` integer
* `long_query_time` float
* `max_allowed_packet` integer
* `max_connections` integer
* `max_heap_table_size` integer
* `net_read_timeout` integer
* `net_write_timeout` integer
* `rpl_semi_sync_master_wait_for_slave_count` integer
* `slave_parallel_type` one of:
- 0: "SLAVE_PARALLEL_TYPE_UNSPECIFIED"
- 1: "DATABASE"
- 2: "LOGICAL_CLOCK"
* `slave_parallel_workers` integer
* `sort_buffer_size` integer
* `sync_binlog` integer
* `table_definition_cache` integer
* `table_open_cache` integer
* `table_open_cache_instances` integer
* `thread_cache_size` integer
* `thread_stack` integer
* `tmp_table_size` integer
* `transaction_isolation` one of:
- 0: "TRANSACTION_ISOLATION_UNSPECIFIED"
- 1: "READ_COMMITTED"
- 2: "REPEATABLE_READ"
- 3: "SERIALIZABLE"
## Import
A cluster can be imported using the `id` of the resource, e.g.
```sh
$ pulumi import yandex:index/mdbMysqlCluster:MdbMysqlCluster foo cluster_id
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[pulumi.InputType['MdbMysqlClusterAccessArgs']] access: Access policy to the MySQL cluster. The structure is documented below.
:param pulumi.Input[pulumi.InputType['MdbMysqlClusterBackupWindowStartArgs']] backup_window_start: Time to start the daily backup, in the UTC. The structure is documented below.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterDatabaseArgs']]]] databases: A database of the MySQL cluster. The structure is documented below.
:param pulumi.Input[bool] deletion_protection: Inhibits deletion of the cluster. Can be either `true` or `false`.
:param pulumi.Input[str] description: Description of the MySQL cluster.
:param pulumi.Input[str] environment: Deployment environment of the MySQL cluster.
:param pulumi.Input[str] folder_id: The ID of the folder that the resource belongs to. If it
is not provided, the default provider folder is used.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterHostArgs']]]] hosts: A host of the MySQL cluster. The structure is documented below.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: A set of key/value label pairs to assign to the MySQL cluster.
:param pulumi.Input[pulumi.InputType['MdbMysqlClusterMaintenanceWindowArgs']] maintenance_window: Maintenance policy of the MySQL cluster. The structure is documented below.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] mysql_config: MySQL cluster config. Detail info in "MySQL config" section (documented below).
:param pulumi.Input[str] name: Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter.
:param pulumi.Input[str] network_id: ID of the network, to which the MySQL cluster uses.
:param pulumi.Input[pulumi.InputType['MdbMysqlClusterResourcesArgs']] resources: Resources allocated to hosts of the MySQL cluster. The structure is documented below.
:param pulumi.Input[pulumi.InputType['MdbMysqlClusterRestoreArgs']] restore: The cluster will be created from the specified backup. The structure is documented below.
:param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_ids: A set of ids of security groups assigned to hosts of the cluster.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterUserArgs']]]] users: A user of the MySQL cluster. The structure is documented below.
:param pulumi.Input[str] version: Version of the MySQL cluster. (allowed versions are: 5.7, 8.0) | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | __init__ | pulumi/pulumi-yandex | 9 | python | @overload
def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions]=None, access: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterAccessArgs']]]=None, allow_regeneration_host: Optional[pulumi.Input[bool]]=None, backup_window_start: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterBackupWindowStartArgs']]]=None, databases: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterDatabaseArgs']]]]]=None, deletion_protection: Optional[pulumi.Input[bool]]=None, description: Optional[pulumi.Input[str]]=None, environment: Optional[pulumi.Input[str]]=None, folder_id: Optional[pulumi.Input[str]]=None, hosts: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterHostArgs']]]]]=None, labels: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, maintenance_window: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterMaintenanceWindowArgs']]]=None, mysql_config: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, name: Optional[pulumi.Input[str]]=None, network_id: Optional[pulumi.Input[str]]=None, resources: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterResourcesArgs']]]=None, restore: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterRestoreArgs']]]=None, security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None, users: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterUserArgs']]]]]=None, version: Optional[pulumi.Input[str]]=None, __props__=None):
'\n Manages a MySQL cluster within the Yandex.Cloud. For more information, see\n [the official documentation](https://cloud.yandex.com/docs/managed-mysql/).\n\n ## Example Usage\n\n Example of creating a Single Node MySQL.\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.5.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n mysql_config={\n "sql_mode": "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION",\n "max_connections": "100",\n "default_authentication_plugin": "MYSQL_NATIVE_PASSWORD",\n "innodb_print_all_deadlocks": "true",\n },\n access=yandex.MdbMysqlClusterAccessArgs(\n web_sql=True,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n )],\n hosts=[yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n subnet_id=foo_vpc_subnet.id,\n )])\n ```\n\n Example of creating a High-Availability(HA) MySQL Cluster.\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.1.0.0/24"])\n bar = yandex.VpcSubnet("bar",\n zone="ru-central1-b",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.2.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(\n type="WEEKLY",\n day="SAT",\n hour=12,\n ),\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n )],\n hosts=[\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n subnet_id=foo_vpc_subnet.id,\n ),\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-b",\n subnet_id=bar.id,\n ),\n ])\n ```\n\n Example of creating a MySQL Cluster with cascade replicas: HA-group consist of \'na-1\' and \'na-2\', cascade replicas form a chain \'na-1\' > \'nb-1\' > \'nb-2\'\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.1.0.0/24"])\n bar = yandex.VpcSubnet("bar",\n zone="ru-central1-b",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.2.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(\n type="WEEKLY",\n day="SAT",\n hour=12,\n ),\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n )],\n hosts=[\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n name="na-1",\n subnet_id=foo_vpc_subnet.id,\n ),\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n name="na-2",\n subnet_id=foo_vpc_subnet.id,\n ),\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-b",\n name="nb-1",\n replication_source_name="na-1",\n subnet_id=bar.id,\n ),\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-b",\n name="nb-2",\n replication_source_name="nb-1",\n subnet_id=bar.id,\n ),\n ])\n ```\n\n Example of creating a Single Node MySQL with user params.\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.5.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(\n type="ANYTIME",\n ),\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n connection_limits=yandex.MdbMysqlClusterUserConnectionLimitsArgs(\n max_questions_per_hour=10,\n ),\n global_permissions=[\n "REPLICATION_SLAVE",\n "PROCESS",\n ],\n authentication_plugin="CACHING_SHA2_PASSWORD",\n )],\n hosts=[yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n subnet_id=foo_vpc_subnet.id,\n )])\n ```\n\n Example of restoring MySQL cluster.\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.5.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n restore=yandex.MdbMysqlClusterRestoreArgs(\n backup_id="c9qj2tns23432471d9qha:stream_20210122T141717Z",\n time="2021-01-23T15:04:05",\n ),\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n )],\n hosts=[yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n subnet_id=foo_vpc_subnet.id,\n )])\n ```\n ## MySQL config\n\n If not specified `mysql_config` then does not make any changes.\n\n * `sql_mode` default value: `ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION`\n\n some of: \t-\t1: "ALLOW_INVALID_DATES"\n \t-\t2: "ANSI_QUOTES"\n \t-\t3: "ERROR_FOR_DIVISION_BY_ZERO"\n \t-\t4: "HIGH_NOT_PRECEDENCE"\n \t-\t5: "IGNORE_SPACE"\n \t-\t6: "NO_AUTO_VALUE_ON_ZERO"\n \t-\t7: "NO_BACKSLASH_ESCAPES"\n \t-\t8: "NO_ENGINE_SUBSTITUTION"\n \t-\t9: "NO_UNSIGNED_SUBTRACTION"\n \t-\t10: "NO_ZERO_DATE"\n \t-\t11: "NO_ZERO_IN_DATE"\n \t-\t15: "ONLY_FULL_GROUP_BY"\n \t-\t16: "PAD_CHAR_TO_FULL_LENGTH"\n \t-\t17: "PIPES_AS_CONCAT"\n \t-\t18: "REAL_AS_FLOAT"\n \t-\t19: "STRICT_ALL_TABLES"\n \t-\t20: "STRICT_TRANS_TABLES"\n \t-\t21: "TIME_TRUNCATE_FRACTIONAL"\n \t-\t22: "ANSI"\n \t-\t23: "TRADITIONAL"\n \t-\t24: "NO_DIR_IN_CREATE"\n or:\n - 0: "SQLMODE_UNSPECIFIED"\n\n ### MysqlConfig 8.0\n * `audit_log` boolean\n\n * `auto_increment_increment` integer\n\n * `auto_increment_offset` integer\n\n * `binlog_cache_size` integer\n\n * `binlog_group_commit_sync_delay` integer\n\n * `binlog_row_image` one of:\n - 0: "BINLOG_ROW_IMAGE_UNSPECIFIED"\n - 1: "FULL"\n - 2: "MINIMAL"\n - 3: "NOBLOB"\n\n * `binlog_rows_query_log_events` boolean\n\n * `character_set_server` text\n\n * `collation_server` text\n\n * `default_authentication_plugin` one of:\n - 0: "AUTH_PLUGIN_UNSPECIFIED"\n - 1: "MYSQL_NATIVE_PASSWORD"\n - 2: "CACHING_SHA2_PASSWORD"\n - 3: "SHA256_PASSWORD"\n\n * `default_time_zone` text\n\n * `explicit_defaults_for_timestamp` boolean\n\n * `general_log` boolean\n\n * `group_concat_max_len` integer\n\n * `innodb_adaptive_hash_index` boolean\n\n * `innodb_buffer_pool_size` integer\n\n * `innodb_flush_log_at_trx_commit` integer\n\n * `innodb_io_capacity` integer\n\n * `innodb_io_capacity_max` integer\n\n * `innodb_lock_wait_timeout` integer\n\n * `innodb_log_buffer_size` integer\n\n * `innodb_log_file_size` integer\n\n * `innodb_numa_interleave` boolean\n\n * `innodb_print_all_deadlocks` boolean\n\n * `innodb_purge_threads` integer\n\n * `innodb_read_io_threads` integer\n\n * `innodb_temp_data_file_max_size` integer\n\n * `innodb_thread_concurrency` integer\n\n * `innodb_write_io_threads` integer\n\n * `join_buffer_size` integer\n\n * `long_query_time` float\n\n * `max_allowed_packet` integer\n\n * `max_connections` integer\n\n * `max_heap_table_size` integer\n\n * `net_read_timeout` integer\n\n * `net_write_timeout` integer\n\n * `regexp_time_limit` integer\n\n * `rpl_semi_sync_master_wait_for_slave_count` integer\n\n * `slave_parallel_type` one of:\n - 0: "SLAVE_PARALLEL_TYPE_UNSPECIFIED"\n - 1: "DATABASE"\n - 2: "LOGICAL_CLOCK"\n\n * `slave_parallel_workers` integer\n\n * `sort_buffer_size` integer\n\n * `sync_binlog` integer\n\n * `table_definition_cache` integer\n\n * `table_open_cache` integer\n\n * `table_open_cache_instances` integer\n\n * `thread_cache_size` integer\n\n * `thread_stack` integer\n\n * `tmp_table_size` integer\n\n * `transaction_isolation` one of:\n - 0: "TRANSACTION_ISOLATION_UNSPECIFIED"\n - 1: "READ_COMMITTED"\n - 2: "REPEATABLE_READ"\n - 3: "SERIALIZABLE"\n\n ### MysqlConfig 5.7\n * `audit_log` boolean\n\n * `auto_increment_increment` integer\n\n * `auto_increment_offset` integer\n\n * `binlog_cache_size` integer\n\n * `binlog_group_commit_sync_delay` integer\n\n * `binlog_row_image` one of:\n - 0: "BINLOG_ROW_IMAGE_UNSPECIFIED"\n - 1: "FULL"\n - 2: "MINIMAL"\n - 3: "NOBLOB"\n\n * `binlog_rows_query_log_events` boolean\n\n * `character_set_server` text\n\n * `collation_server` text\n\n * `default_authentication_plugin` one of:\n - 0: "AUTH_PLUGIN_UNSPECIFIED"\n - 1: "MYSQL_NATIVE_PASSWORD"\n - 2: "CACHING_SHA2_PASSWORD"\n - 3: "SHA256_PASSWORD"\n\n * `default_time_zone` text\n\n * `explicit_defaults_for_timestamp` boolean\n\n * `general_log` boolean\n\n * `group_concat_max_len` integer\n\n * `innodb_adaptive_hash_index` boolean\n\n * `innodb_buffer_pool_size` integer\n\n * `innodb_flush_log_at_trx_commit` integer\n\n * `innodb_io_capacity` integer\n\n * `innodb_io_capacity_max` integer\n\n * `innodb_lock_wait_timeout` integer\n\n * `innodb_log_buffer_size` integer\n\n * `innodb_log_file_size` integer\n\n * `innodb_numa_interleave` boolean\n\n * `innodb_print_all_deadlocks` boolean\n\n * `innodb_purge_threads` integer\n\n * `innodb_read_io_threads` integer\n\n * `innodb_temp_data_file_max_size` integer\n\n * `innodb_thread_concurrency` integer\n\n * `innodb_write_io_threads` integer\n\n * `join_buffer_size` integer\n\n * `long_query_time` float\n\n * `max_allowed_packet` integer\n\n * `max_connections` integer\n\n * `max_heap_table_size` integer\n\n * `net_read_timeout` integer\n\n * `net_write_timeout` integer\n\n * `rpl_semi_sync_master_wait_for_slave_count` integer\n\n * `slave_parallel_type` one of:\n - 0: "SLAVE_PARALLEL_TYPE_UNSPECIFIED"\n - 1: "DATABASE"\n - 2: "LOGICAL_CLOCK"\n\n * `slave_parallel_workers` integer\n\n * `sort_buffer_size` integer\n\n * `sync_binlog` integer\n\n * `table_definition_cache` integer\n\n * `table_open_cache` integer\n\n * `table_open_cache_instances` integer\n\n * `thread_cache_size` integer\n\n * `thread_stack` integer\n\n * `tmp_table_size` integer\n\n * `transaction_isolation` one of:\n - 0: "TRANSACTION_ISOLATION_UNSPECIFIED"\n - 1: "READ_COMMITTED"\n - 2: "REPEATABLE_READ"\n - 3: "SERIALIZABLE"\n\n ## Import\n\n A cluster can be imported using the `id` of the resource, e.g.\n\n ```sh\n $ pulumi import yandex:index/mdbMysqlCluster:MdbMysqlCluster foo cluster_id\n ```\n\n :param str resource_name: The name of the resource.\n :param pulumi.ResourceOptions opts: Options for the resource.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterAccessArgs\']] access: Access policy to the MySQL cluster. The structure is documented below.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterBackupWindowStartArgs\']] backup_window_start: Time to start the daily backup, in the UTC. The structure is documented below.\n :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType[\'MdbMysqlClusterDatabaseArgs\']]]] databases: A database of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[bool] deletion_protection: Inhibits deletion of the cluster. Can be either `true` or `false`.\n :param pulumi.Input[str] description: Description of the MySQL cluster.\n :param pulumi.Input[str] environment: Deployment environment of the MySQL cluster.\n :param pulumi.Input[str] folder_id: The ID of the folder that the resource belongs to. If it\n is not provided, the default provider folder is used.\n :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType[\'MdbMysqlClusterHostArgs\']]]] hosts: A host of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: A set of key/value label pairs to assign to the MySQL cluster.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterMaintenanceWindowArgs\']] maintenance_window: Maintenance policy of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] mysql_config: MySQL cluster config. Detail info in "MySQL config" section (documented below).\n :param pulumi.Input[str] name: Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter.\n :param pulumi.Input[str] network_id: ID of the network, to which the MySQL cluster uses.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterResourcesArgs\']] resources: Resources allocated to hosts of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterRestoreArgs\']] restore: The cluster will be created from the specified backup. The structure is documented below.\n :param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_ids: A set of ids of security groups assigned to hosts of the cluster.\n :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType[\'MdbMysqlClusterUserArgs\']]]] users: A user of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[str] version: Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)\n '
... | @overload
def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions]=None, access: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterAccessArgs']]]=None, allow_regeneration_host: Optional[pulumi.Input[bool]]=None, backup_window_start: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterBackupWindowStartArgs']]]=None, databases: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterDatabaseArgs']]]]]=None, deletion_protection: Optional[pulumi.Input[bool]]=None, description: Optional[pulumi.Input[str]]=None, environment: Optional[pulumi.Input[str]]=None, folder_id: Optional[pulumi.Input[str]]=None, hosts: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterHostArgs']]]]]=None, labels: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, maintenance_window: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterMaintenanceWindowArgs']]]=None, mysql_config: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, name: Optional[pulumi.Input[str]]=None, network_id: Optional[pulumi.Input[str]]=None, resources: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterResourcesArgs']]]=None, restore: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterRestoreArgs']]]=None, security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None, users: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterUserArgs']]]]]=None, version: Optional[pulumi.Input[str]]=None, __props__=None):
'\n Manages a MySQL cluster within the Yandex.Cloud. For more information, see\n [the official documentation](https://cloud.yandex.com/docs/managed-mysql/).\n\n ## Example Usage\n\n Example of creating a Single Node MySQL.\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.5.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n mysql_config={\n "sql_mode": "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION",\n "max_connections": "100",\n "default_authentication_plugin": "MYSQL_NATIVE_PASSWORD",\n "innodb_print_all_deadlocks": "true",\n },\n access=yandex.MdbMysqlClusterAccessArgs(\n web_sql=True,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n )],\n hosts=[yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n subnet_id=foo_vpc_subnet.id,\n )])\n ```\n\n Example of creating a High-Availability(HA) MySQL Cluster.\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.1.0.0/24"])\n bar = yandex.VpcSubnet("bar",\n zone="ru-central1-b",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.2.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(\n type="WEEKLY",\n day="SAT",\n hour=12,\n ),\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n )],\n hosts=[\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n subnet_id=foo_vpc_subnet.id,\n ),\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-b",\n subnet_id=bar.id,\n ),\n ])\n ```\n\n Example of creating a MySQL Cluster with cascade replicas: HA-group consist of \'na-1\' and \'na-2\', cascade replicas form a chain \'na-1\' > \'nb-1\' > \'nb-2\'\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.1.0.0/24"])\n bar = yandex.VpcSubnet("bar",\n zone="ru-central1-b",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.2.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(\n type="WEEKLY",\n day="SAT",\n hour=12,\n ),\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n )],\n hosts=[\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n name="na-1",\n subnet_id=foo_vpc_subnet.id,\n ),\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n name="na-2",\n subnet_id=foo_vpc_subnet.id,\n ),\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-b",\n name="nb-1",\n replication_source_name="na-1",\n subnet_id=bar.id,\n ),\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-b",\n name="nb-2",\n replication_source_name="nb-1",\n subnet_id=bar.id,\n ),\n ])\n ```\n\n Example of creating a Single Node MySQL with user params.\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.5.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(\n type="ANYTIME",\n ),\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n connection_limits=yandex.MdbMysqlClusterUserConnectionLimitsArgs(\n max_questions_per_hour=10,\n ),\n global_permissions=[\n "REPLICATION_SLAVE",\n "PROCESS",\n ],\n authentication_plugin="CACHING_SHA2_PASSWORD",\n )],\n hosts=[yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n subnet_id=foo_vpc_subnet.id,\n )])\n ```\n\n Example of restoring MySQL cluster.\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.5.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n restore=yandex.MdbMysqlClusterRestoreArgs(\n backup_id="c9qj2tns23432471d9qha:stream_20210122T141717Z",\n time="2021-01-23T15:04:05",\n ),\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n )],\n hosts=[yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n subnet_id=foo_vpc_subnet.id,\n )])\n ```\n ## MySQL config\n\n If not specified `mysql_config` then does not make any changes.\n\n * `sql_mode` default value: `ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION`\n\n some of: \t-\t1: "ALLOW_INVALID_DATES"\n \t-\t2: "ANSI_QUOTES"\n \t-\t3: "ERROR_FOR_DIVISION_BY_ZERO"\n \t-\t4: "HIGH_NOT_PRECEDENCE"\n \t-\t5: "IGNORE_SPACE"\n \t-\t6: "NO_AUTO_VALUE_ON_ZERO"\n \t-\t7: "NO_BACKSLASH_ESCAPES"\n \t-\t8: "NO_ENGINE_SUBSTITUTION"\n \t-\t9: "NO_UNSIGNED_SUBTRACTION"\n \t-\t10: "NO_ZERO_DATE"\n \t-\t11: "NO_ZERO_IN_DATE"\n \t-\t15: "ONLY_FULL_GROUP_BY"\n \t-\t16: "PAD_CHAR_TO_FULL_LENGTH"\n \t-\t17: "PIPES_AS_CONCAT"\n \t-\t18: "REAL_AS_FLOAT"\n \t-\t19: "STRICT_ALL_TABLES"\n \t-\t20: "STRICT_TRANS_TABLES"\n \t-\t21: "TIME_TRUNCATE_FRACTIONAL"\n \t-\t22: "ANSI"\n \t-\t23: "TRADITIONAL"\n \t-\t24: "NO_DIR_IN_CREATE"\n or:\n - 0: "SQLMODE_UNSPECIFIED"\n\n ### MysqlConfig 8.0\n * `audit_log` boolean\n\n * `auto_increment_increment` integer\n\n * `auto_increment_offset` integer\n\n * `binlog_cache_size` integer\n\n * `binlog_group_commit_sync_delay` integer\n\n * `binlog_row_image` one of:\n - 0: "BINLOG_ROW_IMAGE_UNSPECIFIED"\n - 1: "FULL"\n - 2: "MINIMAL"\n - 3: "NOBLOB"\n\n * `binlog_rows_query_log_events` boolean\n\n * `character_set_server` text\n\n * `collation_server` text\n\n * `default_authentication_plugin` one of:\n - 0: "AUTH_PLUGIN_UNSPECIFIED"\n - 1: "MYSQL_NATIVE_PASSWORD"\n - 2: "CACHING_SHA2_PASSWORD"\n - 3: "SHA256_PASSWORD"\n\n * `default_time_zone` text\n\n * `explicit_defaults_for_timestamp` boolean\n\n * `general_log` boolean\n\n * `group_concat_max_len` integer\n\n * `innodb_adaptive_hash_index` boolean\n\n * `innodb_buffer_pool_size` integer\n\n * `innodb_flush_log_at_trx_commit` integer\n\n * `innodb_io_capacity` integer\n\n * `innodb_io_capacity_max` integer\n\n * `innodb_lock_wait_timeout` integer\n\n * `innodb_log_buffer_size` integer\n\n * `innodb_log_file_size` integer\n\n * `innodb_numa_interleave` boolean\n\n * `innodb_print_all_deadlocks` boolean\n\n * `innodb_purge_threads` integer\n\n * `innodb_read_io_threads` integer\n\n * `innodb_temp_data_file_max_size` integer\n\n * `innodb_thread_concurrency` integer\n\n * `innodb_write_io_threads` integer\n\n * `join_buffer_size` integer\n\n * `long_query_time` float\n\n * `max_allowed_packet` integer\n\n * `max_connections` integer\n\n * `max_heap_table_size` integer\n\n * `net_read_timeout` integer\n\n * `net_write_timeout` integer\n\n * `regexp_time_limit` integer\n\n * `rpl_semi_sync_master_wait_for_slave_count` integer\n\n * `slave_parallel_type` one of:\n - 0: "SLAVE_PARALLEL_TYPE_UNSPECIFIED"\n - 1: "DATABASE"\n - 2: "LOGICAL_CLOCK"\n\n * `slave_parallel_workers` integer\n\n * `sort_buffer_size` integer\n\n * `sync_binlog` integer\n\n * `table_definition_cache` integer\n\n * `table_open_cache` integer\n\n * `table_open_cache_instances` integer\n\n * `thread_cache_size` integer\n\n * `thread_stack` integer\n\n * `tmp_table_size` integer\n\n * `transaction_isolation` one of:\n - 0: "TRANSACTION_ISOLATION_UNSPECIFIED"\n - 1: "READ_COMMITTED"\n - 2: "REPEATABLE_READ"\n - 3: "SERIALIZABLE"\n\n ### MysqlConfig 5.7\n * `audit_log` boolean\n\n * `auto_increment_increment` integer\n\n * `auto_increment_offset` integer\n\n * `binlog_cache_size` integer\n\n * `binlog_group_commit_sync_delay` integer\n\n * `binlog_row_image` one of:\n - 0: "BINLOG_ROW_IMAGE_UNSPECIFIED"\n - 1: "FULL"\n - 2: "MINIMAL"\n - 3: "NOBLOB"\n\n * `binlog_rows_query_log_events` boolean\n\n * `character_set_server` text\n\n * `collation_server` text\n\n * `default_authentication_plugin` one of:\n - 0: "AUTH_PLUGIN_UNSPECIFIED"\n - 1: "MYSQL_NATIVE_PASSWORD"\n - 2: "CACHING_SHA2_PASSWORD"\n - 3: "SHA256_PASSWORD"\n\n * `default_time_zone` text\n\n * `explicit_defaults_for_timestamp` boolean\n\n * `general_log` boolean\n\n * `group_concat_max_len` integer\n\n * `innodb_adaptive_hash_index` boolean\n\n * `innodb_buffer_pool_size` integer\n\n * `innodb_flush_log_at_trx_commit` integer\n\n * `innodb_io_capacity` integer\n\n * `innodb_io_capacity_max` integer\n\n * `innodb_lock_wait_timeout` integer\n\n * `innodb_log_buffer_size` integer\n\n * `innodb_log_file_size` integer\n\n * `innodb_numa_interleave` boolean\n\n * `innodb_print_all_deadlocks` boolean\n\n * `innodb_purge_threads` integer\n\n * `innodb_read_io_threads` integer\n\n * `innodb_temp_data_file_max_size` integer\n\n * `innodb_thread_concurrency` integer\n\n * `innodb_write_io_threads` integer\n\n * `join_buffer_size` integer\n\n * `long_query_time` float\n\n * `max_allowed_packet` integer\n\n * `max_connections` integer\n\n * `max_heap_table_size` integer\n\n * `net_read_timeout` integer\n\n * `net_write_timeout` integer\n\n * `rpl_semi_sync_master_wait_for_slave_count` integer\n\n * `slave_parallel_type` one of:\n - 0: "SLAVE_PARALLEL_TYPE_UNSPECIFIED"\n - 1: "DATABASE"\n - 2: "LOGICAL_CLOCK"\n\n * `slave_parallel_workers` integer\n\n * `sort_buffer_size` integer\n\n * `sync_binlog` integer\n\n * `table_definition_cache` integer\n\n * `table_open_cache` integer\n\n * `table_open_cache_instances` integer\n\n * `thread_cache_size` integer\n\n * `thread_stack` integer\n\n * `tmp_table_size` integer\n\n * `transaction_isolation` one of:\n - 0: "TRANSACTION_ISOLATION_UNSPECIFIED"\n - 1: "READ_COMMITTED"\n - 2: "REPEATABLE_READ"\n - 3: "SERIALIZABLE"\n\n ## Import\n\n A cluster can be imported using the `id` of the resource, e.g.\n\n ```sh\n $ pulumi import yandex:index/mdbMysqlCluster:MdbMysqlCluster foo cluster_id\n ```\n\n :param str resource_name: The name of the resource.\n :param pulumi.ResourceOptions opts: Options for the resource.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterAccessArgs\']] access: Access policy to the MySQL cluster. The structure is documented below.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterBackupWindowStartArgs\']] backup_window_start: Time to start the daily backup, in the UTC. The structure is documented below.\n :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType[\'MdbMysqlClusterDatabaseArgs\']]]] databases: A database of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[bool] deletion_protection: Inhibits deletion of the cluster. Can be either `true` or `false`.\n :param pulumi.Input[str] description: Description of the MySQL cluster.\n :param pulumi.Input[str] environment: Deployment environment of the MySQL cluster.\n :param pulumi.Input[str] folder_id: The ID of the folder that the resource belongs to. If it\n is not provided, the default provider folder is used.\n :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType[\'MdbMysqlClusterHostArgs\']]]] hosts: A host of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: A set of key/value label pairs to assign to the MySQL cluster.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterMaintenanceWindowArgs\']] maintenance_window: Maintenance policy of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] mysql_config: MySQL cluster config. Detail info in "MySQL config" section (documented below).\n :param pulumi.Input[str] name: Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter.\n :param pulumi.Input[str] network_id: ID of the network, to which the MySQL cluster uses.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterResourcesArgs\']] resources: Resources allocated to hosts of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterRestoreArgs\']] restore: The cluster will be created from the specified backup. The structure is documented below.\n :param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_ids: A set of ids of security groups assigned to hosts of the cluster.\n :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType[\'MdbMysqlClusterUserArgs\']]]] users: A user of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[str] version: Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)\n '
...<|docstring|>Manages a MySQL cluster within the Yandex.Cloud. For more information, see
[the official documentation](https://cloud.yandex.com/docs/managed-mysql/).
## Example Usage
Example of creating a Single Node MySQL.
```python
import pulumi
import pulumi_yandex as yandex
foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")
foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",
zone="ru-central1-a",
network_id=foo_vpc_network.id,
v4_cidr_blocks=["10.5.0.0/24"])
foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",
environment="PRESTABLE",
network_id=foo_vpc_network.id,
version="8.0",
resources=yandex.MdbMysqlClusterResourcesArgs(
resource_preset_id="s2.micro",
disk_type_id="network-ssd",
disk_size=16,
),
mysql_config={
"sql_mode": "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION",
"max_connections": "100",
"default_authentication_plugin": "MYSQL_NATIVE_PASSWORD",
"innodb_print_all_deadlocks": "true",
},
access=yandex.MdbMysqlClusterAccessArgs(
web_sql=True,
),
databases=[yandex.MdbMysqlClusterDatabaseArgs(
name="db_name",
)],
users=[yandex.MdbMysqlClusterUserArgs(
name="user_name",
password="your_password",
permissions=[yandex.MdbMysqlClusterUserPermissionArgs(
database_name="db_name",
roles=["ALL"],
)],
)],
hosts=[yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-a",
subnet_id=foo_vpc_subnet.id,
)])
```
Example of creating a High-Availability(HA) MySQL Cluster.
```python
import pulumi
import pulumi_yandex as yandex
foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")
foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",
zone="ru-central1-a",
network_id=foo_vpc_network.id,
v4_cidr_blocks=["10.1.0.0/24"])
bar = yandex.VpcSubnet("bar",
zone="ru-central1-b",
network_id=foo_vpc_network.id,
v4_cidr_blocks=["10.2.0.0/24"])
foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",
environment="PRESTABLE",
network_id=foo_vpc_network.id,
version="8.0",
resources=yandex.MdbMysqlClusterResourcesArgs(
resource_preset_id="s2.micro",
disk_type_id="network-ssd",
disk_size=16,
),
databases=[yandex.MdbMysqlClusterDatabaseArgs(
name="db_name",
)],
maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(
type="WEEKLY",
day="SAT",
hour=12,
),
users=[yandex.MdbMysqlClusterUserArgs(
name="user_name",
password="your_password",
permissions=[yandex.MdbMysqlClusterUserPermissionArgs(
database_name="db_name",
roles=["ALL"],
)],
)],
hosts=[
yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-a",
subnet_id=foo_vpc_subnet.id,
),
yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-b",
subnet_id=bar.id,
),
])
```
Example of creating a MySQL Cluster with cascade replicas: HA-group consist of 'na-1' and 'na-2', cascade replicas form a chain 'na-1' > 'nb-1' > 'nb-2'
```python
import pulumi
import pulumi_yandex as yandex
foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")
foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",
zone="ru-central1-a",
network_id=foo_vpc_network.id,
v4_cidr_blocks=["10.1.0.0/24"])
bar = yandex.VpcSubnet("bar",
zone="ru-central1-b",
network_id=foo_vpc_network.id,
v4_cidr_blocks=["10.2.0.0/24"])
foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",
environment="PRESTABLE",
network_id=foo_vpc_network.id,
version="8.0",
resources=yandex.MdbMysqlClusterResourcesArgs(
resource_preset_id="s2.micro",
disk_type_id="network-ssd",
disk_size=16,
),
databases=[yandex.MdbMysqlClusterDatabaseArgs(
name="db_name",
)],
maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(
type="WEEKLY",
day="SAT",
hour=12,
),
users=[yandex.MdbMysqlClusterUserArgs(
name="user_name",
password="your_password",
permissions=[yandex.MdbMysqlClusterUserPermissionArgs(
database_name="db_name",
roles=["ALL"],
)],
)],
hosts=[
yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-a",
name="na-1",
subnet_id=foo_vpc_subnet.id,
),
yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-a",
name="na-2",
subnet_id=foo_vpc_subnet.id,
),
yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-b",
name="nb-1",
replication_source_name="na-1",
subnet_id=bar.id,
),
yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-b",
name="nb-2",
replication_source_name="nb-1",
subnet_id=bar.id,
),
])
```
Example of creating a Single Node MySQL with user params.
```python
import pulumi
import pulumi_yandex as yandex
foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")
foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",
zone="ru-central1-a",
network_id=foo_vpc_network.id,
v4_cidr_blocks=["10.5.0.0/24"])
foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",
environment="PRESTABLE",
network_id=foo_vpc_network.id,
version="8.0",
resources=yandex.MdbMysqlClusterResourcesArgs(
resource_preset_id="s2.micro",
disk_type_id="network-ssd",
disk_size=16,
),
databases=[yandex.MdbMysqlClusterDatabaseArgs(
name="db_name",
)],
maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(
type="ANYTIME",
),
users=[yandex.MdbMysqlClusterUserArgs(
name="user_name",
password="your_password",
permissions=[yandex.MdbMysqlClusterUserPermissionArgs(
database_name="db_name",
roles=["ALL"],
)],
connection_limits=yandex.MdbMysqlClusterUserConnectionLimitsArgs(
max_questions_per_hour=10,
),
global_permissions=[
"REPLICATION_SLAVE",
"PROCESS",
],
authentication_plugin="CACHING_SHA2_PASSWORD",
)],
hosts=[yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-a",
subnet_id=foo_vpc_subnet.id,
)])
```
Example of restoring MySQL cluster.
```python
import pulumi
import pulumi_yandex as yandex
foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")
foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",
zone="ru-central1-a",
network_id=foo_vpc_network.id,
v4_cidr_blocks=["10.5.0.0/24"])
foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",
environment="PRESTABLE",
network_id=foo_vpc_network.id,
version="8.0",
restore=yandex.MdbMysqlClusterRestoreArgs(
backup_id="c9qj2tns23432471d9qha:stream_20210122T141717Z",
time="2021-01-23T15:04:05",
),
resources=yandex.MdbMysqlClusterResourcesArgs(
resource_preset_id="s2.micro",
disk_type_id="network-ssd",
disk_size=16,
),
databases=[yandex.MdbMysqlClusterDatabaseArgs(
name="db_name",
)],
users=[yandex.MdbMysqlClusterUserArgs(
name="user_name",
password="your_password",
permissions=[yandex.MdbMysqlClusterUserPermissionArgs(
database_name="db_name",
roles=["ALL"],
)],
)],
hosts=[yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-a",
subnet_id=foo_vpc_subnet.id,
)])
```
## MySQL config
If not specified `mysql_config` then does not make any changes.
* `sql_mode` default value: `ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION`
some of: - 1: "ALLOW_INVALID_DATES"
- 2: "ANSI_QUOTES"
- 3: "ERROR_FOR_DIVISION_BY_ZERO"
- 4: "HIGH_NOT_PRECEDENCE"
- 5: "IGNORE_SPACE"
- 6: "NO_AUTO_VALUE_ON_ZERO"
- 7: "NO_BACKSLASH_ESCAPES"
- 8: "NO_ENGINE_SUBSTITUTION"
- 9: "NO_UNSIGNED_SUBTRACTION"
- 10: "NO_ZERO_DATE"
- 11: "NO_ZERO_IN_DATE"
- 15: "ONLY_FULL_GROUP_BY"
- 16: "PAD_CHAR_TO_FULL_LENGTH"
- 17: "PIPES_AS_CONCAT"
- 18: "REAL_AS_FLOAT"
- 19: "STRICT_ALL_TABLES"
- 20: "STRICT_TRANS_TABLES"
- 21: "TIME_TRUNCATE_FRACTIONAL"
- 22: "ANSI"
- 23: "TRADITIONAL"
- 24: "NO_DIR_IN_CREATE"
or:
- 0: "SQLMODE_UNSPECIFIED"
### MysqlConfig 8.0
* `audit_log` boolean
* `auto_increment_increment` integer
* `auto_increment_offset` integer
* `binlog_cache_size` integer
* `binlog_group_commit_sync_delay` integer
* `binlog_row_image` one of:
- 0: "BINLOG_ROW_IMAGE_UNSPECIFIED"
- 1: "FULL"
- 2: "MINIMAL"
- 3: "NOBLOB"
* `binlog_rows_query_log_events` boolean
* `character_set_server` text
* `collation_server` text
* `default_authentication_plugin` one of:
- 0: "AUTH_PLUGIN_UNSPECIFIED"
- 1: "MYSQL_NATIVE_PASSWORD"
- 2: "CACHING_SHA2_PASSWORD"
- 3: "SHA256_PASSWORD"
* `default_time_zone` text
* `explicit_defaults_for_timestamp` boolean
* `general_log` boolean
* `group_concat_max_len` integer
* `innodb_adaptive_hash_index` boolean
* `innodb_buffer_pool_size` integer
* `innodb_flush_log_at_trx_commit` integer
* `innodb_io_capacity` integer
* `innodb_io_capacity_max` integer
* `innodb_lock_wait_timeout` integer
* `innodb_log_buffer_size` integer
* `innodb_log_file_size` integer
* `innodb_numa_interleave` boolean
* `innodb_print_all_deadlocks` boolean
* `innodb_purge_threads` integer
* `innodb_read_io_threads` integer
* `innodb_temp_data_file_max_size` integer
* `innodb_thread_concurrency` integer
* `innodb_write_io_threads` integer
* `join_buffer_size` integer
* `long_query_time` float
* `max_allowed_packet` integer
* `max_connections` integer
* `max_heap_table_size` integer
* `net_read_timeout` integer
* `net_write_timeout` integer
* `regexp_time_limit` integer
* `rpl_semi_sync_master_wait_for_slave_count` integer
* `slave_parallel_type` one of:
- 0: "SLAVE_PARALLEL_TYPE_UNSPECIFIED"
- 1: "DATABASE"
- 2: "LOGICAL_CLOCK"
* `slave_parallel_workers` integer
* `sort_buffer_size` integer
* `sync_binlog` integer
* `table_definition_cache` integer
* `table_open_cache` integer
* `table_open_cache_instances` integer
* `thread_cache_size` integer
* `thread_stack` integer
* `tmp_table_size` integer
* `transaction_isolation` one of:
- 0: "TRANSACTION_ISOLATION_UNSPECIFIED"
- 1: "READ_COMMITTED"
- 2: "REPEATABLE_READ"
- 3: "SERIALIZABLE"
### MysqlConfig 5.7
* `audit_log` boolean
* `auto_increment_increment` integer
* `auto_increment_offset` integer
* `binlog_cache_size` integer
* `binlog_group_commit_sync_delay` integer
* `binlog_row_image` one of:
- 0: "BINLOG_ROW_IMAGE_UNSPECIFIED"
- 1: "FULL"
- 2: "MINIMAL"
- 3: "NOBLOB"
* `binlog_rows_query_log_events` boolean
* `character_set_server` text
* `collation_server` text
* `default_authentication_plugin` one of:
- 0: "AUTH_PLUGIN_UNSPECIFIED"
- 1: "MYSQL_NATIVE_PASSWORD"
- 2: "CACHING_SHA2_PASSWORD"
- 3: "SHA256_PASSWORD"
* `default_time_zone` text
* `explicit_defaults_for_timestamp` boolean
* `general_log` boolean
* `group_concat_max_len` integer
* `innodb_adaptive_hash_index` boolean
* `innodb_buffer_pool_size` integer
* `innodb_flush_log_at_trx_commit` integer
* `innodb_io_capacity` integer
* `innodb_io_capacity_max` integer
* `innodb_lock_wait_timeout` integer
* `innodb_log_buffer_size` integer
* `innodb_log_file_size` integer
* `innodb_numa_interleave` boolean
* `innodb_print_all_deadlocks` boolean
* `innodb_purge_threads` integer
* `innodb_read_io_threads` integer
* `innodb_temp_data_file_max_size` integer
* `innodb_thread_concurrency` integer
* `innodb_write_io_threads` integer
* `join_buffer_size` integer
* `long_query_time` float
* `max_allowed_packet` integer
* `max_connections` integer
* `max_heap_table_size` integer
* `net_read_timeout` integer
* `net_write_timeout` integer
* `rpl_semi_sync_master_wait_for_slave_count` integer
* `slave_parallel_type` one of:
- 0: "SLAVE_PARALLEL_TYPE_UNSPECIFIED"
- 1: "DATABASE"
- 2: "LOGICAL_CLOCK"
* `slave_parallel_workers` integer
* `sort_buffer_size` integer
* `sync_binlog` integer
* `table_definition_cache` integer
* `table_open_cache` integer
* `table_open_cache_instances` integer
* `thread_cache_size` integer
* `thread_stack` integer
* `tmp_table_size` integer
* `transaction_isolation` one of:
- 0: "TRANSACTION_ISOLATION_UNSPECIFIED"
- 1: "READ_COMMITTED"
- 2: "REPEATABLE_READ"
- 3: "SERIALIZABLE"
## Import
A cluster can be imported using the `id` of the resource, e.g.
```sh
$ pulumi import yandex:index/mdbMysqlCluster:MdbMysqlCluster foo cluster_id
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[pulumi.InputType['MdbMysqlClusterAccessArgs']] access: Access policy to the MySQL cluster. The structure is documented below.
:param pulumi.Input[pulumi.InputType['MdbMysqlClusterBackupWindowStartArgs']] backup_window_start: Time to start the daily backup, in the UTC. The structure is documented below.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterDatabaseArgs']]]] databases: A database of the MySQL cluster. The structure is documented below.
:param pulumi.Input[bool] deletion_protection: Inhibits deletion of the cluster. Can be either `true` or `false`.
:param pulumi.Input[str] description: Description of the MySQL cluster.
:param pulumi.Input[str] environment: Deployment environment of the MySQL cluster.
:param pulumi.Input[str] folder_id: The ID of the folder that the resource belongs to. If it
is not provided, the default provider folder is used.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterHostArgs']]]] hosts: A host of the MySQL cluster. The structure is documented below.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: A set of key/value label pairs to assign to the MySQL cluster.
:param pulumi.Input[pulumi.InputType['MdbMysqlClusterMaintenanceWindowArgs']] maintenance_window: Maintenance policy of the MySQL cluster. The structure is documented below.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] mysql_config: MySQL cluster config. Detail info in "MySQL config" section (documented below).
:param pulumi.Input[str] name: Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter.
:param pulumi.Input[str] network_id: ID of the network, to which the MySQL cluster uses.
:param pulumi.Input[pulumi.InputType['MdbMysqlClusterResourcesArgs']] resources: Resources allocated to hosts of the MySQL cluster. The structure is documented below.
:param pulumi.Input[pulumi.InputType['MdbMysqlClusterRestoreArgs']] restore: The cluster will be created from the specified backup. The structure is documented below.
:param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_ids: A set of ids of security groups assigned to hosts of the cluster.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterUserArgs']]]] users: A user of the MySQL cluster. The structure is documented below.
:param pulumi.Input[str] version: Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)<|endoftext|> |
dd2e56fb57858657e691123e5eb05f9d2f9a0b9542419fae3a30e6cd29064f16 | @overload
def __init__(__self__, resource_name: str, args: MdbMysqlClusterArgs, opts: Optional[pulumi.ResourceOptions]=None):
'\n Manages a MySQL cluster within the Yandex.Cloud. For more information, see\n [the official documentation](https://cloud.yandex.com/docs/managed-mysql/).\n\n ## Example Usage\n\n Example of creating a Single Node MySQL.\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.5.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n mysql_config={\n "sql_mode": "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION",\n "max_connections": "100",\n "default_authentication_plugin": "MYSQL_NATIVE_PASSWORD",\n "innodb_print_all_deadlocks": "true",\n },\n access=yandex.MdbMysqlClusterAccessArgs(\n web_sql=True,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n )],\n hosts=[yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n subnet_id=foo_vpc_subnet.id,\n )])\n ```\n\n Example of creating a High-Availability(HA) MySQL Cluster.\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.1.0.0/24"])\n bar = yandex.VpcSubnet("bar",\n zone="ru-central1-b",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.2.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(\n type="WEEKLY",\n day="SAT",\n hour=12,\n ),\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n )],\n hosts=[\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n subnet_id=foo_vpc_subnet.id,\n ),\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-b",\n subnet_id=bar.id,\n ),\n ])\n ```\n\n Example of creating a MySQL Cluster with cascade replicas: HA-group consist of \'na-1\' and \'na-2\', cascade replicas form a chain \'na-1\' > \'nb-1\' > \'nb-2\'\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.1.0.0/24"])\n bar = yandex.VpcSubnet("bar",\n zone="ru-central1-b",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.2.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(\n type="WEEKLY",\n day="SAT",\n hour=12,\n ),\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n )],\n hosts=[\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n name="na-1",\n subnet_id=foo_vpc_subnet.id,\n ),\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n name="na-2",\n subnet_id=foo_vpc_subnet.id,\n ),\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-b",\n name="nb-1",\n replication_source_name="na-1",\n subnet_id=bar.id,\n ),\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-b",\n name="nb-2",\n replication_source_name="nb-1",\n subnet_id=bar.id,\n ),\n ])\n ```\n\n Example of creating a Single Node MySQL with user params.\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.5.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(\n type="ANYTIME",\n ),\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n connection_limits=yandex.MdbMysqlClusterUserConnectionLimitsArgs(\n max_questions_per_hour=10,\n ),\n global_permissions=[\n "REPLICATION_SLAVE",\n "PROCESS",\n ],\n authentication_plugin="CACHING_SHA2_PASSWORD",\n )],\n hosts=[yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n subnet_id=foo_vpc_subnet.id,\n )])\n ```\n\n Example of restoring MySQL cluster.\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.5.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n restore=yandex.MdbMysqlClusterRestoreArgs(\n backup_id="c9qj2tns23432471d9qha:stream_20210122T141717Z",\n time="2021-01-23T15:04:05",\n ),\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n )],\n hosts=[yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n subnet_id=foo_vpc_subnet.id,\n )])\n ```\n ## MySQL config\n\n If not specified `mysql_config` then does not make any changes.\n\n * `sql_mode` default value: `ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION`\n\n some of: \t-\t1: "ALLOW_INVALID_DATES"\n \t-\t2: "ANSI_QUOTES"\n \t-\t3: "ERROR_FOR_DIVISION_BY_ZERO"\n \t-\t4: "HIGH_NOT_PRECEDENCE"\n \t-\t5: "IGNORE_SPACE"\n \t-\t6: "NO_AUTO_VALUE_ON_ZERO"\n \t-\t7: "NO_BACKSLASH_ESCAPES"\n \t-\t8: "NO_ENGINE_SUBSTITUTION"\n \t-\t9: "NO_UNSIGNED_SUBTRACTION"\n \t-\t10: "NO_ZERO_DATE"\n \t-\t11: "NO_ZERO_IN_DATE"\n \t-\t15: "ONLY_FULL_GROUP_BY"\n \t-\t16: "PAD_CHAR_TO_FULL_LENGTH"\n \t-\t17: "PIPES_AS_CONCAT"\n \t-\t18: "REAL_AS_FLOAT"\n \t-\t19: "STRICT_ALL_TABLES"\n \t-\t20: "STRICT_TRANS_TABLES"\n \t-\t21: "TIME_TRUNCATE_FRACTIONAL"\n \t-\t22: "ANSI"\n \t-\t23: "TRADITIONAL"\n \t-\t24: "NO_DIR_IN_CREATE"\n or:\n - 0: "SQLMODE_UNSPECIFIED"\n\n ### MysqlConfig 8.0\n * `audit_log` boolean\n\n * `auto_increment_increment` integer\n\n * `auto_increment_offset` integer\n\n * `binlog_cache_size` integer\n\n * `binlog_group_commit_sync_delay` integer\n\n * `binlog_row_image` one of:\n - 0: "BINLOG_ROW_IMAGE_UNSPECIFIED"\n - 1: "FULL"\n - 2: "MINIMAL"\n - 3: "NOBLOB"\n\n * `binlog_rows_query_log_events` boolean\n\n * `character_set_server` text\n\n * `collation_server` text\n\n * `default_authentication_plugin` one of:\n - 0: "AUTH_PLUGIN_UNSPECIFIED"\n - 1: "MYSQL_NATIVE_PASSWORD"\n - 2: "CACHING_SHA2_PASSWORD"\n - 3: "SHA256_PASSWORD"\n\n * `default_time_zone` text\n\n * `explicit_defaults_for_timestamp` boolean\n\n * `general_log` boolean\n\n * `group_concat_max_len` integer\n\n * `innodb_adaptive_hash_index` boolean\n\n * `innodb_buffer_pool_size` integer\n\n * `innodb_flush_log_at_trx_commit` integer\n\n * `innodb_io_capacity` integer\n\n * `innodb_io_capacity_max` integer\n\n * `innodb_lock_wait_timeout` integer\n\n * `innodb_log_buffer_size` integer\n\n * `innodb_log_file_size` integer\n\n * `innodb_numa_interleave` boolean\n\n * `innodb_print_all_deadlocks` boolean\n\n * `innodb_purge_threads` integer\n\n * `innodb_read_io_threads` integer\n\n * `innodb_temp_data_file_max_size` integer\n\n * `innodb_thread_concurrency` integer\n\n * `innodb_write_io_threads` integer\n\n * `join_buffer_size` integer\n\n * `long_query_time` float\n\n * `max_allowed_packet` integer\n\n * `max_connections` integer\n\n * `max_heap_table_size` integer\n\n * `net_read_timeout` integer\n\n * `net_write_timeout` integer\n\n * `regexp_time_limit` integer\n\n * `rpl_semi_sync_master_wait_for_slave_count` integer\n\n * `slave_parallel_type` one of:\n - 0: "SLAVE_PARALLEL_TYPE_UNSPECIFIED"\n - 1: "DATABASE"\n - 2: "LOGICAL_CLOCK"\n\n * `slave_parallel_workers` integer\n\n * `sort_buffer_size` integer\n\n * `sync_binlog` integer\n\n * `table_definition_cache` integer\n\n * `table_open_cache` integer\n\n * `table_open_cache_instances` integer\n\n * `thread_cache_size` integer\n\n * `thread_stack` integer\n\n * `tmp_table_size` integer\n\n * `transaction_isolation` one of:\n - 0: "TRANSACTION_ISOLATION_UNSPECIFIED"\n - 1: "READ_COMMITTED"\n - 2: "REPEATABLE_READ"\n - 3: "SERIALIZABLE"\n\n ### MysqlConfig 5.7\n * `audit_log` boolean\n\n * `auto_increment_increment` integer\n\n * `auto_increment_offset` integer\n\n * `binlog_cache_size` integer\n\n * `binlog_group_commit_sync_delay` integer\n\n * `binlog_row_image` one of:\n - 0: "BINLOG_ROW_IMAGE_UNSPECIFIED"\n - 1: "FULL"\n - 2: "MINIMAL"\n - 3: "NOBLOB"\n\n * `binlog_rows_query_log_events` boolean\n\n * `character_set_server` text\n\n * `collation_server` text\n\n * `default_authentication_plugin` one of:\n - 0: "AUTH_PLUGIN_UNSPECIFIED"\n - 1: "MYSQL_NATIVE_PASSWORD"\n - 2: "CACHING_SHA2_PASSWORD"\n - 3: "SHA256_PASSWORD"\n\n * `default_time_zone` text\n\n * `explicit_defaults_for_timestamp` boolean\n\n * `general_log` boolean\n\n * `group_concat_max_len` integer\n\n * `innodb_adaptive_hash_index` boolean\n\n * `innodb_buffer_pool_size` integer\n\n * `innodb_flush_log_at_trx_commit` integer\n\n * `innodb_io_capacity` integer\n\n * `innodb_io_capacity_max` integer\n\n * `innodb_lock_wait_timeout` integer\n\n * `innodb_log_buffer_size` integer\n\n * `innodb_log_file_size` integer\n\n * `innodb_numa_interleave` boolean\n\n * `innodb_print_all_deadlocks` boolean\n\n * `innodb_purge_threads` integer\n\n * `innodb_read_io_threads` integer\n\n * `innodb_temp_data_file_max_size` integer\n\n * `innodb_thread_concurrency` integer\n\n * `innodb_write_io_threads` integer\n\n * `join_buffer_size` integer\n\n * `long_query_time` float\n\n * `max_allowed_packet` integer\n\n * `max_connections` integer\n\n * `max_heap_table_size` integer\n\n * `net_read_timeout` integer\n\n * `net_write_timeout` integer\n\n * `rpl_semi_sync_master_wait_for_slave_count` integer\n\n * `slave_parallel_type` one of:\n - 0: "SLAVE_PARALLEL_TYPE_UNSPECIFIED"\n - 1: "DATABASE"\n - 2: "LOGICAL_CLOCK"\n\n * `slave_parallel_workers` integer\n\n * `sort_buffer_size` integer\n\n * `sync_binlog` integer\n\n * `table_definition_cache` integer\n\n * `table_open_cache` integer\n\n * `table_open_cache_instances` integer\n\n * `thread_cache_size` integer\n\n * `thread_stack` integer\n\n * `tmp_table_size` integer\n\n * `transaction_isolation` one of:\n - 0: "TRANSACTION_ISOLATION_UNSPECIFIED"\n - 1: "READ_COMMITTED"\n - 2: "REPEATABLE_READ"\n - 3: "SERIALIZABLE"\n\n ## Import\n\n A cluster can be imported using the `id` of the resource, e.g.\n\n ```sh\n $ pulumi import yandex:index/mdbMysqlCluster:MdbMysqlCluster foo cluster_id\n ```\n\n :param str resource_name: The name of the resource.\n :param MdbMysqlClusterArgs args: The arguments to use to populate this resource\'s properties.\n :param pulumi.ResourceOptions opts: Options for the resource.\n '
... | Manages a MySQL cluster within the Yandex.Cloud. For more information, see
[the official documentation](https://cloud.yandex.com/docs/managed-mysql/).
## Example Usage
Example of creating a Single Node MySQL.
```python
import pulumi
import pulumi_yandex as yandex
foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")
foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",
zone="ru-central1-a",
network_id=foo_vpc_network.id,
v4_cidr_blocks=["10.5.0.0/24"])
foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",
environment="PRESTABLE",
network_id=foo_vpc_network.id,
version="8.0",
resources=yandex.MdbMysqlClusterResourcesArgs(
resource_preset_id="s2.micro",
disk_type_id="network-ssd",
disk_size=16,
),
mysql_config={
"sql_mode": "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION",
"max_connections": "100",
"default_authentication_plugin": "MYSQL_NATIVE_PASSWORD",
"innodb_print_all_deadlocks": "true",
},
access=yandex.MdbMysqlClusterAccessArgs(
web_sql=True,
),
databases=[yandex.MdbMysqlClusterDatabaseArgs(
name="db_name",
)],
users=[yandex.MdbMysqlClusterUserArgs(
name="user_name",
password="your_password",
permissions=[yandex.MdbMysqlClusterUserPermissionArgs(
database_name="db_name",
roles=["ALL"],
)],
)],
hosts=[yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-a",
subnet_id=foo_vpc_subnet.id,
)])
```
Example of creating a High-Availability(HA) MySQL Cluster.
```python
import pulumi
import pulumi_yandex as yandex
foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")
foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",
zone="ru-central1-a",
network_id=foo_vpc_network.id,
v4_cidr_blocks=["10.1.0.0/24"])
bar = yandex.VpcSubnet("bar",
zone="ru-central1-b",
network_id=foo_vpc_network.id,
v4_cidr_blocks=["10.2.0.0/24"])
foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",
environment="PRESTABLE",
network_id=foo_vpc_network.id,
version="8.0",
resources=yandex.MdbMysqlClusterResourcesArgs(
resource_preset_id="s2.micro",
disk_type_id="network-ssd",
disk_size=16,
),
databases=[yandex.MdbMysqlClusterDatabaseArgs(
name="db_name",
)],
maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(
type="WEEKLY",
day="SAT",
hour=12,
),
users=[yandex.MdbMysqlClusterUserArgs(
name="user_name",
password="your_password",
permissions=[yandex.MdbMysqlClusterUserPermissionArgs(
database_name="db_name",
roles=["ALL"],
)],
)],
hosts=[
yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-a",
subnet_id=foo_vpc_subnet.id,
),
yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-b",
subnet_id=bar.id,
),
])
```
Example of creating a MySQL Cluster with cascade replicas: HA-group consist of 'na-1' and 'na-2', cascade replicas form a chain 'na-1' > 'nb-1' > 'nb-2'
```python
import pulumi
import pulumi_yandex as yandex
foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")
foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",
zone="ru-central1-a",
network_id=foo_vpc_network.id,
v4_cidr_blocks=["10.1.0.0/24"])
bar = yandex.VpcSubnet("bar",
zone="ru-central1-b",
network_id=foo_vpc_network.id,
v4_cidr_blocks=["10.2.0.0/24"])
foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",
environment="PRESTABLE",
network_id=foo_vpc_network.id,
version="8.0",
resources=yandex.MdbMysqlClusterResourcesArgs(
resource_preset_id="s2.micro",
disk_type_id="network-ssd",
disk_size=16,
),
databases=[yandex.MdbMysqlClusterDatabaseArgs(
name="db_name",
)],
maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(
type="WEEKLY",
day="SAT",
hour=12,
),
users=[yandex.MdbMysqlClusterUserArgs(
name="user_name",
password="your_password",
permissions=[yandex.MdbMysqlClusterUserPermissionArgs(
database_name="db_name",
roles=["ALL"],
)],
)],
hosts=[
yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-a",
name="na-1",
subnet_id=foo_vpc_subnet.id,
),
yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-a",
name="na-2",
subnet_id=foo_vpc_subnet.id,
),
yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-b",
name="nb-1",
replication_source_name="na-1",
subnet_id=bar.id,
),
yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-b",
name="nb-2",
replication_source_name="nb-1",
subnet_id=bar.id,
),
])
```
Example of creating a Single Node MySQL with user params.
```python
import pulumi
import pulumi_yandex as yandex
foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")
foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",
zone="ru-central1-a",
network_id=foo_vpc_network.id,
v4_cidr_blocks=["10.5.0.0/24"])
foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",
environment="PRESTABLE",
network_id=foo_vpc_network.id,
version="8.0",
resources=yandex.MdbMysqlClusterResourcesArgs(
resource_preset_id="s2.micro",
disk_type_id="network-ssd",
disk_size=16,
),
databases=[yandex.MdbMysqlClusterDatabaseArgs(
name="db_name",
)],
maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(
type="ANYTIME",
),
users=[yandex.MdbMysqlClusterUserArgs(
name="user_name",
password="your_password",
permissions=[yandex.MdbMysqlClusterUserPermissionArgs(
database_name="db_name",
roles=["ALL"],
)],
connection_limits=yandex.MdbMysqlClusterUserConnectionLimitsArgs(
max_questions_per_hour=10,
),
global_permissions=[
"REPLICATION_SLAVE",
"PROCESS",
],
authentication_plugin="CACHING_SHA2_PASSWORD",
)],
hosts=[yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-a",
subnet_id=foo_vpc_subnet.id,
)])
```
Example of restoring MySQL cluster.
```python
import pulumi
import pulumi_yandex as yandex
foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")
foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",
zone="ru-central1-a",
network_id=foo_vpc_network.id,
v4_cidr_blocks=["10.5.0.0/24"])
foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",
environment="PRESTABLE",
network_id=foo_vpc_network.id,
version="8.0",
restore=yandex.MdbMysqlClusterRestoreArgs(
backup_id="c9qj2tns23432471d9qha:stream_20210122T141717Z",
time="2021-01-23T15:04:05",
),
resources=yandex.MdbMysqlClusterResourcesArgs(
resource_preset_id="s2.micro",
disk_type_id="network-ssd",
disk_size=16,
),
databases=[yandex.MdbMysqlClusterDatabaseArgs(
name="db_name",
)],
users=[yandex.MdbMysqlClusterUserArgs(
name="user_name",
password="your_password",
permissions=[yandex.MdbMysqlClusterUserPermissionArgs(
database_name="db_name",
roles=["ALL"],
)],
)],
hosts=[yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-a",
subnet_id=foo_vpc_subnet.id,
)])
```
## MySQL config
If not specified `mysql_config` then does not make any changes.
* `sql_mode` default value: `ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION`
some of: - 1: "ALLOW_INVALID_DATES"
- 2: "ANSI_QUOTES"
- 3: "ERROR_FOR_DIVISION_BY_ZERO"
- 4: "HIGH_NOT_PRECEDENCE"
- 5: "IGNORE_SPACE"
- 6: "NO_AUTO_VALUE_ON_ZERO"
- 7: "NO_BACKSLASH_ESCAPES"
- 8: "NO_ENGINE_SUBSTITUTION"
- 9: "NO_UNSIGNED_SUBTRACTION"
- 10: "NO_ZERO_DATE"
- 11: "NO_ZERO_IN_DATE"
- 15: "ONLY_FULL_GROUP_BY"
- 16: "PAD_CHAR_TO_FULL_LENGTH"
- 17: "PIPES_AS_CONCAT"
- 18: "REAL_AS_FLOAT"
- 19: "STRICT_ALL_TABLES"
- 20: "STRICT_TRANS_TABLES"
- 21: "TIME_TRUNCATE_FRACTIONAL"
- 22: "ANSI"
- 23: "TRADITIONAL"
- 24: "NO_DIR_IN_CREATE"
or:
- 0: "SQLMODE_UNSPECIFIED"
### MysqlConfig 8.0
* `audit_log` boolean
* `auto_increment_increment` integer
* `auto_increment_offset` integer
* `binlog_cache_size` integer
* `binlog_group_commit_sync_delay` integer
* `binlog_row_image` one of:
- 0: "BINLOG_ROW_IMAGE_UNSPECIFIED"
- 1: "FULL"
- 2: "MINIMAL"
- 3: "NOBLOB"
* `binlog_rows_query_log_events` boolean
* `character_set_server` text
* `collation_server` text
* `default_authentication_plugin` one of:
- 0: "AUTH_PLUGIN_UNSPECIFIED"
- 1: "MYSQL_NATIVE_PASSWORD"
- 2: "CACHING_SHA2_PASSWORD"
- 3: "SHA256_PASSWORD"
* `default_time_zone` text
* `explicit_defaults_for_timestamp` boolean
* `general_log` boolean
* `group_concat_max_len` integer
* `innodb_adaptive_hash_index` boolean
* `innodb_buffer_pool_size` integer
* `innodb_flush_log_at_trx_commit` integer
* `innodb_io_capacity` integer
* `innodb_io_capacity_max` integer
* `innodb_lock_wait_timeout` integer
* `innodb_log_buffer_size` integer
* `innodb_log_file_size` integer
* `innodb_numa_interleave` boolean
* `innodb_print_all_deadlocks` boolean
* `innodb_purge_threads` integer
* `innodb_read_io_threads` integer
* `innodb_temp_data_file_max_size` integer
* `innodb_thread_concurrency` integer
* `innodb_write_io_threads` integer
* `join_buffer_size` integer
* `long_query_time` float
* `max_allowed_packet` integer
* `max_connections` integer
* `max_heap_table_size` integer
* `net_read_timeout` integer
* `net_write_timeout` integer
* `regexp_time_limit` integer
* `rpl_semi_sync_master_wait_for_slave_count` integer
* `slave_parallel_type` one of:
- 0: "SLAVE_PARALLEL_TYPE_UNSPECIFIED"
- 1: "DATABASE"
- 2: "LOGICAL_CLOCK"
* `slave_parallel_workers` integer
* `sort_buffer_size` integer
* `sync_binlog` integer
* `table_definition_cache` integer
* `table_open_cache` integer
* `table_open_cache_instances` integer
* `thread_cache_size` integer
* `thread_stack` integer
* `tmp_table_size` integer
* `transaction_isolation` one of:
- 0: "TRANSACTION_ISOLATION_UNSPECIFIED"
- 1: "READ_COMMITTED"
- 2: "REPEATABLE_READ"
- 3: "SERIALIZABLE"
### MysqlConfig 5.7
* `audit_log` boolean
* `auto_increment_increment` integer
* `auto_increment_offset` integer
* `binlog_cache_size` integer
* `binlog_group_commit_sync_delay` integer
* `binlog_row_image` one of:
- 0: "BINLOG_ROW_IMAGE_UNSPECIFIED"
- 1: "FULL"
- 2: "MINIMAL"
- 3: "NOBLOB"
* `binlog_rows_query_log_events` boolean
* `character_set_server` text
* `collation_server` text
* `default_authentication_plugin` one of:
- 0: "AUTH_PLUGIN_UNSPECIFIED"
- 1: "MYSQL_NATIVE_PASSWORD"
- 2: "CACHING_SHA2_PASSWORD"
- 3: "SHA256_PASSWORD"
* `default_time_zone` text
* `explicit_defaults_for_timestamp` boolean
* `general_log` boolean
* `group_concat_max_len` integer
* `innodb_adaptive_hash_index` boolean
* `innodb_buffer_pool_size` integer
* `innodb_flush_log_at_trx_commit` integer
* `innodb_io_capacity` integer
* `innodb_io_capacity_max` integer
* `innodb_lock_wait_timeout` integer
* `innodb_log_buffer_size` integer
* `innodb_log_file_size` integer
* `innodb_numa_interleave` boolean
* `innodb_print_all_deadlocks` boolean
* `innodb_purge_threads` integer
* `innodb_read_io_threads` integer
* `innodb_temp_data_file_max_size` integer
* `innodb_thread_concurrency` integer
* `innodb_write_io_threads` integer
* `join_buffer_size` integer
* `long_query_time` float
* `max_allowed_packet` integer
* `max_connections` integer
* `max_heap_table_size` integer
* `net_read_timeout` integer
* `net_write_timeout` integer
* `rpl_semi_sync_master_wait_for_slave_count` integer
* `slave_parallel_type` one of:
- 0: "SLAVE_PARALLEL_TYPE_UNSPECIFIED"
- 1: "DATABASE"
- 2: "LOGICAL_CLOCK"
* `slave_parallel_workers` integer
* `sort_buffer_size` integer
* `sync_binlog` integer
* `table_definition_cache` integer
* `table_open_cache` integer
* `table_open_cache_instances` integer
* `thread_cache_size` integer
* `thread_stack` integer
* `tmp_table_size` integer
* `transaction_isolation` one of:
- 0: "TRANSACTION_ISOLATION_UNSPECIFIED"
- 1: "READ_COMMITTED"
- 2: "REPEATABLE_READ"
- 3: "SERIALIZABLE"
## Import
A cluster can be imported using the `id` of the resource, e.g.
```sh
$ pulumi import yandex:index/mdbMysqlCluster:MdbMysqlCluster foo cluster_id
```
:param str resource_name: The name of the resource.
:param MdbMysqlClusterArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | __init__ | pulumi/pulumi-yandex | 9 | python | @overload
def __init__(__self__, resource_name: str, args: MdbMysqlClusterArgs, opts: Optional[pulumi.ResourceOptions]=None):
'\n Manages a MySQL cluster within the Yandex.Cloud. For more information, see\n [the official documentation](https://cloud.yandex.com/docs/managed-mysql/).\n\n ## Example Usage\n\n Example of creating a Single Node MySQL.\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.5.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n mysql_config={\n "sql_mode": "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION",\n "max_connections": "100",\n "default_authentication_plugin": "MYSQL_NATIVE_PASSWORD",\n "innodb_print_all_deadlocks": "true",\n },\n access=yandex.MdbMysqlClusterAccessArgs(\n web_sql=True,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n )],\n hosts=[yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n subnet_id=foo_vpc_subnet.id,\n )])\n ```\n\n Example of creating a High-Availability(HA) MySQL Cluster.\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.1.0.0/24"])\n bar = yandex.VpcSubnet("bar",\n zone="ru-central1-b",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.2.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(\n type="WEEKLY",\n day="SAT",\n hour=12,\n ),\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n )],\n hosts=[\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n subnet_id=foo_vpc_subnet.id,\n ),\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-b",\n subnet_id=bar.id,\n ),\n ])\n ```\n\n Example of creating a MySQL Cluster with cascade replicas: HA-group consist of \'na-1\' and \'na-2\', cascade replicas form a chain \'na-1\' > \'nb-1\' > \'nb-2\'\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.1.0.0/24"])\n bar = yandex.VpcSubnet("bar",\n zone="ru-central1-b",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.2.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(\n type="WEEKLY",\n day="SAT",\n hour=12,\n ),\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n )],\n hosts=[\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n name="na-1",\n subnet_id=foo_vpc_subnet.id,\n ),\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n name="na-2",\n subnet_id=foo_vpc_subnet.id,\n ),\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-b",\n name="nb-1",\n replication_source_name="na-1",\n subnet_id=bar.id,\n ),\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-b",\n name="nb-2",\n replication_source_name="nb-1",\n subnet_id=bar.id,\n ),\n ])\n ```\n\n Example of creating a Single Node MySQL with user params.\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.5.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(\n type="ANYTIME",\n ),\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n connection_limits=yandex.MdbMysqlClusterUserConnectionLimitsArgs(\n max_questions_per_hour=10,\n ),\n global_permissions=[\n "REPLICATION_SLAVE",\n "PROCESS",\n ],\n authentication_plugin="CACHING_SHA2_PASSWORD",\n )],\n hosts=[yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n subnet_id=foo_vpc_subnet.id,\n )])\n ```\n\n Example of restoring MySQL cluster.\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.5.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n restore=yandex.MdbMysqlClusterRestoreArgs(\n backup_id="c9qj2tns23432471d9qha:stream_20210122T141717Z",\n time="2021-01-23T15:04:05",\n ),\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n )],\n hosts=[yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n subnet_id=foo_vpc_subnet.id,\n )])\n ```\n ## MySQL config\n\n If not specified `mysql_config` then does not make any changes.\n\n * `sql_mode` default value: `ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION`\n\n some of: \t-\t1: "ALLOW_INVALID_DATES"\n \t-\t2: "ANSI_QUOTES"\n \t-\t3: "ERROR_FOR_DIVISION_BY_ZERO"\n \t-\t4: "HIGH_NOT_PRECEDENCE"\n \t-\t5: "IGNORE_SPACE"\n \t-\t6: "NO_AUTO_VALUE_ON_ZERO"\n \t-\t7: "NO_BACKSLASH_ESCAPES"\n \t-\t8: "NO_ENGINE_SUBSTITUTION"\n \t-\t9: "NO_UNSIGNED_SUBTRACTION"\n \t-\t10: "NO_ZERO_DATE"\n \t-\t11: "NO_ZERO_IN_DATE"\n \t-\t15: "ONLY_FULL_GROUP_BY"\n \t-\t16: "PAD_CHAR_TO_FULL_LENGTH"\n \t-\t17: "PIPES_AS_CONCAT"\n \t-\t18: "REAL_AS_FLOAT"\n \t-\t19: "STRICT_ALL_TABLES"\n \t-\t20: "STRICT_TRANS_TABLES"\n \t-\t21: "TIME_TRUNCATE_FRACTIONAL"\n \t-\t22: "ANSI"\n \t-\t23: "TRADITIONAL"\n \t-\t24: "NO_DIR_IN_CREATE"\n or:\n - 0: "SQLMODE_UNSPECIFIED"\n\n ### MysqlConfig 8.0\n * `audit_log` boolean\n\n * `auto_increment_increment` integer\n\n * `auto_increment_offset` integer\n\n * `binlog_cache_size` integer\n\n * `binlog_group_commit_sync_delay` integer\n\n * `binlog_row_image` one of:\n - 0: "BINLOG_ROW_IMAGE_UNSPECIFIED"\n - 1: "FULL"\n - 2: "MINIMAL"\n - 3: "NOBLOB"\n\n * `binlog_rows_query_log_events` boolean\n\n * `character_set_server` text\n\n * `collation_server` text\n\n * `default_authentication_plugin` one of:\n - 0: "AUTH_PLUGIN_UNSPECIFIED"\n - 1: "MYSQL_NATIVE_PASSWORD"\n - 2: "CACHING_SHA2_PASSWORD"\n - 3: "SHA256_PASSWORD"\n\n * `default_time_zone` text\n\n * `explicit_defaults_for_timestamp` boolean\n\n * `general_log` boolean\n\n * `group_concat_max_len` integer\n\n * `innodb_adaptive_hash_index` boolean\n\n * `innodb_buffer_pool_size` integer\n\n * `innodb_flush_log_at_trx_commit` integer\n\n * `innodb_io_capacity` integer\n\n * `innodb_io_capacity_max` integer\n\n * `innodb_lock_wait_timeout` integer\n\n * `innodb_log_buffer_size` integer\n\n * `innodb_log_file_size` integer\n\n * `innodb_numa_interleave` boolean\n\n * `innodb_print_all_deadlocks` boolean\n\n * `innodb_purge_threads` integer\n\n * `innodb_read_io_threads` integer\n\n * `innodb_temp_data_file_max_size` integer\n\n * `innodb_thread_concurrency` integer\n\n * `innodb_write_io_threads` integer\n\n * `join_buffer_size` integer\n\n * `long_query_time` float\n\n * `max_allowed_packet` integer\n\n * `max_connections` integer\n\n * `max_heap_table_size` integer\n\n * `net_read_timeout` integer\n\n * `net_write_timeout` integer\n\n * `regexp_time_limit` integer\n\n * `rpl_semi_sync_master_wait_for_slave_count` integer\n\n * `slave_parallel_type` one of:\n - 0: "SLAVE_PARALLEL_TYPE_UNSPECIFIED"\n - 1: "DATABASE"\n - 2: "LOGICAL_CLOCK"\n\n * `slave_parallel_workers` integer\n\n * `sort_buffer_size` integer\n\n * `sync_binlog` integer\n\n * `table_definition_cache` integer\n\n * `table_open_cache` integer\n\n * `table_open_cache_instances` integer\n\n * `thread_cache_size` integer\n\n * `thread_stack` integer\n\n * `tmp_table_size` integer\n\n * `transaction_isolation` one of:\n - 0: "TRANSACTION_ISOLATION_UNSPECIFIED"\n - 1: "READ_COMMITTED"\n - 2: "REPEATABLE_READ"\n - 3: "SERIALIZABLE"\n\n ### MysqlConfig 5.7\n * `audit_log` boolean\n\n * `auto_increment_increment` integer\n\n * `auto_increment_offset` integer\n\n * `binlog_cache_size` integer\n\n * `binlog_group_commit_sync_delay` integer\n\n * `binlog_row_image` one of:\n - 0: "BINLOG_ROW_IMAGE_UNSPECIFIED"\n - 1: "FULL"\n - 2: "MINIMAL"\n - 3: "NOBLOB"\n\n * `binlog_rows_query_log_events` boolean\n\n * `character_set_server` text\n\n * `collation_server` text\n\n * `default_authentication_plugin` one of:\n - 0: "AUTH_PLUGIN_UNSPECIFIED"\n - 1: "MYSQL_NATIVE_PASSWORD"\n - 2: "CACHING_SHA2_PASSWORD"\n - 3: "SHA256_PASSWORD"\n\n * `default_time_zone` text\n\n * `explicit_defaults_for_timestamp` boolean\n\n * `general_log` boolean\n\n * `group_concat_max_len` integer\n\n * `innodb_adaptive_hash_index` boolean\n\n * `innodb_buffer_pool_size` integer\n\n * `innodb_flush_log_at_trx_commit` integer\n\n * `innodb_io_capacity` integer\n\n * `innodb_io_capacity_max` integer\n\n * `innodb_lock_wait_timeout` integer\n\n * `innodb_log_buffer_size` integer\n\n * `innodb_log_file_size` integer\n\n * `innodb_numa_interleave` boolean\n\n * `innodb_print_all_deadlocks` boolean\n\n * `innodb_purge_threads` integer\n\n * `innodb_read_io_threads` integer\n\n * `innodb_temp_data_file_max_size` integer\n\n * `innodb_thread_concurrency` integer\n\n * `innodb_write_io_threads` integer\n\n * `join_buffer_size` integer\n\n * `long_query_time` float\n\n * `max_allowed_packet` integer\n\n * `max_connections` integer\n\n * `max_heap_table_size` integer\n\n * `net_read_timeout` integer\n\n * `net_write_timeout` integer\n\n * `rpl_semi_sync_master_wait_for_slave_count` integer\n\n * `slave_parallel_type` one of:\n - 0: "SLAVE_PARALLEL_TYPE_UNSPECIFIED"\n - 1: "DATABASE"\n - 2: "LOGICAL_CLOCK"\n\n * `slave_parallel_workers` integer\n\n * `sort_buffer_size` integer\n\n * `sync_binlog` integer\n\n * `table_definition_cache` integer\n\n * `table_open_cache` integer\n\n * `table_open_cache_instances` integer\n\n * `thread_cache_size` integer\n\n * `thread_stack` integer\n\n * `tmp_table_size` integer\n\n * `transaction_isolation` one of:\n - 0: "TRANSACTION_ISOLATION_UNSPECIFIED"\n - 1: "READ_COMMITTED"\n - 2: "REPEATABLE_READ"\n - 3: "SERIALIZABLE"\n\n ## Import\n\n A cluster can be imported using the `id` of the resource, e.g.\n\n ```sh\n $ pulumi import yandex:index/mdbMysqlCluster:MdbMysqlCluster foo cluster_id\n ```\n\n :param str resource_name: The name of the resource.\n :param MdbMysqlClusterArgs args: The arguments to use to populate this resource\'s properties.\n :param pulumi.ResourceOptions opts: Options for the resource.\n '
... | @overload
def __init__(__self__, resource_name: str, args: MdbMysqlClusterArgs, opts: Optional[pulumi.ResourceOptions]=None):
'\n Manages a MySQL cluster within the Yandex.Cloud. For more information, see\n [the official documentation](https://cloud.yandex.com/docs/managed-mysql/).\n\n ## Example Usage\n\n Example of creating a Single Node MySQL.\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.5.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n mysql_config={\n "sql_mode": "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION",\n "max_connections": "100",\n "default_authentication_plugin": "MYSQL_NATIVE_PASSWORD",\n "innodb_print_all_deadlocks": "true",\n },\n access=yandex.MdbMysqlClusterAccessArgs(\n web_sql=True,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n )],\n hosts=[yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n subnet_id=foo_vpc_subnet.id,\n )])\n ```\n\n Example of creating a High-Availability(HA) MySQL Cluster.\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.1.0.0/24"])\n bar = yandex.VpcSubnet("bar",\n zone="ru-central1-b",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.2.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(\n type="WEEKLY",\n day="SAT",\n hour=12,\n ),\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n )],\n hosts=[\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n subnet_id=foo_vpc_subnet.id,\n ),\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-b",\n subnet_id=bar.id,\n ),\n ])\n ```\n\n Example of creating a MySQL Cluster with cascade replicas: HA-group consist of \'na-1\' and \'na-2\', cascade replicas form a chain \'na-1\' > \'nb-1\' > \'nb-2\'\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.1.0.0/24"])\n bar = yandex.VpcSubnet("bar",\n zone="ru-central1-b",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.2.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(\n type="WEEKLY",\n day="SAT",\n hour=12,\n ),\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n )],\n hosts=[\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n name="na-1",\n subnet_id=foo_vpc_subnet.id,\n ),\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n name="na-2",\n subnet_id=foo_vpc_subnet.id,\n ),\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-b",\n name="nb-1",\n replication_source_name="na-1",\n subnet_id=bar.id,\n ),\n yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-b",\n name="nb-2",\n replication_source_name="nb-1",\n subnet_id=bar.id,\n ),\n ])\n ```\n\n Example of creating a Single Node MySQL with user params.\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.5.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(\n type="ANYTIME",\n ),\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n connection_limits=yandex.MdbMysqlClusterUserConnectionLimitsArgs(\n max_questions_per_hour=10,\n ),\n global_permissions=[\n "REPLICATION_SLAVE",\n "PROCESS",\n ],\n authentication_plugin="CACHING_SHA2_PASSWORD",\n )],\n hosts=[yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n subnet_id=foo_vpc_subnet.id,\n )])\n ```\n\n Example of restoring MySQL cluster.\n\n ```python\n import pulumi\n import pulumi_yandex as yandex\n\n foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")\n foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",\n zone="ru-central1-a",\n network_id=foo_vpc_network.id,\n v4_cidr_blocks=["10.5.0.0/24"])\n foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",\n environment="PRESTABLE",\n network_id=foo_vpc_network.id,\n version="8.0",\n restore=yandex.MdbMysqlClusterRestoreArgs(\n backup_id="c9qj2tns23432471d9qha:stream_20210122T141717Z",\n time="2021-01-23T15:04:05",\n ),\n resources=yandex.MdbMysqlClusterResourcesArgs(\n resource_preset_id="s2.micro",\n disk_type_id="network-ssd",\n disk_size=16,\n ),\n databases=[yandex.MdbMysqlClusterDatabaseArgs(\n name="db_name",\n )],\n users=[yandex.MdbMysqlClusterUserArgs(\n name="user_name",\n password="your_password",\n permissions=[yandex.MdbMysqlClusterUserPermissionArgs(\n database_name="db_name",\n roles=["ALL"],\n )],\n )],\n hosts=[yandex.MdbMysqlClusterHostArgs(\n zone="ru-central1-a",\n subnet_id=foo_vpc_subnet.id,\n )])\n ```\n ## MySQL config\n\n If not specified `mysql_config` then does not make any changes.\n\n * `sql_mode` default value: `ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION`\n\n some of: \t-\t1: "ALLOW_INVALID_DATES"\n \t-\t2: "ANSI_QUOTES"\n \t-\t3: "ERROR_FOR_DIVISION_BY_ZERO"\n \t-\t4: "HIGH_NOT_PRECEDENCE"\n \t-\t5: "IGNORE_SPACE"\n \t-\t6: "NO_AUTO_VALUE_ON_ZERO"\n \t-\t7: "NO_BACKSLASH_ESCAPES"\n \t-\t8: "NO_ENGINE_SUBSTITUTION"\n \t-\t9: "NO_UNSIGNED_SUBTRACTION"\n \t-\t10: "NO_ZERO_DATE"\n \t-\t11: "NO_ZERO_IN_DATE"\n \t-\t15: "ONLY_FULL_GROUP_BY"\n \t-\t16: "PAD_CHAR_TO_FULL_LENGTH"\n \t-\t17: "PIPES_AS_CONCAT"\n \t-\t18: "REAL_AS_FLOAT"\n \t-\t19: "STRICT_ALL_TABLES"\n \t-\t20: "STRICT_TRANS_TABLES"\n \t-\t21: "TIME_TRUNCATE_FRACTIONAL"\n \t-\t22: "ANSI"\n \t-\t23: "TRADITIONAL"\n \t-\t24: "NO_DIR_IN_CREATE"\n or:\n - 0: "SQLMODE_UNSPECIFIED"\n\n ### MysqlConfig 8.0\n * `audit_log` boolean\n\n * `auto_increment_increment` integer\n\n * `auto_increment_offset` integer\n\n * `binlog_cache_size` integer\n\n * `binlog_group_commit_sync_delay` integer\n\n * `binlog_row_image` one of:\n - 0: "BINLOG_ROW_IMAGE_UNSPECIFIED"\n - 1: "FULL"\n - 2: "MINIMAL"\n - 3: "NOBLOB"\n\n * `binlog_rows_query_log_events` boolean\n\n * `character_set_server` text\n\n * `collation_server` text\n\n * `default_authentication_plugin` one of:\n - 0: "AUTH_PLUGIN_UNSPECIFIED"\n - 1: "MYSQL_NATIVE_PASSWORD"\n - 2: "CACHING_SHA2_PASSWORD"\n - 3: "SHA256_PASSWORD"\n\n * `default_time_zone` text\n\n * `explicit_defaults_for_timestamp` boolean\n\n * `general_log` boolean\n\n * `group_concat_max_len` integer\n\n * `innodb_adaptive_hash_index` boolean\n\n * `innodb_buffer_pool_size` integer\n\n * `innodb_flush_log_at_trx_commit` integer\n\n * `innodb_io_capacity` integer\n\n * `innodb_io_capacity_max` integer\n\n * `innodb_lock_wait_timeout` integer\n\n * `innodb_log_buffer_size` integer\n\n * `innodb_log_file_size` integer\n\n * `innodb_numa_interleave` boolean\n\n * `innodb_print_all_deadlocks` boolean\n\n * `innodb_purge_threads` integer\n\n * `innodb_read_io_threads` integer\n\n * `innodb_temp_data_file_max_size` integer\n\n * `innodb_thread_concurrency` integer\n\n * `innodb_write_io_threads` integer\n\n * `join_buffer_size` integer\n\n * `long_query_time` float\n\n * `max_allowed_packet` integer\n\n * `max_connections` integer\n\n * `max_heap_table_size` integer\n\n * `net_read_timeout` integer\n\n * `net_write_timeout` integer\n\n * `regexp_time_limit` integer\n\n * `rpl_semi_sync_master_wait_for_slave_count` integer\n\n * `slave_parallel_type` one of:\n - 0: "SLAVE_PARALLEL_TYPE_UNSPECIFIED"\n - 1: "DATABASE"\n - 2: "LOGICAL_CLOCK"\n\n * `slave_parallel_workers` integer\n\n * `sort_buffer_size` integer\n\n * `sync_binlog` integer\n\n * `table_definition_cache` integer\n\n * `table_open_cache` integer\n\n * `table_open_cache_instances` integer\n\n * `thread_cache_size` integer\n\n * `thread_stack` integer\n\n * `tmp_table_size` integer\n\n * `transaction_isolation` one of:\n - 0: "TRANSACTION_ISOLATION_UNSPECIFIED"\n - 1: "READ_COMMITTED"\n - 2: "REPEATABLE_READ"\n - 3: "SERIALIZABLE"\n\n ### MysqlConfig 5.7\n * `audit_log` boolean\n\n * `auto_increment_increment` integer\n\n * `auto_increment_offset` integer\n\n * `binlog_cache_size` integer\n\n * `binlog_group_commit_sync_delay` integer\n\n * `binlog_row_image` one of:\n - 0: "BINLOG_ROW_IMAGE_UNSPECIFIED"\n - 1: "FULL"\n - 2: "MINIMAL"\n - 3: "NOBLOB"\n\n * `binlog_rows_query_log_events` boolean\n\n * `character_set_server` text\n\n * `collation_server` text\n\n * `default_authentication_plugin` one of:\n - 0: "AUTH_PLUGIN_UNSPECIFIED"\n - 1: "MYSQL_NATIVE_PASSWORD"\n - 2: "CACHING_SHA2_PASSWORD"\n - 3: "SHA256_PASSWORD"\n\n * `default_time_zone` text\n\n * `explicit_defaults_for_timestamp` boolean\n\n * `general_log` boolean\n\n * `group_concat_max_len` integer\n\n * `innodb_adaptive_hash_index` boolean\n\n * `innodb_buffer_pool_size` integer\n\n * `innodb_flush_log_at_trx_commit` integer\n\n * `innodb_io_capacity` integer\n\n * `innodb_io_capacity_max` integer\n\n * `innodb_lock_wait_timeout` integer\n\n * `innodb_log_buffer_size` integer\n\n * `innodb_log_file_size` integer\n\n * `innodb_numa_interleave` boolean\n\n * `innodb_print_all_deadlocks` boolean\n\n * `innodb_purge_threads` integer\n\n * `innodb_read_io_threads` integer\n\n * `innodb_temp_data_file_max_size` integer\n\n * `innodb_thread_concurrency` integer\n\n * `innodb_write_io_threads` integer\n\n * `join_buffer_size` integer\n\n * `long_query_time` float\n\n * `max_allowed_packet` integer\n\n * `max_connections` integer\n\n * `max_heap_table_size` integer\n\n * `net_read_timeout` integer\n\n * `net_write_timeout` integer\n\n * `rpl_semi_sync_master_wait_for_slave_count` integer\n\n * `slave_parallel_type` one of:\n - 0: "SLAVE_PARALLEL_TYPE_UNSPECIFIED"\n - 1: "DATABASE"\n - 2: "LOGICAL_CLOCK"\n\n * `slave_parallel_workers` integer\n\n * `sort_buffer_size` integer\n\n * `sync_binlog` integer\n\n * `table_definition_cache` integer\n\n * `table_open_cache` integer\n\n * `table_open_cache_instances` integer\n\n * `thread_cache_size` integer\n\n * `thread_stack` integer\n\n * `tmp_table_size` integer\n\n * `transaction_isolation` one of:\n - 0: "TRANSACTION_ISOLATION_UNSPECIFIED"\n - 1: "READ_COMMITTED"\n - 2: "REPEATABLE_READ"\n - 3: "SERIALIZABLE"\n\n ## Import\n\n A cluster can be imported using the `id` of the resource, e.g.\n\n ```sh\n $ pulumi import yandex:index/mdbMysqlCluster:MdbMysqlCluster foo cluster_id\n ```\n\n :param str resource_name: The name of the resource.\n :param MdbMysqlClusterArgs args: The arguments to use to populate this resource\'s properties.\n :param pulumi.ResourceOptions opts: Options for the resource.\n '
...<|docstring|>Manages a MySQL cluster within the Yandex.Cloud. For more information, see
[the official documentation](https://cloud.yandex.com/docs/managed-mysql/).
## Example Usage
Example of creating a Single Node MySQL.
```python
import pulumi
import pulumi_yandex as yandex
foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")
foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",
zone="ru-central1-a",
network_id=foo_vpc_network.id,
v4_cidr_blocks=["10.5.0.0/24"])
foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",
environment="PRESTABLE",
network_id=foo_vpc_network.id,
version="8.0",
resources=yandex.MdbMysqlClusterResourcesArgs(
resource_preset_id="s2.micro",
disk_type_id="network-ssd",
disk_size=16,
),
mysql_config={
"sql_mode": "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION",
"max_connections": "100",
"default_authentication_plugin": "MYSQL_NATIVE_PASSWORD",
"innodb_print_all_deadlocks": "true",
},
access=yandex.MdbMysqlClusterAccessArgs(
web_sql=True,
),
databases=[yandex.MdbMysqlClusterDatabaseArgs(
name="db_name",
)],
users=[yandex.MdbMysqlClusterUserArgs(
name="user_name",
password="your_password",
permissions=[yandex.MdbMysqlClusterUserPermissionArgs(
database_name="db_name",
roles=["ALL"],
)],
)],
hosts=[yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-a",
subnet_id=foo_vpc_subnet.id,
)])
```
Example of creating a High-Availability(HA) MySQL Cluster.
```python
import pulumi
import pulumi_yandex as yandex
foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")
foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",
zone="ru-central1-a",
network_id=foo_vpc_network.id,
v4_cidr_blocks=["10.1.0.0/24"])
bar = yandex.VpcSubnet("bar",
zone="ru-central1-b",
network_id=foo_vpc_network.id,
v4_cidr_blocks=["10.2.0.0/24"])
foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",
environment="PRESTABLE",
network_id=foo_vpc_network.id,
version="8.0",
resources=yandex.MdbMysqlClusterResourcesArgs(
resource_preset_id="s2.micro",
disk_type_id="network-ssd",
disk_size=16,
),
databases=[yandex.MdbMysqlClusterDatabaseArgs(
name="db_name",
)],
maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(
type="WEEKLY",
day="SAT",
hour=12,
),
users=[yandex.MdbMysqlClusterUserArgs(
name="user_name",
password="your_password",
permissions=[yandex.MdbMysqlClusterUserPermissionArgs(
database_name="db_name",
roles=["ALL"],
)],
)],
hosts=[
yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-a",
subnet_id=foo_vpc_subnet.id,
),
yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-b",
subnet_id=bar.id,
),
])
```
Example of creating a MySQL Cluster with cascade replicas: HA-group consist of 'na-1' and 'na-2', cascade replicas form a chain 'na-1' > 'nb-1' > 'nb-2'
```python
import pulumi
import pulumi_yandex as yandex
foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")
foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",
zone="ru-central1-a",
network_id=foo_vpc_network.id,
v4_cidr_blocks=["10.1.0.0/24"])
bar = yandex.VpcSubnet("bar",
zone="ru-central1-b",
network_id=foo_vpc_network.id,
v4_cidr_blocks=["10.2.0.0/24"])
foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",
environment="PRESTABLE",
network_id=foo_vpc_network.id,
version="8.0",
resources=yandex.MdbMysqlClusterResourcesArgs(
resource_preset_id="s2.micro",
disk_type_id="network-ssd",
disk_size=16,
),
databases=[yandex.MdbMysqlClusterDatabaseArgs(
name="db_name",
)],
maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(
type="WEEKLY",
day="SAT",
hour=12,
),
users=[yandex.MdbMysqlClusterUserArgs(
name="user_name",
password="your_password",
permissions=[yandex.MdbMysqlClusterUserPermissionArgs(
database_name="db_name",
roles=["ALL"],
)],
)],
hosts=[
yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-a",
name="na-1",
subnet_id=foo_vpc_subnet.id,
),
yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-a",
name="na-2",
subnet_id=foo_vpc_subnet.id,
),
yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-b",
name="nb-1",
replication_source_name="na-1",
subnet_id=bar.id,
),
yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-b",
name="nb-2",
replication_source_name="nb-1",
subnet_id=bar.id,
),
])
```
Example of creating a Single Node MySQL with user params.
```python
import pulumi
import pulumi_yandex as yandex
foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")
foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",
zone="ru-central1-a",
network_id=foo_vpc_network.id,
v4_cidr_blocks=["10.5.0.0/24"])
foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",
environment="PRESTABLE",
network_id=foo_vpc_network.id,
version="8.0",
resources=yandex.MdbMysqlClusterResourcesArgs(
resource_preset_id="s2.micro",
disk_type_id="network-ssd",
disk_size=16,
),
databases=[yandex.MdbMysqlClusterDatabaseArgs(
name="db_name",
)],
maintenance_window=yandex.MdbMysqlClusterMaintenanceWindowArgs(
type="ANYTIME",
),
users=[yandex.MdbMysqlClusterUserArgs(
name="user_name",
password="your_password",
permissions=[yandex.MdbMysqlClusterUserPermissionArgs(
database_name="db_name",
roles=["ALL"],
)],
connection_limits=yandex.MdbMysqlClusterUserConnectionLimitsArgs(
max_questions_per_hour=10,
),
global_permissions=[
"REPLICATION_SLAVE",
"PROCESS",
],
authentication_plugin="CACHING_SHA2_PASSWORD",
)],
hosts=[yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-a",
subnet_id=foo_vpc_subnet.id,
)])
```
Example of restoring MySQL cluster.
```python
import pulumi
import pulumi_yandex as yandex
foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")
foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",
zone="ru-central1-a",
network_id=foo_vpc_network.id,
v4_cidr_blocks=["10.5.0.0/24"])
foo_mdb_mysql_cluster = yandex.MdbMysqlCluster("fooMdbMysqlCluster",
environment="PRESTABLE",
network_id=foo_vpc_network.id,
version="8.0",
restore=yandex.MdbMysqlClusterRestoreArgs(
backup_id="c9qj2tns23432471d9qha:stream_20210122T141717Z",
time="2021-01-23T15:04:05",
),
resources=yandex.MdbMysqlClusterResourcesArgs(
resource_preset_id="s2.micro",
disk_type_id="network-ssd",
disk_size=16,
),
databases=[yandex.MdbMysqlClusterDatabaseArgs(
name="db_name",
)],
users=[yandex.MdbMysqlClusterUserArgs(
name="user_name",
password="your_password",
permissions=[yandex.MdbMysqlClusterUserPermissionArgs(
database_name="db_name",
roles=["ALL"],
)],
)],
hosts=[yandex.MdbMysqlClusterHostArgs(
zone="ru-central1-a",
subnet_id=foo_vpc_subnet.id,
)])
```
## MySQL config
If not specified `mysql_config` then does not make any changes.
* `sql_mode` default value: `ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION`
some of: - 1: "ALLOW_INVALID_DATES"
- 2: "ANSI_QUOTES"
- 3: "ERROR_FOR_DIVISION_BY_ZERO"
- 4: "HIGH_NOT_PRECEDENCE"
- 5: "IGNORE_SPACE"
- 6: "NO_AUTO_VALUE_ON_ZERO"
- 7: "NO_BACKSLASH_ESCAPES"
- 8: "NO_ENGINE_SUBSTITUTION"
- 9: "NO_UNSIGNED_SUBTRACTION"
- 10: "NO_ZERO_DATE"
- 11: "NO_ZERO_IN_DATE"
- 15: "ONLY_FULL_GROUP_BY"
- 16: "PAD_CHAR_TO_FULL_LENGTH"
- 17: "PIPES_AS_CONCAT"
- 18: "REAL_AS_FLOAT"
- 19: "STRICT_ALL_TABLES"
- 20: "STRICT_TRANS_TABLES"
- 21: "TIME_TRUNCATE_FRACTIONAL"
- 22: "ANSI"
- 23: "TRADITIONAL"
- 24: "NO_DIR_IN_CREATE"
or:
- 0: "SQLMODE_UNSPECIFIED"
### MysqlConfig 8.0
* `audit_log` boolean
* `auto_increment_increment` integer
* `auto_increment_offset` integer
* `binlog_cache_size` integer
* `binlog_group_commit_sync_delay` integer
* `binlog_row_image` one of:
- 0: "BINLOG_ROW_IMAGE_UNSPECIFIED"
- 1: "FULL"
- 2: "MINIMAL"
- 3: "NOBLOB"
* `binlog_rows_query_log_events` boolean
* `character_set_server` text
* `collation_server` text
* `default_authentication_plugin` one of:
- 0: "AUTH_PLUGIN_UNSPECIFIED"
- 1: "MYSQL_NATIVE_PASSWORD"
- 2: "CACHING_SHA2_PASSWORD"
- 3: "SHA256_PASSWORD"
* `default_time_zone` text
* `explicit_defaults_for_timestamp` boolean
* `general_log` boolean
* `group_concat_max_len` integer
* `innodb_adaptive_hash_index` boolean
* `innodb_buffer_pool_size` integer
* `innodb_flush_log_at_trx_commit` integer
* `innodb_io_capacity` integer
* `innodb_io_capacity_max` integer
* `innodb_lock_wait_timeout` integer
* `innodb_log_buffer_size` integer
* `innodb_log_file_size` integer
* `innodb_numa_interleave` boolean
* `innodb_print_all_deadlocks` boolean
* `innodb_purge_threads` integer
* `innodb_read_io_threads` integer
* `innodb_temp_data_file_max_size` integer
* `innodb_thread_concurrency` integer
* `innodb_write_io_threads` integer
* `join_buffer_size` integer
* `long_query_time` float
* `max_allowed_packet` integer
* `max_connections` integer
* `max_heap_table_size` integer
* `net_read_timeout` integer
* `net_write_timeout` integer
* `regexp_time_limit` integer
* `rpl_semi_sync_master_wait_for_slave_count` integer
* `slave_parallel_type` one of:
- 0: "SLAVE_PARALLEL_TYPE_UNSPECIFIED"
- 1: "DATABASE"
- 2: "LOGICAL_CLOCK"
* `slave_parallel_workers` integer
* `sort_buffer_size` integer
* `sync_binlog` integer
* `table_definition_cache` integer
* `table_open_cache` integer
* `table_open_cache_instances` integer
* `thread_cache_size` integer
* `thread_stack` integer
* `tmp_table_size` integer
* `transaction_isolation` one of:
- 0: "TRANSACTION_ISOLATION_UNSPECIFIED"
- 1: "READ_COMMITTED"
- 2: "REPEATABLE_READ"
- 3: "SERIALIZABLE"
### MysqlConfig 5.7
* `audit_log` boolean
* `auto_increment_increment` integer
* `auto_increment_offset` integer
* `binlog_cache_size` integer
* `binlog_group_commit_sync_delay` integer
* `binlog_row_image` one of:
- 0: "BINLOG_ROW_IMAGE_UNSPECIFIED"
- 1: "FULL"
- 2: "MINIMAL"
- 3: "NOBLOB"
* `binlog_rows_query_log_events` boolean
* `character_set_server` text
* `collation_server` text
* `default_authentication_plugin` one of:
- 0: "AUTH_PLUGIN_UNSPECIFIED"
- 1: "MYSQL_NATIVE_PASSWORD"
- 2: "CACHING_SHA2_PASSWORD"
- 3: "SHA256_PASSWORD"
* `default_time_zone` text
* `explicit_defaults_for_timestamp` boolean
* `general_log` boolean
* `group_concat_max_len` integer
* `innodb_adaptive_hash_index` boolean
* `innodb_buffer_pool_size` integer
* `innodb_flush_log_at_trx_commit` integer
* `innodb_io_capacity` integer
* `innodb_io_capacity_max` integer
* `innodb_lock_wait_timeout` integer
* `innodb_log_buffer_size` integer
* `innodb_log_file_size` integer
* `innodb_numa_interleave` boolean
* `innodb_print_all_deadlocks` boolean
* `innodb_purge_threads` integer
* `innodb_read_io_threads` integer
* `innodb_temp_data_file_max_size` integer
* `innodb_thread_concurrency` integer
* `innodb_write_io_threads` integer
* `join_buffer_size` integer
* `long_query_time` float
* `max_allowed_packet` integer
* `max_connections` integer
* `max_heap_table_size` integer
* `net_read_timeout` integer
* `net_write_timeout` integer
* `rpl_semi_sync_master_wait_for_slave_count` integer
* `slave_parallel_type` one of:
- 0: "SLAVE_PARALLEL_TYPE_UNSPECIFIED"
- 1: "DATABASE"
- 2: "LOGICAL_CLOCK"
* `slave_parallel_workers` integer
* `sort_buffer_size` integer
* `sync_binlog` integer
* `table_definition_cache` integer
* `table_open_cache` integer
* `table_open_cache_instances` integer
* `thread_cache_size` integer
* `thread_stack` integer
* `tmp_table_size` integer
* `transaction_isolation` one of:
- 0: "TRANSACTION_ISOLATION_UNSPECIFIED"
- 1: "READ_COMMITTED"
- 2: "REPEATABLE_READ"
- 3: "SERIALIZABLE"
## Import
A cluster can be imported using the `id` of the resource, e.g.
```sh
$ pulumi import yandex:index/mdbMysqlCluster:MdbMysqlCluster foo cluster_id
```
:param str resource_name: The name of the resource.
:param MdbMysqlClusterArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.<|endoftext|> |
9661464e17d3dd65413da706d653badb7c43db6ae9d4c8b91786718986fef422 | @staticmethod
def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions]=None, access: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterAccessArgs']]]=None, allow_regeneration_host: Optional[pulumi.Input[bool]]=None, backup_window_start: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterBackupWindowStartArgs']]]=None, created_at: Optional[pulumi.Input[str]]=None, databases: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterDatabaseArgs']]]]]=None, deletion_protection: Optional[pulumi.Input[bool]]=None, description: Optional[pulumi.Input[str]]=None, environment: Optional[pulumi.Input[str]]=None, folder_id: Optional[pulumi.Input[str]]=None, health: Optional[pulumi.Input[str]]=None, hosts: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterHostArgs']]]]]=None, labels: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, maintenance_window: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterMaintenanceWindowArgs']]]=None, mysql_config: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, name: Optional[pulumi.Input[str]]=None, network_id: Optional[pulumi.Input[str]]=None, resources: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterResourcesArgs']]]=None, restore: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterRestoreArgs']]]=None, security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None, status: Optional[pulumi.Input[str]]=None, users: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterUserArgs']]]]]=None, version: Optional[pulumi.Input[str]]=None) -> 'MdbMysqlCluster':
'\n Get an existing MdbMysqlCluster resource\'s state with the given name, id, and optional extra\n properties used to qualify the lookup.\n\n :param str resource_name: The unique name of the resulting resource.\n :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.\n :param pulumi.ResourceOptions opts: Options for the resource.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterAccessArgs\']] access: Access policy to the MySQL cluster. The structure is documented below.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterBackupWindowStartArgs\']] backup_window_start: Time to start the daily backup, in the UTC. The structure is documented below.\n :param pulumi.Input[str] created_at: Creation timestamp of the cluster.\n :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType[\'MdbMysqlClusterDatabaseArgs\']]]] databases: A database of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[bool] deletion_protection: Inhibits deletion of the cluster. Can be either `true` or `false`.\n :param pulumi.Input[str] description: Description of the MySQL cluster.\n :param pulumi.Input[str] environment: Deployment environment of the MySQL cluster.\n :param pulumi.Input[str] folder_id: The ID of the folder that the resource belongs to. If it\n is not provided, the default provider folder is used.\n :param pulumi.Input[str] health: Aggregated health of the cluster.\n :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType[\'MdbMysqlClusterHostArgs\']]]] hosts: A host of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: A set of key/value label pairs to assign to the MySQL cluster.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterMaintenanceWindowArgs\']] maintenance_window: Maintenance policy of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] mysql_config: MySQL cluster config. Detail info in "MySQL config" section (documented below).\n :param pulumi.Input[str] name: Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter.\n :param pulumi.Input[str] network_id: ID of the network, to which the MySQL cluster uses.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterResourcesArgs\']] resources: Resources allocated to hosts of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterRestoreArgs\']] restore: The cluster will be created from the specified backup. The structure is documented below.\n :param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_ids: A set of ids of security groups assigned to hosts of the cluster.\n :param pulumi.Input[str] status: Status of the cluster.\n :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType[\'MdbMysqlClusterUserArgs\']]]] users: A user of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[str] version: Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)\n '
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _MdbMysqlClusterState.__new__(_MdbMysqlClusterState)
__props__.__dict__['access'] = access
__props__.__dict__['allow_regeneration_host'] = allow_regeneration_host
__props__.__dict__['backup_window_start'] = backup_window_start
__props__.__dict__['created_at'] = created_at
__props__.__dict__['databases'] = databases
__props__.__dict__['deletion_protection'] = deletion_protection
__props__.__dict__['description'] = description
__props__.__dict__['environment'] = environment
__props__.__dict__['folder_id'] = folder_id
__props__.__dict__['health'] = health
__props__.__dict__['hosts'] = hosts
__props__.__dict__['labels'] = labels
__props__.__dict__['maintenance_window'] = maintenance_window
__props__.__dict__['mysql_config'] = mysql_config
__props__.__dict__['name'] = name
__props__.__dict__['network_id'] = network_id
__props__.__dict__['resources'] = resources
__props__.__dict__['restore'] = restore
__props__.__dict__['security_group_ids'] = security_group_ids
__props__.__dict__['status'] = status
__props__.__dict__['users'] = users
__props__.__dict__['version'] = version
return MdbMysqlCluster(resource_name, opts=opts, __props__=__props__) | Get an existing MdbMysqlCluster resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[pulumi.InputType['MdbMysqlClusterAccessArgs']] access: Access policy to the MySQL cluster. The structure is documented below.
:param pulumi.Input[pulumi.InputType['MdbMysqlClusterBackupWindowStartArgs']] backup_window_start: Time to start the daily backup, in the UTC. The structure is documented below.
:param pulumi.Input[str] created_at: Creation timestamp of the cluster.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterDatabaseArgs']]]] databases: A database of the MySQL cluster. The structure is documented below.
:param pulumi.Input[bool] deletion_protection: Inhibits deletion of the cluster. Can be either `true` or `false`.
:param pulumi.Input[str] description: Description of the MySQL cluster.
:param pulumi.Input[str] environment: Deployment environment of the MySQL cluster.
:param pulumi.Input[str] folder_id: The ID of the folder that the resource belongs to. If it
is not provided, the default provider folder is used.
:param pulumi.Input[str] health: Aggregated health of the cluster.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterHostArgs']]]] hosts: A host of the MySQL cluster. The structure is documented below.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: A set of key/value label pairs to assign to the MySQL cluster.
:param pulumi.Input[pulumi.InputType['MdbMysqlClusterMaintenanceWindowArgs']] maintenance_window: Maintenance policy of the MySQL cluster. The structure is documented below.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] mysql_config: MySQL cluster config. Detail info in "MySQL config" section (documented below).
:param pulumi.Input[str] name: Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter.
:param pulumi.Input[str] network_id: ID of the network, to which the MySQL cluster uses.
:param pulumi.Input[pulumi.InputType['MdbMysqlClusterResourcesArgs']] resources: Resources allocated to hosts of the MySQL cluster. The structure is documented below.
:param pulumi.Input[pulumi.InputType['MdbMysqlClusterRestoreArgs']] restore: The cluster will be created from the specified backup. The structure is documented below.
:param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_ids: A set of ids of security groups assigned to hosts of the cluster.
:param pulumi.Input[str] status: Status of the cluster.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterUserArgs']]]] users: A user of the MySQL cluster. The structure is documented below.
:param pulumi.Input[str] version: Version of the MySQL cluster. (allowed versions are: 5.7, 8.0) | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | get | pulumi/pulumi-yandex | 9 | python | @staticmethod
def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions]=None, access: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterAccessArgs']]]=None, allow_regeneration_host: Optional[pulumi.Input[bool]]=None, backup_window_start: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterBackupWindowStartArgs']]]=None, created_at: Optional[pulumi.Input[str]]=None, databases: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterDatabaseArgs']]]]]=None, deletion_protection: Optional[pulumi.Input[bool]]=None, description: Optional[pulumi.Input[str]]=None, environment: Optional[pulumi.Input[str]]=None, folder_id: Optional[pulumi.Input[str]]=None, health: Optional[pulumi.Input[str]]=None, hosts: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterHostArgs']]]]]=None, labels: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, maintenance_window: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterMaintenanceWindowArgs']]]=None, mysql_config: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, name: Optional[pulumi.Input[str]]=None, network_id: Optional[pulumi.Input[str]]=None, resources: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterResourcesArgs']]]=None, restore: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterRestoreArgs']]]=None, security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None, status: Optional[pulumi.Input[str]]=None, users: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterUserArgs']]]]]=None, version: Optional[pulumi.Input[str]]=None) -> 'MdbMysqlCluster':
'\n Get an existing MdbMysqlCluster resource\'s state with the given name, id, and optional extra\n properties used to qualify the lookup.\n\n :param str resource_name: The unique name of the resulting resource.\n :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.\n :param pulumi.ResourceOptions opts: Options for the resource.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterAccessArgs\']] access: Access policy to the MySQL cluster. The structure is documented below.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterBackupWindowStartArgs\']] backup_window_start: Time to start the daily backup, in the UTC. The structure is documented below.\n :param pulumi.Input[str] created_at: Creation timestamp of the cluster.\n :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType[\'MdbMysqlClusterDatabaseArgs\']]]] databases: A database of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[bool] deletion_protection: Inhibits deletion of the cluster. Can be either `true` or `false`.\n :param pulumi.Input[str] description: Description of the MySQL cluster.\n :param pulumi.Input[str] environment: Deployment environment of the MySQL cluster.\n :param pulumi.Input[str] folder_id: The ID of the folder that the resource belongs to. If it\n is not provided, the default provider folder is used.\n :param pulumi.Input[str] health: Aggregated health of the cluster.\n :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType[\'MdbMysqlClusterHostArgs\']]]] hosts: A host of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: A set of key/value label pairs to assign to the MySQL cluster.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterMaintenanceWindowArgs\']] maintenance_window: Maintenance policy of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] mysql_config: MySQL cluster config. Detail info in "MySQL config" section (documented below).\n :param pulumi.Input[str] name: Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter.\n :param pulumi.Input[str] network_id: ID of the network, to which the MySQL cluster uses.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterResourcesArgs\']] resources: Resources allocated to hosts of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterRestoreArgs\']] restore: The cluster will be created from the specified backup. The structure is documented below.\n :param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_ids: A set of ids of security groups assigned to hosts of the cluster.\n :param pulumi.Input[str] status: Status of the cluster.\n :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType[\'MdbMysqlClusterUserArgs\']]]] users: A user of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[str] version: Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)\n '
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _MdbMysqlClusterState.__new__(_MdbMysqlClusterState)
__props__.__dict__['access'] = access
__props__.__dict__['allow_regeneration_host'] = allow_regeneration_host
__props__.__dict__['backup_window_start'] = backup_window_start
__props__.__dict__['created_at'] = created_at
__props__.__dict__['databases'] = databases
__props__.__dict__['deletion_protection'] = deletion_protection
__props__.__dict__['description'] = description
__props__.__dict__['environment'] = environment
__props__.__dict__['folder_id'] = folder_id
__props__.__dict__['health'] = health
__props__.__dict__['hosts'] = hosts
__props__.__dict__['labels'] = labels
__props__.__dict__['maintenance_window'] = maintenance_window
__props__.__dict__['mysql_config'] = mysql_config
__props__.__dict__['name'] = name
__props__.__dict__['network_id'] = network_id
__props__.__dict__['resources'] = resources
__props__.__dict__['restore'] = restore
__props__.__dict__['security_group_ids'] = security_group_ids
__props__.__dict__['status'] = status
__props__.__dict__['users'] = users
__props__.__dict__['version'] = version
return MdbMysqlCluster(resource_name, opts=opts, __props__=__props__) | @staticmethod
def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions]=None, access: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterAccessArgs']]]=None, allow_regeneration_host: Optional[pulumi.Input[bool]]=None, backup_window_start: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterBackupWindowStartArgs']]]=None, created_at: Optional[pulumi.Input[str]]=None, databases: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterDatabaseArgs']]]]]=None, deletion_protection: Optional[pulumi.Input[bool]]=None, description: Optional[pulumi.Input[str]]=None, environment: Optional[pulumi.Input[str]]=None, folder_id: Optional[pulumi.Input[str]]=None, health: Optional[pulumi.Input[str]]=None, hosts: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterHostArgs']]]]]=None, labels: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, maintenance_window: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterMaintenanceWindowArgs']]]=None, mysql_config: Optional[pulumi.Input[Mapping[(str, pulumi.Input[str])]]]=None, name: Optional[pulumi.Input[str]]=None, network_id: Optional[pulumi.Input[str]]=None, resources: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterResourcesArgs']]]=None, restore: Optional[pulumi.Input[pulumi.InputType['MdbMysqlClusterRestoreArgs']]]=None, security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]=None, status: Optional[pulumi.Input[str]]=None, users: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterUserArgs']]]]]=None, version: Optional[pulumi.Input[str]]=None) -> 'MdbMysqlCluster':
'\n Get an existing MdbMysqlCluster resource\'s state with the given name, id, and optional extra\n properties used to qualify the lookup.\n\n :param str resource_name: The unique name of the resulting resource.\n :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.\n :param pulumi.ResourceOptions opts: Options for the resource.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterAccessArgs\']] access: Access policy to the MySQL cluster. The structure is documented below.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterBackupWindowStartArgs\']] backup_window_start: Time to start the daily backup, in the UTC. The structure is documented below.\n :param pulumi.Input[str] created_at: Creation timestamp of the cluster.\n :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType[\'MdbMysqlClusterDatabaseArgs\']]]] databases: A database of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[bool] deletion_protection: Inhibits deletion of the cluster. Can be either `true` or `false`.\n :param pulumi.Input[str] description: Description of the MySQL cluster.\n :param pulumi.Input[str] environment: Deployment environment of the MySQL cluster.\n :param pulumi.Input[str] folder_id: The ID of the folder that the resource belongs to. If it\n is not provided, the default provider folder is used.\n :param pulumi.Input[str] health: Aggregated health of the cluster.\n :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType[\'MdbMysqlClusterHostArgs\']]]] hosts: A host of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: A set of key/value label pairs to assign to the MySQL cluster.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterMaintenanceWindowArgs\']] maintenance_window: Maintenance policy of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[Mapping[str, pulumi.Input[str]]] mysql_config: MySQL cluster config. Detail info in "MySQL config" section (documented below).\n :param pulumi.Input[str] name: Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter.\n :param pulumi.Input[str] network_id: ID of the network, to which the MySQL cluster uses.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterResourcesArgs\']] resources: Resources allocated to hosts of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[pulumi.InputType[\'MdbMysqlClusterRestoreArgs\']] restore: The cluster will be created from the specified backup. The structure is documented below.\n :param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_ids: A set of ids of security groups assigned to hosts of the cluster.\n :param pulumi.Input[str] status: Status of the cluster.\n :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType[\'MdbMysqlClusterUserArgs\']]]] users: A user of the MySQL cluster. The structure is documented below.\n :param pulumi.Input[str] version: Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)\n '
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _MdbMysqlClusterState.__new__(_MdbMysqlClusterState)
__props__.__dict__['access'] = access
__props__.__dict__['allow_regeneration_host'] = allow_regeneration_host
__props__.__dict__['backup_window_start'] = backup_window_start
__props__.__dict__['created_at'] = created_at
__props__.__dict__['databases'] = databases
__props__.__dict__['deletion_protection'] = deletion_protection
__props__.__dict__['description'] = description
__props__.__dict__['environment'] = environment
__props__.__dict__['folder_id'] = folder_id
__props__.__dict__['health'] = health
__props__.__dict__['hosts'] = hosts
__props__.__dict__['labels'] = labels
__props__.__dict__['maintenance_window'] = maintenance_window
__props__.__dict__['mysql_config'] = mysql_config
__props__.__dict__['name'] = name
__props__.__dict__['network_id'] = network_id
__props__.__dict__['resources'] = resources
__props__.__dict__['restore'] = restore
__props__.__dict__['security_group_ids'] = security_group_ids
__props__.__dict__['status'] = status
__props__.__dict__['users'] = users
__props__.__dict__['version'] = version
return MdbMysqlCluster(resource_name, opts=opts, __props__=__props__)<|docstring|>Get an existing MdbMysqlCluster resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[pulumi.InputType['MdbMysqlClusterAccessArgs']] access: Access policy to the MySQL cluster. The structure is documented below.
:param pulumi.Input[pulumi.InputType['MdbMysqlClusterBackupWindowStartArgs']] backup_window_start: Time to start the daily backup, in the UTC. The structure is documented below.
:param pulumi.Input[str] created_at: Creation timestamp of the cluster.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterDatabaseArgs']]]] databases: A database of the MySQL cluster. The structure is documented below.
:param pulumi.Input[bool] deletion_protection: Inhibits deletion of the cluster. Can be either `true` or `false`.
:param pulumi.Input[str] description: Description of the MySQL cluster.
:param pulumi.Input[str] environment: Deployment environment of the MySQL cluster.
:param pulumi.Input[str] folder_id: The ID of the folder that the resource belongs to. If it
is not provided, the default provider folder is used.
:param pulumi.Input[str] health: Aggregated health of the cluster.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterHostArgs']]]] hosts: A host of the MySQL cluster. The structure is documented below.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: A set of key/value label pairs to assign to the MySQL cluster.
:param pulumi.Input[pulumi.InputType['MdbMysqlClusterMaintenanceWindowArgs']] maintenance_window: Maintenance policy of the MySQL cluster. The structure is documented below.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] mysql_config: MySQL cluster config. Detail info in "MySQL config" section (documented below).
:param pulumi.Input[str] name: Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter.
:param pulumi.Input[str] network_id: ID of the network, to which the MySQL cluster uses.
:param pulumi.Input[pulumi.InputType['MdbMysqlClusterResourcesArgs']] resources: Resources allocated to hosts of the MySQL cluster. The structure is documented below.
:param pulumi.Input[pulumi.InputType['MdbMysqlClusterRestoreArgs']] restore: The cluster will be created from the specified backup. The structure is documented below.
:param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_ids: A set of ids of security groups assigned to hosts of the cluster.
:param pulumi.Input[str] status: Status of the cluster.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MdbMysqlClusterUserArgs']]]] users: A user of the MySQL cluster. The structure is documented below.
:param pulumi.Input[str] version: Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)<|endoftext|> |
6f965d412079b68f20ececa334da812fdda6c7113f1f89aa25e13c680ac991fd | @property
@pulumi.getter
def access(self) -> pulumi.Output['outputs.MdbMysqlClusterAccess']:
'\n Access policy to the MySQL cluster. The structure is documented below.\n '
return pulumi.get(self, 'access') | Access policy to the MySQL cluster. The structure is documented below. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | access | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def access(self) -> pulumi.Output['outputs.MdbMysqlClusterAccess']:
'\n \n '
return pulumi.get(self, 'access') | @property
@pulumi.getter
def access(self) -> pulumi.Output['outputs.MdbMysqlClusterAccess']:
'\n \n '
return pulumi.get(self, 'access')<|docstring|>Access policy to the MySQL cluster. The structure is documented below.<|endoftext|> |
a38990351e774e86e821dd27dad9aaafc1a9a717e7820070050a00e04535747a | @property
@pulumi.getter(name='backupWindowStart')
def backup_window_start(self) -> pulumi.Output['outputs.MdbMysqlClusterBackupWindowStart']:
'\n Time to start the daily backup, in the UTC. The structure is documented below.\n '
return pulumi.get(self, 'backup_window_start') | Time to start the daily backup, in the UTC. The structure is documented below. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | backup_window_start | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter(name='backupWindowStart')
def backup_window_start(self) -> pulumi.Output['outputs.MdbMysqlClusterBackupWindowStart']:
'\n \n '
return pulumi.get(self, 'backup_window_start') | @property
@pulumi.getter(name='backupWindowStart')
def backup_window_start(self) -> pulumi.Output['outputs.MdbMysqlClusterBackupWindowStart']:
'\n \n '
return pulumi.get(self, 'backup_window_start')<|docstring|>Time to start the daily backup, in the UTC. The structure is documented below.<|endoftext|> |
76c3991a7cef3a681c48940f5cebde908328e52011967d35d0f4300d6e7d0030 | @property
@pulumi.getter(name='createdAt')
def created_at(self) -> pulumi.Output[str]:
'\n Creation timestamp of the cluster.\n '
return pulumi.get(self, 'created_at') | Creation timestamp of the cluster. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | created_at | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter(name='createdAt')
def created_at(self) -> pulumi.Output[str]:
'\n \n '
return pulumi.get(self, 'created_at') | @property
@pulumi.getter(name='createdAt')
def created_at(self) -> pulumi.Output[str]:
'\n \n '
return pulumi.get(self, 'created_at')<|docstring|>Creation timestamp of the cluster.<|endoftext|> |
2dcebed67730c9c148976340d08cdc1365c894d65540be2b13a84b0aefd15c8d | @property
@pulumi.getter
def databases(self) -> pulumi.Output[Sequence['outputs.MdbMysqlClusterDatabase']]:
'\n A database of the MySQL cluster. The structure is documented below.\n '
return pulumi.get(self, 'databases') | A database of the MySQL cluster. The structure is documented below. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | databases | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def databases(self) -> pulumi.Output[Sequence['outputs.MdbMysqlClusterDatabase']]:
'\n \n '
return pulumi.get(self, 'databases') | @property
@pulumi.getter
def databases(self) -> pulumi.Output[Sequence['outputs.MdbMysqlClusterDatabase']]:
'\n \n '
return pulumi.get(self, 'databases')<|docstring|>A database of the MySQL cluster. The structure is documented below.<|endoftext|> |
762c9e5ce3aa16a35b1a9f637c7e41999d23e9a2589cc5c896abede113a3599e | @property
@pulumi.getter(name='deletionProtection')
def deletion_protection(self) -> pulumi.Output[bool]:
'\n Inhibits deletion of the cluster. Can be either `true` or `false`.\n '
return pulumi.get(self, 'deletion_protection') | Inhibits deletion of the cluster. Can be either `true` or `false`. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | deletion_protection | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter(name='deletionProtection')
def deletion_protection(self) -> pulumi.Output[bool]:
'\n \n '
return pulumi.get(self, 'deletion_protection') | @property
@pulumi.getter(name='deletionProtection')
def deletion_protection(self) -> pulumi.Output[bool]:
'\n \n '
return pulumi.get(self, 'deletion_protection')<|docstring|>Inhibits deletion of the cluster. Can be either `true` or `false`.<|endoftext|> |
c8723cc0c0050c3d929ee9726fa0d2f23a3b5a62e404f37f2a4bf514b81bdb32 | @property
@pulumi.getter
def description(self) -> pulumi.Output[Optional[str]]:
'\n Description of the MySQL cluster.\n '
return pulumi.get(self, 'description') | Description of the MySQL cluster. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | description | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def description(self) -> pulumi.Output[Optional[str]]:
'\n \n '
return pulumi.get(self, 'description') | @property
@pulumi.getter
def description(self) -> pulumi.Output[Optional[str]]:
'\n \n '
return pulumi.get(self, 'description')<|docstring|>Description of the MySQL cluster.<|endoftext|> |
227305e19b7db14b04a4241a4af9ece13852e6b50b74e813451db42b473a1f0d | @property
@pulumi.getter
def environment(self) -> pulumi.Output[str]:
'\n Deployment environment of the MySQL cluster.\n '
return pulumi.get(self, 'environment') | Deployment environment of the MySQL cluster. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | environment | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def environment(self) -> pulumi.Output[str]:
'\n \n '
return pulumi.get(self, 'environment') | @property
@pulumi.getter
def environment(self) -> pulumi.Output[str]:
'\n \n '
return pulumi.get(self, 'environment')<|docstring|>Deployment environment of the MySQL cluster.<|endoftext|> |
182faae29289d25b03a286b47ccddd01ffe8dff518aed1c35c51e3897e206310 | @property
@pulumi.getter(name='folderId')
def folder_id(self) -> pulumi.Output[str]:
'\n The ID of the folder that the resource belongs to. If it\n is not provided, the default provider folder is used.\n '
return pulumi.get(self, 'folder_id') | The ID of the folder that the resource belongs to. If it
is not provided, the default provider folder is used. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | folder_id | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter(name='folderId')
def folder_id(self) -> pulumi.Output[str]:
'\n The ID of the folder that the resource belongs to. If it\n is not provided, the default provider folder is used.\n '
return pulumi.get(self, 'folder_id') | @property
@pulumi.getter(name='folderId')
def folder_id(self) -> pulumi.Output[str]:
'\n The ID of the folder that the resource belongs to. If it\n is not provided, the default provider folder is used.\n '
return pulumi.get(self, 'folder_id')<|docstring|>The ID of the folder that the resource belongs to. If it
is not provided, the default provider folder is used.<|endoftext|> |
e9ce98c067fd702e0bd26b8c2cab1a0c968a68e57344e29e44ceaf8aea3432bf | @property
@pulumi.getter
def health(self) -> pulumi.Output[str]:
'\n Aggregated health of the cluster.\n '
return pulumi.get(self, 'health') | Aggregated health of the cluster. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | health | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def health(self) -> pulumi.Output[str]:
'\n \n '
return pulumi.get(self, 'health') | @property
@pulumi.getter
def health(self) -> pulumi.Output[str]:
'\n \n '
return pulumi.get(self, 'health')<|docstring|>Aggregated health of the cluster.<|endoftext|> |
54e293b2886b7addfe1a73abaa0a5fe4357ca0e304f9e673854f0123d91e7b79 | @property
@pulumi.getter
def hosts(self) -> pulumi.Output[Sequence['outputs.MdbMysqlClusterHost']]:
'\n A host of the MySQL cluster. The structure is documented below.\n '
return pulumi.get(self, 'hosts') | A host of the MySQL cluster. The structure is documented below. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | hosts | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def hosts(self) -> pulumi.Output[Sequence['outputs.MdbMysqlClusterHost']]:
'\n \n '
return pulumi.get(self, 'hosts') | @property
@pulumi.getter
def hosts(self) -> pulumi.Output[Sequence['outputs.MdbMysqlClusterHost']]:
'\n \n '
return pulumi.get(self, 'hosts')<|docstring|>A host of the MySQL cluster. The structure is documented below.<|endoftext|> |
836b741c96e383f5aefd120b7bf28df9f479bfa5d487083cdbfad22168ab0945 | @property
@pulumi.getter
def labels(self) -> pulumi.Output[Optional[Mapping[(str, str)]]]:
'\n A set of key/value label pairs to assign to the MySQL cluster.\n '
return pulumi.get(self, 'labels') | A set of key/value label pairs to assign to the MySQL cluster. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | labels | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def labels(self) -> pulumi.Output[Optional[Mapping[(str, str)]]]:
'\n \n '
return pulumi.get(self, 'labels') | @property
@pulumi.getter
def labels(self) -> pulumi.Output[Optional[Mapping[(str, str)]]]:
'\n \n '
return pulumi.get(self, 'labels')<|docstring|>A set of key/value label pairs to assign to the MySQL cluster.<|endoftext|> |
04540f7ce7b5a3be4505544174dfffc5227edaa5b360e558d1b3eece897dd0c2 | @property
@pulumi.getter(name='maintenanceWindow')
def maintenance_window(self) -> pulumi.Output['outputs.MdbMysqlClusterMaintenanceWindow']:
'\n Maintenance policy of the MySQL cluster. The structure is documented below.\n '
return pulumi.get(self, 'maintenance_window') | Maintenance policy of the MySQL cluster. The structure is documented below. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | maintenance_window | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter(name='maintenanceWindow')
def maintenance_window(self) -> pulumi.Output['outputs.MdbMysqlClusterMaintenanceWindow']:
'\n \n '
return pulumi.get(self, 'maintenance_window') | @property
@pulumi.getter(name='maintenanceWindow')
def maintenance_window(self) -> pulumi.Output['outputs.MdbMysqlClusterMaintenanceWindow']:
'\n \n '
return pulumi.get(self, 'maintenance_window')<|docstring|>Maintenance policy of the MySQL cluster. The structure is documented below.<|endoftext|> |
6b99f6bfd8b540b220fbfb02b0a9d5ab5fe9c28f49efd95956f8a7b4ce72bcdb | @property
@pulumi.getter(name='mysqlConfig')
def mysql_config(self) -> pulumi.Output[Mapping[(str, str)]]:
'\n MySQL cluster config. Detail info in "MySQL config" section (documented below).\n '
return pulumi.get(self, 'mysql_config') | MySQL cluster config. Detail info in "MySQL config" section (documented below). | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | mysql_config | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter(name='mysqlConfig')
def mysql_config(self) -> pulumi.Output[Mapping[(str, str)]]:
'\n \n '
return pulumi.get(self, 'mysql_config') | @property
@pulumi.getter(name='mysqlConfig')
def mysql_config(self) -> pulumi.Output[Mapping[(str, str)]]:
'\n \n '
return pulumi.get(self, 'mysql_config')<|docstring|>MySQL cluster config. Detail info in "MySQL config" section (documented below).<|endoftext|> |
ed45d9c77639b9b99397adc88c1cc3f7cf1e276a18d1dcab7167b6d47a0e849d | @property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
'\n Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter.\n '
return pulumi.get(self, 'name') | Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | name | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
'\n \n '
return pulumi.get(self, 'name') | @property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
'\n \n '
return pulumi.get(self, 'name')<|docstring|>Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to `replication_source_name` parameter.<|endoftext|> |
69bb2592332e6181768ed41a004e7c085a6b03cb1c722dfed53631d0f88d4c3c | @property
@pulumi.getter(name='networkId')
def network_id(self) -> pulumi.Output[str]:
'\n ID of the network, to which the MySQL cluster uses.\n '
return pulumi.get(self, 'network_id') | ID of the network, to which the MySQL cluster uses. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | network_id | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter(name='networkId')
def network_id(self) -> pulumi.Output[str]:
'\n \n '
return pulumi.get(self, 'network_id') | @property
@pulumi.getter(name='networkId')
def network_id(self) -> pulumi.Output[str]:
'\n \n '
return pulumi.get(self, 'network_id')<|docstring|>ID of the network, to which the MySQL cluster uses.<|endoftext|> |
bacf45602ea4fa752b9e25dc0567fa8031bf8a50eea63e5e0a0807bcfc21c380 | @property
@pulumi.getter
def resources(self) -> pulumi.Output['outputs.MdbMysqlClusterResources']:
'\n Resources allocated to hosts of the MySQL cluster. The structure is documented below.\n '
return pulumi.get(self, 'resources') | Resources allocated to hosts of the MySQL cluster. The structure is documented below. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | resources | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def resources(self) -> pulumi.Output['outputs.MdbMysqlClusterResources']:
'\n \n '
return pulumi.get(self, 'resources') | @property
@pulumi.getter
def resources(self) -> pulumi.Output['outputs.MdbMysqlClusterResources']:
'\n \n '
return pulumi.get(self, 'resources')<|docstring|>Resources allocated to hosts of the MySQL cluster. The structure is documented below.<|endoftext|> |
058566c816667db4b7276339da89267d4997a0bc504337c16b87ac22e9e92b0e | @property
@pulumi.getter
def restore(self) -> pulumi.Output[Optional['outputs.MdbMysqlClusterRestore']]:
'\n The cluster will be created from the specified backup. The structure is documented below.\n '
return pulumi.get(self, 'restore') | The cluster will be created from the specified backup. The structure is documented below. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | restore | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def restore(self) -> pulumi.Output[Optional['outputs.MdbMysqlClusterRestore']]:
'\n \n '
return pulumi.get(self, 'restore') | @property
@pulumi.getter
def restore(self) -> pulumi.Output[Optional['outputs.MdbMysqlClusterRestore']]:
'\n \n '
return pulumi.get(self, 'restore')<|docstring|>The cluster will be created from the specified backup. The structure is documented below.<|endoftext|> |
6f1d19923d35d426c81e2d075a87fd05b374c885a769c0d4128b35b03514dff9 | @property
@pulumi.getter(name='securityGroupIds')
def security_group_ids(self) -> pulumi.Output[Optional[Sequence[str]]]:
'\n A set of ids of security groups assigned to hosts of the cluster.\n '
return pulumi.get(self, 'security_group_ids') | A set of ids of security groups assigned to hosts of the cluster. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | security_group_ids | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter(name='securityGroupIds')
def security_group_ids(self) -> pulumi.Output[Optional[Sequence[str]]]:
'\n \n '
return pulumi.get(self, 'security_group_ids') | @property
@pulumi.getter(name='securityGroupIds')
def security_group_ids(self) -> pulumi.Output[Optional[Sequence[str]]]:
'\n \n '
return pulumi.get(self, 'security_group_ids')<|docstring|>A set of ids of security groups assigned to hosts of the cluster.<|endoftext|> |
67863f48fcfed511a3b6a21986cd6bf4a6c51b50b9daa9ecc1ca6a5267ad99ac | @property
@pulumi.getter
def status(self) -> pulumi.Output[str]:
'\n Status of the cluster.\n '
return pulumi.get(self, 'status') | Status of the cluster. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | status | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def status(self) -> pulumi.Output[str]:
'\n \n '
return pulumi.get(self, 'status') | @property
@pulumi.getter
def status(self) -> pulumi.Output[str]:
'\n \n '
return pulumi.get(self, 'status')<|docstring|>Status of the cluster.<|endoftext|> |
38d92cc81931bd3714a4e868b8cd64d2c00861873d4737d72bf4dde81b910dbc | @property
@pulumi.getter
def users(self) -> pulumi.Output[Sequence['outputs.MdbMysqlClusterUser']]:
'\n A user of the MySQL cluster. The structure is documented below.\n '
return pulumi.get(self, 'users') | A user of the MySQL cluster. The structure is documented below. | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | users | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def users(self) -> pulumi.Output[Sequence['outputs.MdbMysqlClusterUser']]:
'\n \n '
return pulumi.get(self, 'users') | @property
@pulumi.getter
def users(self) -> pulumi.Output[Sequence['outputs.MdbMysqlClusterUser']]:
'\n \n '
return pulumi.get(self, 'users')<|docstring|>A user of the MySQL cluster. The structure is documented below.<|endoftext|> |
a77a098c4020b4a6a49fd9a2dfafd5ad987b1c7885ef1d45b8e2b06ac052e41c | @property
@pulumi.getter
def version(self) -> pulumi.Output[str]:
'\n Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)\n '
return pulumi.get(self, 'version') | Version of the MySQL cluster. (allowed versions are: 5.7, 8.0) | sdk/python/pulumi_yandex/mdb_mysql_cluster.py | version | pulumi/pulumi-yandex | 9 | python | @property
@pulumi.getter
def version(self) -> pulumi.Output[str]:
'\n \n '
return pulumi.get(self, 'version') | @property
@pulumi.getter
def version(self) -> pulumi.Output[str]:
'\n \n '
return pulumi.get(self, 'version')<|docstring|>Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)<|endoftext|> |
777f67464f30f29f170b5b192d158ead4ab73b2016d1ec4f8613dfce7a51e2e0 | def testEzsigntemplateformfieldgroupResponseCompound(self):
'Test EzsigntemplateformfieldgroupResponseCompound'
pass | Test EzsigntemplateformfieldgroupResponseCompound | test/test_ezsigntemplateformfieldgroup_response_compound.py | testEzsigntemplateformfieldgroupResponseCompound | ezmaxinc/eZmax-SDK-python | 0 | python | def testEzsigntemplateformfieldgroupResponseCompound(self):
pass | def testEzsigntemplateformfieldgroupResponseCompound(self):
pass<|docstring|>Test EzsigntemplateformfieldgroupResponseCompound<|endoftext|> |
b9a96652798687d642fbd5923720552fbc077ef9418a27c05bda3a6e7643722b | @property
def key_file(self):
'Get the path to the key file containig our auth key, or None.'
if self.auth_key:
key_file_path = os.path.join(orchestration_mkdtemp(), 'key')
with open(key_file_path, 'w') as fd:
fd.write(self.auth_key)
os.chmod(key_file_path, stat.S_IRUSR)
return key_file_path | Get the path to the key file containig our auth key, or None. | mongo_orchestration/common.py | key_file | DmitryLukyanov/mongo-orchestration | 49 | python | @property
def key_file(self):
if self.auth_key:
key_file_path = os.path.join(orchestration_mkdtemp(), 'key')
with open(key_file_path, 'w') as fd:
fd.write(self.auth_key)
os.chmod(key_file_path, stat.S_IRUSR)
return key_file_path | @property
def key_file(self):
if self.auth_key:
key_file_path = os.path.join(orchestration_mkdtemp(), 'key')
with open(key_file_path, 'w') as fd:
fd.write(self.auth_key)
os.chmod(key_file_path, stat.S_IRUSR)
return key_file_path<|docstring|>Get the path to the key file containig our auth key, or None.<|endoftext|> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.